Creating a wallet - secure external password store

Oracle wallet enables autologin feature without supplying a password. It is no longer a part of Oracle Advanced Security and available in all licensed editions of all supported releases of the Oracle database.

Prepare a secured folder for the wallet

$ mkdir -p $ORACLE_HOME/owm/wallets/oracle
$ chmod -R 700 $ORACLE_HOME/owm/wallets
Create the wallet
$ mkstore -wrl $ORACLE_HOME/owm/wallets/oracle/ -create
Oracle Secret Store Tool : Version 12.2.0.1.0
Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights
reserved.

Enter password:
Enter password again:
Edit sqlnet.ora and add the wallet location created in the previous step
$ vi $ORACLE_HOME/network/admin/sqlnet.ora
SQLNET.WALLET_OVERRIDE = TRUE
WALLET_LOCATION=(
SOURCE=(METHOD=FILE)
(METHOD_DATA=(DIRECTORY=/oracle/product/12.2.0.1/dbhome_1/owm/wallets/oracle/))
)
Add credentials
$ mkstore -wrl $ORACLE_HOME/owm/wallets/oracle/ -createCredential prmy_db
sys P@$$w0rd
Oracle Secret Store Tool : Version 12.2.0.1.0
Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights
reserved.

Enter wallet password:
$ mkstore -wrl $ORACLE_HOME/owm/wallets/oracle/ -createCredential stndby_db
sys P@$$w0rd
Oracle Secret Store Tool : Version 12.2.0.1.0
Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights
reserved.

Enter wallet password:
$ mkstore -wrl $ORACLE_HOME/owm/wallets/oracle/ -createCredential frsnc_db
sys P@$$w0rd
Oracle Secret Store Tool : Version 12.2.0.1.0
Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights
reserved.

Enter wallet password:
List the contents of the wallet
$ mkstore -wrl $ORACLE_HOME/owm/wallets/oracle/ -listCredential
Oracle Secret Store Tool : Version 12.2.0.1.0
Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights
reserved.

Enter wallet password:
List credential (index: connect_string username)
3: frsnc_db sys
2: stndby_db sys
1: prmy_db sys
Verify connection with no password - using the wallet
$ sqlplus /@prmy_db as sysdba

SQL*Plus: Release 12.2.0.1.0 Production on Thu Nov 9 18:22:25 2017

Copyright (c) 1982, 2016, Oracle. All rights reserved.

Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit
Production

SYS@prmy_db:SQL> Disconnected from Oracle Database 12c Enterprise
Edition Release 12.2.0.1.0 - 64bit Production
$
Modifying Credentials
$ mkstore -wrl $ORACLE_HOME/owm/wallets/oracle/ -modifyCredential prmy_db
sys Passw0rd
Oracle Secret Store Tool : Version 12.2.0.1.0
Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights
reserved.

Enter wallet password:
Deleting Credentials
$ mkstore -wrl $ORACLE_HOME/owm/wallets/oracle/ -deleteCredential prmy_db
Oracle Secret Store Tool : Version 12.2.0.1.0
Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights
reserved.

Enter wallet password:
Using a Wallet is not valid for Grid Infrastructure (Doc ID 1153244.1)

Reference:

Comments

Popular posts from this blog

Silent Installation

Data Guard - Changing IP Addresses

Fixing & Registering ORACLE_HOMES in Central Inventory