Skip to content

ECDSA JWT parsing uses JWTSecret instead of JWTPublicKey #476

@lakhansamani

Description

@lakhansamani

Bug Description

In internal/token/jwt.go:67, the ParseJWTToken function uses p.config.JWTSecret instead of p.config.JWTPublicKey for ECDSA (ES256/ES384/ES512) token validation.

Signing correctly uses JWTPrivateKey, but parsing incorrectly uses JWTSecret instead of JWTPublicKey.

Impact

CRITICAL — All ECDSA token validation is broken. Tokens signed with ECDSA private key cannot be verified since the wrong key material is used for parsing.

Fix

Change p.config.JWTSecretp.config.JWTPublicKey on line 67 of internal/token/jwt.go.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions