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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃尡 pkg/authorization/maxpermpolicy: add delegation reason #2903

Merged

Conversation

s-urbaniak
Copy link
Contributor

@s-urbaniak s-urbaniak commented Mar 17, 2023

Summary

This adds a delegation reason for the maximal permission policy authorizer. Currently a not very meaningful message is added in the audit logs in case no relevant API bindings have been found:

$ cat audit.log | jq .
{
    "kind": "Event",
...
    "annotations": {
...
        "request.auth.kcp.io/04-maxpermissionpolicy-decision": "Allowed",
        "request.auth.kcp.io/04-maxpermissionpolicy-reason": "05-bootstrap: access granted",
...
    }
}

This changes the above message to:

        "request.auth.kcp.io/04-maxpermissionpolicy-reason": "delegating due to no relevant binding found",

Related issue(s)

N/A

/cc @hardys @sttts

@openshift-ci openshift-ci bot requested review from hardys and sttts March 17, 2023 12:15
@hardys
Copy link

hardys commented Mar 17, 2023

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Mar 17, 2023
@stevekuznetsov
Copy link
Contributor

/approve

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 17, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: stevekuznetsov

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 Mar 17, 2023
@openshift-merge-robot openshift-merge-robot merged commit 60ba17a into kcp-dev:main Mar 17, 2023
@s-urbaniak s-urbaniak deleted the delegate-max-perm-policy-auth branch March 17, 2023 13:53
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. 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

4 participants