

# Design Principles

The framework is built on six design principles that reflect AWS security best practices and the operational requirements of cross-account access patterns. Each principle addresses a specific concern that arises when granting third-party access to customer resources.

The principle of least privilege governs the IAM policy design. The policy grants only read-only actions: Describe, List, and Get operations. No write, update, or delete permissions are included. CloudWatch metric read APIs do not support IAM condition restricting retrieval to a specific AWS namespace . Therefore, namespace scoping is enforced operationally by the monitoring workflow rather than via IAM resource-level conditions. The monitoring system should scope its queries to the AWS/DX namespace (and AWS/NetworkMonitor if CloudWatch Network Synthetic Monitor is used). IAM self-audit permissions (GetRole, GetPolicy) are scoped to the specific operator role and policy ARNs, preventing the WSP/ESP from enumerating other roles or policies in the customer's account.

The ExternalId requirement addresses the confused deputy problem, a well-documented security risk in cross-account IAM role delegation. Without an ExternalId, a malicious actor who knows the customer's Role ARN could potentially trick the WSP/ESP into assuming the role on their behalf. The ExternalId condition mitigates this by ensuring that the role can only be assumed when the caller provides the correct, customer-specific value. The security model relies on three properties: uniqueness (each customer relationship uses a distinct value), control (the WSP/ESP generates and manages the value, not the customer), and enforcement (the trust policy requires it via an sts:ExternalId condition). The ExternalId is not a secret in the cryptographic sense — knowing it alone is insufficient to assume the role, as the caller must also be the trusted AWS account principal specified in the trust policy. The value should be unique per customer relationship, stored consistently, and transmitted via an encrypted channel during initial exchange.

Auditability is achieved through AWS CloudTrail, which logs every role assumption event and API call made using the assumed role's temporary credentials. The session name parameter in the AssumeRole call identifies the specific operator or system that initiated the session. Governance validation of tag compliance is optional and implemented outside of this stack. Customers may use AWS Config (where supported), custom rules, or scheduled audits to monitor tag integrity.

Revocability ensures that the customer can terminate the WSP/ESP's access at any time using graduated methods aligned with AWS-documented IAM role credential revocation mechanisms. At the application layer, removing DXInfoSharing=enabled tags from resources prevents the WSP/ESP from retrieving operational metadata via the Resource Groups Tagging API; this is a data-scoping control, not an IAM credential revocation mechanism, and does not invalidate issued STS credentials. To revoke active sessions, the customer attaches the AWSRevokeOlderSessions inline policy to the role, which uses the aws:TokenIssueTime condition key to deny all permissions to credentials issued before a specified timestamp; new sessions assumed after the revocation remain functional. To prevent new role assumptions while preserving the role for potential re-enablement, the customer may modify the trust policy to remove the WSP/ESP account principal or attach a deny-all permissions policy; AWS documents this as the recommended approach for disabling a role without deleting it. To permanently remove access, the customer deletes the role; this is a destructive action that cannot be reversed and requires redeployment of the CloudFormation stack to restore. AWS recommends considering session revocation and trust policy modification before deletion.

Partition independence is achieved using AWS::Partition in the CloudFormation template. All ARNs are constructed dynamically using the partition of the deployment account, which means the same template deploys correctly in all AWS partitions without modification.

Customer control is enforced through a two-tier opt-in process. At the organizational level, the cloud governance team must approve the framework and authorize deployment of the IAM role template. At the account level, individual account owners must explicitly tag their Direct Connect resources with DXInfoSharing=enabled before any operational metadata is accessible. This two-tier model ensures that information sharing is both organizationally sanctioned and individually consented.