[minor] gitops: automated configtool oidc registration #1437
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
These changes are part of the work to automate the registration of an OIDC client to support usage of the MAS Application Framework (MAF) configuration tool (https://jsw.ibm.com/browse/MASCORE-3763)
gitops-suite function changes
Accepts optional
--oidc-config
parameter: this is a YAML string for defining the OpenID clients (OIDC) that will be registered automatically after the suite is installed.E.g.
mas gitops-suite --oidc-config '{"configtool": {"trusted_uri_prefixes": ["https://example.com:443", "https://otherexample.com:8443"]}}'
is rendered into generated
ibm-mas-suite-.yaml
config file as:This is used by the changes in ibm-mas/gitops#247 to render a Job to perform the OIDC registration step.
Gitops Tekton changes
Passes
oidc
configuration frommas-instance-params.yaml
into thegitops-mas-suite
Task as YAML. These changes are copied into saas-tekton here: https://github.ibm.com/maximoappsuite/saas-tekton/pull/89Make configtool_oidc function suitable for use in automation
Some minor changes were required to the
configtool_oidc
function to make it suitable for use by a Job inside the cluster. This PR changes two things necessary for this to work properly. The changes are backwards compatible.Testing (Fyre)
Configure configtool OIDC with default trusted_uri_prefixes:
mas-instance-params.yaml:
gitops-mas-instance pipeline run
gitops-envs commit:
ibm-mas-suite.yaml:
postsync job runs:
Local MAF instance running on
localhost:3001
Forwards to MAS for login:
MAF tool login successful:
Configure configtool OIDC with non-default trusted_uri_prefixes:
mas-instance-params.yaml:
gitops-mas-instance pipeline run
gitops-envs commit:
ibm-mas-suite.yaml:
postsync job runs:
Local MAF instance running on
localhost:3001
Forwards to MAS for login:
MAF tool login successful:
Remove OIDC configtool configuration
No oidc element in mas-instance-params.yaml
gitops-mas-instance pipeline run
gitops-envs commit:
oidc element removed from in ibm-mas-suite.yaml
postsync job runs:
Local MAF instance running on
localhost:3001
:Login fails as expected:
Testing (ROSA / fvtsaas)