hasura-backend-plus
hasura-backend-plus copied to clipboard
Wait loop when using JWKS
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:
- Create environment using provided docker compose
- Change graphql-engine to use JWKS
HASURA_GRAPHQL_JWT_SECRET: '{"type": "RS256", "jwk_url": "http://hasura-backend-plus:3000/auth/jwks"}'
- 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
This can also happen on 2.6.1
, if one container was stopped or recreated, it's impossible to sync them again.
second that. I'm trying to automate deployment using ansible. The way to work around this is
- startup
hasura
(andhbp
) excluding the config settingHASURA_GRAPHQL_JWT_SECRET
- after
hbp
is listening ( e.g. do adocker-compose logs -f hbp
) restart thehasura
service withdocker-compose up -d
this time withHASURA_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