Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
7e6a168
Update key-vault.md
SD-eskimo Jun 5, 2025
7a9478f
Merge branch 'oracle-livelabs:main' into main
SD-eskimo Jun 23, 2025
3decce4
Update key-vault.md
SD-eskimo Jun 23, 2025
16f9bb5
Merge branch 'oracle-livelabs:main' into main
SD-eskimo Jul 21, 2025
089ce86
Update key-vault.md
SD-eskimo Jul 22, 2025
ec4c96e
Update key-vault.md
SD-eskimo Jul 23, 2025
1194c93
Update key-vault.md
SD-eskimo Jul 23, 2025
3e7b6b5
Update key-vault.md
SD-eskimo Jul 23, 2025
fa1660d
Update key-vault.md
SD-eskimo Jul 23, 2025
57af79f
Update key-vault.md
SD-eskimo Jul 23, 2025
1337d08
New pictures
SD-eskimo Jul 24, 2025
d494f64
dsfdsafdsafdsa
SD-eskimo Jul 30, 2025
2262335
Update manifest.json
SD-eskimo Aug 1, 2025
f360f67
all new
SD-eskimo Aug 4, 2025
098c860
more updates
SD-eskimo Aug 4, 2025
65af186
more updates
SD-eskimo Aug 5, 2025
70e8dc2
More fine-tuning
SD-eskimo Aug 6, 2025
d61ffab
more updates
SD-eskimo Aug 7, 2025
c26c27f
minor updates to 5
SD-eskimo Aug 14, 2025
e7776ed
new LL4
SD-eskimo Aug 19, 2025
58f3e60
correction
SD-eskimo Aug 19, 2025
21ac2ab
updates
SD-eskimo Aug 20, 2025
e70b561
Update key-vault-Lab4.md
SD-eskimo Aug 20, 2025
3a52755
updates
SD-eskimo Aug 20, 2025
eebca19
pictures
SD-eskimo Aug 21, 2025
cbada8a
Update key-vault-Lab12.md
SD-eskimo Aug 21, 2025
e69f851
update
SD-eskimo Sep 2, 2025
eaeed8a
Update key-vault-Lab5.md
SD-eskimo Sep 2, 2025
a64c903
new pictures
SD-eskimo Sep 2, 2025
aaf5b7d
updates
SD-eskimo Sep 3, 2025
200fae2
updates
SD-eskimo Sep 3, 2025
304aad8
updates
SD-eskimo Sep 5, 2025
6f90cca
Merge branch 'oracle-livelabs:main' into main
SD-eskimo Sep 12, 2025
6c71a1b
LL12 with screenshots
SD-eskimo Sep 12, 2025
451e65d
updatre
SD-eskimo Sep 18, 2025
f2c3ab8
Merge branch 'oracle-livelabs:main' into main
SD-eskimo Sep 18, 2025
e789849
Update key-vault-Lab12.md
SD-eskimo Sep 18, 2025
4477fd7
Update key-vault-Lab12.md
shubhamgoyaloracle Sep 18, 2025
25a0acc
ll6
SD-eskimo Sep 18, 2025
02c04bb
updates
SD-eskimo Sep 25, 2025
44edb8c
updates
SD-eskimo Sep 25, 2025
7bbe90d
updates
SD-eskimo Sep 26, 2025
99455e7
LL10 added
SD-eskimo Sep 26, 2025
6de9a51
updates
SD-eskimo Sep 27, 2025
59416c5
update
SD-eskimo Sep 29, 2025
fb17e67
updates
SD-eskimo Sep 29, 2025
4bdf96c
updates
SD-eskimo Sep 29, 2025
6e38176
plaintext
SD-eskimo Sep 29, 2025
54de86c
update
SD-eskimo Sep 29, 2025
6c110ee
updates
SD-eskimo Sep 29, 2025
f5f863b
updates
SD-eskimo Sep 30, 2025
b7b990a
updates
SD-eskimo Sep 30, 2025
d53501d
Removing TEST to verify changes
shubhamgoyaloracle Sep 30, 2025
4e49b40
Changed titles + some content.
shubhamgoyaloracle Oct 1, 2025
4f3c0db
Merge branch 'oracle-livelabs:main' into main
shubhamgoyaloracle Oct 1, 2025
736ae75
Update key-vault-Lab4.md
shubhamgoyaloracle Oct 1, 2025
7358f62
Reverting back
shubhamgoyaloracle Oct 1, 2025
97110c7
Update key-vault-Lab4.md
shubhamgoyaloracle Oct 1, 2025
ed8171e
Content added for later labs
shubhamgoyaloracle Oct 2, 2025
c9779d7
Textual changes
shubhamgoyaloracle Oct 2, 2025
e51a091
Labs 4&5 fully done. Still WIP
shubhamgoyaloracle Oct 3, 2025
99ad4c1
Finished most of the lab changes
shubhamgoyaloracle Oct 4, 2025
6e2bd51
More changes to Lab 12
shubhamgoyaloracle Oct 4, 2025
972432f
Headings done
shubhamgoyaloracle Oct 4, 2025
4e49a45
Finished up changes to Lab 12
shubhamgoyaloracle Oct 5, 2025
f30eeb8
Marked broken code elements
shubhamgoyaloracle Oct 5, 2025
af900ca
Lab 12 base changes complete. Pics left.
shubhamgoyaloracle Oct 7, 2025
ae3eaab
More changes
shubhamgoyaloracle Oct 8, 2025
faedfb2
Cleaned up look and feel of commands + updated photos to higher res
shubhamgoyaloracle Oct 8, 2025
7a6d485
Finished lab 12 work - ready for review
shubhamgoyaloracle Oct 9, 2025
9a125e5
Updated per PM review comments.
shubhamgoyaloracle Oct 15, 2025
543bddf
Couple more changes
shubhamgoyaloracle Oct 16, 2025
e436b1c
Moving to new directories for private publish
shubhamgoyaloracle Oct 20, 2025
c67cd53
Updated manifest file to point to new labs
shubhamgoyaloracle Oct 20, 2025
5f7cbbb
Replaced new labs in existing location with new labs
shubhamgoyaloracle Oct 20, 2025
0df06dc
Corrected the manifest
shubhamgoyaloracle Oct 21, 2025
cc2b486
Updated screenshots per requirements
shubhamgoyaloracle Oct 21, 2025
d162a3b
Final changes
shubhamgoyaloracle Oct 21, 2025
40983ea
Update intro-key-vault.md
shubhamgoyaloracle Oct 21, 2025
98fed32
Update key-vault.md
shubhamgoyaloracle Oct 21, 2025
d8ae486
Merge branch 'oracle-livelabs:main' into main
SD-eskimo Oct 21, 2025
c9028b0
Updated the type in the manifest
shubhamgoyaloracle Oct 21, 2025
908671f
Merge branch 'main' of https://github.com/SD-eskimo/myfork
shubhamgoyaloracle Oct 21, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions database/advanced/intro/intro-key-vault.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
### Overview
*Estimated Time to complete the workshop*: 55 minutes

