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

Add authorization handler #5

Merged
merged 1 commit into from
Nov 6, 2023

Conversation

jhernand
Copy link
Collaborator

@jhernand jhernand commented Nov 6, 2023

This patch adds an authorization handler that restricts access to subjects that match a access control list. The items of the control list are pairs of claim names and regular expressions. For example, the following access control list grants access only to the subjects that have the sub claim with the value mysubject:

- claim: sub
  pattern: ^mysubject$

Files containing these items are specified with the --authz-acl-file command line option, which can be repeated multiple times.

If no ACL files are specified then there is no restriction: all authenticated subjects will be granted access.

If there is at least one ACL file specified then only subjects that match at least one item will be granted access.

Related: https://issues.redhat.com/browse/MGMT-16123

This patch adds an authorization handler that restricts access to
subjects that match a access control list. The items of the control list
are pairs of claim names and regular expressions. For example, the
following access control list grants access only to the subjects that
have the `sub` claim with the value `mysubject`:

```yaml
- claim: sub
  pattern: ^mysubject$
```

Files containing these items are specified with the `--authz-acl-file`
command line option, which can be repeated multiple times.

If no ACL files are specified then there is no restriction: all
authenticated subjects will be granted access.

If there is at least one ACL file specified then only subjects that
match at least one item will be granted access.

Related: https://issues.redhat.com/browse/MGMT-16123
Signed-off-by: Juan Hernandez <[email protected]>
@jhernand jhernand merged commit 81c6327 into openshift-kni:main Nov 6, 2023
4 checks passed
@jhernand jhernand deleted the add_authorization_handler branch November 6, 2023 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant