5 Using the Wallet Manager Tool to Set Up a Wallet

To perform lifecycle operations using the LCM tools, password credentials must be stored in a wallet. As a result, you need to set up an Oracle wallet that contains the required credentials to run the create-domain action, such as the user name and password used for connecting to the database.

To do this, you will use the Wallet Manager tool.

5.1 About the Wallet Manager Tool

You can use the Wallet Manager tool to create and manage the password credentials required to perform various lifecycle operations.

The Wallet Manager tool provides a simple command-line interface for building and maintaining an Oracle Wallet file. Depending on your security needs, you can either create an encrypted wallet or an auto-login one.

With this tool, you can:

  • Create a new wallet.

  • Add new credentials to a wallet.

  • Update existing credentials in a wallet.

  • Remove existing credentials from a wallet.

This tutorial shows you how to create a new, encrypted wallet. See Creating a Wallet.

If you are familiar with Java programming, you can also use the Oracle Fusion Middleware Java API Reference for the Lifecycle Management Credential Management to learn more about how to use the APIs to create a wallet.

5.2 Creating a Wallet

This example shows you how to use the Wallet Manager tool to create a wallet and add the necessary password credentials to that wallet.

For this tutorial, use the create-wallet.sh script in the create-domain-example directory to set up a wallet that contains the credentials referenced by the sample topology.

To create a wallet:

  1. Change directory to the create-domain-example directory.
    cd path_to_example_directory/create-domain-example
    
  2. Open the create-wallet.sh file, and specify values for the -password option for each credential.

    Use the following table to define the -password option for the database user, the WebLogic administrator user, and for each schema user in the create-wallet.sh file:

    Make a note of the passwords you define here; you need them later on during the domain creation process.

    -alias -user -password

    db1/dba

    Database user name (the default user name on Oracle databases is sys)

    database user password

    soa/wlsadmin

    WebLogic administrator user name (default is weblogic)

    WebLogic administrator user password

    db1/soa-infra

    ${SCHEMA_PREFIX}_SOAINFRA

    SOAINFRA schema password

    db1/opss

    ${SCHEMA_PREFIX}_OPSS

    OPSS schema password

    db1/iau

    ${SCHEMA_PREFIX}_IAU

    IAU schema password

    db1/iau-append

    ${SCHEMA_PREFIX}_IAU_APPEND

    IAU_APPEND schema password

    db1/iau-viewer

    ${SCHEMA_PREFIX}_IAU_VIEWER

    IAU_VIEWER schema password

    db1/ums

    ${SCHEMA_PREFIX}_UMS

    UMS schema password

    db1/mds

    ${SCHEMA_PREFIX}_MDS

    MDS schema password

    db1/wls

    ${SCHEMA_PREFIX}_WLS

    WLS schema password

    db1/wls-runtime

    ${SCHEMA_PREFIX}_WLS_RUNTIME

    WLS_RUNTIME schema password

    db1/stb

    ${SCHEMA_PREFIX}_STB

    STB schema password

    The following shows an example of the create-wallet.sh file:

    "$JAVA" "$JRE_OPTIONS" -cp "$JRE_CP" oracle.fmwplatform.credentials.wallet.WalletManager add -walletDirectory . 
    -alias db1/dba -user sys -password database_password -walletPassword $WALLET
    
    "$JAVA" "$JRE_OPTIONS" -cp "$JRE_CP" oracle.fmwplatform.credentials.wallet.WalletManager add -walletDirectory . 
    -alias soa/wlsadmin -user weblogic -password weblogic_password  -walletPassword $WALLET
    
    "$JAVA" "$JRE_OPTIONS" -cp "$JRE_CP" oracle.fmwplatform.credentials.wallet.WalletManager add -walletDirectory . 
    -alias db1/soa-infra -user ${SCHEMA_PREFIX}_SOAINFRA -password soainfra_password  -walletPassword $WALLET
    
    "$JAVA" "$JRE_OPTIONS" -cp "$JRE_CP" oracle.fmwplatform.credentials.wallet.WalletManager add -walletDirectory . 
    -alias db1/opss -user ${SCHEMA_PREFIX}_OPSS -password opss_password -walletPassword $WALLET
    
    "$JAVA" "$JRE_OPTIONS" -cp "$JRE_CP" oracle.fmwplatform.credentials.wallet.WalletManager add -walletDirectory . 
    -alias db1/iau -user ${SCHEMA_PREFIX}_IAU -password iau_password -walletPassword $WALLET
    
    "$JAVA" "$JRE_OPTIONS" -cp "$JRE_CP" oracle.fmwplatform.credentials.wallet.WalletManager add -walletDirectory . 
    -alias db1/iau-append -user ${SCHEMA_PREFIX}_IAU_APPEND -password iau_append_password -walletPassword $WALLET
    
    "$JAVA" "$JRE_OPTIONS" -cp "$JRE_CP" oracle.fmwplatform.credentials.wallet.WalletManager add -walletDirectory . 
    -alias db1/iau-viewer -user ${SCHEMA_PREFIX}_IAU_VIEWER -password iau_viewer_password -walletPassword $WALLET
    
    "$JAVA" "$JRE_OPTIONS" -cp "$JRE_CP" oracle.fmwplatform.credentials.wallet.WalletManager add -walletDirectory . 
    -alias db1/ums -user ${SCHEMA_PREFIX}_UMS -password ums_password -walletPassword $WALLET
    
    "$JAVA" "$JRE_OPTIONS" -cp "$JRE_CP" oracle.fmwplatform.credentials.wallet.WalletManager add -walletDirectory . 
    -alias db1/mds -user ${SCHEMA_PREFIX}_MDS -password mds_password -walletPassword $WALLET
    
    "$JAVA" "$JRE_OPTIONS" -cp "$JRE_CP" oracle.fmwplatform.credentials.wallet.WalletManager add -walletDirectory . 
    -alias db1/wls -user ${SCHEMA_PREFIX}_WLS -password wls_password -walletPassword $WALLET
    
    "$JAVA" "$JRE_OPTIONS" -cp "$JRE_CP" oracle.fmwplatform.credentials.wallet.WalletManager add -walletDirectory . 
    -alias db1/wls-runtime -user ${SCHEMA_PREFIX}_WLS_RUNTIME -password wls_runtime_password -walletPassword $WALLET
    
    "$JAVA" "$JRE_OPTIONS" -cp "$JRE_CP" oracle.fmwplatform.credentials.wallet.WalletManager add -walletDirectory . 
    -alias db1/stb -user ${SCHEMA_PREFIX}_STB -password stb_password -walletPassword $WALLET
    
  3. Save and close the file.
  4. Set the ORACLE_HOME environment variable to the full path of the Oracle home where you installed Fusion Middleware Infrastructure.

    For example:

    export ORACLE_HOME=/home/Oracle/products/fmw12212
    
  5. Set the JAVA_HOME environment variable to the path of a certified JDK.

    For example:

    export JAVA_HOME=/home/Oracle/products/jdk1.8.0_101
    
  6. Change directory to the create-domain-example/mywallet directory.
    cd path_to_example_directory/create-domain-example/mywallet
    
    Remove any existing wallets in this directory. This directory is empty by default.
  7. Run the following command to create a wallet in the mywallet directory with the credentials you defined in step 2. Ensure that you have execute permissions if not already.
    sh ../create-wallet.sh FMWEX -walletPassword wallet_password
    

    Where:

    • FMWEX is the schema prefix that will be used to create the SOA schemas for the domain and will be referenced throughout this tutorial.

      If you choose a different prefix, replace FMWEX with the value of your actual prefix. Make a note of the prefix you enter here; you need to make sure to update the Prefix fields for all the schemas when you edit the soa-topology-1.0.json file later.

    • wallet_password is the wallet password.

You now have a wallet in the create-domain-example/mywallet directory that contains the required credentials, including your database, WebLogic administrator, and schema user credentials.