question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

support multiple JWT secrets

See original GitHub issue

for admin secret, we can set in the environment variable: HASURA_GRAPHQL_ADMIN_SECRET and pass x-hasura-admin-secret in header to authorize the permission.

in my scenario, i have two applications sharing the same Hasura API server. Theses two applications have their own JWT secret (specifically different jwk_url). I don’t want to duplicate the Hasura server to handle these two applications.

is it possible to set multiple JWT secrets into Hasura server? or pass the jwt secret to Hasura in header like x-hasura-jwt-secret? or specifically select the jwk_url in run-time?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:36
  • Comments:46 (7 by maintainers)

github_iconTop GitHub Comments

24reactions
tirumaraiselvancommented, Apr 27, 2022

Hey folks, this is available in Hasura Cloud (v2.3 onwards). The docs are available here: https://hasura.io/docs/latest/graphql/cloud/security/multiple-jwt-secrets/

If you are not on Cloud, there is a simple workaround:

  1. Create a new endpoint that combines the result of all your JWK providers.
  2. Use this endpoint as the jwk_url in a single JWT Secret configuration.
12reactions
smunozpcommented, Mar 30, 2020

Hello

There is any update in this? We have the same situation, we want to serve multitennant with the same server

Read more comments on GitHub >

github_iconTop Results From Across the Web

Multiple JWT Secrets | Hasura GraphQL Docs
Multiple JWT secrets can be provided in the env var HASURA_GRAPHQL_JWT_SECRETS which takes a list of JWT secret objects. For example:.
Read more >
passport.js - How to implement multiple JWT strategies using ...
I recently created a package for managing this, extending passport-jwt to allow an array of passport-jwt configurations ...
Read more >
How to support different JWTs in your Spring Boot application
A practical guide with code examples on how to support multiple JWTs signed by different issuers (in most cases authorization servers).
Read more >
Multibrand - Using multiple JWT single sign-on URLs
Multibrand allows you to control all your company brands in a single Zendesk Support instance. However, security settings will only allow ...
Read more >
11 JWT Token Security Best Practices | Curity
A JSON Web Token (JWT, pronounced "jot") is a compact and URL-safe way of ... signing try to use ephemeral secrets, which will...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found