
In April, 2023 Oracle announced the deprecation of the mkstore command in Oracle AI Database 26ai. What was not entirely clear from that announcement was the equivalent orapki command syntax for accomplishing equivalent mkstore entry management operations. Fortunately, this transition is not difficult if you know the proper syntax. This post is to serve as a reference to self on the synatx differences particularly for use cases like Enterprise User Security (EUS) and Centrally Managed Users (CMU) wallet management for ORACLE.SECURITY.USERNAME, ORACLE.SECURITY.DN and ORACLE.SECURITY.PASSWORD entries. In this series of examples, I'll just illustrate wallet entry management for the ORACLE.SECURITY.USERNAME entry.
Environment Variables To Simplify Commands
The following environment variables simplify finding and executing commands. The JAVA_HOME, ldir and pkilib variables are only required for the java commands.
export JAVA_HOME=/u01/sw/jdk-25.0.4
export PATH=$ORACLE_HOME/bin:$JAVA_HOME/bin:$PATH
w="/u01/app/oracle/26ai/admin/hrdb/wallet"
wpw="Oracle123"
ldir=$(find $ORACLE_HOME -name cryptojce.jar 2> /dev/null|head -1|xargs -n1 dirname)
pkilib="${ldir}/oraclepki.jar:${ldir}/cryptoj.jar"
export PATH=$ORACLE_HOME/bin:$JAVA_HOME/bin:$PATH
w="/u01/app/oracle/26ai/admin/hrdb/wallet"
wpw="Oracle123"
ldir=$(find $ORACLE_HOME -name cryptojce.jar 2> /dev/null|head -1|xargs -n1 dirname)
pkilib="${ldir}/oraclepki.jar:${ldir}/cryptoj.jar"
List Wallet Entries
Here is how to view wallet entries with each of the command options.
mkstore
mkstore -nologo -wrl ${w} -list
orapki secretstore list_entries
orapki secretstore list_entries -nologo -wallet ${w} -pwd "${wpw}"
orapki summary
orapki wallet display -nologo -summary -wallet ${w}
orapki complete
orapki wallet display -nologo -complete -wallet ${w}
orapki details
orapki wallet display -nologo -details -wallet ${w}
java
java -classpath "${pkilib}" oracle.security.pki.textui.OraclePKITextUI secretstore list_entries -nologo -wallet ${w} -pwd "${wpw}"
Create Wallet Entry
Here is how to create a wallet entry for ORACLE.SECURITY.USERNAME with each of the command options.
mkstore
mkstore -nologo -wrl "${w}" -createEntry ORACLE.SECURITY.USERNAME bdiggs
orapki secrestore create_entry
orapki secretstore create_entry -nologo -wallet ${w} -pwd "${wpw}" -alias ORACLE.SECURITY.USERNAME -secret bdiggs
java
java -classpath "${pkilib}" oracle.security.pki.textui.OraclePKITextUI secretstore create_entry -nologo -wallet ${mywallet} -pwd "${walletpw}" -alias ORACLE.SECURITY.USERNAME -secret bdiggs
View Wallet Entry
Here is how to view a wallet entry for ORACLE.SECURITY.USERNAME with each of the command options.
mkstore
mkstore -nologo -wrl ${w} -viewEntry ORACLE.SECURITY.USERNAME
orapki secretstore view_entry
orapki secretstore view_entry -nologo -wallet ${w} -pwd "${wpw}" -alias ORACLE.SECURITY.USERNAME
java
java -classpath "${pkilib}" oracle.security.pki.textui.OraclePKITextUI secretstore view_entry -nologo -wallet ${w} -pwd "${wpw}" -alias ORACLE.SECURITY.USERNAME
Delete Wallet Entry
Here is how to delete a wallet entry for ORACLE.SECURITY.USERNAME with each of the command options.
mkstore
mkstore -nologo -wrl "${w}" -deleteEntry ORACLE.SECURITY.USERNAME
orapki secretstore delete_entry
orapki secretstore delete_entry -nologo -wallet ${w} -pwd "${wpw}" -alias ORACLE.SECURITY.USERNAME
java
java -classpath "${pkilib}" oracle.security.pki.textui.OraclePKITextUI secretstore delete_entry -nologo -wallet ${w} -pwd "${wpw}" -alias ORACLE.SECURITY.USERNAME
I hope you found this informative and helpful.
Blessings!
No comments:
Post a Comment