As part of a series targeted at enabling customers with Entra ID integration for centralizing Oracle database authentication, authorization and user life cycle management, I published several blog posts on setting up TLS between the Oracle database clients and servers. One of the commands used for wallet and certificate management is orapki. The orapki tool is included with the full Oracle database client but not the instant client.
$ cd /u01/app/oracle/instantclient_23_7
$ mkdir pkilib
$ cd pkilib
$ unzip -q /tmp/V1044259-01.zip client/stage/Components/oracle.crypto.*
$ unzip -q client/stage/Components/oracle.crypto.pki/23.0.0.0.0/1/DataFiles/filegroup1.jar jlib/oraclepki.jar
$ unzip -q client/stage/Components/oracle.crypto.rsa/23.0.0.0.0/1/DataFiles/filegroup1.jar jlib/*
$ mv jlib/* .
$ rm -fr client
$ export JAVA_HOME=/u01/sw/jdk-21.0.6
$ pl="/u01/app/oracle/instantclient_23_7/pkilib/oraclepki.jar:/u01/app/oracle/instantclient_23_7/pkilib/cryptojce.jar"
$ $JAVA_HOME/bin/java -classpath "$pl" oracle.security.pki.textui.OraclePKITextUI wallet create -wallet wallet -pwd Oracle123 -auto_login
Oracle PKI Tool Release 23.0.0.0.0 - Production
Version 23.0.0.0.0
Copyright (c) 2004, 2024, Oracle and/or its affiliates. All rights reserved.
Operation is successfully completed.
$ $JAVA_HOME/bin/java -classpath "$pl" oracle.security.pki.textui.OraclePKITextUI wallet display -wallet wallet -pwd Oracle123
Oracle PKI Tool Release 23.0.0.0.0 - Production
Version 23.0.0.0.0
Copyright (c) 2004, 2024, Oracle and/or its affiliates. All rights reserved.
Requested Certificates:
User Certificates:
Trusted Certificates:
cd \u01\app\instantclient_23_7
mkdir pkilib
cd pkilib
Expand-Archive -Path C:\u01\app\V1045016-01.zip -DestinationPath client
Move-Item -Path client\jlib\cryptojce.jar -Destination .
Move-Item -Path client\jlib\oraclepki.jar -Destination .
Remove-Item -Recurse -Force client
$env:JAVA_HOME="C:\Program Files\Java\jdk-17"
$env:PATH="$env:JAVA_HOME\bin;" + $env:Path
$env:pl="C:\u01\app\instantclient_23_7\pkilib\oraclepki.jar;C:\u01\app\instantclient_23_7\pkilib\cryptojce.jar"
java -classpath $env:pl oracle.security.pki.textui.OraclePKITextUI wallet create -wallet wallet -pwd Oracle123 -auto_login
java -classpath $env:pl oracle.security.pki.textui.OraclePKITextUI wallet display -wallet wallet -pwd Oracle123
No comments:
Post a Comment