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

OCPBUGS-3873: adding rbac for UserOAuthAccessToken #2962

Merged
merged 2 commits into from Aug 31, 2023

Conversation

Patryk-Stefanski
Copy link
Contributor

What this PR does / why we need it:
Adds rbac to hosted clusters to allow users created through OAuth to retrieve the UserOAuthAccessToken

Which issue(s) this PR fixes (optional, use fixes #<issue_number>(, fixes #<issue_number>, ...) format, where issue_number might be a GitHub issue, or a Jira story:
Fixes #

OCPBUGS-3873

Checklist

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.
  • This change includes docs.
  • This change includes unit tests.

@openshift-ci openshift-ci bot added area/control-plane-operator Indicates the PR includes changes for the control plane operator - in an OCP release and removed do-not-merge/needs-area labels Aug 30, 2023
@csrwng
Copy link
Contributor

csrwng commented Aug 30, 2023

/approve

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 30, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: csrwng, Patryk-Stefanski

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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 30, 2023
if r.Annotations == nil {
r.Annotations = map[string]string{}
}
r.Annotations["rbac.authorization.kubernetes.io/autoupdate"] = "true"
Copy link
Member

Choose a reason for hiding this comment

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

Why do we need this annotation?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

not sure if we do or why but Its present in the yaml file I used as a reference (link) aswell as on regular ocp .

Copy link
Member

Choose a reason for hiding this comment

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

can we please investigate and clarify with that team why is needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

https://kubernetes.io/docs/reference/access-authn-authz/rbac/#auto-reconciliation

I don't think we need this as we are already reconciling it, but also don't see any harm in having it. Wdyt @enxebre ?

Copy link
Contributor

Choose a reason for hiding this comment

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

My vote is to leave it on there, given that at some point we may want to honor this annotation in the hcco so that we're in line with kube.

@enxebre
Copy link
Member

enxebre commented Aug 30, 2023

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Aug 30, 2023
@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD a79960b and 2 for PR HEAD ea9d0f6 in total

@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD c9a7ac6 and 1 for PR HEAD ea9d0f6 in total

@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD 8b4b529 and 0 for PR HEAD ea9d0f6 in total

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 31, 2023

@Patryk-Stefanski: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@openshift-merge-robot openshift-merge-robot merged commit ba86f62 into openshift:main Aug 31, 2023
13 checks passed
@Patryk-Stefanski Patryk-Stefanski changed the title OCPBUGS-3873 adding rbac for UserOAuthAccessToken OCPBUGS-3873: adding rbac for UserOAuthAccessToken Sep 5, 2023
@openshift-ci-robot
Copy link

@Patryk-Stefanski: Jira Issue OCPBUGS-3873: All pull requests linked via external trackers have merged:

Jira Issue OCPBUGS-3873 has been moved to the MODIFIED state.

In response to this:

What this PR does / why we need it:
Adds rbac to hosted clusters to allow users created through OAuth to retrieve the UserOAuthAccessToken

Which issue(s) this PR fixes (optional, use fixes #<issue_number>(, fixes #<issue_number>, ...) format, where issue_number might be a GitHub issue, or a Jira story:
Fixes #

OCPBUGS-3873

Checklist

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.
  • This change includes docs.
  • This change includes unit tests.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

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/control-plane-operator Indicates the PR includes changes for the control plane operator - in an OCP release lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants