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 multiple Gateway Listener certificateRefs #2604

Open
4 tasks
rainest opened this issue Jun 23, 2022 · 2 comments
Open
4 tasks

Support multiple Gateway Listener certificateRefs #2604

rainest opened this issue Jun 23, 2022 · 2 comments
Labels
area/feature New feature or request area/gateway-api Relating to upstream Kubernetes SIG Networking Gateway API good first issue Good for newcomers nice-to-have size/S

Comments

@rainest
Copy link
Contributor

rainest commented Jun 23, 2022

Per https://gateway-api.sigs.k8s.io/v1alpha2/references/spec/#gateway.networking.k8s.io/v1alpha2.GatewayTLSConfig

A single CertificateRef to a Kubernetes Secret has “Core” support. Implementations MAY choose to support attaching multiple certificates to a Listener, but this behavior is implementation-specific.

#2580 only implements the core requirement, and rejects configurations with multiple certificates.

Kong certificate entities can hold two certificates, and will select the served certificate based on client algorithm support (ECDSA or RSA): https://docs.konghq.com/gateway/latest/admin-api/#add-certificate

Acceptance criteria

To support this for Gateway APIs, we would need to:

  • Increase the certificateRef limit to 2.
  • If two certificates are present, verify that they use different signature algorithms (Kong will reject them if they do not).
  • Verify that all certificates use the same CN and SAN sets. Kong does not require this (it probably should) but the Gateway spec requires that implementations serve the cert with the longest SNI-SAN match (e.g. you would serve the cert with foo.example.com instead of *.example.com for foo.example.com) across all certificates. Since we must instead choose the certificate based on algorithm first, we can't meet that part of the spec and need to instead ensure it's irrelevant.
  • For Listeners with 2 certificateRefs, create a Kong certificate with one certificate and key in cert and key and the other in cert_alt and key_alt.
@rainest rainest added this to the Gateway API - Milestone 3 milestone Jun 23, 2022
@shaneutt shaneutt added the area/gateway-api Relating to upstream Kubernetes SIG Networking Gateway API label Jun 23, 2022
@scseanchow
Copy link
Contributor

@rainest is this extended support, does it make sense for us to push this out to a further milestone?

@rainest
Copy link
Contributor Author

rainest commented Jul 19, 2022

Yes, per the spec this is extended. Core only requires supporting a single certificate. The main reason for us to add it is because there's an existing Kong feature we can take advantage of with multiple.

@mlavacca mlavacca added the good first issue Good for newcomers label Aug 30, 2022
@mlavacca mlavacca added good first issue Good for newcomers and removed good first issue Good for newcomers labels Aug 24, 2023
@programmer04 programmer04 removed this from the Gateway API - Next milestone Sep 27, 2023
@lahabana lahabana added size/S and removed size/small labels Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/feature New feature or request area/gateway-api Relating to upstream Kubernetes SIG Networking Gateway API good first issue Good for newcomers nice-to-have size/S
Projects
None yet
Development

No branches or pull requests

6 participants