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

Allow adding claims to the OIDC token request #1951

Merged
merged 1 commit into from
Feb 27, 2023
Merged

Conversation

triarius
Copy link
Contributor

@triarius triarius commented Feb 14, 2023

This adds a new claim flag that may be specified multiple times to add elements to a claims field to the JSON body of the OIDC token request to buildkite.com.

@triarius triarius force-pushed the pdp-554-oidc-claim-flag branch from 7e1b4d0 to 6900983 Compare February 14, 2023 22:16
@triarius triarius marked this pull request as ready for review February 26, 2023 23:21
Copy link
Member

@sj26 sj26 left a comment

Choose a reason for hiding this comment

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

I tried this with the newly-available claims parameter on the agent api and it works a treat — thanks!

buildkite-agent oidc request-token --claim organization_id --claim pipeline_id | jwt decode -

...

Token claims
------------
{
...
  "organization_id": "(a correct uuid)",
  "organization_slug": "my-test-account",
  "pipeline_id": "(a correct uuid)",
  "pipeline_slug": "test",
...
}

@triarius triarius merged commit a45022c into main Feb 27, 2023
@triarius triarius deleted the pdp-554-oidc-claim-flag branch February 27, 2023 01:56
@sj26
Copy link
Member

sj26 commented Feb 27, 2023

💚

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