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

maskinporten: add validation rule for exposed scopes #220

Merged
merged 1 commit into from
Jun 4, 2024

Conversation

tronghn
Copy link
Contributor

@tronghn tronghn commented Apr 30, 2024

The delegationSource field for exposed scopes is optional. However if delegationSource is set, the separator field must accordingly be set to "/" due to some arcane validation logic in Altinn (see previous PR: #214)

This adds a CEL validation rule to the CRD schema that enforces this logic.

See also:

@tronghn tronghn requested a review from a team as a code owner April 30, 2024 13:20
…ource set

The `delegationSource` field for exposed scopes is optional.
However, if `delegationSource` is set, the separator field must accordingly be set to `"/"` due to some arcane validation logic in Altinn (see previous PR: #214)

This commit adds a CEL validation rule to the CRD schema that enforces this logic.

See also:
- https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#validation-rules
- https://kubernetes.io/docs/reference/access-authn-authz/validating-admission-policy/#optional-parameters
@tronghn tronghn force-pushed the maskinporten-validate-delegation branch from 5a1f6cd to 4f74631 Compare June 4, 2024 11:32
@tronghn tronghn merged commit 30ca183 into main Jun 4, 2024
8 checks passed
@tronghn tronghn deleted the maskinporten-validate-delegation branch June 4, 2024 12:07
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