-
Bug
-
Resolution: Done-Errata
-
Major
-
4.15
-
None
-
No
-
False
-
-
-
Bug Fix
-
In Progress
Description of problem:
It failed to configure oauth identity providers in the HostedCluster when accessTokenInactivityTimeout is not set
Version-Release number of selected component (if applicable):
How reproducible:
always
Steps to Reproduce:
1. Create a cluster 2. configure htpasswd without accessTokenInactivityTimeout field in the HostedCluster CR 3. it failed to apply
Actual results:
jiezhao-mac:hypershift jiezhao$ oc get hostedcluster -n clusters -o yaml > cluster.yaml spec: configuration: oauth: identityProviders: - htpasswd: fileData: name: htpass-secret mappingMethod: claim name: my_htpasswd_provider type: HTPasswd secretRefs: - name: htpass-secret jiezhao-mac:hypershift jiezhao$ oc apply -f cluster.yaml The HostedCluster "jie-test" is invalid: spec.configuration.oauth: Invalid value: "object": no such key: tokenConfig evaluating rule: spec.configuration.oauth.tokenConfig.accessTokenInactivityTimeout minimum acceptable token timeout value is 300 seconds
Expected results:
htpasswd should be configured successfully without accessTokenInactivityTimeout field
Additional info:
When accessTokenInactivityTimeout it set to 300s, htpasswd is configured in the HostedCluster successfully. jiezhao-mac:hypershift jiezhao$ oc get hostedcluster -n clusters -o yaml > cluster.yaml spec: configuration: oauth: identityProviders: - htpasswd: fileData: name: htpass-secret mappingMethod: claim name: my_htpasswd_provider type: HTPasswd tokenConfig: accessTokenInactivityTimeout: 300s secretRefs: - name: htpass-secret jiezhao-mac:hypershift jiezhao$ oc apply -f cluster.yaml hostedcluster.hypershift.openshift.io/jie-test configured jiezhao-mac:hypershift jiezhao$ jiezhao-mac:hypershift jiezhao$ oc get hostedcluster/jie-test -n clusters -ojsonpath='{.spec.configuration}' | jq { "oauth": { "identityProviders": [ { "htpasswd": { "fileData": { "name": "htpass-secret" } }, "mappingMethod": "claim", "name": "my_htpasswd_provider", "type": "HTPasswd" } ], "tokenConfig": { "accessTokenInactivityTimeout": "300s" } } }