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

ReferenceGrant Core Support #615

Closed
mpstefan opened this issue May 3, 2023 · 0 comments
Closed

ReferenceGrant Core Support #615

mpstefan opened this issue May 3, 2023 · 0 comments
Labels
enhancement New feature or request epic Represents an epic. Contains sub-issues refined Requirements are refined and the issue is ready to be implemented.
Milestone

Comments

@mpstefan
Copy link
Collaborator

mpstefan commented May 3, 2023

For our release of NGINX Gateway v1.0, we need at least core support for the ReferenceGrant API Object as defined in the Kubernetes Gateway API v1beta1. We may want to split this by kinds, but we will also need acceptance criteria to ensure access is updated when the ReferenceGrants are changed in any way.

The API specificiation for ReferenceGrantSpec states that a reference grant is made from a ReferenceGrantFrom to a ReferenceGrantTo, each specifies a different set of objects to target:

ReferenceGrantFrom kinds:

  • If "ReferenceGrantTo" is a SecretObjectReference: Gateway
  • If "ReferenceGrantTo" is a BackendObjectReference: GRPCRoute, HTTPRoute, TCPRoute, TLSRoute, UDPRoute

ReferenceGrantTo kinds:

  • SecretObjectReference (Secret)
  • BackendObjectReference (Service)

Each one of the RerferenceGrantFrom kinds needs to be able to target any one of the ReferenceGrantTo kinds.

Acceptance:

  • The ReferenceGrant should permit Gateways or Routes to reference Secrets or Services across namespace boundaries.
  • Cross-namespace references without a grant should not be permitted.
  • When a ReferenceGrant is changed or removed, the access that the grant allowed should be automatically recalculated and applied accordingly.
  • If a cross-namespace reference is made without an applicable ReferenceGrant, do NOT expose information about the existence of a resource in another namespace. NKG should only report that the ReferenceGrant does not exist to allow this reference. Do not give hints about whether or not the referenced resource exists.
  • Update the documentation
    • Update the compatibility doc
    • Add an example for both Gateway -> Secret and Route -> Backend cross-namespace routing
### Stories
- [ ] https://github.com/nginxinc/nginx-kubernetes-gateway/issues/694
- [ ] https://github.com/nginxinc/nginx-kubernetes-gateway/issues/695
- [ ] https://github.com/nginxinc/nginx-kubernetes-gateway/issues/687

For Discussion:

  • ReferenceGrantFrom includes core support for GRPCRoute, TCPRoute, TLSRoute, and UDPRoute - how does this make sense when those routes are not included in the v1beta1 spec?
  • Does the above split for stories make sense?
@mpstefan mpstefan added this to the v0.5.0 milestone May 3, 2023
@mpstefan mpstefan added the epic Represents an epic. Contains sub-issues label May 3, 2023
@mpstefan mpstefan added the refined Requirements are refined and the issue is ready to be implemented. label May 31, 2023
@mpstefan mpstefan added the enhancement New feature or request label Jun 9, 2023
@mpstefan mpstefan closed this as completed Jul 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request epic Represents an epic. Contains sub-issues refined Requirements are refined and the issue is ready to be implemented.
Projects
None yet
Development

No branches or pull requests

1 participant