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

Opa should always renew its IDP information #63

Merged
merged 5 commits into from
Jun 3, 2024
Merged

Conversation

daisieh
Copy link
Member

@daisieh daisieh commented Jun 1, 2024

In case the underlying Keycloak instance changes and therefore our saved IdP keys are invalidated, we need to make sure that we can update the value in Opa's vault store.

The authx change allows for us to call authx.auth.add_provider_to_opa again with our bearer token and update the value in vault any time the file /app/bearer.txt is found on startup.

To test: get a site admin token and save it to a file test.txt. Then run

docker cp test.txt candigv2_opa-runner_1:/app/bearer.txt
docker restart candigv2_opa-runner_1

You should see a log message Updating our IDP with a new bearer token at the time you did that. You should NOT see a message following that says IDP is incorrect: verify that Keycloak is set up and clean/build/compose opa again.

@daisieh daisieh requested a review from kcranston June 1, 2024 01:23
@daisieh daisieh merged commit c55bb03 into develop Jun 3, 2024
2 checks passed
@daisieh daisieh deleted the daisieh/renew-idp branch June 3, 2024 18:15
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

Successfully merging this pull request may close these issues.

2 participants