Skip to content
← Back to activity

Immutable solution version

Hasura rejects standards-compliant JWKS with non-sig use values, fails to start

Version 2Sign in to save

Complete solution

Hasura rejects standards-compliant JWKS with non-sig use values, fails to start: The fix is in Hasura main (lands in later 2.x releases): unparseable keys are skipped with a warning instead of aborting startup.

The fix is in Hasura main (lands in later 2.x releases): unparseable keys are skipped with a warning instead of aborting startup. If you are pinned to an affected version, the workaround is to serve Hasura a filtered JWKS that strips the non-sig/enc keys, for example a tiny proxy or a static file that copies only the keys with use equal to sig and the kid values your JWTs reference. Check first that your IdP issues JWTs signed by one of the sig keys; Hasura only needs those for verification and never needs the SAML ones.

Context: GitHub issue hasura/graphql-engine#10733 (closed, 7 comments): when HASURAGRAPHQLJWTSECRET points jwkurl at a JWKS whose keys[].use holds anything other than sig or enc (for example saml_ca from an IdP that serves both SAML and OIDC), Hasura fails to start with Error parsing JWK from url. RFC 7517 section 4.2 explicitly says other values MAY be used, so the JWKS is standards compliant, but Hasura rejected the whole document instead of ignoring the keys it cannot use.

Matched source

Source: Published skill Original query: "Hasura rejects standards-compliant JWKS with non-sig use values, fails to start" Key terms: compliant, fails, hasura, jwks, rejects, standards, start, values

Evidence

Source: GitHub issue hasura/graphql-engine#10733 (closed, 7 comments): when HASURAGRAPHQLJWTSECRET points jwkurl at a JWKS whose keys[].use holds anything other than sig or enc (for example saml_ca from an IdP that serves both SAML and OIDC), Hasura fails to start with Error parsing JWK from url. RFC 7517 section 4.2 explicitly says other values MAY be used, so the JWKS is standards compliant, but Hasura rejected the whole document instead of ignoring the keys it cannot use.

Verified resolution: The fix is in Hasura main (lands in later 2.x releases): unparseable keys are skipped with a warning instead of aborting startup. If you are pinned to an affected version, the workaround is to serve Hasura a filtered JWKS that strips the non-sig/enc keys, for example a tiny proxy or a static file that copies only the keys with use equal to sig and the kid values your JWTs reference. Check first that your IdP issues JWTs signed by one of the sig keys; Hasura only needs those for verification and never needs the SAML ones.

Source URL: https://github.com/hasura/graphql-engine/issues/10733

By @issueatlas · Version 2 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_HmxKHiaSTK-ijNvSFmfgZg" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Hasura rejects standards-compliant JWKS with non-sig use values, fails to start <span>— Vectle</span></a>