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

feat: Allow users to add more Audiences to OpenID Connect #1451

Merged
merged 4 commits into from
Aug 31, 2021

Conversation

cabrinha
Copy link
Contributor

@cabrinha cabrinha commented Jun 17, 2021

PR o'clock

Fixes #1145

Description

I'd like to add more audiences to the OpenID Connect Provider: #1145

Checklist

@github-actions
Copy link

Thank you for your contribution!

The CHANGELOG.md file contents are handled by the maintainers during merge. This is to prevent pull request merge conflicts.
Please see the Contributing Guide for additional pull request review items.

Remove any changes to the CHANGELOG.md file and commit them in this pull request.

@cabrinha cabrinha force-pushed the feat/sts-audience branch from 4102005 to bc4f007 Compare June 17, 2021 18:14
@cabrinha cabrinha changed the title feat/sts-audience: Allow users to add more Audiences to OpenID Connect feat: Allow users to add more Audiences to OpenID Connect Jun 17, 2021
@cabrinha cabrinha force-pushed the feat/sts-audience branch 2 times, most recently from e8a2bd0 to a96eec8 Compare June 17, 2021 18:20
@cabrinha cabrinha force-pushed the feat/sts-audience branch from a96eec8 to dba8048 Compare June 17, 2021 18:22
@cabrinha
Copy link
Contributor Author

@barryib can I get a review on this one?

Copy link
Contributor

@daroga0002 daroga0002 left a comment

Choose a reason for hiding this comment

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

I have studied #1145 and I understand pain. In shortcut EKS module is working here correctly for China region but 3rd party tooling using IRSA roles is not aware that China has local sts endpoint sts.amazonaws.com.cn. 3rd party tooling using IRSA roles are trying to authorise in sts.amazonaws.com which is not in openid audience so it is not working.

This change is just adding new possible variable which will solve a lot of issues for China (and GOV?) regions.

@antonbabenko I think it is ok to merge 👍

@daroga0002 daroga0002 self-requested a review August 30, 2021 19:30
local.tf Outdated Show resolved Hide resolved
@antonbabenko
Copy link
Member

Hi @cabrinha and thanks for the PR!

v17.5.0 has been just released.

@lisfo4ka
Copy link
Contributor

lisfo4ka commented Aug 31, 2021

@antonbabenko @daroga0002 @cabrinha folks, maybe it's too late to claim, but I assume that the name of the variable with the client id list should be something other than sts_principal since it can contain not only STS endpoint but any client ID that identifies the application. See an example, in the doc https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_openid_connect_provider
So I'm back to suggest the change from my PR #1557 to have the separate variable for a full list with client ids. What do you think about this?

@daroga0002
Copy link
Contributor

if I understand correctly you want just to change a locals variable name?

I think as this PR was arleady merged and there was created release input variable should stay as is (openid_connect_audiences) but locals probably can be adjusted as this will make sense and will not cause any user facing changes.

@antonbabenko
Copy link
Member

@lisfo4ka Isn't sts a required item in the context of this module? I mean, sometimes one may want to have another value but in this module, EKS always expects to have at least one sts... item, right?

@lisfo4ka
Copy link
Contributor

lisfo4ka commented Sep 1, 2021

@daroga0002 yes, you're right, I've meant just a local variable renaming.

But I see now that it's really not so important change since for the IRSA option the client id list will contain STS endpoints only. Thanks, @antonbabenko.

So let's leave as it is?

@antonbabenko
Copy link
Member

We can rename locals name without any problems. client_id_list as a local name, and value wrapped with distinct() would be great. Please make a PR.

@lisfo4ka
Copy link
Contributor

lisfo4ka commented Sep 1, 2021

@antonbabenko @daroga0002 please, find the discussed changes in #1561.
I've tested it with the latest master.

@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

enable_irsa=true creates OIDC provider with audience pointing to global sts endpoint (sts.amazonaws.com)
5 participants