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

DIG-898: allow service_token to view user_key #56

Merged
merged 1 commit into from
May 1, 2024
Merged

Conversation

daisieh
Copy link
Member

@daisieh daisieh commented May 1, 2024

Specifically allow the service token to view the decoded user key.

To test: clean/docker-volumes/build/compose opa, then try calling

curl -X "POST" "http://candig.docker.internal:8181/v1/data/idp" \
     -H 'Content-Type: application/json' \
     -H 'Accept: application/json' \
     -H 'X-Opa: opa-service-token' \
     -d $'{
  "input": {
    "token": "user token"
  }
}'

You should get the value of the user key (the email) as a response.

@daisieh daisieh requested a review from OrdiNeu May 1, 2024 18:50
Copy link
Contributor

@OrdiNeu OrdiNeu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works as expected for a service token ✔️ I double checked the JWT manually as well

@daisieh daisieh merged commit a989584 into develop May 1, 2024
2 checks passed
@daisieh daisieh deleted the daisieh/user_id branch May 1, 2024 20:31
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