Support Workload Identity Federation flow#1109
Support Workload Identity Federation flow#1109JorTurFer wants to merge 29 commits intostackitcloud:mainfrom
Conversation
| if sdkConfig.ServiceAccountFederatedTokenFunc == nil && getEnvBoolIfValueAbsent(providerConfig.UseOIDC, "STACKIT_USE_OIDC") { | ||
| sdkConfig.WorkloadIdentityFederation = true | ||
| // https://docs.github.com/en/actions/reference/security/oidc#methods-for-requesting-the-oidc-token | ||
| oidcReqURL := getEnvStringOrDefault(providerConfig.OIDCTokenRequestURL, "ACTIONS_ID_TOKEN_REQUEST_URL", "") | ||
| oidcReqToken := getEnvStringOrDefault(providerConfig.OIDCTokenRequestToken, "ACTIONS_ID_TOKEN_REQUEST_TOKEN", "") | ||
| if oidcReqURL != "" && oidcReqToken != "" { | ||
| sdkConfig.ServiceAccountFederatedTokenFunc = oidcadapters.RequestGHOIDCToken(oidcReqURL, oidcReqToken) | ||
| } |
There was a problem hiding this comment.
Is this implementation Github specific? If yes, I think the env STACKIT_USE_OIDC could be confusing, because it sounds more generic, but it enables only OIDC for Github.
There was a problem hiding this comment.
This is Github specific but next step is to support AzDO too (I'm on it but it required a task on AzDO). I've used a generic name because of that, but I can change it if you prefer.
There was a problem hiding this comment.
Also, there is an option to provide the OIDC token by your own, so I'd not change this
|
This PR was marked as stale after 7 days of inactivity and will be closed after another 7 days of further inactivity. If this PR should be kept open, just add a comment, remove the stale label or push new commits to it. |
Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es>
Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es>
Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es>
Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es>
Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es>
Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es>
Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es>
Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es>
Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es>
Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es>
Co-authored-by: Marcel Jacek <72880145+marceljk@users.noreply.github.com>
Signed-off-by: Jorge Turrado <jorge.turrado@mail.schwarz>
4ad56b1 to
dadceb9
Compare
Signed-off-by: Jorge Turrado <jorge.turrado@mail.schwarz>
Signed-off-by: Jorge Turrado <jorge.turrado@mail.schwarz>
Signed-off-by: Jorge Turrado <jorge.turrado@mail.schwarz>
Description
Aligned with the incoming workload identity federation feature, this PR support workload identity federation flow
This PR from the SDK is needed -> stackitcloud/stackit-sdk-go#4074
Checklist
make fmtexamples/directory)make generate-docs(will be checked by CI)make test(will be checked by CI)make lint(will be checked by CI)