-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🛂 Add statement for cross account assumption (#1392)
* Add cross account statement Signed-off-by: Jacob Woffenden <[email protected]> * Add xacct_trust_statement Signed-off-by: Jacob Woffenden <[email protected]> * the linters have spoken Signed-off-by: Jacob Woffenden <[email protected]> * Added option to add cloud platform arn role to allow CP role to assume AP role * Hidden additional form through feature flag * Moved code to correct view * Ran black * Fixed flake8 error * Changed text on checkbox * Ran black again * Updated migrations * removed logging from JS * Moved code to clean method in form. Enabled in dev for testing --------- Signed-off-by: Jacob Woffenden <[email protected]> Co-authored-by: jamesstottmoj <[email protected]> Co-authored-by: James Stott <[email protected]>
- Loading branch information
1 parent
157dacf
commit 9ccef74
Showing
11 changed files
with
154 additions
and
3 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
24 changes: 24 additions & 0 deletions
24
controlpanel/api/migrations/0047_app_cloud_platform_role_arn.py
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,24 @@ | ||
# Generated by Django 5.1.2 on 2024-11-27 15:46 | ||
|
||
# Third-party | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("api", "0046_alter_user_options"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="app", | ||
name="cloud_platform_role_arn", | ||
field=models.CharField( | ||
default=None, | ||
help_text="The cloud platform arn for the app", | ||
max_length=130, | ||
null=True, | ||
), | ||
), | ||
] |
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
9 changes: 9 additions & 0 deletions
9
controlpanel/api/templates/assume_roles/cloud_platform_xacct.json
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,9 @@ | ||
{ | ||
"Sid": "AllowCloudPlatformCrossAccountIAM", | ||
"Effect": "Allow", | ||
"Action": "sts:AssumeRole", | ||
"Principal": { | ||
"AWS": "{{ app_role }}" | ||
}, | ||
"Condition": {} | ||
} |
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
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
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
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
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
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
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