Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
23ef38a
Add scoped customer monitoring network provisioning role
ebariaux Nov 27, 2026
8b9cfb1
Add customer monitoring peering and route template
ebariaux Nov 27, 2026
1d74048
Document monitoring network configuration and operator interface
ebariaux Nov 27, 2026
525c0c4
Add central monitoring return-route template
ebariaux Nov 27, 2026
1c89ff9
Align monitoring networking with central account provisioning
ebariaux Nov 27, 2026
be4f1a4
Document central route provisioning identity
ebariaux Nov 27, 2026
7553bc1
Document central monitoring connection settings in Parameter Store
ebariaux Nov 27, 2026
d648773
Read and validate monitoring connection settings from SSM
ebariaux Nov 27, 2026
57f1368
Merge branch 'main' of https://github.com/openremote/core into featur…
ebariaux Nov 30, 2026
593beb4
Add manual OIDC workflow to check monitoring connection settings
ebariaux Nov 30, 2026
b03e2e4
Linting
ebariaux Nov 30, 2026
f4da60e
Merge branch 'main' into feature/monitoring-networking
denniskuijs Nov 30, 2026
8a1523d
Merge branch 'main' into feature/monitoring-networking
ebariaux Dec 1, 2026
e980e58
Update .github/workflows/monitoring-network.yml
ebariaux Dec 1, 2026
1795bc6
Pipeline improvements based on review feedback
ebariaux Dec 1, 2026
ca3b645
Converted Python used in workflow to bash. Keep python for local testing
ebariaux Dec 1, 2026
996f134
Merge branch 'main' into feature/monitoring-networking
ebariaux Dec 1, 2026
64c6a9c
Merge branch 'main' into feature/monitoring-networking
ebariaux Dec 1, 2026
49c0128
Merge branch 'main' into feature/monitoring-networking
ebariaux Dec 2, 2026
0c81ad8
Merge branch 'main' into feature/monitoring-networking
ebariaux Dec 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
462 changes: 462 additions & 0 deletions .ci_cd/aws/monitoring-network/README.md

Large diffs are not rendered by default.

39 changes: 39 additions & 0 deletions .ci_cd/aws/monitoring-network/cloudformation-central-routes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
AWSTemplateFormatVersion: "2010-09-09"
Transform: AWS::LanguageExtensions
Description: Explicit central return routes for one customer monitoring connection

Parameters:
MonitoringRouteTableIds:
Type: CommaDelimitedList
AllowedPattern: "rtb-([0-9a-f]{8}|[0-9a-f]{17})"
Description: Unique existing route tables in the monitoring VPC approved for this connection
CustomerVpcCidr:
Type: String
AllowedPattern: '((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])/(1[6-9]|2[0-8])'
Description: Exact canonical customer IPv4 VPC CIDR, /16 through /28; verify against AWS before applying
PeeringConnectionId:
Type: String
AllowedPattern: "pcx-([0-9a-f]{8}|[0-9a-f]{17})"
Description: Active connection ID from the approved customer networking stack output

Resources:
# The peering belongs to the customer stack and must already be active.
# Table-derived logical IDs keep routes stable when the list is reordered.
"Fn::ForEach::MonitoringRoutes":
- RouteTableId
- !Ref MonitoringRouteTableIds
- "CustomerRoute&{RouteTableId}":
Type: AWS::EC2::Route
Properties:
RouteTableId: "${RouteTableId}"
DestinationCidrBlock: !Ref CustomerVpcCidr
VpcPeeringConnectionId: !Ref PeeringConnectionId

Outputs:
PeeringConnectionId:
Value: !Ref PeeringConnectionId
CustomerVpcCidr:
Value: !Ref CustomerVpcCidr
MonitoringRouteTableIds:
Value:
Fn::Join: [",", !Ref MonitoringRouteTableIds]
70 changes: 70 additions & 0 deletions .ci_cd/aws/monitoring-network/cloudformation-customer-network.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
AWSTemplateFormatVersion: "2010-09-09"
Transform: AWS::LanguageExtensions
Description: Shared customer monitoring peering and explicit customer routes

Parameters:
CustomerVpcId:
Type: AWS::EC2::VPC::Id
Description: Existing customer requester VPC in this account and region
CustomerRouteTableIds:
Type: CommaDelimitedList
AllowedPattern: "rtb-([0-9a-f]{8}|[0-9a-f]{17})"
Description: Unique existing customer route tables approved by the provisioning role
MonitoringAccountId:
Type: String
AllowedPattern: "[0-9]{12}"
Description: Account owning the monitoring VPC and acceptance role
MonitoringVpcId:
Type: String
AllowedPattern: "vpc-([0-9a-f]{8}|[0-9a-f]{17})"
Description: Existing monitoring accepter VPC in the same region
MonitoringVpcCidr:
Type: String
AllowedPattern: '((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])/(1[6-9]|2[0-8])'
Description: Exact canonical IPv4 VPC CIDR for monitoring, /16 through /28; verify against AWS before applying
AcceptanceRoleArn:
Type: String
AllowedPattern: "arn:aws:iam::[0-9]{12}:role/[A-Za-z0-9+=,.@_/-]+"
Description: Approved central acceptance role for this customer role and VPC pair

Resources:
MonitoringPeering:
Type: AWS::EC2::VPCPeeringConnection
Properties:
VpcId: !Ref CustomerVpcId
PeerOwnerId: !Ref MonitoringAccountId
PeerVpcId: !Ref MonitoringVpcId
PeerRegion: !Ref AWS::Region
PeerRoleArn: !Ref AcceptanceRoleArn
Tags:
# Must match NetworkStackName in the customer provisioning role.
- Key: openremote:monitoring-network
Value: !Ref AWS::StackName
- Key: Name
Value: !Ref AWS::StackName

# Table-derived logical IDs keep routes stable when the list is reordered.
# &{} allows the hyphen in EC2 route-table IDs.
"Fn::ForEach::CustomerRoutes":
- RouteTableId
- !Ref CustomerRouteTableIds
- "MonitoringRoute&{RouteTableId}":
Type: AWS::EC2::Route
Properties:
RouteTableId: "${RouteTableId}"
DestinationCidrBlock: !Ref MonitoringVpcCidr
VpcPeeringConnectionId: !Ref MonitoringPeering

Outputs:
PeeringConnectionId:
Description: Connection ID for the separate central return-routes stack
Value: !Ref MonitoringPeering
CustomerVpcId:
Value: !Ref CustomerVpcId
CustomerRouteTableIds:
Value:
Fn::Join: [",", !Ref CustomerRouteTableIds]
MonitoringVpcId:
Value: !Ref MonitoringVpcId
MonitoringVpcCidr:
Value: !Ref MonitoringVpcCidr
180 changes: 180 additions & 0 deletions .ci_cd/aws/monitoring-network/cloudformation-customer-role.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@
AWSTemplateFormatVersion: "2010-09-09"
Description: Dedicated GitHub OIDC role for one customer monitoring network stack

Parameters:
RoleName:
Type: String
Description: Pathless role name also configured on the central acceptance stack
AllowedPattern: "[A-Za-z0-9+=,.@_-]+"
MaxLength: 64
GitHubRepository:
Type: String
Description: Exact owner/repository of the customer workflow caller
AllowedPattern: "[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+"
GitHubEnvironment:
Type: String
Default: monitoring-network
Description: Account-level GitHub environment; configure its protection and branch rules separately
AllowedPattern: "[A-Za-z0-9_-]+"
MaxLength: 255
NetworkStackName:
Type: String
Description: Exact dedicated customer peering/routes stack name, different from this IAM stack
AllowedPattern: "[A-Za-z][A-Za-z0-9-]*"
MaxLength: 128
CustomerVpcId:
Type: AWS::EC2::VPC::Id
Description: Existing customer VPC; this role cannot create or replace it
CustomerRouteTableIds:
Type: CommaDelimitedList
AllowedPattern: "rtb-([0-9a-f]{8}|[0-9a-f]{17})"
Description: Explicit existing customer route tables whose route entries may be managed
MonitoringVpcArn:
Type: String
Description: Exact monitoring VPC ARN in the same region and partition
AllowedPattern: "arn:aws:ec2:[a-z0-9-]+:[0-9]{12}:vpc/vpc-([0-9a-f]{8}|[0-9a-f]{17})"
AcceptanceRoleArn:
Type: String
Description: PeeringAcceptanceRoleArn output from the approved central acceptance stack
AllowedPattern: "arn:aws:iam::[0-9]{12}:role/[A-Za-z0-9+=,.@_/-]+"

# The account-wide GitHub OIDC provider is an existing prerequisite, managed by CfCT.
# This role uses its own credentials through CloudFormation, not a service role.
Resources:
CustomerNetworkRole:
Type: AWS::IAM::Role
Properties:
RoleName: !Ref RoleName
Description: Provisions only the configured customer monitoring connection
MaxSessionDuration: 3600
AssumeRolePolicyDocument:
Version: "2012-10-17"
Statement:
- Effect: Allow
Principal:
Federated: !Sub "arn:${AWS::Partition}:iam::${AWS::AccountId}:oidc-provider/token.actions.githubusercontent.com"
Action: sts:AssumeRoleWithWebIdentity
Condition:
StringEquals:
token.actions.githubusercontent.com:aud: sts.amazonaws.com
token.actions.githubusercontent.com:sub: !Sub "repo:${GitHubRepository}:environment:${GitHubEnvironment}"
Policies:
- PolicyName: CustomerMonitoringNetwork
PolicyDocument:
Version: "2012-10-17"
Statement:
- Sid: InspectRegionalNetwork
Effect: Allow
Action:
- ec2:DescribeVpcs
- ec2:DescribeVpcAttribute
- ec2:DescribeVpcPeeringConnections
- ec2:DescribeRouteTables
- ec2:DescribeSubnets
- ec2:DescribeNetworkAcls
- ec2:DescribeSecurityGroups
Resource: "*"
Condition:
StringEquals:
aws:RequestedRegion: !Ref AWS::Region
- Sid: PreviewDedicatedStack
Effect: Allow
Action: cloudformation:CreateChangeSet
Resource: !Sub "arn:${AWS::Partition}:cloudformation:${AWS::Region}:${AWS::AccountId}:stack/${NetworkStackName}/*"
Condition:
"Null":
cloudformation:RoleArn: "true"
- Sid: OperateDedicatedStack
Effect: Allow
Action:
- cloudformation:DescribeStacks
- cloudformation:DescribeStackEvents
- cloudformation:DescribeStackResources
- cloudformation:ListStackResources
- cloudformation:GetTemplate
- cloudformation:ListChangeSets
- cloudformation:DescribeChangeSet
- cloudformation:ExecuteChangeSet
- cloudformation:DeleteChangeSet
- cloudformation:ContinueUpdateRollback
- cloudformation:TagResource
- cloudformation:UntagResource
Resource: !Sub "arn:${AWS::Partition}:cloudformation:${AWS::Region}:${AWS::AccountId}:stack/${NetworkStackName}/*"
- Sid: AssumeCentralAcceptanceRole
Effect: Allow
Action: sts:AssumeRole
Resource: !Ref AcceptanceRoleArn
- Sid: RequestFromCustomerVpc
Effect: Allow
Action: ec2:CreateVpcPeeringConnection
Resource: !Sub "arn:${AWS::Partition}:ec2:${AWS::Region}:${AWS::AccountId}:vpc/${CustomerVpcId}"
- Sid: CreateConfiguredPeering
Effect: Allow
Action: ec2:CreateVpcPeeringConnection
Resource: !Sub "arn:${AWS::Partition}:ec2:${AWS::Region}:${AWS::AccountId}:vpc-peering-connection/*"
Condition:
ArnEquals:
ec2:RequesterVpc: !Sub "arn:${AWS::Partition}:ec2:${AWS::Region}:${AWS::AccountId}:vpc/${CustomerVpcId}"
ec2:AccepterVpc: !Ref MonitoringVpcArn
StringEquals:
aws:RequestTag/openremote:monitoring-network: !Ref NetworkStackName
- Sid: TagPeeringOnCreation
Effect: Allow
Action: ec2:CreateTags
Resource: !Sub "arn:${AWS::Partition}:ec2:${AWS::Region}:${AWS::AccountId}:vpc-peering-connection/*"
Condition:
StringEquals:
ec2:CreateAction: CreateVpcPeeringConnection
aws:RequestTag/openremote:monitoring-network: !Ref NetworkStackName
- Sid: UpdateOwnedPeeringTags
Effect: Allow
Action:
- ec2:CreateTags
- ec2:DeleteTags
Resource: !Sub "arn:${AWS::Partition}:ec2:${AWS::Region}:${AWS::AccountId}:vpc-peering-connection/*"
Condition:
StringEquals:
ec2:ResourceTag/openremote:monitoring-network: !Ref NetworkStackName
ForAllValues:StringNotEquals:
aws:TagKeys: openremote:monitoring-network
- Sid: DeleteOwnedConfiguredPeering
Effect: Allow
Action: ec2:DeleteVpcPeeringConnection
Resource: !Sub "arn:${AWS::Partition}:ec2:${AWS::Region}:${AWS::AccountId}:vpc-peering-connection/*"
Condition:
ArnEquals:
ec2:RequesterVpc: !Sub "arn:${AWS::Partition}:ec2:${AWS::Region}:${AWS::AccountId}:vpc/${CustomerVpcId}"
ec2:AccepterVpc: !Ref MonitoringVpcArn
StringEquals:
ec2:ResourceTag/openremote:monitoring-network: !Ref NetworkStackName
- Sid: ManageRoutesInApprovedTables
Effect: Allow
Action:
- ec2:CreateRoute
- ec2:ReplaceRoute
- ec2:DeleteRoute
Resource: !Sub "arn:${AWS::Partition}:ec2:${AWS::Region}:${AWS::AccountId}:route-table/*"
Condition:
ArnEquals:
ec2:Vpc: !Sub "arn:${AWS::Partition}:ec2:${AWS::Region}:${AWS::AccountId}:vpc/${CustomerVpcId}"
StringEquals:
ec2:RouteTableID: !Ref CustomerRouteTableIds
Tags:
- Key: Component
Value: monitoring-network
- Key: NetworkStack
Value: !Ref NetworkStackName

Outputs:
CustomerNetworkRoleArn:
Description: Role to assume through GitHub OIDC for the customer networking workflow
Value: !GetAtt CustomerNetworkRole.Arn
CustomerNetworkRoleName:
Description: RequesterRoleName for the central acceptance prerequisite
Value: !Ref CustomerNetworkRole
TrustedGitHubSubject:
Description: Exact repository/environment subject authorized by this role
Value: !Sub "repo:${GitHubRepository}:environment:${GitHubEnvironment}"
NetworkStackName:
Description: Dedicated customer networking stack this role may operate
Value: !Ref NetworkStackName
Loading
Loading