A Guide to Delegated Administrator in AWS Organizations and Multi-Account Management
Overview #
root
account and improve security.- Via organization actions such as
organizations:RegisterDelegatedAdministrator
. - Via service-specific actions such as
guardduty:EnableOrganizationAdminAccount
orcloudtrail:RegisterOrganizationDelegatedAdmin
. - Organization resource-based delegation policies.
- AWS Organizations and Multi Account Management.
- Delegated Administrator and the security and management benefits.
- What can be done by delegated administrator.
- The 3 different methods of setting up delegated administration and the complexity of delegation.
- The IAM permissions required for Delegated Administrator Management and reference policies.
Background #
root
user for a system. Mistakes and misconfigurations happen, and using the management account may have a large blast radius of potential impact.- Organization Authorization Policies such as Service Control Policies (SCPs) that can manage permissions available for accounts and their principals in the organization.
- Organization Management Policies such as AI services out-opt policies that enable data collection control for AWS AI services across the organization's accounts, Tag policies that standardize tags attached to AWS resources in the organization's accounts.
- Account Management activities such as AWS CloudFormation StackSets and AWS Account Management.
- Resource Management activities such as AWS Systems Manager.
- Account Management security services such as AWS GuardDuty, AWS Trusted Advisor, and AWS CloudTrail.
Selected Timeline of Relevant Releases #
- 2006: AWS began offering IT infrastructure services.
- May 2011: AWS launched Identity and Access Management (IAM).
- February 2017: AWS Organizations generally available.
- October 2020: Amazon GuardDuty Delegated Administrator.
- February 2021: CloudFormation StackSets delegated administration.
- November 2022: Delegated Administrator via Delegation Policies Release.
Why Delegation? #
Security Concerns of Organization Management Account Overuse #
- The management account has organization-level functionality that can affect all member accounts and a broad scope of influence.
- Created member accounts come with
OrganizationAccountAccessRole
which comes with default*:*
Administrator Access and permits the management account to assume it. - SCPs do not apply to the management account.
- The management account has Organization visibility into member accounts and other reconnaissance activities.
- The management account has Organization management features such as SCPs, enabling/disabling security features across the Organization and all member accounts.
sts:AssumeRole
privileges in the organization management account, they could have administrative access to every member account in the entire AWS Organization. Additionally, the Organization Management account can be subject to misconfiguration that has a greater blast radius and can affect multiple member accounts and applications. An example of this could be a misconfigured Service Control Policy (SCP).What Delegated Administrator Cannot Do #
- Moving accounts between OUs.
- Inviting an account to join the organization.
- Creating new accounts within the organization.
- Creating new organizational units within the organization.
Risks of Delegated Administrator Accounts #
- Overprivileged delegated administrator access. Delegated Administrator accounts could have more relaxed access control. This could be true if the delegated administrator accounts also host application workloads.
- Delegated Administrator accounts are impacted by Service Control Policies (SCPs). There is a risk of potential adverse impact if SCPs are misconfigured.
Delegated Administrator Management #
Setup: How does Delegation Happen? #
- Via organization actions such as
organizations:RegisterDelegatedAdministrator
. - Via service-specific actions such as
guardduty:EnableOrganizationAdminAccount
orcloudtrail:RegisterOrganizationDelegatedAdmin
. - Organization resource-based delegation policies.
Delegation via Organization Actions
organizations:RegisterDelegatedAdministrator
. Note that this permission is called as a child command from the service-specific permissions for registering a Delegated Administrator. Note: AWS Security Lake is included, but is in Preview right now and the behavior may not differ when it becomes generally available (GA) like other AWS services.organizations:RegisterDelegatedAdministrator
command. Trusted Service Access can be enabled via organizations:EnableAWSServiceAccess
.aws organizations enable-aws-service-access \
--service-principal access-analyzer.amazonaws.com \
--region us-east-1
aws organizations register-delegated-administrator \
--account-id 123412341234 \
--service-principal access-analyzer.amazonaws.com \
--region us-east-1
AWS Service | Support via organizations:RegisterDelegatedAdministrator only |
---|---|
AWS Trusted Advisor | Yes |
AWS CloudFormation StackSets | Yes |
AWS Systems Manager Explorer | Yes |
AWS Systems Manager Change Manager | Yes |
AWS Account Management | Yes |
AWS Backup | Yes |
AWS Compute Optimizer | Yes |
AWS Config | Yes |
AWS DevOps Guru | Yes |
AWS IAM Access Analyzer | Yes |
AWS License Manager | Yes |
AWS Network Manager | Yes |
AWS S3 Storage Lens | Yes |
AWS Service Catalog | Yes |
AWS IAM Identity Center | Yes |
Reachability Analyzer | Yes |
Delegation via Service-specific Actions
EnableOrganizationAdminAccount
, RegisterOrganizationDelegatedAdmin
, and AssociateAdminAccount
.AWS Service | Service-Specific IAM Action for Delegation |
---|---|
AWS Security Lake (Preview) | securitylake |
AWS CloudTrail | cloudtrail |
AWS Firewall Manager | fms |
AWS GuardDuty | guardduty |
AWS Detective | detective |
AWS VPC IP Address Manager (EC2 IPAM) | ec2 |
AWS Security Hub | securityhub |
AWS Audit Manager | auditmanager |
AWS Inspector | inspector2 |
AWS Macie | macie2 |
organizations:RegisterDelegatedAdministrator
and other dependent actions. The below screenshot shows the associated calls for fms:AssociateAdminAccount
, guardduty:EnableOrganizationAdminAccount
, macie2:EnableOrganizationAdminAccount
, and inspector2:EnableDelegatedAdminAccount
.Organization Resource-Based Delegation Policies
organizations:PutResourcePolicy
. Specifically, this enables the following actions that can be grouped into 3 categories: resource tagging, viewing organizational information, and organizational policy management:Organizational Policy Management
organizations:CreatePolicy
,organizations:AttachPolicy
,organizations:UpdatePolicy
,organizations:DeletePolicy
,organizations:DetachPolicy
.organizations:DisablePolicyType
andorganizations:EnablePolicyType
.
- AI Services data collection and usage via
AISERVICES_OPT_OUT_POLICY
- AWS Backup via
BACKUP_POLICY
- Organization Permission Management via
SERVICE_CONTROL_POLICY
- Resource Tagging via
TAG_POLICY
Resource Tagging
organziations:TagResource
,organizations:UntagResource
organizations:TagResource
and organizations:UntagResource
:- AWS account
- Organization root
- Organizational unit (OU)
- Policy (any type)
Viewing Organizational Information
organizations:DescribeCreateAccountStatus
,organizations:ListCreateAccountStatus
organizations:DescribeEffectivePolicy
,organizations:DescribeResourcePolicy
organizations:DescribeHandshake
,organizations:ListHandshakesForAccount
,organizations:ListHandshakesForOrganization
organizations:DescribeAccount
,organizations:DescribeOrganization
,organizations:DescribeOrganizationalUnit
organizations:ListAccounts
,organizations:ListAccountsForParent
,organizations:ListChildren
,organizations:ListOrganizationalUnitsForParent
,organizations:ListParents
,organizations:ListRoots
organizations:ListPolicies
,organizations:ListPoliciesForTarget
organizations:ListAWSServiceAccessForOrganization
,organizations:ListDelegatedAdministrators
,organizations:ListDelegatedServicesForAccount
organizations:ListTagsForResource
,organizations:ListTargetsForPolicy
Example Resource-Based Delegation Policy
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllPossiblePermissionsForDelegationPolicy",
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::123412341234:root"
},
"Action": [
"organizations:ListTagsForResource",
"organizations:ListRoots",
"organizations:ListPoliciesForTarget",
"organizations:ListPolicies",
"organizations:ListParents",
"organizations:ListOrganizationalUnitsForParent",
"organizations:ListDelegatedServicesForAccount",
"organizations:ListHandshakesForAccount",
"organizations:ListHandshakesForOrganization",
"organizations:ListDelegatedAdministrators",
"organizations:ListCreateAccountStatus",
"organizations:ListChildren",
"organizations:ListAWSServiceAccessForOrganization",
"organizations:ListAccountsForParent",
"organizations:ListAccounts",
"organizations:DetachPolicy",
"organizations:DescribePolicy",
"organizations:DescribeOrganizationalUnit",
"organizations:DescribeHandshake",
"organizations:DescribeEffectivePolicy",
"organizations:DescribeCreateAccountStatus",
"organizations:DescribeAccount",
"organizations:DescribeOrganization",
"organizations:CreatePolicy",
"organizations:AttachPolicy",
"organizations:EnablePolicyType",
"organizations:ListTargetsForPolicy",
"organizations:UntagResource",
"organizations:TagResource",
"organizations:UpdatePolicy",
"organizations:DeletePolicy",
"organizations:DisablePolicyType"
],
"Resource": "*"
}
]
}
Access Management: Granting Access to Manage Delegated Administration #
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "OrganizationDelegatedAdminReadOnly",
"Effect": "Allow",
"Action": ["organizations:List*", "organizations:Describe*"],
"Resource": "*"
},
{
"Sid": "OrganizationDelegatedAdminManagement",
"Effect": "Allow",
"Action": [
"organizations:RegisterDelegatedAdministrator",
"organizations:DeregisterDelegatedAdministrator",
"organizations:PutResourcePolicy",
"organizations:DeleteResourcePolicy",
"securitylake:CreateDatalakeDelegatedAdmin",
"securitylake:DeleteDatalakeDelegatedAdmin",
"cloudtrail:RegisterOrganizationDelegatedAdmin",
"cloudtrail:DeregisterOrganizationDelegatedAdmin",
"fms:AssociateAdminAccount",
"fms:DisassociateAdminAccount",
"guardduty:EnableOrganizationAdminAccount",
"guardduty:DisableOrganizationAdminAccount",
"detective:EnableOrganizationAdminAccount",
"detective:DisableOrganizationAdminAccount",
"ec2:EnableIpamOrganizationAdminAccount",
"ec2:DisableIpamOrganizationAdminAccount",
"securityhub:EnableOrganizationAdminAccount",
"securityhub:DisableOrganizationAdminAccount",
"auditmanager:RegisterOrganizationAdminAccount",
"auditmanager:DeregisterOrganizationAdminAccount",
"inspector2:EnableDelegatedAdminAccount",
"inspector2:DisableDelegatedAdminAccount",
"macie2:EnableOrganizationAdminAccount",
"macie2:DisableOrganizationAdminAccount"
],
"Resource": "*"
},
{
"Sid": "DependentActions",
"Effect": "Allow",
"Action": [
"organizations:EnableAWSServiceAccess",
"organizations:DisableAWSServiceAccess",
"iam:GetRole",
"iam:CreateServiceLinkedRole"
],
"Resource": "*"
}
]
}
Update or Deletion: deregistering Delegated Administrators #
organizations:DeregisterDelegatedAdministrator
) are below:AWS Service | Action |
---|---|
AWS Security Lake (Preview) | securitylake |
AWS CloudTrail | cloudtrail |
AWS Firewall Manager | fms |
AWS GuardDuty | guardduty |
AWS Detective | detective |
AWS VPC IP Address Manager (EC2 IPAM) | ec2 |
AWS Security Hub | securityhub |
AWS Audit Manager | auditmanager |
AWS Inspector | inspector2 |
AWS Macie | macie2 |
Observability: Finding Delegated Administrators #
spec:
name: 'aws'
path: 'cloudquery/aws'
registry: 'cloudquery'
version: 'v30.2.0'
destinations: ['postgresql']
tables: ['aws_organization*']
spec:
accounts:
- id: '123412341234'
local_profile: 'cq-read-role'
Finding Delegated Administrator Accounts
SELECT * from aws_organizations_delegated_administrators;
Finding Organization Resource-Based Delegation Policies
SELECT * from aws_organization_resource_policies;
Summary #
- Use delegated administrator to reduce usage of the organization management account for multi account AWS environments.
- Delegated administrator can be setup 3 different ways for different use cases:
- Via organization actions such as
organizations:RegisterDelegatedAdministrator
. - Via service-specific actions such as
guardduty:EnableOrganizationAdminAccount
orcloudtrail:RegisterOrganizationDelegatedAdmin
. - Via organization resource-based delegation policies.
References and Useful Links #
Written by Jason Kao
Jason worked as Head of Security Research and Solutions at CloudQuery and was a Senior Data Engineer prior to taking on that role. He focused on multi-cloud environments and has particular expertise on AWS.