This workshop is the SECOND of two Hands-On Labs dedicated to encrypting data at rest within the Oracle Database. The first workshop, DB Security – ASO (Transparent Data Encryption & Data Redaction) covers transparent data encryption (TDE). This second workshop covers the important topic of managing encryption keys. Here, we will migrate an encrypted database to Oracle Key Vault for centralized key management.
This workshop is the SECOND of two Hands-On Labs dedicated to encrypting data at rest within the Oracle Database. The first workshop, DB Security – ASO (Transparent Data Encryption & Data Redaction) covers transparent data encryption (TDE). This second workshop covers the important topic of managing encryption keys. Here, we will migrate an encrypted database to Oracle Key Vault for centralized key management and walk through a typical Key Vault deployment.

Based on an OCI architecture, deployed in a few minutes with a simple internet connection, it allows you to test DB Security use cases in a complete environment already pre-configured by the Oracle Database Security Product Manager Team.

Expand Down Expand Up @@ -33,11 +33,11 @@ This Hands-On Labs give the user an opportunity to learn how to configure the DB

In this mini-lab, you will learn how to use the **Oracle Key Vault** (OKV) features.

The entire DB Security PMs Team wishes you an excellent workshop!
The entire DB Security PMs team wishes you an excellent workshop!

You may now [proceed to the next lab](#next).

## Acknowledgements
- **Author** - Hakim Loumi, Database Security PM
- **Contributors** - Peter Wahl, Rahil Mir
- **Last Updated By/Date** - Hakim Loumi, Database Security PM - August 2024
- **Contributors** - Peter Wahl, Rahil Mir, Shubham Goyal
- **Last Updated By/Date** - Shubham Goyal, Database Security PM - October 2025
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
70 changes: 70 additions & 0 deletions database/advanced/key-vault-new/key-vault-Lab10.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Automate key rotation

## Introduction
Scripting of the key rotation operations can be made easier and safer by storing the keystore password in an external store.

Estimated Lab Time: 5 minutes

### Objectives
In this lab, you will add the keystore password to a local auto-login wallet and then use this wallet to perform a re-key operation without needing to enter the OKV password.

### Prerequisites
This lab assumes you have completed lab 9.

## Task 1: Automate re-key

1. Add the keystore password into a new local auto-open wallet in <WALLET_ROOT>/tde

````
<copy>
sqlplus / as sysdba
ADMINISTER KEY MANAGEMENT ADD SECRET '<Key Vault endpoint password>' FOR CLIENT 'OKV_PASSWORD' TO LOCAL AUTO_LOGIN KEYSTORE '/etc/ORACLE/WALLETS/cdb1/tde_seps';
exit;
</copy>
````

![Key Vault](./images/Screenshot_2025-10-03_16.19.30.png "Add the keystore password into a new local auto-open wallet in <WALLET_ROOT>/tde")

2. Check the Master Encryption Key ID before a re-key

```
<copy>
sqlplus / as sysdba
col "container" format a10
select b.name "CONTAINER", a.MASTERKEYID "MASTER ENCRYPTION KEY ID"
from v$database_key_info a join v$containers b on a.con_id = b.con_id
where b.name in ('CDB$ROOT');
exit;
</copy>
```

![Key Vault](./images/Screenshot_2025-10-07_23.41.30.png "Check the Master Encryption Key ID before a re-key")

3. Execute a re-key operation without using the Key Vault password

````
<copy>
sqlplus / as sysdba
ADMINISTER KEY MANAGEMENT SET KEY FORCE KEYSTORE IDENTIFIED BY EXTERNAL STORE;
exit;
</copy>
````

This command rotates the TDE master encryption keys for CDB$ROOT and PDB1.

![Key Vault](./images/Screenshot_2025-10-07_23.29.07.png "Execute a re-key operation without using the Key Vault password")

4. Verify that the tablespace was re-keyed

```
<copy>
sqlplus / as sysdba
col "container" format a10
select b.name "CONTAINER", a.MASTERKEYID "MASTER ENCRYPTION KEY ID"
from v$database_key_info a join v$containers b on a.con_id = b.con_id
where b.name in ('CDB$ROOT');
exit;
</copy>
```

![Key Vault](./images/Screenshot_2025-10-07_23.39.39.png "Verify that the tablespace was re-keyed")
97 changes: 97 additions & 0 deletions database/advanced/key-vault-new/key-vault-Lab11.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
# Bring your own key

## Introduction
You may want to bring an externally generated key, potentially with higher entropy, and manage it with Key Vault.

Estimated Lab Time: 5 minutes

### Objectives
In this lab, you will upload an externally generated key to the Key Vault server, and activate it for the database.

### Prerequisites
This lab assumes you have completed lab 10.


## Task 1: Generate a key external to Oracle Key Vault

1. Write your key to a file

In this example, we use openssl to generate TDE Master Encryption Key. You can use other means to generate this key.

```
<copy>
openssl rand -hex 32 | tr '[:lower:]' '[:upper:]' > $DBSEC_LABS/okv/byok_aes256.txt
</copy>
```


## Task 2: Upload the key to Oracle Key Vault

1. Login to Key Vault as user **KVRESTADMIN**

Get the randonly generated password by executing this command

```
<copy>
cat wui_passphrase
</copy>
```

![Key Vault](./images/Screenshot_2025-10-03_13.45.01.png "Login to Key Vault as the REST administrator")

2. Click the **Keys & Wallets** tab and then click the **Keys & Secrets** tab

![Key Vault](./images/Screenshot_2025-10-03_14.31.43.png "Click the Keys & Secrets tab")

3. Click the **Create** button

![Key Vault](./images/Screenshot_2025-10-03_14.37.46.png "Click the Create button")

4. Click the **TDE Master Encryption Key** link

![Key Vault](./images/Screenshot_2025-10-03_14.33.54.png "Click the TDE Master Encryption Key link")

5. Click the **Bring Your Own Key** radio button and upload `byok_aes256.txt` file you had created above.

This will be located at `/home/oracle/DBSecLab/livelabs/okv/byok_aes256.txt`

![Key Vault](./images/Screenshot_2025-10-03_14.38.50.png "Click the Bring Your Own Key radio button and upload byok_aes256.txt file you had created above")

6. Click the **Select Wallet** button, choose the **LIVELABS\_DB\_WALLET** wallet from the pop-up, and click the **Close** button of the pop-up window

![Key Vault](./images/Screenshot_2025-10-03_14.42.12.png "Click the Select Wallet button and choose the LIVELABS_DB_WALLET wallet")

7. Copy the **Master Encryption Key Identifier** (at the top of this page)

![Key Vault](./images/Screenshot_2025-10-03_14.44.02.png "Copy the Master Encryption Key Identifier")

8. Click the **Create** button

## Task 3: Activate the key in the database

1. Activate the imported key (BYOK)

Note: The Master Encryption Key Identifier is the string you copied above in task 2 step 7
````
<copy>
sqlplus / as sysdba
ADMINISTER KEY MANAGEMENT USE KEY '<Master Encryption Key Identifier>' FORCE KEYSTORE IDENTIFIED BY EXTERNAL STORE;
exit;
</copy>
````
![Key Vault](./images/Screenshot_2025-10-08_12.10.54.png "Activate the imported key")

2. Verify the key with the supplied master encryption key identifier was activated by the database

```
<copy>
sqlplus / as sysdba
col "container" format a10
select b.name "CONTAINER", a.MASTERKEYID "MASTER ENCRYPTION KEY ID"
from v$database_key_info a join v$containers b on a.con_id = b.con_id
where b.name in ('CDB$ROOT');
exit;
</copy>
```

![Key Vault](./images/Screenshot_2025-10-08_12.12.47.png "Verify that the tablespace was re-keyed")
Loading