generated from terraform-modules/template_aws_submodules
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from jones910/patch-2
Create README.md
- Loading branch information
Showing
8 changed files
with
92 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,91 @@ | ||
|
|
||
| 1. **Enable IAM authentication on the Postgres DB instance or Aurora Postgres Cluster** | ||
|
|
||
| **Terraform:** | ||
|
|
||
| Set iam\_database\_authentication\_enabled = true within the Instance or the Cluster resource and apply. | ||
|
|
||
| **Console:** | ||
|
|
||
| * 1. Enable IAM Authentication on the DB Instance | ||
| 1. Go to **RDS Console** → Select your **DB instance or the Cluster**. | ||
| 2. Choose **Modify**. | ||
| 3. Scroll to **Database Authentication**. | ||
| 4. Set **IAM DB authentication** to **Enabled**. | ||
| 5. Click **Continue** → **Apply Immediately** or during the next maintenance window. | ||
| 6. This allows the DB instance to accept IAM token-based logins | ||
|
|
||
| **CLI:** | ||
|
|
||
| aws rds modify-db-instance \ | ||
| --db-instance-identifier <your-db-instance-identifier> \ | ||
| --enable-iam-database-authentication \ | ||
| --apply-immediately | ||
|
|
||
| aws rds modify-db-cluster \ | ||
| --db-cluster-identifier your-aurora-cluster-identifier \ | ||
| --enable-iam-database-authentication \ | ||
| --apply-immediately | ||
|
|
||
| 1. **Create IAM User/Role and assign IAM Policy (Please Confirm with Matt Morgan from SCT - INC000003161057)** | ||
|
|
||
| Policy: | ||
|
|
||
| For RDS: | ||
|
|
||
| { | ||
| "Version" : "2012-10-17", | ||
| "Statement" : | ||
| [ | ||
| { | ||
| "Effect" : "Allow", | ||
| "Action" : ["rds-db:connect"], | ||
| "Resource" : ["arn:aws:rds-db:us-east-1:123456789012:dbuser:db-ABCDEFGHIJKL01234/mydbuser"] | ||
| } | ||
| ] | ||
| } | ||
| For Aurora: | ||
|
|
||
| { | ||
| "Version" : "2012-10-17", | ||
| "Statement" : | ||
| [ | ||
| { | ||
| "Effect" : "Allow", | ||
| "Action" : ["rds-db:connect"], | ||
| "Resource" : ["arn:aws:rds-db:us-east-1:123456789012:dbuser:cluster-ABCDEFGHIJKL01234/mydbuser"] | ||
| } | ||
| ] | ||
| } | ||
|
|
||
| 1. **Enable IAM authentication for the database JBID user** | ||
|
|
||
| Grant rds\_iam to <JBID>; | ||
|
|
||
| 1. Launch the URL from production network to access AWS Console using Identity Center | ||
|
|
||
| <https://start.us-gov-east-1.us-gov-home.awsapps.com/directory/d-c2672d0b4e#/> | ||
|
|
||
|  | ||
|
|
||
| Once verified via the phone Okta verify app, successfully logged in. | ||
|
|
||
|  | ||
|
|
||
|  | ||
|
|
||
| Retrieve the Access keys: | ||
|
|
||
|  | ||
|
|
||
| Generate DB token after setting the keys in Power shell or Command prompt. | ||
|
|
||
|  | ||
|
|
||
|  | ||
|
|
||
| Copy the token and paste in the password box in PGADMIN or DBeaver tools. | ||
|
|
||
| Token can be obtained only after getting authenticated with MFA. | ||
|
|
||
| Login should be successful. |
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
|
|