Creating the application secret
A secret is used for setting sensitive information for creating IBM Engineering AI Hub through IBM Engineering AI Hub operator.
About this task
The administrator must create IBM Engineering AI Hub secret and then configure the values in the secret file before the IBM Engineering AI Hub instance is created on the supported cluster.
Procedure
- To create the secret on the supported cluster on Red Hat OpenShift console, complete the following steps:
- Log in to the
-
Select the project from the
Alternatively, you can run the
oc project <project name>command. - Create the secret in the same project.
- Go to Workloads > Secrets.
- On the Secrets page, select Key/Value Secret from the Create list.
-
On the Create Key/Value Secret page, provide the following details:
- In the Secret Name field, add the following value:
engineering-ai-hub-application-secrets - Add the following key-value pairs.
Keys Description Values oidcClientIdThe client ID forms part of the credentials to use to communicate with your OIDC provider. This ID must be registered with your OIDC provider. Contact your OIDC provider to get this value. <engineeringaihub_client_id>oidcClientSecretThe client secret forms part of the credentials to communicate with your ODIC provider. Contact your OIDC provider to get this value. <engineeringaihubclient_secret>dbcredentials.dbNameDatabase name used by IBM® Engineering AI Hub. The recommended database name is elmaihub.elmaihubdbcredentials.dbUserNameUsername used to connect to the database. db_userdbcredentials.dbPasswordPassword used to authenticate to the database. db_passworddbcredentials.dbHostHostname of the PostgreSQL database server. db.example.comdbcredentials.dbPortPort on which the PostgreSQL database is running. 5432dbcredentials.dbMinPoolSizeOptional. Minimum database connection pool size. If not specified, the system uses the default value of 1. 1dbcredentials.dbMaxPoolSizeOptional. Maximum database connection pool size. If not specified, the system uses the default value of 5. 5dbcredentials.sslmodeSpecifies the SSL/TLS mode used to secure the PostgreSQL database connection. Supported values are disable, require, verify-ca, and verify-full. The default value is disable. For more information, see SSL Mode Descriptions.
For example: verify-cadbcredentials.sslCertSecretDirectory that contains the SSL certificate files required for establishing a secure PostgreSQL database connection. For more information, see Creating database SSL certificate secret.Note:For SSL-enabled PostgreSQL connections, the required certificate files depend on the configured SSL mode and the server-side authentication settings:
- For verify-ca and verify-full modes, the ca.crt file is mandatory and is used to verify the server certificate against a trusted Certificate Authority.
- The tls.crt and tls.key files (client certificate and private key) are not required by default, even in verify-full mode.
They become mandatory only when the PostgreSQL server is configured to require client certificate authentication, for example when pg_hba.conf uses the cert authentication method.
- In such cases, the server explicitly requests a client certificate, and the connection will fail if tls.crt and tls.key are not provided.
All certificate files must use the exact filenames ca.crt, tls.crt, and tls.key in the referenced Kubernetes/OpenShift secret. Any deviation from these filenames is not supported and can cause SSL connection failures.
aihubdbsslsecret
- In the Secret Name field, add the following value:
- Click Create.
- To create the secret by using command line, complete the following steps:
-
Write the <sample_secret_file>.yaml file. The following is a sample file.
kind: Secret apiVersion: v1 metadata: name: ibmaihub-application-secrets namespace: <namespace> stringData: dbPassword: <postgres> dbAdminPassword: <postgres> oidcClientId: <rse-client> oidcClientSecret: <D8ElPYt9BS4sADJzWaUFaBV25IfE3Zj9>Important: Do not use the following characters in the password: "#", "?", "/", and "\". -
Pass the name of the secret as a value to the
secretparameter of IBM Engineering AI Hub specification. -
Run the following command. A secret based on the values entered in the <sample_secret_file>.yaml file is created and encoded.
- Red Hat OpenShift
-
oc create -f <sample_secret_file>.yaml -n <namespace> - Kubernetes
-
kubectl create -f <sample_secret_file>.yaml -n <namespace>