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 custom service account issuer without public bucket #14991

Merged

Conversation

hakman
Copy link
Member

@hakman hakman commented Jan 13, 2023

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jan 13, 2023
@hakman
Copy link
Member Author

hakman commented Jan 13, 2023

/test pull-kops-e2e-k8s-aws-calico

@johngmyers
Copy link
Member

As stated in Office Hours, I would like there to be more documentation around this use case.

@johngmyers
Copy link
Member

I read over the existing documentation. It states:

The enableAWSOIDCProvider configures AWS to trust the service account issuer to
authenticate service accounts for IAM Roles for Service Accounts (IRSA). In order for this to work,
the service account issuer discovery URL must be publicly readable.

This is true, though it should probably more specifically state that spec.kubeAPIServer.serviceAccountIssuer is what must be publicly readable.

The must-be-publicly-readable requirement could be made conditional on enableAWSOIDCProvider: true since it is AWS IAM that makes that requirement. Technically, we should be applying the requirement of being publicly readable to serviceAccountIssuer instead of discoveryStore, but that's a bit difficult now.

We should document the conditions under which kOps sets object-level ACLs. I'm wondering if we should deprecate the object-level ACLs.

@olemarkus
Copy link
Member

We should document the conditions under which kOps sets object-level ACLs. I'm wondering if we should deprecate the object-level ACLs.

There is something off with the logic today, I believe. But the object-level ACL is somewhat critical in the cases where public buckets are used as state store (like e.g our e2e tests). But the ACL should only tighten the restrictions. Right now, it is also trying to loosen the restrictions (public objects in private buckets), which fail.

@johngmyers
Copy link
Member

I was referring to the PublicACL field of ManagedFile.

There's other code that sets public-read for the fileRepository on S3. That should probably also be deprecated. The fileRepository doesn't have to be public in the first place.

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle stale
  • Close this PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 6, 2023
@hakman
Copy link
Member Author

hakman commented Aug 1, 2023

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Aug 1, 2023
@johngmyers
Copy link
Member

I think what we need is to update the documentation in cluster_spec.md stating the conditions in which it will set object-level public-read ACLs, namely that it is in S3, there is no whole-bucket public ACL, and the kubeAPIServer.serviceAccountIssuer hasn't been overridden to point somewhere else.

@hakman hakman force-pushed the custom_service-account-issuer_url branch from 1798861 to 17d313e Compare August 31, 2023 13:37
@justinsb
Copy link
Member

We discussed in office hours, this unblocks some users hitting this problem, so we're going to merge this and hopefully document it more fully over time.

Thanks @hakman

/approve
/lgtm

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: justinsb

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 Aug 31, 2023
k8s-ci-robot added a commit that referenced this pull request Aug 31, 2023
…-upstream-release-1.27

Automated cherry pick of #14991: Allow custom service account issuer without public bucket
@k8s-ci-robot k8s-ci-robot merged commit 54ab9ea into kubernetes:master Aug 31, 2023
8 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.28 milestone Aug 31, 2023
@hakman hakman deleted the custom_service-account-issuer_url branch August 31, 2023 14:45
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. 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.

6 participants