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

Keys used for generating tokens are not refreshed in services #238

Open
doumdi opened this issue Feb 14, 2024 · 0 comments
Open

Keys used for generating tokens are not refreshed in services #238

doumdi opened this issue Feb 14, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@doumdi
Copy link
Member

doumdi commented Feb 14, 2024

Describe the bug
Keys are stored in Redis to generate tokens. They are read when each service starts. However, if TeraServer changes the keys, which might happen in test mode when we completely flush the DB and regenerate default values, then the services are not updated with the new keys and calls to API fail with wrong tokens.

To Reproduce
Steps to reproduce the behavior:

  1. Launch TeraServer in test mode with --enable_tests=1
  2. Launch other services in test mode
  3. Call the /api/tests/database/reset API to flush an regenerate the default DB
  4. Create a new participant and get its static token
  5. Use the new token to call an endpoint on the service (will be generated with the wrong key from the new DB)

Expected behavior
Service must be aware of changes in redis keys and update them in ServiceAccessManager.

@doumdi doumdi added the bug Something isn't working label Feb 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants