Skip to content

default api audiences to service account token issuer if available #70308

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

Merged
merged 1 commit into from
Oct 30, 2018

Conversation

mikedanese
Copy link
Member

This is a sane default that users can choose to migrate away from later.

Fixes #70104

/kind feature
/sig auth

--api-audiences now defaults to the --service-account-issuer if the issuer is provided but the API audience is not.

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/feature Categorizes issue or PR as related to a new feature. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. sig/auth Categorizes an issue or PR as relevant to SIG Auth. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Oct 26, 2018
@k8s-ci-robot k8s-ci-robot added area/apiserver sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. labels Oct 26, 2018
@mikedanese mikedanese force-pushed the trev7 branch 2 times, most recently from 3918ef3 to 7ad2476 Compare October 26, 2018 22:48
@mikedanese
Copy link
Member Author

/retest

@roycaihw
Copy link
Member

/assign @yliaog

Copy link
Member

@liggitt liggitt left a comment

Choose a reason for hiding this comment

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

update the flag help to indicate what it defaults to

@@ -328,11 +329,14 @@ func (s *BuiltInAuthenticationOptions) ToAuthenticationConfig() kubeauthenticato
}

if s.ServiceAccounts != nil {
if s.ServiceAccounts.Issuer != "" && len(s.APIAudiences) == 0 {
Copy link
Member

Choose a reason for hiding this comment

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

try to avoid mutating s, modify the returned config instead?

This is a sane default that users can choose to migrate away from later.
@mikedanese
Copy link
Member Author

/retest

@liggitt
Copy link
Member

liggitt commented Oct 30, 2018

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 30, 2018
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: liggitt, mikedanese

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 30, 2018
@k8s-ci-robot k8s-ci-robot merged commit 1f0f4cd into kubernetes:master Oct 30, 2018
@mikedanese mikedanese deleted the trev7 branch October 30, 2018 05:09
george-angel added a commit to utilitywarehouse/tf_kube_ignition that referenced this pull request Dec 10, 2020
```
Error: --service-account-signing-key-file, --service-account-issuer, and --api-audiences should be specified together
```

kubernetes/kubernetes#70308
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/apiserver cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/auth Categorizes an issue or PR as relevant to SIG Auth. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants