StarlingX OIDC Authentication App
Go to file
Joaci Morais 2194db0ac8 Fixed applying OIDC without overrides
The oidc-auth-apps fails to apply without a timeout error if no user
overrides are set. Ideally, a lifecycle check should be put in place
to return an error message on the application-list status
recommending that user overrides should be set.

When user tries to apply oidc with 'system application-apply
oidc-auth-apps' command, the lifecycle handler triggers the action
'pre-apply'(before applying the app) to search for missing overrides
required to properly apply the oidc app. Once a missing override
is detected, an exception will be raised setting the app status to
'apply-failed' also informing that all overrides are required as the
following example:

"Overrides for all helm charts are required to apply OIDC. Refer to
'Set up OIDC Auth Applications' guide to configure the application"

This implementation blocks the application apply workflow to start
for the oidc-auth-apps until the required overrides have been
properly configured according the "Set Up OIDC Auth Applications"
Documentation:
https://docs.starlingx.io/security/kubernetes/configure-oidc-auth-
applications.html

Test Plan:
PASS: Deploy a SX with master ISO.
PASS: Build oidc-auth-apps tarball with this change.
PASS: Update test, update the current oidc-auth-apps to the new
      tarball just built and check is the procedure was successfully
      done.
PASS: Once tarball is updated, try to apply the oidc-auth-apps
      without any overrides, we should get status 'apply-failed' with
      the progress message: "Overrides for all helm charts are
      required to apply OIDC. Refer to 'Set up OIDC Auth Applications'
      guide to configure the application"
PASS: Once oidc-client overrides are setted according OIDC
      documentation try to apply the oidc-auth-apps without dex
      overrides, we should similar status 'apply-failed' with the
      same progress message.
PASS: Once oidc-client and dex overrides are setted try to apply the
      oidc-auth-apps without secret-observer overrides, we still
      should get similar status 'apply-failed' with the same progress
      message.
PASS: Once all oidc-client, dex and secret-observer overrides are
      properly configured according the setup guide, try to apply the
      oidc-auth-apps, we should get oidc-auth-apps successfully
      applied as expected.
PASS: Once oidc-auth-apps in applied status, perform oidc-auth-apps
      test by creating a user, apply rolebiding and authenticate it
      using oidc-auth command, check if the new user can send k8s
      commands based on its roles.

Closes-Bug: 2071469

Change-Id: I771552d5231088de5d3549e0ff95075e590310c2
Signed-off-by: Joaci Morais <joaci.demorais@windriver.com>
2024-12-13 09:54:05 -03:00
helm-charts Add support to edit telemetry nodePort 2024-11-26 13:10:05 -03:00
oidc-auth-tools Fixes cert issue on oidc-auth command 2024-11-06 14:59:38 -03:00
python3-k8sapp-oidc Fixed applying OIDC without overrides 2024-12-13 09:54:05 -03:00
stx-oidc-auth-helm Rename Helm repository to avoid naming collision 2024-10-10 16:09:16 -03:00
stx-oidc-client/debian reduce size of stx-oidc-client image 2022-10-03 17:35:36 -04:00
.gitignore Update app Zuul Check Jobs. 2023-12-18 09:08:54 -07:00
.gitreview Added .gitreview 2019-12-06 17:46:31 +00:00
.zuul.yaml Correct trigger for metadata job in .zuul.yaml 2024-02-06 09:44:27 -07:00
bindep.txt Add python3.9 support 2021-09-09 10:48:57 -04:00
debian_build_layer.cfg Add debian_build_layer.cfg file 2021-10-05 14:10:36 -04:00
debian_iso_image.inc oidc-auth-armada-app: update debian_iso_image.inc 2022-11-22 14:16:12 +08:00
debian_pkg_dirs Auto-increment chart versions 2024-03-05 13:45:03 -07:00
debian_stable_docker_images.inc move oidc-client docker image to Debian 2022-09-29 13:31:18 +00:00
requirements.txt Add Dex as a platform managed application 2020-01-07 14:13:34 -05:00
test-requirements.txt Update app Zuul Check Jobs. 2023-12-18 09:08:54 -07:00
tox.ini Update app Zuul Check Jobs. 2023-12-18 09:08:54 -07:00