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

[release-4.14] OCPBUGS-22360: Validate accessTokenInactivityTimeout >= 300s #3130

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions api/v1beta1/hostedcluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -2096,6 +2096,7 @@ type ClusterConfiguration struct {
// It is used to configure the integrated OAuth server.
// This configuration is only honored when the top level Authentication config has type set to IntegratedOAuth.
// +optional
// +kubebuilder:validation:XValidation:rule="!has(self.tokenConfig.accessTokenInactivityTimeout) || duration(self.tokenConfig.accessTokenInactivityTimeout).getSeconds() >= 300", message="spec.configuration.oauth.tokenConfig.accessTokenInactivityTimeout minimum acceptable token timeout value is 300 seconds"
OAuth *configv1.OAuthSpec `json:"oauth,omitempty"`

// Scheduler holds cluster-wide config information to run the Kubernetes Scheduler
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5614,6 +5614,12 @@ spec:
type: integer
type: object
type: object
x-kubernetes-validations:
- message: spec.configuration.oauth.tokenConfig.accessTokenInactivityTimeout
minimum acceptable token timeout value is 300 seconds
rule: '!has(self.tokenConfig.accessTokenInactivityTimeout) ||
duration(self.tokenConfig.accessTokenInactivityTimeout).getSeconds()
>= 300'
proxy:
description: Proxy holds cluster-wide information on how to configure
default proxies for the cluster.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5594,6 +5594,12 @@ spec:
type: integer
type: object
type: object
x-kubernetes-validations:
- message: spec.configuration.oauth.tokenConfig.accessTokenInactivityTimeout
minimum acceptable token timeout value is 300 seconds
rule: '!has(self.tokenConfig.accessTokenInactivityTimeout) ||
duration(self.tokenConfig.accessTokenInactivityTimeout).getSeconds()
>= 300'
proxy:
description: Proxy holds cluster-wide information on how to configure
default proxies for the cluster.
Expand Down
12 changes: 12 additions & 0 deletions hack/app-sre/saas_template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35589,6 +35589,12 @@ objects:
type: integer
type: object
type: object
x-kubernetes-validations:
- message: spec.configuration.oauth.tokenConfig.accessTokenInactivityTimeout
minimum acceptable token timeout value is 300 seconds
rule: '!has(self.tokenConfig.accessTokenInactivityTimeout)
|| duration(self.tokenConfig.accessTokenInactivityTimeout).getSeconds()
>= 300'
proxy:
description: Proxy holds cluster-wide information on how to
configure default proxies for the cluster.
Expand Down Expand Up @@ -43318,6 +43324,12 @@ objects:
type: integer
type: object
type: object
x-kubernetes-validations:
- message: spec.configuration.oauth.tokenConfig.accessTokenInactivityTimeout
minimum acceptable token timeout value is 300 seconds
rule: '!has(self.tokenConfig.accessTokenInactivityTimeout)
|| duration(self.tokenConfig.accessTokenInactivityTimeout).getSeconds()
>= 300'
proxy:
description: Proxy holds cluster-wide information on how to
configure default proxies for the cluster.
Expand Down