Step 3: Decode Wallet

# Extract schema credentials 
cat response.json | jq -r .schemas > schemas.json
# Set  files to 600 so only the owner can read/write 
# the files 
chmod 600 schemas.json
# Create a wallet directory
mkdir -p wallet
# Extract wallet content to the wallet directory
cat response.json | jq -r '.wallet.README' | base64 -d > wallet/README 
cat response.json | jq -r '.wallet."cwallet.sso"' | base64 -d > wallet/cwallet.sso 
cat response.json | jq -r '.wallet."ewallet.p12"' | base64 -d > wallet/ewallet.p12 
cat response.json | jq -r '.wallet."keystore.jks"' | base64 -d > wallet/keystore.jks
cat response.json | jq -r '.wallet."ojdbc.properties"' | base64 -d > wallet/ojdbc.properties
cat response.json | jq -r '.wallet."sqlnet.ora"' | base64 -d > wallet/sqlnet.ora 
cat response.json | jq -r '.wallet."tnsnames.ora"' | base64 -d > wallet/tnsnames.ora
cat response.json | jq -r '.wallet."truststore.jks"' | base64 -d > wallet/truststore.jks
# Set directories to 700 and files to 600 
# so only the owner can read/write the files and directory
chmod 700 wallet
chmod 600 wallet/*