Skip to content

Investigate whether we should make the source field in an AccessPolicyRule optional #208

@haiyanmeng

Description

@haiyanmeng

Context: #193 (comment)

The source field is required currently. An AccessPolicyRule applying to all the agents looks like:

apiVersion: agentic.prototype.x-k8s.io/v0alpha0
kind: XAccessPolicy
metadata:
  name: e2e-gateway-extauth-policy
  namespace: e2e-test-ns
spec:
  targetRefs:
  - ...
  rules:
  - name: ext-authz-rule
    source:
      type: ServiceAccount
    authorization:
      type: ExternalAuth
      externalAuth:
        ...

I wonder whether we should make it optional. If the field is optional, An AccessPolicyRule applying to all the agents looks like:

apiVersion: agentic.prototype.x-k8s.io/v0alpha0
kind: XAccessPolicy
metadata:
  name: e2e-gateway-extauth-policy
  namespace: e2e-test-ns
spec:
  targetRefs:
  - ...
  rules:
  - name: ext-authz-rule
    authorization:
      type: ExternalAuth
      externalAuth:
        ...

cc @guicassolato @LiorLieberman @david-martin

Metadata

Metadata

Assignees

Labels

kind/featureCategorizes issue or PR as related to a new feature.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions