DexAuthenticator
Scope: Namespaced
After the DexAuthenticator
object appears in the namespace, the following objects will be created:
- Deployment containing OAuth2-Proxy and Redis containers;
- Service, pointing to OAuth2-Proxy;
- Ingress resource, configured to receive requests on
https://<applicationDomain>/dex-authenticator
and send it to a service side; - Secrets, needed to access Dex.
Warning. After restarting a pod with an OAuth2-Proxy, the current Access Token and ID Token will be queried (using the refresh token) and stored in a Redis memory.
Example:
apiVersion: deckhouse.io/v1
kind: DexAuthenticator
metadata:
name: app-name
namespace: app-namespace
spec:
applicationDomain: app-name.kube.my-domain.com
sendAuthorizationHeader: false
applicationIngressCertificateSecretName: ingress-tls
applicationIngressClassName: nginx
keepUsersLoggedInFor: 720h
allowedGroups:
- everyone
- admins
whitelistSourceRanges:
- 1.1.1.1/32
- 192.168.0.0/24
additionalApplications:
- domain: additional-app-name.kube.my-domain.com
ingressSecretName: ingress-tls
ingressClassName: nginx
signOutURL: "/logout"
whitelistSourceRanges:
- 2.2.2.2/32
- spec
Required value
- spec.additionalApplications
A list of additional applications for which user authentication is required.
- spec.additionalApplications.domain
Required value
An application domain from which the user request will be redirected for authentication in Dex.
Warning. Must be specified without HTTP scheme.
Pattern:
^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
- spec.additionalApplications.ingressClassName
Required value
The name of the Ingress class to be used in the Ingress resource (it must match the Ingress class name for the application domain).
Pattern:
^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
- spec.additionalApplications.ingressSecretName
The name of the Secret containing the TLS certificate (from the domain) used in the applications Ingress resource. The Secret must be in the same namespace as DexAuthenticator.
Pattern:
^(|[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*)$
- spec.additionalApplications.signOutURL
The URL of the application from which requests will be redirected to the sign-out URL of the
dex-authenticator
.It is used in the application to direct logout requests. A separate Ingress resource will be created for the specified URL, and requests to it will be redirected to
dex-authenticator
. - spec.additionalApplications.whitelistSourceRanges
CIDRs that are allowed to authenticate. Authentication is allowed without IP address restrictions, If not specified.
- Element of the array
Pattern:
^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/[0-9]{1,2}$
- spec.allowedGroups
A list of groups whose members are allowed to connect to the client.
By default, all groups can connect.
Default:
All groups are allowed.
- spec.applicationDomain
Required value
An address for the application (DNS domain for Ingress resource) from which the user request will be redirected for authentication in Dex.
Warning. Must be specified without HTTP scheme.
Pattern:
^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
Example:
applicationDomain: my-app.domain.com
- spec.applicationIngressCertificateSecretName
The name of the Secret containing the TLS certificate for the application domain (is used in the Ingress resource). The Secret must be located in the same namespace as the DexAuthenticator.
Pattern:
^(|[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*)$
Example:
applicationIngressCertificateSecretName: ingress-tls
- spec.applicationIngressClassName
Required value
The name of the Ingress class to be used in the Ingress resource (it must match the Ingress class name for the application domain).
Pattern:
^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
Example:
applicationIngressClassName: nginx
- spec.highAvailability
Enables high availability mode for dex-authenticator.
When this mode is enabled, multiple pod replicas will be deployed to ensure fault tolerance.
Default:
false
- spec.keepUsersLoggedInFor
User session will be kept for specified amount of time even if user will not log in. Specified with
s
,m
orh
suffix.Default:
"168h"
Example:
keepUsersLoggedInFor: 24h
- spec.nodeSelector
If specified, the
dex-authenticator
pods nodeSelector.Format: the standard
nodeSelector
list. Instance pods inherit this field as is. - boolean
Request to application will be sent with
Authorization: Bearer
header when the option is switched to true. - spec.signOutURL
The URL of the application from which requests will be redirected to the sign-out URL of the
dex-authenticator
.It is used in the application to direct logout requests. A separate Ingress resource will be created for the specified URL, and requests to it will be redirected to
dex-authenticator
. - spec.tolerations
If specified the
dex-authenticator
pods tolerations.Format: the standard toleration list. Instance pods inherit this field as is.
- spec.tolerations.effect
Defines the taint’s effect this toleration is associated with (it matches any effect if empty).
Allowed values:
NoSchedule
,PreferNoSchedule
,NoExecute
- spec.tolerations.key
Defines the taint’s key this toleration is associated with (it matches any key if empty).
If the key is omitted (emplty), then
operator
must be set toExists
(which means it matches anyvalue
andkey
). - spec.tolerations.operator
Defines how the key and its value are linked — whether the key must be
Equal
to the value or can have any value.Setting it to
Exists
is equivalent to the value having any value so that the pod with the specified toleration can match the corresponding taint.Default:
"Equal"
Allowed values:
Exists
,Equal
- spec.tolerations.tolerationSeconds
Specifies the period (in seconds) that the scheduler waits before evicting a Pod from a node if the toleration no longer matches the taint (only applicable to the
NoExecute
effect, otherwise ignored).If the parameter is not set, the Pod will not be evicted from the node if the toleration no longer matches the taint. If the parameter is set to zero (or negative), the Pod will be evicted immediately if the toleration no longer matches the taint.
The default is: not set.
- spec.tolerations.value
The value that the toleration must match.
Must be empty if the operator parameter is set to
Exists
.
- spec.whitelistSourceRanges
CIDRs that are allowed to authenticate. Authentication is allowed without IP address restrictions, If not specified.
Example:
whitelistSourceRanges: 192.168.42.0/24
- Element of the array
Pattern:
^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/[0-9]{1,2}$
- spec
Required value
- spec.allowedGroups
A list of groups whose members are allowed to connect to the client.
By default, all groups can connect.
Default:
All groups are allowed.
- spec.applications
Required value
A list of applications for which user authentication is required.
- spec.applications.domain
Required value
An application domain (for Ingress resources) from which the user request will be redirected for authentication in Dex.
Warning. Must be specified without HTTP scheme.
Pattern:
^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
- spec.applications.ingressClassName
Required value
The name of the Ingress class to be used in the Ingress resource (it must match the Ingress class name for the application domain).
Pattern:
^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
- spec.applications.ingressSecretName
The name of the Secret containing the TLS certificate for the application domain (is used in the Ingress resource). The Secret must be located in the same namespace as the DexAuthenticator.
Pattern:
^(|[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*)$
- spec.applications.signOutURL
The URL of the application from which requests will be redirected to the sign-out URL of the
dex-authenticator
.It is used in the application to direct logout requests. A separate Ingress resource will be created for the specified URL, and requests to it will be redirected to
dex-authenticator
. - spec.applications.whitelistSourceRanges
CIDRs that are allowed to authenticate. Authentication is allowed without IP address restrictions, if not specified.
- Element of the array
Pattern:
^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/[0-9]{1,2}$
- spec.highAvailability
Enables high availability mode for dex-authenticator.
When this mode is enabled, multiple pod replicas will be deployed to ensure fault tolerance.
Default:
false
- spec.keepUsersLoggedInFor
User session will be kept for specified amount of time even if user will not log in.
Specified with
s
,m
orh
suffix.Default:
"168h"
- spec.nodeSelector
If specified, the
dex-authenticator
pods nodeSelector.Format: the standard
nodeSelector
list. Instance pods inherit this field as is. - boolean
Request to application will be sent with
Authorization: Bearer
header when the option is switched to true. - spec.tolerations
If specified the
dex-authenticator
pods tolerations.Format: the standard toleration list. Instance pods inherit this field as is.
- spec.tolerations.effect
Defines the taint’s effect this toleration is associated with (it matches any effect if empty).
Allowed values:
NoSchedule
,PreferNoSchedule
,NoExecute
- spec.tolerations.key
Defines the taint’s key this toleration is associated with (it matches any key if empty).
If the key is omitted (emplty), then
operator
must be set toExists
(which means it matches anyvalue
andkey
). - spec.tolerations.operator
Defines how the key and its value are linked — whether the key must be
Equal
to the value or can have any value.Setting it to
Exists
is equivalent to the value having any value so that the pod with the specified toleration can match the corresponding taint.Default:
"Equal"
Allowed values:
Exists
,Equal
- spec.tolerations.tolerationSeconds
Specifies the period (in seconds) that the scheduler waits before evicting a Pod from a node if the toleration no longer matches the taint (only applicable to the
NoExecute
effect, otherwise ignored).If the parameter is not set, the Pod will not be evicted from the node if the toleration no longer matches the taint. If the parameter is set to zero (or negative), the Pod will be evicted immediately if the toleration no longer matches the taint.
The default is: not set.
- spec.tolerations.value
The value that the toleration must match.
Must be empty if the operator parameter is set to
Exists
.
Deprecated resource. Support for the resource might be removed in a later release.
After the DexAuthenticator
object appears in the namespace, the following objects will be created:
- Deployment containing OAuth2-Proxy and Redis containers;
- Service, pointing to OAuth2-Proxy;
- Ingress resource, configured to receive requests on
https://<applicationDomain>/dex-authenticator
and send it to a service side; - Secrets, needed to access Dex.
Warning. After restarting a pod with an OAuth2-Proxy, the current Access Token and ID Token will be queried (using the refresh token) and stored in a Redis memory.
Example:
apiVersion: deckhouse.io/v1
kind: DexAuthenticator
metadata:
name: app-name
namespace: app-namespace
spec:
applicationDomain: app-name.kube.my-domain.com
sendAuthorizationHeader: false
applicationIngressCertificateSecretName: ingress-tls
applicationIngressClassName: nginx
keepUsersLoggedInFor: 720h
allowedGroups:
- everyone
- admins
whitelistSourceRanges:
- 1.1.1.1/32
- 192.168.0.0/24
additionalApplications:
- domain: additional-app-name.kube.my-domain.com
ingressSecretName: ingress-tls
ingressClassName: nginx
signOutURL: "/logout"
whitelistSourceRanges:
- 2.2.2.2/32
- spec
Required value
- spec.additionalApplications
A list of additional applications for which user authentication is required.
- spec.additionalApplications.domain
Required value
An application domain from which the user request will be redirected for authentication in Dex.
Warning. Must be specified without HTTP scheme.
Pattern:
^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
- spec.additionalApplications.ingressClassName
Required value
The name of the Ingress class to be used in the Ingress resource (it must match the Ingress class name for the application domain).
Pattern:
^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
- spec.additionalApplications.ingressSecretName
The name of the Secret containing the TLS certificate (from the domain) used in the applications Ingress resource. The Secret must be in the same namespace as DexAuthenticator.
Pattern:
^(|[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*)$
- spec.additionalApplications.signOutURL
The URL of the application from which requests will be redirected to the sign-out URL of the
dex-authenticator
.It is used in the application to direct logout requests. A separate Ingress resource will be created for the specified URL, and requests to it will be redirected to
dex-authenticator
. - spec.additionalApplications.whitelistSourceRanges
CIDRs that are allowed to authenticate. Authentication is allowed without IP address restrictions, If not specified.
- Element of the array
Pattern:
^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/[0-9]{1,2}$
- spec.allowedGroups
A list of groups whose members are allowed to connect to the client.
By default, all groups can connect.
Default:
All groups are allowed.
- spec.applicationDomain
Required value
An address for the application (DNS domain for Ingress resource) from which the user request will be redirected for authentication in Dex.
Warning. Must be specified without HTTP scheme.
Pattern:
^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
Example:
applicationDomain: my-app.domain.com
- spec.applicationIngressCertificateSecretName
The name of the Secret containing the TLS certificate for the application domain (is used in the Ingress resource). The Secret must be located in the same namespace as the DexAuthenticator.
Pattern:
^(|[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*)$
Example:
applicationIngressCertificateSecretName: ingress-tls
- spec.applicationIngressClassName
Required value
The name of the Ingress class to be used in the Ingress resource (it must match the Ingress class name for the application domain).
Pattern:
^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
Example:
applicationIngressClassName: nginx
- spec.highAvailability
Enables high availability mode for dex-authenticator.
When this mode is enabled, multiple pod replicas will be deployed to ensure fault tolerance.
Default:
false
- spec.keepUsersLoggedInFor
User session will be kept for specified amount of time even if user will not log in. Specified with
s
,m
orh
suffix.Default:
"168h"
Example:
keepUsersLoggedInFor: 24h
- spec.nodeSelector
If specified, the
dex-authenticator
pods nodeSelector.Format: the standard
nodeSelector
list. Instance pods inherit this field as is. - boolean
Request to application will be sent with
Authorization: Bearer
header when the option is switched to true. - spec.signOutURL
The URL of the application from which requests will be redirected to the sign-out URL of the
dex-authenticator
.It is used in the application to direct logout requests. A separate Ingress resource will be created for the specified URL, and requests to it will be redirected to
dex-authenticator
. - spec.tolerations
If specified the
dex-authenticator
pods tolerations.Format: the standard toleration list. Instance pods inherit this field as is.
- spec.tolerations.effect
Defines the taint’s effect this toleration is associated with (it matches any effect if empty).
Allowed values:
NoSchedule
,PreferNoSchedule
,NoExecute
- spec.tolerations.key
Defines the taint’s key this toleration is associated with (it matches any key if empty).
If the key is omitted (emplty), then
operator
must be set toExists
(which means it matches anyvalue
andkey
). - spec.tolerations.operator
Defines how the key and its value are linked — whether the key must be
Equal
to the value or can have any value.Setting it to
Exists
is equivalent to the value having any value so that the pod with the specified toleration can match the corresponding taint.Default:
"Equal"
Allowed values:
Exists
,Equal
- spec.tolerations.tolerationSeconds
Specifies the period (in seconds) that the scheduler waits before evicting a Pod from a node if the toleration no longer matches the taint (only applicable to the
NoExecute
effect, otherwise ignored).If the parameter is not set, the Pod will not be evicted from the node if the toleration no longer matches the taint. If the parameter is set to zero (or negative), the Pod will be evicted immediately if the toleration no longer matches the taint.
The default is: not set.
- spec.tolerations.value
The value that the toleration must match.
Must be empty if the operator parameter is set to
Exists
.
- spec.whitelistSourceRanges
CIDRs that are allowed to authenticate. Authentication is allowed without IP address restrictions, If not specified.
Example:
whitelistSourceRanges: 192.168.42.0/24
- Element of the array
Pattern:
^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/[0-9]{1,2}$