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

APIRule v2alpha1 Authorization Policy #18768

Open
I551317 opened this issue Jan 14, 2025 · 0 comments
Open

APIRule v2alpha1 Authorization Policy #18768

I551317 opened this issue Jan 14, 2025 · 0 comments

Comments

@I551317
Copy link

I551317 commented Jan 14, 2025

When a new 'APIRule' is created a new Istio 'AuthorizationPolicy' is created in an automatic way as well. Such an approach brings a following problem: if I have another application (AppRouter) that routes traffic to the same 'Service' and backend application as 'APIRule', we are getting 'RBAC: Access Denied error' calling AppRouter endpoints.

I wonder if there is possibility to somehow either override created 'AuthorizationPolicy' or not to create that in an automatic way at all (if other 'AuthorizationPolicy' already exist in the namespace)?

Deployed API Rule:

---
apiVersion: gateway.kyma-project.io/v2alpha1
kind: APIRule
metadata:
  name: customer-connectivity-data-api
  namespace: rcc-1872-con-acc
spec:
  gateway: kyma-system/kyma-gateway
  hosts:
    - connectivity-data-rcc-1872-con-acc
  rules:
    - methods:
        - GET
        - POST
        - PATCH
        - DELETE
        - OPTIONS
      noAuth: true
      path: /*
  service:
    name: customer-connectivity-data-lb
    namespace: rcc-1872-con-acc
    port: 81

Created AuthorizationPolicy:

---
apiVersion: security.istio.io/v1beta1
kind: AuthorizationPolicy
metadata:
  name: customer-connectivity-data-api-xqs7b
  namespace: rcc-1872-con-acc
spec:
  rules:
    - from:
        - source:
            principals:
              - >-
                cluster.local/ns/istio-system/sa/istio-ingressgateway-service-account
      to:
        - operation:
            methods:
              - GET
              - POST
              - PATCH
              - DELETE
              - OPTIONS
            paths:
              - /{**}
  selector:
    matchLabels:
      app: customer-connectivity-data-app

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

No branches or pull requests

1 participant