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

Client invalid sdk key error using automatic config profile #112

Closed
simonkotwicz opened this issue Nov 24, 2020 · 3 comments
Closed

Client invalid sdk key error using automatic config profile #112

simonkotwicz opened this issue Nov 24, 2020 · 3 comments

Comments

@simonkotwicz
Copy link
Contributor

simonkotwicz commented Nov 24, 2020

Describe the bug
If you rotate an environment's SDK key and start the relay proxy, clients started with the old SDK key get a 401 invalid SDK key error.

To reproduce

  • Start the relay proxy using an automatic configuration profile (eg. docker run --rm -p 8030:8030 --name ld-relay -e AUTO_CONFIG_KEY="***" launchdarkly/ld-relay)
  • Start an ld client that talks to the relay proxy
  • Rotate an environment's sdk key so that there are two valid sdk keys (new and old)
  • At this point, the relay proxy is notified of the change in the sdk key and everything still works
  • Restart the relay proxy (you should see a log message like Old SDK key ending in *** for environment *** (*** ***) will expire at *** when the relay proxy starts)
  • The client gets an error ERROR: Error in stream connection (giving up permanently): HTTP error 401 (invalid SDK key)

Relay version
launchdarkly/ld-relay@sha256:2a3bdc8d8adf774a1631d7f13bacac5a8e9e89cdb2ce84f662104a3bb4be11fa

@simonkotwicz simonkotwicz changed the title Invalid sdk key error talking to relay proxy using automatic configuration profile Client invalid sdk key error using automatic config profile Nov 24, 2020
@eli-darkly
Copy link
Contributor

Could I ask you to submit this as a support request instead of a GitHub issue? It's not for sure that this is a bug in the Relay Proxy code (as opposed to an issue with how the LaunchDarkly service sends data to the Relay Proxy), and in order to diagnose this problem we might need to ask you for account information or log data that shouldn't be posted publicly on GitHub, so it would be better to have a support ticket.

@eli-darkly
Copy link
Contributor

Actually, never mind that; I was originally unable to reproduce the problem so I thought we might have to investigate further through support, but then I identified a mistake in my test procedure and proved that this is indeed a problem in the Relay Proxy code— one that unfortunately we had a gap in test coverage for. It should be a straightforward fix. Thanks for reporting this!

@eli-darkly
Copy link
Contributor

We've released version 6.1.1, which should fix this. Sorry for the inconvenience and thanks for pointing out the problem.

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

2 participants