mirror of
https://github.com/vmware-tanzu/pinniped.git
synced 2026-09-13 03:24:25 +00:00
Replace the OIDCProvider field SNICertificateSecretName with a TLS.SecretName field.
Signed-off-by: Matt Moyer <moyerm@vmware.com>
This commit is contained in:
@@ -146,9 +146,11 @@ spec:
|
||||
# The hostname would typically match the DNS name of the public ingress or load balancer for the cluster.
|
||||
# Any path can be specified, which allows a single hostname to have multiple different issuers. The path is optional.
|
||||
issuer: https://my-issuer.example.com/any/path
|
||||
|
||||
# Optionally configure the name of a Secret in the same namespace, of type `kubernetes.io/tls`,
|
||||
# which contains the TLS serving certificate for the HTTPS endpoints served by this OIDC Provider.
|
||||
sniCertificateSecretName: my-tls-cert-secret
|
||||
tls:
|
||||
secretName: my-tls-cert-secret
|
||||
```
|
||||
|
||||
#### Configuring TLS for the Supervisor OIDC Endpoints
|
||||
@@ -159,17 +161,17 @@ configure TLS certificates on the OIDCProvider.
|
||||
If you are using a LoadBalancer Service to expose the Supervisor app outside your cluster, then you will
|
||||
also need to configure the Supervisor app to terminate TLS. There are two places to configure TLS certificates:
|
||||
|
||||
1. Each `OIDCProvider` can be configured with TLS certificates, using the `sniCertificateSecretName` field.
|
||||
1. Each `OIDCProvider` can be configured with TLS certificates, using the `spec.tls.secretName` field.
|
||||
|
||||
1. The default TLS certificate for all OIDC providers can be configured by creating a Secret called
|
||||
`pinniped-supervisor-default-tls-certificate` in the same namespace in which the Supervisor was installed.
|
||||
|
||||
The default TLS certificate will be used for all OIDC providers which did not declare an `sniCertificateSecretName`.
|
||||
Also, the `sniCertificateSecretName` will be ignored for incoming requests to the OIDC endpoints
|
||||
The default TLS certificate will be used for all OIDC providers which did not declare a `spec.tls.secretName`.
|
||||
Also, the `spec.tls.secretName` will be ignored for incoming requests to the OIDC endpoints
|
||||
that use an IP address as the host, so those requests will always present the default TLS certificates
|
||||
to the client. When the request includes the hostname, and that hostname matches the hostname of an `Issuer`,
|
||||
then the TLS certificate defined by the `sniCertificateSecretName` will be used. If that issuer did not
|
||||
define `sniCertificateSecretName` then the default TLS certificate will be used. If neither exists,
|
||||
then the TLS certificate defined by the `spec.tls.secretName` will be used. If that issuer did not
|
||||
define `spec.tls.secretName` then the default TLS certificate will be used. If neither exists,
|
||||
then the client will get a TLS error because the server will not present any TLS certificate.
|
||||
|
||||
It is recommended that you have a DNS entry for your load balancer or Ingress, and that you configure the
|
||||
|
||||
@@ -47,26 +47,32 @@ spec:
|
||||
for more information."
|
||||
minLength: 1
|
||||
type: string
|
||||
sniCertificateSecretName:
|
||||
description: "SNICertificateSecretName is an optional name of a Secret
|
||||
in the same namespace, of type `kubernetes.io/tls`, which contains
|
||||
the TLS serving certificate for the HTTPS endpoints served by this
|
||||
OIDC Provider. When provided, the TLS Secret named here must contain
|
||||
keys named `tls.crt` and `tls.key` that contain the certificate
|
||||
and private key to use for TLS. \n Server Name Indication (SNI)
|
||||
is an extension to the Transport Layer Security (TLS) supported
|
||||
by all major browsers. \n SNICertificateSecretName is required if
|
||||
you would like to use different TLS certificates for issuers of
|
||||
different hostnames. SNI requests do not include port numbers, so
|
||||
all issuers with the same DNS hostname must use the same SNICertificateSecretName
|
||||
value even if they have different port numbers. \n SNICertificateSecretName
|
||||
is not required when you would like to use only the HTTP endpoints
|
||||
(e.g. when terminating TLS at an Ingress). It is also not required
|
||||
when you would like all requests to this OIDC Provider's HTTPS endpoints
|
||||
to use the default TLS certificate, which is configured elsewhere.
|
||||
\n When your Issuer URL's host is an IP address, then this field
|
||||
is ignored. SNI does not work for IP addresses."
|
||||
type: string
|
||||
tls:
|
||||
description: TLS configures how this OIDCProvider is served over Transport
|
||||
Layer Security (TLS).
|
||||
properties:
|
||||
secretName:
|
||||
description: "SecretName is an optional name of a Secret in the
|
||||
same namespace, of type `kubernetes.io/tls`, which contains
|
||||
the TLS serving certificate for the HTTPS endpoints served by
|
||||
this OIDCProvider. When provided, the TLS Secret named here
|
||||
must contain keys named `tls.crt` and `tls.key` that contain
|
||||
the certificate and private key to use for TLS. \n Server Name
|
||||
Indication (SNI) is an extension to the Transport Layer Security
|
||||
(TLS) supported by all major browsers. \n SecretName is required
|
||||
if you would like to use different TLS certificates for issuers
|
||||
of different hostnames. SNI requests do not include port numbers,
|
||||
so all issuers with the same DNS hostname must use the same
|
||||
SecretName value even if they have different port numbers. \n
|
||||
SecretName is not required when you would like to use only the
|
||||
HTTP endpoints (e.g. when terminating TLS at an Ingress). It
|
||||
is also not required when you would like all requests to this
|
||||
OIDC Provider's HTTPS endpoints to use the default TLS certificate,
|
||||
which is configured elsewhere. \n When your Issuer URL's host
|
||||
is an IP address, then this field is ignored. SNI does not work
|
||||
for IP addresses."
|
||||
type: string
|
||||
type: object
|
||||
required:
|
||||
- issuer
|
||||
type: object
|
||||
|
||||
Reference in New Issue
Block a user