jenkinsci / oidc-provider-plugin

OpenID Connect Provider Plugin for Jenkins
https://plugins.jenkins.io/oidc-provider/
MIT License
22 stars 13 forks source link

[Fix #14] Add git_branch and git_revision claims #16

Closed LucaPrete closed 1 year ago

LucaPrete commented 2 years ago

Adds the git_branch and git_revision claims to the JWT token if the related ${GIT_BRANCH} and ${GIT_REVISION} token macro variables are present. These variables are automatically made available by the git Jenkins plugin through the token macro plugin.

LucaPrete commented 1 year ago

Hello @jglick I'm not sure I understood the direction we want to take on this and the latest comments. Is there any way I can reach you out somewhere on a chat or in a call to discuss further and close the PR?

Thanks

jglick commented 1 year ago

I am afraid at the moment I do not have time to work on this plugin or even think about it much. I probably need to put it up for adoption.

My idea here was to hard-code a list of environment variables (normally defined by BranchNameContributor) which would be exposed in id tokens as claims of the same name (but lowercased). So you would get at least branch_name. No need for token-macro.

Allowing an IdTokenCredentials configurer to pick the variables to expose, or especially to pick the claim names, seems potentially dangerous as in https://github.com/jenkinsci/oidc-provider-plugin/pull/15#issuecomment-1212091098.

jglick commented 1 year ago

I think #18 handles your use cases.

LucaPrete commented 1 year ago

Fantastic. Thank you. I’ll look into it.

Il giorno sab 24 set 2022 alle 16:16 Jesse Glick @.***> ha scritto:

I think #18 https://github.com/jenkinsci/oidc-provider-plugin/pull/18 handles your use cases.

— Reply to this email directly, view it on GitHub https://github.com/jenkinsci/oidc-provider-plugin/pull/16#issuecomment-1256978766, or unsubscribe https://github.com/notifications/unsubscribe-auth/AARY7UASHUVU7JLIM2B2MHDV74EL3ANCNFSM56WKG5SA . You are receiving this because you authored the thread.Message ID: @.***>

jglick commented 1 year ago

Superseded by #18.