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

Support {*} and {**} operators in APIRule v2alpha1 path #1397

Closed
16 tasks done
strekm opened this issue Oct 23, 2024 · 0 comments
Closed
16 tasks done

Support {*} and {**} operators in APIRule v2alpha1 path #1397

strekm opened this issue Oct 23, 2024 · 0 comments
Assignees
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Milestone

Comments

@strekm
Copy link
Contributor

strekm commented Oct 23, 2024

Description

Based on outcome of POC and requirements from #1297 extends APIRule v2alpha1 path to support {*} and {**}. {*} and {**} behaviour is matching the one described in AP. It should be possible to use mentioned operators accordingly as described in AP docu. /* is considered secial case in APIRule and it represents wildcard match.

Supported validation examples:

  • /headers
  • /status/{*}
  • /anything/{**}/hello
  • /*

Not supported:

  • /a/* -> this was not working in v1beta1, so there is no reason to support this use case.

For more information see the paths field description in Istio documentation.

TODOs:

  • Extend CRD validation
  • Improve path validation
  • Integration tests for different scenarios
  • Check VS and AP builders if they need adapting
  • Report issue to Istio about when {**} is used twice --> email sent

ACs:

  • it is possible to use {*} and {**} in path
  • {*} and {**} behaviour is matching Istio AuthorizationPolicy behaviour
  • /* matches anything
  • path is validated including above rules
  • path is documented

PRs:

Reasons
Provide convenience for users exposing their workloads

DoD:

  • Provide unit and integration tests.
  • Provide documentation.
  • Verify if the solution works for both open-source Kyma and SAP BTP, Kyma runtime.
  • If you changed the resource limits, explain why it was needed.
  • Verify that your contributions don't decrease code coverage. If they do, explain why this is the case.
  • Add release notes.

Attachments
https://istio.io/latest/docs/reference/config/security/authorization-policy/#Operation
fixes: #1297

@strekm strekm added the kind/feature Categorizes issue or PR as related to a new feature. label Oct 23, 2024
@strekm strekm added this to the 2.9.0 milestone Oct 23, 2024
@strekm strekm changed the title Support wildcard in APIRule v2alpha1 path Support {*} and {**} operators in APIRule v2alpha1 path Oct 24, 2024
@Ressetkk Ressetkk self-assigned this Oct 31, 2024
@barchw barchw assigned barchw and unassigned Ressetkk Nov 4, 2024
@strekm strekm closed this as completed Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

4 participants