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
Attempting to validate the abotained authentication token against the OIDC server after it was restarted, resulted in the following error:
failed to exchange token: invalid signature (signature verification failed: square/go-jose: error in cryptographic primitive)
The issue looks to be in the client\rp\jwks.go file, on VerifySignature method where, if the verifySignatureCached return the "invalid signature (signature verification failed: square/go-jose: error in cryptographic primitive)" error and due to this returned error the verifySignatureRemote which refresh the signature with the server is not called
If you meant to refer to code inside the repository, use permanent links
Please use a recent version of OIDC. 1.13.2 is no longer supported. v3 is supported by zitadel. v2 is based on community support only.
Regarding the contents:
What do you mean by "server"? Are you using an implementation of our op.Provider with storage, are you using zitadel, another product? How would I be able to reproduce those steps?
Preflight Checklist
Version
1.13.2
Describe the problem caused by this bug
Attempting to validate the abotained authentication token against the OIDC server after it was restarted, resulted in the following error:
failed to exchange token: invalid signature (signature verification failed: square/go-jose: error in cryptographic primitive)
The issue looks to be in the client\rp\jwks.go file, on VerifySignature method where, if the verifySignatureCached return the "invalid signature (signature verification failed: square/go-jose: error in cryptographic primitive)" error and due to this returned error the verifySignatureRemote which refresh the signature with the server is not called
Now:
func (r *remoteKeySet) VerifySignature(ctx context.Context, jws *jose.JSONWebSignature) ([]byte, error) { keyID, alg := oidc.GetKeyIDAndAlg(jws) if alg == "" { alg = r.defaultAlg } payload, err := r.verifySignatureCached(jws, keyID, alg) if payload != nil { return payload, nil } if err != nil { return nil, err } return r.verifySignatureRemote(ctx, jws, keyID, alg) }
To reproduce
Screenshots
No response
Expected behavior
Additional Context
No response
The text was updated successfully, but these errors were encountered: