WAD user cannot access the K8S API after applying Oidc app
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
StarlingX |
Fix Released
|
Medium
|
Andy |
Bug Description
Brief Description
-----------------
WAD user cannot access the K8S API after applying Oidc app
Severity
--------
Major: WAD user cannot access k8s API by oidc.
Steps to Reproduce
------------------
Following procedure to enable oidc:
- apply oidc service parameters
- generate local-dex.tls, dex-client-secret secrets
- helm overrides update for oidc-auth-apps
- apply oidc-auth-apps
- get oidc token by oidc-auth cli
- generate kubeconfig to be used by kubectl command
- run "sudo kubectl --kubeconfig /home/sysadmin/
Expected Behavior
------------------
WAD user should access the K8s api without any issues. The command lists the pods in the system.
Actual Behavior
----------------
[sysadmin@
error: You must be logged in to the server (Unauthorized)
Reproducibility
---------------
100% reproducible
System Configuration
-------
Any
Branch/Pull Time/Commit
-------
STX master latest.
Last Pass
---------
Unknown
Timestamp/Logs
--------------
Following error is shown continuously on oidc dex pod:
[sysadmin@
2022-03-
2022-03-
2022-03-
2022-03-
2022-03-
2022-03-
kube-apiserver pod has this error in logs:
E0615 05:53:22.726624 1 oidc.go:224] oidc authenticator: initializing plugin: oidc: issuer did not match the issuer returned by provider, expected "https:/
E0615 05:53:32.725379 1 oidc.go:224] oidc authenticator: initializing plugin: oidc: issuer did not match the issuer returned by provider, expected "https:/
E0615 05:53:33.586420 1 authentication.
Test Activity
-------------
Regression Testing
Workaround
----------
Update /etc/kubernetes
set oidc-issuer-url pointing to OAM floating IP:
- --oidc-issuer-url=https://<OAM floating IP>:30556/dex
Changed in starlingx: | |
assignee: | nobody → Andy (andy.wrs) |
Changed in starlingx: | |
importance: | Undecided → Medium |
tags: | added: stx.7.0 stx.apps stx.security |
Fix proposed to branch: master /review. opendev. org/c/starlingx /stx-puppet/ +/846237
Review: https:/