You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[security] - JWT does not check Issuer/Audience binding (omits context validation) #91
Description: ValidateToken function only checks signing method and expiry date; does not bind Issuer/Audience to expected value → can accept tokens valid for signature but issued from other issuers.
Location: pkg/auth/jwt_manager.go and shared/shieldx-common/pkg/auth/jwt_manager.go (function ValidateToken).
Suggestion: Use parser with strict option: jwt.NewParser(jwt.WithValidMethods(["RS256"]), jwt.WithIssuer(expectedIssuer), jwt.WithAudience(expectedAud)); after parsing, check claims.Issuer, claims.Audience, claims.Subject according to config; consider kid rotation and JWKS.
Complete when: Unit test wrong token issuer/audience is rejected; issuer/audience configuration exists via environment variable/secret.
Activity