Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wait loop when using JWKS #634

Open
SVerkuil opened this issue Jul 20, 2021 · 2 comments
Open

Wait loop when using JWKS #634

SVerkuil opened this issue Jul 20, 2021 · 2 comments

Comments

@SVerkuil
Copy link

Describe the bug
When using JWKS hasura-backend-plus will wait with starting until hasura (graphql-engine) is ready. But graphql-engine will never become ready because it will wait for the JWKS endpoint of hasura-backend-plus to become ready first.

To Reproduce
Steps to reproduce the behavior:

  1. Create environment using provided docker compose
  2. Change graphql-engine to use JWKS HASURA_GRAPHQL_JWT_SECRET: '{"type": "RS256", "jwk_url": "http://hasura-backend-plus:3000/auth/jwks"}'
  3. Observe logs of hasura-backend-plus (crash loop) and graphql-engine (crash on JWKS)

Expected behavior
The hasura-backend-plus application should expose JWKS endpoint on app startup even if Hasura is not ready

Additional context
hasura-backend-plus 2.6.1 works fine, JWKS api is broken in 2.7.1

@pk992
Copy link

pk992 commented Jul 29, 2021

This can also happen on 2.6.1, if one container was stopped or recreated, it's impossible to sync them again.

@paulbalomiri
Copy link

second that.
I'm trying to automate deployment using ansible. The way to work around this is

  • startup hasura (and hbp) excluding the config setting HASURA_GRAPHQL_JWT_SECRET
  • after hbp is listening ( e.g. do a docker-compose logs -f hbp) restart the hasura service with docker-compose up -d this time with HASURA_GRAPHQL_JWT_SECRET properly set

my docker images are:

    image: hasura/graphql-engine:v2.0.3.cli-migrations-v3
    image: nhost/hasura-backend-plus:latest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants