# hkb-rcp-data-perimeter

RCP-01 deny S3, KMS, Secrets Manager and STS access from principals outside the organization.

| Property | Value |
| --- | --- |
| Type | Resource control policy |
| Attached to | the organization root |
| Source | `org/hkb-org-rcp.yaml`, resource `DataPerimeterPolicy` |

## `Rcp01DenyPrincipalsOutsideOrganization`

```yaml
- Sid: Rcp01DenyPrincipalsOutsideOrganization
  Effect: Deny
  Principal: "*"
  Action:
    - s3:*
    - kms:*
    - secretsmanager:*
    - sts:AssumeRole
    - sts:SetSourceIdentity
    - sts:TagSession
  Resource: "*"
  Condition:
    StringNotEqualsIfExists:
      aws:PrincipalOrgID: !Ref OrganizationId
    BoolIfExists:
      aws:PrincipalIsAWSService: "false"
```
