3.5.2 Create a Secret with Identity Provider Client Credentials

To provide users the capability to log in to the MicroTx console, you must set up an identity provider. Create a Kubernetes secret to provide the client credentials of the identity provider to the MicroTx.

Before you begin, ensure that you have set up your identity provider and noted down the values for client ID and client secret.

To create a Kubernetes secret with the identity provider client credentials:
  1. Launch a terminal and enter the following commands to base64 encode the client ID and client secret.
    echo -n "clientid" | base64 -w 0 
    echo -n "clientSecret" | base64 -w 0 

    Replace clientid and clientSecret with the values in your environment.

    Note:

    For Linux, add -w 0 to the command to remove line breaks.
    The base64 encoded value of the client ID and client secret is returned. Note down these values as you will need it later.
  2. Paste the following code in any text editor.
    apiVersion: v1
        kind: Secret
        metadata:
          name: console-identity-client-secret
        type: Opaque
        data:
          clientId: base64_encoded_clientId
          clientPassword: base64_encoded_clientSecret

    Where,

    • console-identity-client-secret is the name of the Kubernetes secret that you want to create. Note down this name as you will have to provide it later in the values.yaml file.
    • base64_encoded_clientId and base64_encoded_clientSecret are the base64 encoded values of the client ID and client secret that you have generated in the previous step.

    Replace these with values specific to your environment.

  3. Save the file as a YAML file. For example, consoleSecret.yaml.
  4. Run the following command to create a Kubernetes secret in the namespace where you want to install MicroTx.

    Command syntax

    kubectl apply -f <filename> -n <namespace>

    The following sample command creates a Kubernetes secret with the name console-identity-client-secret in the otmm namespace with the details that you have provided in the consoleSecret.yaml file.

    kubectl apply -f consoleSecret.yaml -n otmm
Note down the name of the secret, console-identity-client-secret. You'll provide this name as the value for the tmmConfiguration.identityProvider.clientSecretName property in the values.yaml file.