# AWS RDS for Oracle

<figure><img src="https://762006384-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MJXOXEifAmpyvNVL1to%2Fuploads%2F1LhbAKVmnSSyU2S65nxf%2FAWS%20RDS%20for%20Oracle.jpg?alt=media&#x26;token=28f568ab-98bc-4773-94a8-a36566bc681a" alt=""><figcaption></figcaption></figure>

## Overview

In this guide, you'll learn how to rotate passwords for AWS Oracle Database User and Admin accounts on your AWS environment using Keeper Rotation. RDS for Oracle is an AWS managed resource where the Oracle Admin Credentials are defined in the **PAM Database** record type and the configurations of the MySQL Users are defined in the **PAM User** record type.

For Amazon RDS, the AWS SDK will be used to rotate the password of Database Admin Accounts. To rotate the passwords of Regular Database Users, Keeper connects to the DB instance with the provided admin credentials and executes the necessary SQL statements to change the password.

## Prerequisites

This guide assumes the following tasks have already taken place:

* Keeper Secrets Manager is enabled for your [role](https://docs.keeper.io/en/keeperpam/getting-started/enforcement-policies#secrets-manager)
* Keeper Rotation is enabled for your [role](https://docs.keeper.io/en/keeperpam/getting-started/enforcement-policies#keeper-rotation)
* A Keeper Secrets Manager [application](https://docs.keeper.io/en/keeperpam/privileged-access-manager/getting-started/applications) has been created
* A Keeper Rotation [gateway](https://docs.keeper.io/en/keeperpam/privileged-access-manager/getting-started/gateways) is already installed, running, and is able to communicate with your AWS Oracle Database
* Your AWS environment is [configured](https://docs.keeper.io/en/keeperpam/privileged-access-manager/getting-started/pam-configuration/aws-environment-setup) per our documentation

## 1. Set up a PAM Database Record

The **PAM Database** record contains the admin credentials and necessary configurations to connect to the Oracle RDS instance on AWS. Keeper Rotation will use these provided configurations to rotate passwords of regular database user accounts in the Oracle RDS instance. These provided admin credentials need to also have sufficient database permissions to successfully change the credentials of the database user accounts.

The following table lists all the **required** fields on the **PAM Database** Record:

<table><thead><tr><th width="194.5">Field</th><th>Description</th></tr></thead><tbody><tr><td><strong>Title</strong></td><td>Keeper record title Ex: <code>AWS Oracle Admin</code></td></tr><tr><td><strong>Hostname or IP Address</strong></td><td>The RDS Endpoint i.e. <code>rdsdb.ckivswes.us-east-2.rds.amazonaws.com</code></td></tr><tr><td><strong>Port</strong></td><td>The RDS Port, for default ports see <a href="https://github.com/Keeper-Security/gitbook-secrets-manager/blob/master/privileged-access-manager/password-rotation/rotation-use-cases/aws/managed-database/broken-reference/README.md">port mapping</a><br>i.e. <code>1521</code></td></tr><tr><td><strong>Use SSL</strong></td><td>Check to perform SSL verification before connecting, if your database has SSL configured</td></tr><tr><td><strong>Login</strong></td><td>Admin account username that will perform rotation</td></tr><tr><td><strong>Password</strong></td><td>Admin account password</td></tr><tr><td><strong>Connect Database</strong></td><td>Optional database that will be used when connecting to the database server.</td></tr><tr><td><strong>Database ID</strong></td><td>The AWS DB instance ID</td></tr><tr><td><strong>Database Type</strong></td><td><code>oracle</code></td></tr><tr><td><strong>Provider Region</strong></td><td>The region your Amazon RDS instance is using. i.e <code>us-east-2</code></td></tr></tbody></table>

Note: Adding Provider Region and Database ID will enable managing the PAM Database Record through the SDK.

This PAM Database Record with the admin credential needs to be in a shared folder that is shared to the KSM application created in the pre-requisites. Only the KSM application needs access to this privileged account, it does not need to be shared with any users

## 2. Set up PAM Configuration <a href="#managed-directory-services" id="managed-directory-services"></a>

Note: You can skip this step if you already have a PAM Configuration set up for this environment.

If you are creating a new **PAM Configuration**, login to the Keeper Vault and select "Secrets Manager", then select the "PAM Configurations" tab, and click on "New Configuration".

The following table lists all the required fields on the **PAM Configuration** Record:

<table><thead><tr><th width="193">Field</th><th>Description</th><th data-hidden></th></tr></thead><tbody><tr><td><strong>Title</strong></td><td>Configuration name, example: <code>AWS RDS Configuration</code></td><td></td></tr><tr><td><strong>Environment</strong></td><td>Select: <code>AWS</code></td><td></td></tr><tr><td><strong>Gateway</strong></td><td>Select the Gateway that is configured on the Keeper Secrets Manager application and has network access to your Oracle RDS Instance</td><td></td></tr><tr><td><strong>Application</strong> <strong>Folder</strong></td><td>Select the Shared folder where the PAM Configuration will be stored. We recommend placing this in a shared folder with the PAM User records, not the database resources.</td><td></td></tr><tr><td><strong>AWS ID</strong></td><td>A unique ID for this instance of AWS. This is for your reference and can be anything, but its recommended to be kept short<br>Ex: <code>AWS-1</code></td><td></td></tr><tr><td><strong>Access Key ID</strong></td><td>Set this field to <code>USE_INSTANCE_ROLE</code> if you are using EC2 role policy (default). Otherwise use a specific Access Key ID.</td><td></td></tr><tr><td><strong>Access Secret Key</strong></td><td>Set this field to <code>USE_INSTANCE_ROLE</code> if you are using EC2 role policy (default). Otherwise use a specific Secret Access Key.</td><td></td></tr></tbody></table>

For more details on all the configurable fields in the PAM Configuration record, visit this [page](https://docs.keeper.io/en/keeperpam/privileged-access-manager/getting-started/pam-configuration).

## 3. Set up PAM User Records

Keeper Rotation will use the credentials in the **PAM Database** record to rotate the **PAM User** records on your AWS environment. The **PAM User** credential needs to be in a shared folder that is shared to the KSM application created in the prerequisites.

The following table lists all the required fields on the **PAM User** record:

<table><thead><tr><th width="205.5">Field</th><th>Description</th></tr></thead><tbody><tr><td><strong>Title</strong></td><td>Keeper record title i.e. <code>AWS DB User 1</code></td></tr><tr><td><strong>Login</strong></td><td>Case sensitive username of the account being rotated. If the user in the DB user table is in a Host other than %, add the Host value to the user name as <code>USERNAME@HOST</code></td></tr><tr><td><strong>Password</strong></td><td>Account password is optional, rotation will set one if blank</td></tr><tr><td><strong>Connect Database</strong></td><td>Optional database that will be used when connecting to the database server.<br>For example: PostgreSQL requires a database and so this will default to template1</td></tr></tbody></table>

## 4. Configure Rotation on the PAM User records

Select the **PAM User** record(s) from Step 3, edit the record and open the "Password Rotation Settings".

* Select the desired schedule and password complexity.
* The "Rotation Settings" should use the **PAM Configuration** setup previously.
* The "Resource Credential" field should select the **PAM Database** credential setup from Step 1.
* Upon saving, the rotation button will be enabled and available to rotate on demand, or via the selected schedule.

Any user with `edit` rights to a **PAM User** record has the ability to setup rotation for that record.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.keeper.io/en/keeperpam/privileged-access-manager/password-rotation/rotation-use-cases/aws/managed-database/aws-rds-for-oracle.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
