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
I was trying to overwrite "hydra.jwt.access-token" by importing a set of jwt from command line. The sid and kid were swapped when stored in the database. Looking at the source code, the caller of the JwkApi.SetJsonWebKey is passing in the arguments in the wrong order.
Function: func (a *JwkApiService) SetJsonWebKey(ctx context.Context, set string, kid string)
Preflight checklist
Describe the bug
I was trying to overwrite "hydra.jwt.access-token" by importing a set of jwt from command line. The sid and kid were swapped when stored in the database. Looking at the source code, the caller of the JwkApi.SetJsonWebKey is passing in the arguments in the wrong order.
Function: func (a *JwkApiService) SetJsonWebKey(ctx context.Context, set string, kid string)
Caller: m.JwkApi.SetJsonWebKey(cmd.Context(), k.Kid, set).JsonWebKey(k).Execute()
Reproducing the bug
hydra import jwk "hydra.jwt.access-token" --skip-tls-verify --use sig /etc/ssl/certs/ecdsakey.json /etc/ssl/certs/ecdsapub.json --alg ES384 -e $HYDRA_ADMIN_URL
"hydra.jwt.access-token" will be safe as the kid. Sid will be auto-generated.
Relevant log output
No response
Relevant configuration
No response
Version
v2.0.1
On which operating system are you observing this issue?
Windows
In which environment are you deploying?
Docker Compose
Additional Context
Possible workaround (not ideal), set the kid as "hydra.jwt.access-token" so that the arguments are swapped back...
The text was updated successfully, but these errors were encountered: