xmtpd
xmtpd copied to clipboard
JWTVerifier interceptor does not enforce auth
When a request to the server carries the proper JWT, the auth interceptor sets:
ctx = context.WithValue(ctx, constants.VerifiedNodeRequestCtxKey{}, true)
Afterwards, no handler actually checks the context value.
This means:
- All endpoints are optionally authenticated - they accept both authenticated and unauthenticated requests.
- The interceptor only validates tokens when they're present, but doesn't enforce their presence.
- The
VerifiedNodeRequestCtxKeycontext value exists but is unused (except in tests).