-
Hi, I've just deployed ory/hydra:1.10.7 across 4 Docker environments (think of these as dev, stage, test, prod). As far as I can tell, the environments are more or less identical. The test and prod environments are running 2 copies of the Docker image, for H/A reasons. dev/stage run just one each. I have not issued any oAuth2 keys yet in these environments. Every environment has got these Hydra environment variables set (obviously I'm just showing the names here):
But for some reason, just one environment (the test environment) has two JWKs at /.well-known/jwks.json, and I don't understand this difference. All the other three environments (dev, stage and prod) have just one key at this URL. I didn't manually create any keys in any of the environments - whatever's there has been added automatically by Hydra during provisioning. Can anyone explain what might cause this second key in just one environment? Is it a problem? Does the key get generated on the first HTTP request to Hydra? My only theory was it was the loadbalancer's very first health checks to the two containers when they came up, which might've occurred at exactly the same time. But, I'm surprised that that didn't happen in the prod environment as well, unless it's pure chance.. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
I dropped the database, recreated and re-migrated (seeded) it, and then stopped my containers to let them respawn... and now I have just the one key, which is more like what I'd expect. I saw this in the logs of one of the containers:
The other container only had the https-tls one:
My theory is that both containers both generated keys at the same time, the first time they came online. A purely-by-chance timing thing. Would it be a problem? And would it be a problem that there might be two https-tls keys? Or am I worrying about nothing? :) |
Beta Was this translation helpful? Give feedback.
-
This shouldn't be a problem! This can happen when two workers start on an empty database. So we recommend to use one instance for the initial set up of the database and then later on have multiple / HA set up :) This is only relevant for the first time when you install the database. |
Beta Was this translation helpful? Give feedback.
This shouldn't be a problem! This can happen when two workers start on an empty database. So we recommend to use one instance for the initial set up of the database and then later on have multiple / HA set up :) This is only relevant for the first time when you install the database.