Introduction:
In some cases, while configuring or updating Oracle REST Data Services (ORDS), you may need to manage credentials stored in the Oracle Wallet.
This is done using the mkstore utility provided by Oracle.
Step 1: Attempt to Create the Credential:
To create a new credential for the ORDS connection string in the wallet:
mkstore -wrl /u01/TEST_APEX24/ORDS24/CONF/databases/default/wallet -createCredential "@//TEST_DB:1595/TSTAPEX" ORDS_PUBLIC_USER
You will be prompted to enter and re-enter the password:
Your secret/Password is missing in the command line Enter your secret/Password: xxxx Re-enter your secret/Password:xxxx
Error Scenario:
If the credential already exists, the following error will be thrown:
Create credential Secret Store error occurred: oracle.security.pki.OracleSecretStoreException: Credential already exists
Step 2: Modify the Existing Credential:
In such cases, you can update the existing credential using the -modifyCredential flag:
mkstore -wrl /u01/TEST_APEX24/ORDS24/CONF/databases/default/wallet -modifyCredential "@//TEST_DB:1595/TSTAPEX" ORDS_PUBLIC_USER
Again, you will be prompted to enter the updated password:
Your secret/Password is missing in the command line Enter your secret/Password:xxxx Re-enter your secret/Password:xxxx Modify credential Modify 1
Conclusion:
Using the mkstore utility, you can securely manage ORDS user credentials within the Oracle Wallet. This is a crucial step for ORDS database connectivity and must be kept in sync with the correct credentials for the database user (e.g., ORDS_PUBLIC_USER).