@friggframework/devtools 2.0.0--canary.400.bed3308.0 → 2.0.0--canary.404.e9d4980.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/frigg-cli/build-command/index.js +3 -18
- package/frigg-cli/deploy-command/index.js +3 -19
- package/frigg-cli/index.js +1 -73
- package/frigg-cli/install-command/index.js +2 -15
- package/frigg-cli/start-command/index.js +2 -17
- package/infrastructure/create-frigg-infrastructure.js +2 -2
- package/infrastructure/serverless-template.js +79 -529
- package/package.json +5 -9
- package/frigg-cli/.eslintrc.js +0 -141
- package/frigg-cli/__tests__/jest.config.js +0 -102
- package/frigg-cli/__tests__/unit/commands/build.test.js +0 -483
- package/frigg-cli/__tests__/unit/commands/install.test.js +0 -418
- package/frigg-cli/__tests__/unit/commands/ui.test.js +0 -592
- package/frigg-cli/__tests__/utils/command-tester.js +0 -170
- package/frigg-cli/__tests__/utils/mock-factory.js +0 -270
- package/frigg-cli/__tests__/utils/test-fixtures.js +0 -463
- package/frigg-cli/__tests__/utils/test-setup.js +0 -286
- package/frigg-cli/generate-command/__tests__/generate-command.test.js +0 -312
- package/frigg-cli/generate-command/azure-generator.js +0 -43
- package/frigg-cli/generate-command/gcp-generator.js +0 -47
- package/frigg-cli/generate-command/index.js +0 -350
- package/frigg-cli/generate-command/terraform-generator.js +0 -555
- package/frigg-cli/generate-iam-command.js +0 -115
- package/frigg-cli/package.json +0 -75
- package/frigg-cli/ui-command/index.js +0 -167
- package/frigg-cli/utils/app-resolver.js +0 -319
- package/frigg-cli/utils/backend-path.js +0 -38
- package/frigg-cli/utils/process-manager.js +0 -199
- package/frigg-cli/utils/repo-detection.js +0 -405
- package/infrastructure/AWS-DISCOVERY-TROUBLESHOOTING.md +0 -245
- package/infrastructure/AWS-IAM-CREDENTIAL-NEEDS.md +0 -620
- package/infrastructure/DEPLOYMENT-INSTRUCTIONS.md +0 -268
- package/infrastructure/GENERATE-IAM-DOCS.md +0 -253
- package/infrastructure/IAM-POLICY-TEMPLATES.md +0 -176
- package/infrastructure/README-TESTING.md +0 -332
- package/infrastructure/README.md +0 -421
- package/infrastructure/WEBSOCKET-CONFIGURATION.md +0 -105
- package/infrastructure/__tests__/fixtures/mock-aws-resources.js +0 -391
- package/infrastructure/__tests__/helpers/test-utils.js +0 -277
- package/infrastructure/aws-discovery.js +0 -568
- package/infrastructure/aws-discovery.test.js +0 -373
- package/infrastructure/build-time-discovery.js +0 -206
- package/infrastructure/build-time-discovery.test.js +0 -375
- package/infrastructure/frigg-deployment-iam-stack.yaml +0 -393
- package/infrastructure/iam-generator.js +0 -810
- package/infrastructure/iam-generator.test.js +0 -169
- package/infrastructure/iam-policy-basic.json +0 -236
- package/infrastructure/iam-policy-full.json +0 -305
- package/infrastructure/integration.test.js +0 -383
- package/infrastructure/run-discovery.js +0 -110
- package/infrastructure/serverless-template.test.js +0 -553
- package/management-ui/.eslintrc.js +0 -22
- package/management-ui/README.md +0 -203
- package/management-ui/components.json +0 -21
- package/management-ui/index.html +0 -13
- package/management-ui/merge-conflict-cleaner.py +0 -371
- package/management-ui/package-lock.json +0 -10997
- package/management-ui/package.json +0 -76
- package/management-ui/postcss.config.js +0 -6
- package/management-ui/server/api/backend.js +0 -256
- package/management-ui/server/api/cli.js +0 -315
- package/management-ui/server/api/codegen.js +0 -663
- package/management-ui/server/api/connections.js +0 -857
- package/management-ui/server/api/discovery.js +0 -185
- package/management-ui/server/api/environment/index.js +0 -1
- package/management-ui/server/api/environment/router.js +0 -378
- package/management-ui/server/api/environment.js +0 -328
- package/management-ui/server/api/integrations.js +0 -479
- package/management-ui/server/api/logs.js +0 -248
- package/management-ui/server/api/monitoring.js +0 -282
- package/management-ui/server/api/open-ide.js +0 -31
- package/management-ui/server/api/project.js +0 -553
- package/management-ui/server/api/users/sessions.js +0 -371
- package/management-ui/server/api/users/simulation.js +0 -254
- package/management-ui/server/api/users.js +0 -362
- package/management-ui/server/api-contract.md +0 -275
- package/management-ui/server/index.js +0 -428
- package/management-ui/server/middleware/errorHandler.js +0 -70
- package/management-ui/server/middleware/security.js +0 -32
- package/management-ui/server/processManager.js +0 -296
- package/management-ui/server/server.js +0 -188
- package/management-ui/server/services/aws-monitor.js +0 -413
- package/management-ui/server/services/npm-registry.js +0 -347
- package/management-ui/server/services/template-engine.js +0 -538
- package/management-ui/server/utils/cliIntegration.js +0 -220
- package/management-ui/server/utils/environment/auditLogger.js +0 -471
- package/management-ui/server/utils/environment/awsParameterStore.js +0 -264
- package/management-ui/server/utils/environment/encryption.js +0 -278
- package/management-ui/server/utils/environment/envFileManager.js +0 -286
- package/management-ui/server/utils/import-commonjs.js +0 -28
- package/management-ui/server/utils/response.js +0 -83
- package/management-ui/server/websocket/handler.js +0 -325
- package/management-ui/src/App.jsx +0 -51
- package/management-ui/src/assets/FriggLogo.svg +0 -1
- package/management-ui/src/components/AppRouter.jsx +0 -65
- package/management-ui/src/components/Button.jsx +0 -2
- package/management-ui/src/components/Card.jsx +0 -9
- package/management-ui/src/components/EnvironmentCompare.jsx +0 -400
- package/management-ui/src/components/EnvironmentEditor.jsx +0 -372
- package/management-ui/src/components/EnvironmentImportExport.jsx +0 -469
- package/management-ui/src/components/EnvironmentSchema.jsx +0 -491
- package/management-ui/src/components/EnvironmentSecurity.jsx +0 -463
- package/management-ui/src/components/ErrorBoundary.jsx +0 -73
- package/management-ui/src/components/IntegrationCard.jsx +0 -199
- package/management-ui/src/components/IntegrationCardEnhanced.jsx +0 -490
- package/management-ui/src/components/IntegrationExplorer.jsx +0 -379
- package/management-ui/src/components/IntegrationStatus.jsx +0 -235
- package/management-ui/src/components/Layout.jsx +0 -250
- package/management-ui/src/components/LoadingSpinner.jsx +0 -45
- package/management-ui/src/components/RepositoryPicker.jsx +0 -248
- package/management-ui/src/components/SessionMonitor.jsx +0 -255
- package/management-ui/src/components/StatusBadge.jsx +0 -70
- package/management-ui/src/components/UserContextSwitcher.jsx +0 -154
- package/management-ui/src/components/UserSimulation.jsx +0 -299
- package/management-ui/src/components/Welcome.jsx +0 -434
- package/management-ui/src/components/codegen/APIEndpointGenerator.jsx +0 -637
- package/management-ui/src/components/codegen/APIModuleSelector.jsx +0 -227
- package/management-ui/src/components/codegen/CodeGenerationWizard.jsx +0 -247
- package/management-ui/src/components/codegen/CodePreviewEditor.jsx +0 -316
- package/management-ui/src/components/codegen/DynamicModuleForm.jsx +0 -271
- package/management-ui/src/components/codegen/FormBuilder.jsx +0 -737
- package/management-ui/src/components/codegen/IntegrationGenerator.jsx +0 -855
- package/management-ui/src/components/codegen/ProjectScaffoldWizard.jsx +0 -797
- package/management-ui/src/components/codegen/SchemaBuilder.jsx +0 -303
- package/management-ui/src/components/codegen/TemplateSelector.jsx +0 -586
- package/management-ui/src/components/codegen/index.js +0 -10
- package/management-ui/src/components/connections/ConnectionConfigForm.jsx +0 -362
- package/management-ui/src/components/connections/ConnectionHealthMonitor.jsx +0 -182
- package/management-ui/src/components/connections/ConnectionTester.jsx +0 -200
- package/management-ui/src/components/connections/EntityRelationshipMapper.jsx +0 -292
- package/management-ui/src/components/connections/OAuthFlow.jsx +0 -204
- package/management-ui/src/components/connections/index.js +0 -5
- package/management-ui/src/components/index.js +0 -21
- package/management-ui/src/components/monitoring/APIGatewayMetrics.jsx +0 -222
- package/management-ui/src/components/monitoring/LambdaMetrics.jsx +0 -169
- package/management-ui/src/components/monitoring/MetricsChart.jsx +0 -197
- package/management-ui/src/components/monitoring/MonitoringDashboard.jsx +0 -393
- package/management-ui/src/components/monitoring/SQSMetrics.jsx +0 -246
- package/management-ui/src/components/monitoring/index.js +0 -6
- package/management-ui/src/components/monitoring/monitoring.css +0 -218
- package/management-ui/src/components/theme-provider.jsx +0 -52
- package/management-ui/src/components/theme-toggle.jsx +0 -39
- package/management-ui/src/components/ui/badge.tsx +0 -36
- package/management-ui/src/components/ui/button.test.jsx +0 -56
- package/management-ui/src/components/ui/button.tsx +0 -57
- package/management-ui/src/components/ui/card.tsx +0 -76
- package/management-ui/src/components/ui/dropdown-menu.tsx +0 -199
- package/management-ui/src/components/ui/select.tsx +0 -157
- package/management-ui/src/components/ui/skeleton.jsx +0 -15
- package/management-ui/src/hooks/useFrigg.jsx +0 -387
- package/management-ui/src/hooks/useSocket.jsx +0 -58
- package/management-ui/src/index.css +0 -194
- package/management-ui/src/lib/utils.ts +0 -6
- package/management-ui/src/main.jsx +0 -10
- package/management-ui/src/pages/CodeGeneration.jsx +0 -14
- package/management-ui/src/pages/Connections.jsx +0 -252
- package/management-ui/src/pages/ConnectionsEnhanced.jsx +0 -427
- package/management-ui/src/pages/Dashboard.jsx +0 -311
- package/management-ui/src/pages/Environment.jsx +0 -314
- package/management-ui/src/pages/IntegrationConfigure.jsx +0 -544
- package/management-ui/src/pages/IntegrationDiscovery.jsx +0 -479
- package/management-ui/src/pages/IntegrationTest.jsx +0 -494
- package/management-ui/src/pages/Integrations.jsx +0 -254
- package/management-ui/src/pages/Monitoring.jsx +0 -17
- package/management-ui/src/pages/Simulation.jsx +0 -155
- package/management-ui/src/pages/Users.jsx +0 -492
- package/management-ui/src/services/api.js +0 -41
- package/management-ui/src/services/apiModuleService.js +0 -193
- package/management-ui/src/services/websocket-handlers.js +0 -120
- package/management-ui/src/test/api/project.test.js +0 -273
- package/management-ui/src/test/components/Welcome.test.jsx +0 -378
- package/management-ui/src/test/mocks/server.js +0 -178
- package/management-ui/src/test/setup.js +0 -61
- package/management-ui/src/test/utils/test-utils.jsx +0 -134
- package/management-ui/src/utils/repository.js +0 -98
- package/management-ui/src/utils/repository.test.js +0 -118
- package/management-ui/src/workflows/phase2-integration-workflows.js +0 -884
- package/management-ui/tailwind.config.js +0 -63
- package/management-ui/tsconfig.json +0 -37
- package/management-ui/tsconfig.node.json +0 -10
- package/management-ui/vite.config.js +0 -26
- package/management-ui/vitest.config.js +0 -38
|
@@ -1,393 +0,0 @@
|
|
|
1
|
-
AWSTemplateFormatVersion: '2010-09-09'
|
|
2
|
-
Description: 'IAM roles and policies for Frigg application deployment pipeline'
|
|
3
|
-
|
|
4
|
-
Parameters:
|
|
5
|
-
DeploymentUserName:
|
|
6
|
-
Type: String
|
|
7
|
-
Default: 'frigg-deployment-user'
|
|
8
|
-
Description: 'Name for the IAM user that will deploy Frigg applications'
|
|
9
|
-
|
|
10
|
-
EnableVPCSupport:
|
|
11
|
-
Type: String
|
|
12
|
-
Default: 'true'
|
|
13
|
-
AllowedValues: ['true', 'false']
|
|
14
|
-
Description: 'Enable VPC-related permissions for Frigg applications'
|
|
15
|
-
|
|
16
|
-
EnableKMSSupport:
|
|
17
|
-
Type: String
|
|
18
|
-
Default: 'true'
|
|
19
|
-
AllowedValues: ['true', 'false']
|
|
20
|
-
Description: 'Enable KMS encryption permissions for Frigg applications'
|
|
21
|
-
|
|
22
|
-
EnableSSMSupport:
|
|
23
|
-
Type: String
|
|
24
|
-
Default: 'true'
|
|
25
|
-
AllowedValues: ['true', 'false']
|
|
26
|
-
Description: 'Enable SSM Parameter Store permissions for Frigg applications'
|
|
27
|
-
|
|
28
|
-
Conditions:
|
|
29
|
-
CreateVPCPermissions: !Equals [!Ref EnableVPCSupport, 'true']
|
|
30
|
-
CreateKMSPermissions: !Equals [!Ref EnableKMSSupport, 'true']
|
|
31
|
-
CreateSSMPermissions: !Equals [!Ref EnableSSMSupport, 'true']
|
|
32
|
-
|
|
33
|
-
Resources:
|
|
34
|
-
# IAM User for deployment
|
|
35
|
-
FriggDeploymentUser:
|
|
36
|
-
Type: AWS::IAM::User
|
|
37
|
-
Properties:
|
|
38
|
-
UserName: !Ref DeploymentUserName
|
|
39
|
-
ManagedPolicyArns:
|
|
40
|
-
- !Ref FriggDiscoveryPolicy
|
|
41
|
-
- !Ref FriggCoreDeploymentPolicy
|
|
42
|
-
- !If [CreateVPCPermissions, !Ref FriggVPCPolicy, !Ref 'AWS::NoValue']
|
|
43
|
-
- !If [CreateKMSPermissions, !Ref FriggKMSPolicy, !Ref 'AWS::NoValue']
|
|
44
|
-
- !If [CreateSSMPermissions, !Ref FriggSSMPolicy, !Ref 'AWS::NoValue']
|
|
45
|
-
|
|
46
|
-
# Access key for the deployment user
|
|
47
|
-
FriggDeploymentAccessKey:
|
|
48
|
-
Type: AWS::IAM::AccessKey
|
|
49
|
-
Properties:
|
|
50
|
-
UserName: !Ref FriggDeploymentUser
|
|
51
|
-
|
|
52
|
-
# Discovery-time permissions (required for build process)
|
|
53
|
-
FriggDiscoveryPolicy:
|
|
54
|
-
Type: AWS::IAM::ManagedPolicy
|
|
55
|
-
Properties:
|
|
56
|
-
ManagedPolicyName: 'FriggDiscoveryPolicy'
|
|
57
|
-
Description: 'Permissions for AWS resource discovery during Frigg build process'
|
|
58
|
-
PolicyDocument:
|
|
59
|
-
Version: '2012-10-17'
|
|
60
|
-
Statement:
|
|
61
|
-
- Sid: 'AWSDiscoveryPermissions'
|
|
62
|
-
Effect: Allow
|
|
63
|
-
Action:
|
|
64
|
-
- 'sts:GetCallerIdentity'
|
|
65
|
-
- 'ec2:DescribeVpcs'
|
|
66
|
-
- 'ec2:DescribeSubnets'
|
|
67
|
-
- 'ec2:DescribeSecurityGroups'
|
|
68
|
-
- 'ec2:DescribeRouteTables'
|
|
69
|
-
- 'kms:ListKeys'
|
|
70
|
-
- 'kms:DescribeKey'
|
|
71
|
-
Resource: '*'
|
|
72
|
-
|
|
73
|
-
# Core deployment permissions
|
|
74
|
-
FriggCoreDeploymentPolicy:
|
|
75
|
-
Type: AWS::IAM::ManagedPolicy
|
|
76
|
-
Properties:
|
|
77
|
-
ManagedPolicyName: 'FriggCoreDeploymentPolicy'
|
|
78
|
-
Description: 'Core permissions for deploying Frigg applications'
|
|
79
|
-
PolicyDocument:
|
|
80
|
-
Version: '2012-10-17'
|
|
81
|
-
Statement:
|
|
82
|
-
# CloudFormation permissions
|
|
83
|
-
- Sid: 'CloudFormationFriggStacks'
|
|
84
|
-
Effect: Allow
|
|
85
|
-
Action:
|
|
86
|
-
- 'cloudformation:CreateStack'
|
|
87
|
-
- 'cloudformation:UpdateStack'
|
|
88
|
-
- 'cloudformation:DeleteStack'
|
|
89
|
-
- 'cloudformation:DescribeStacks'
|
|
90
|
-
- 'cloudformation:DescribeStackEvents'
|
|
91
|
-
- 'cloudformation:DescribeStackResources'
|
|
92
|
-
- 'cloudformation:DescribeStackResource'
|
|
93
|
-
- 'cloudformation:ListStackResources'
|
|
94
|
-
- 'cloudformation:GetTemplate'
|
|
95
|
-
- 'cloudformation:DescribeChangeSet'
|
|
96
|
-
- 'cloudformation:CreateChangeSet'
|
|
97
|
-
- 'cloudformation:DeleteChangeSet'
|
|
98
|
-
- 'cloudformation:ExecuteChangeSet'
|
|
99
|
-
Resource:
|
|
100
|
-
- !Sub 'arn:aws:cloudformation:*:${AWS::AccountId}:stack/*frigg*/*'
|
|
101
|
-
|
|
102
|
-
# ValidateTemplate needs to be allowed on all resources
|
|
103
|
-
- Sid: 'CloudFormationValidateTemplate'
|
|
104
|
-
Effect: Allow
|
|
105
|
-
Action:
|
|
106
|
-
- 'cloudformation:ValidateTemplate'
|
|
107
|
-
Resource: '*'
|
|
108
|
-
|
|
109
|
-
# S3 deployment bucket permissions
|
|
110
|
-
- Sid: 'S3DeploymentBucket'
|
|
111
|
-
Effect: Allow
|
|
112
|
-
Action:
|
|
113
|
-
- 's3:CreateBucket'
|
|
114
|
-
- 's3:DeleteBucket'
|
|
115
|
-
- 's3:PutObject'
|
|
116
|
-
- 's3:GetObject'
|
|
117
|
-
- 's3:DeleteObject'
|
|
118
|
-
- 's3:PutBucketPolicy'
|
|
119
|
-
- 's3:GetBucketPolicy'
|
|
120
|
-
- 's3:DeleteBucketPolicy'
|
|
121
|
-
- 's3:PutBucketVersioning'
|
|
122
|
-
- 's3:GetBucketVersioning'
|
|
123
|
-
- 's3:PutBucketPublicAccessBlock'
|
|
124
|
-
- 's3:GetBucketPublicAccessBlock'
|
|
125
|
-
- 's3:PutBucketTagging'
|
|
126
|
-
- 's3:GetBucketTagging'
|
|
127
|
-
- 's3:DeleteBucketTagging'
|
|
128
|
-
- 's3:PutBucketEncryption'
|
|
129
|
-
- 's3:GetBucketEncryption'
|
|
130
|
-
- 's3:PutEncryptionConfiguration'
|
|
131
|
-
- 's3:PutBucketNotification'
|
|
132
|
-
- 's3:GetBucketNotification'
|
|
133
|
-
- 's3:GetBucketLocation'
|
|
134
|
-
- 's3:ListBucket'
|
|
135
|
-
- 's3:GetBucketAcl'
|
|
136
|
-
- 's3:PutBucketAcl'
|
|
137
|
-
Resource:
|
|
138
|
-
- 'arn:aws:s3:::*serverless*'
|
|
139
|
-
- 'arn:aws:s3:::*serverless*/*'
|
|
140
|
-
|
|
141
|
-
# Lambda function permissions
|
|
142
|
-
- Sid: 'LambdaFriggFunctions'
|
|
143
|
-
Effect: Allow
|
|
144
|
-
Action:
|
|
145
|
-
- 'lambda:CreateFunction'
|
|
146
|
-
- 'lambda:UpdateFunctionCode'
|
|
147
|
-
- 'lambda:UpdateFunctionConfiguration'
|
|
148
|
-
- 'lambda:DeleteFunction'
|
|
149
|
-
- 'lambda:GetFunction'
|
|
150
|
-
- 'lambda:ListFunctions'
|
|
151
|
-
- 'lambda:PublishVersion'
|
|
152
|
-
- 'lambda:CreateAlias'
|
|
153
|
-
- 'lambda:UpdateAlias'
|
|
154
|
-
- 'lambda:DeleteAlias'
|
|
155
|
-
- 'lambda:GetAlias'
|
|
156
|
-
- 'lambda:AddPermission'
|
|
157
|
-
- 'lambda:RemovePermission'
|
|
158
|
-
- 'lambda:GetPolicy'
|
|
159
|
-
- 'lambda:PutProvisionedConcurrencyConfig'
|
|
160
|
-
- 'lambda:DeleteProvisionedConcurrencyConfig'
|
|
161
|
-
- 'lambda:PutConcurrency'
|
|
162
|
-
- 'lambda:DeleteConcurrency'
|
|
163
|
-
- 'lambda:TagResource'
|
|
164
|
-
- 'lambda:UntagResource'
|
|
165
|
-
- 'lambda:ListVersionsByFunction'
|
|
166
|
-
Resource:
|
|
167
|
-
- !Sub 'arn:aws:lambda:*:${AWS::AccountId}:function:*frigg*'
|
|
168
|
-
|
|
169
|
-
# Lambda EventSourceMapping permissions
|
|
170
|
-
- Sid: 'FriggLambdaEventSourceMapping'
|
|
171
|
-
Effect: Allow
|
|
172
|
-
Action:
|
|
173
|
-
- 'lambda:CreateEventSourceMapping'
|
|
174
|
-
- 'lambda:DeleteEventSourceMapping'
|
|
175
|
-
- 'lambda:GetEventSourceMapping'
|
|
176
|
-
- 'lambda:UpdateEventSourceMapping'
|
|
177
|
-
- 'lambda:ListEventSourceMappings'
|
|
178
|
-
Resource:
|
|
179
|
-
- !Sub 'arn:aws:lambda:*:${AWS::AccountId}:event-source-mapping:*'
|
|
180
|
-
|
|
181
|
-
# IAM role permissions
|
|
182
|
-
- Sid: 'IAMRolesForFriggLambda'
|
|
183
|
-
Effect: Allow
|
|
184
|
-
Action:
|
|
185
|
-
- 'iam:CreateRole'
|
|
186
|
-
- 'iam:DeleteRole'
|
|
187
|
-
- 'iam:GetRole'
|
|
188
|
-
- 'iam:PassRole'
|
|
189
|
-
- 'iam:PutRolePolicy'
|
|
190
|
-
- 'iam:DeleteRolePolicy'
|
|
191
|
-
- 'iam:GetRolePolicy'
|
|
192
|
-
- 'iam:AttachRolePolicy'
|
|
193
|
-
- 'iam:DetachRolePolicy'
|
|
194
|
-
- 'iam:TagRole'
|
|
195
|
-
- 'iam:UntagRole'
|
|
196
|
-
Resource:
|
|
197
|
-
- !Sub 'arn:aws:iam::${AWS::AccountId}:role/*frigg*'
|
|
198
|
-
- !Sub 'arn:aws:iam::${AWS::AccountId}:role/*frigg*LambdaRole*'
|
|
199
|
-
|
|
200
|
-
# IAM policy permissions
|
|
201
|
-
- Sid: 'IAMPolicyVersionPermissions'
|
|
202
|
-
Effect: Allow
|
|
203
|
-
Action:
|
|
204
|
-
- 'iam:ListPolicyVersions'
|
|
205
|
-
Resource:
|
|
206
|
-
- !Sub 'arn:aws:iam::${AWS::AccountId}:policy/*'
|
|
207
|
-
|
|
208
|
-
# SQS permissions
|
|
209
|
-
- Sid: 'FriggMessagingServices'
|
|
210
|
-
Effect: Allow
|
|
211
|
-
Action:
|
|
212
|
-
- 'sqs:CreateQueue'
|
|
213
|
-
- 'sqs:DeleteQueue'
|
|
214
|
-
- 'sqs:GetQueueAttributes'
|
|
215
|
-
- 'sqs:SetQueueAttributes'
|
|
216
|
-
- 'sqs:GetQueueUrl'
|
|
217
|
-
- 'sqs:TagQueue'
|
|
218
|
-
- 'sqs:UntagQueue'
|
|
219
|
-
Resource:
|
|
220
|
-
- !Sub 'arn:aws:sqs:*:${AWS::AccountId}:*frigg*'
|
|
221
|
-
- !Sub 'arn:aws:sqs:*:${AWS::AccountId}:internal-error-queue-*'
|
|
222
|
-
|
|
223
|
-
# SNS permissions
|
|
224
|
-
- Sid: 'FriggSNSTopics'
|
|
225
|
-
Effect: Allow
|
|
226
|
-
Action:
|
|
227
|
-
- 'sns:CreateTopic'
|
|
228
|
-
- 'sns:DeleteTopic'
|
|
229
|
-
- 'sns:GetTopicAttributes'
|
|
230
|
-
- 'sns:SetTopicAttributes'
|
|
231
|
-
- 'sns:Subscribe'
|
|
232
|
-
- 'sns:Unsubscribe'
|
|
233
|
-
- 'sns:ListSubscriptionsByTopic'
|
|
234
|
-
- 'sns:TagResource'
|
|
235
|
-
- 'sns:UntagResource'
|
|
236
|
-
Resource:
|
|
237
|
-
- !Sub 'arn:aws:sns:*:${AWS::AccountId}:*frigg*'
|
|
238
|
-
|
|
239
|
-
# CloudWatch and Logs permissions
|
|
240
|
-
- Sid: 'FriggMonitoringAndLogs'
|
|
241
|
-
Effect: Allow
|
|
242
|
-
Action:
|
|
243
|
-
- 'cloudwatch:PutMetricAlarm'
|
|
244
|
-
- 'cloudwatch:DeleteAlarms'
|
|
245
|
-
- 'cloudwatch:DescribeAlarms'
|
|
246
|
-
- 'logs:CreateLogGroup'
|
|
247
|
-
- 'logs:CreateLogStream'
|
|
248
|
-
- 'logs:DeleteLogGroup'
|
|
249
|
-
- 'logs:DescribeLogGroups'
|
|
250
|
-
- 'logs:DescribeLogStreams'
|
|
251
|
-
- 'logs:FilterLogEvents'
|
|
252
|
-
- 'logs:PutLogEvents'
|
|
253
|
-
- 'logs:PutRetentionPolicy'
|
|
254
|
-
Resource:
|
|
255
|
-
- !Sub 'arn:aws:logs:*:${AWS::AccountId}:log-group:/aws/lambda/*frigg*'
|
|
256
|
-
- !Sub 'arn:aws:logs:*:${AWS::AccountId}:log-group:/aws/lambda/*frigg*:*'
|
|
257
|
-
- !Sub 'arn:aws:cloudwatch:*:${AWS::AccountId}:alarm:*frigg*'
|
|
258
|
-
|
|
259
|
-
# API Gateway permissions
|
|
260
|
-
- Sid: 'FriggAPIGateway'
|
|
261
|
-
Effect: Allow
|
|
262
|
-
Action:
|
|
263
|
-
- 'apigateway:POST'
|
|
264
|
-
- 'apigateway:PUT'
|
|
265
|
-
- 'apigateway:DELETE'
|
|
266
|
-
- 'apigateway:GET'
|
|
267
|
-
- 'apigateway:PATCH'
|
|
268
|
-
Resource:
|
|
269
|
-
- 'arn:aws:apigateway:*::/restapis'
|
|
270
|
-
- 'arn:aws:apigateway:*::/restapis/*'
|
|
271
|
-
- 'arn:aws:apigateway:*::/domainnames'
|
|
272
|
-
- 'arn:aws:apigateway:*::/domainnames/*'
|
|
273
|
-
- 'arn:aws:apigateway:*::/tags/*'
|
|
274
|
-
|
|
275
|
-
# VPC-specific permissions
|
|
276
|
-
FriggVPCPolicy:
|
|
277
|
-
Type: AWS::IAM::ManagedPolicy
|
|
278
|
-
Condition: CreateVPCPermissions
|
|
279
|
-
Properties:
|
|
280
|
-
ManagedPolicyName: 'FriggVPCPolicy'
|
|
281
|
-
Description: 'VPC-related permissions for Frigg applications'
|
|
282
|
-
PolicyDocument:
|
|
283
|
-
Version: '2012-10-17'
|
|
284
|
-
Statement:
|
|
285
|
-
- Sid: 'FriggVPCEndpointManagement'
|
|
286
|
-
Effect: Allow
|
|
287
|
-
Action:
|
|
288
|
-
- 'ec2:CreateVpcEndpoint'
|
|
289
|
-
- 'ec2:DeleteVpcEndpoints'
|
|
290
|
-
- 'ec2:DescribeVpcEndpoints'
|
|
291
|
-
- 'ec2:ModifyVpcEndpoint'
|
|
292
|
-
- 'ec2:CreateNatGateway'
|
|
293
|
-
- 'ec2:DeleteNatGateway'
|
|
294
|
-
- 'ec2:DescribeNatGateways'
|
|
295
|
-
- 'ec2:AllocateAddress'
|
|
296
|
-
- 'ec2:ReleaseAddress'
|
|
297
|
-
- 'ec2:DescribeAddresses'
|
|
298
|
-
- 'ec2:CreateRouteTable'
|
|
299
|
-
- 'ec2:DeleteRouteTable'
|
|
300
|
-
- 'ec2:DescribeRouteTables'
|
|
301
|
-
- 'ec2:CreateRoute'
|
|
302
|
-
- 'ec2:DeleteRoute'
|
|
303
|
-
- 'ec2:AssociateRouteTable'
|
|
304
|
-
- 'ec2:DisassociateRouteTable'
|
|
305
|
-
- 'ec2:CreateSecurityGroup'
|
|
306
|
-
- 'ec2:DeleteSecurityGroup'
|
|
307
|
-
- 'ec2:AuthorizeSecurityGroupEgress'
|
|
308
|
-
- 'ec2:AuthorizeSecurityGroupIngress'
|
|
309
|
-
- 'ec2:RevokeSecurityGroupEgress'
|
|
310
|
-
- 'ec2:RevokeSecurityGroupIngress'
|
|
311
|
-
- 'ec2:CreateTags'
|
|
312
|
-
- 'ec2:DeleteTags'
|
|
313
|
-
- 'ec2:DescribeTags'
|
|
314
|
-
Resource: '*'
|
|
315
|
-
|
|
316
|
-
# KMS permissions
|
|
317
|
-
FriggKMSPolicy:
|
|
318
|
-
Type: AWS::IAM::ManagedPolicy
|
|
319
|
-
Condition: CreateKMSPermissions
|
|
320
|
-
Properties:
|
|
321
|
-
ManagedPolicyName: 'FriggKMSPolicy'
|
|
322
|
-
Description: 'KMS encryption permissions for Frigg applications'
|
|
323
|
-
PolicyDocument:
|
|
324
|
-
Version: '2012-10-17'
|
|
325
|
-
Statement:
|
|
326
|
-
- Sid: 'FriggKMSEncryptionRuntime'
|
|
327
|
-
Effect: Allow
|
|
328
|
-
Action:
|
|
329
|
-
- 'kms:GenerateDataKey'
|
|
330
|
-
- 'kms:Decrypt'
|
|
331
|
-
Resource:
|
|
332
|
-
- !Sub 'arn:aws:kms:*:${AWS::AccountId}:key/*'
|
|
333
|
-
Condition:
|
|
334
|
-
StringEquals:
|
|
335
|
-
'kms:ViaService':
|
|
336
|
-
- 'lambda.*.amazonaws.com'
|
|
337
|
-
- 's3.*.amazonaws.com'
|
|
338
|
-
|
|
339
|
-
# SSM Parameter Store permissions
|
|
340
|
-
FriggSSMPolicy:
|
|
341
|
-
Type: AWS::IAM::ManagedPolicy
|
|
342
|
-
Condition: CreateSSMPermissions
|
|
343
|
-
Properties:
|
|
344
|
-
ManagedPolicyName: 'FriggSSMPolicy'
|
|
345
|
-
Description: 'SSM Parameter Store permissions for Frigg applications'
|
|
346
|
-
PolicyDocument:
|
|
347
|
-
Version: '2012-10-17'
|
|
348
|
-
Statement:
|
|
349
|
-
- Sid: 'FriggSSMParameterAccess'
|
|
350
|
-
Effect: Allow
|
|
351
|
-
Action:
|
|
352
|
-
- 'ssm:GetParameter'
|
|
353
|
-
- 'ssm:GetParameters'
|
|
354
|
-
- 'ssm:GetParametersByPath'
|
|
355
|
-
Resource:
|
|
356
|
-
- !Sub 'arn:aws:ssm:*:${AWS::AccountId}:parameter/*frigg*'
|
|
357
|
-
- !Sub 'arn:aws:ssm:*:${AWS::AccountId}:parameter/*frigg*/*'
|
|
358
|
-
|
|
359
|
-
# Store access key in Secrets Manager
|
|
360
|
-
FriggDeploymentCredentials:
|
|
361
|
-
Type: AWS::SecretsManager::Secret
|
|
362
|
-
Properties:
|
|
363
|
-
Name: 'frigg-deployment-credentials'
|
|
364
|
-
Description: 'Access credentials for Frigg deployment user'
|
|
365
|
-
SecretString: !Sub |
|
|
366
|
-
{
|
|
367
|
-
"AccessKeyId": "${FriggDeploymentAccessKey}",
|
|
368
|
-
"SecretAccessKey": "${FriggDeploymentAccessKey.SecretAccessKey}"
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
Outputs:
|
|
372
|
-
DeploymentUserArn:
|
|
373
|
-
Description: 'ARN of the Frigg deployment user'
|
|
374
|
-
Value: !GetAtt FriggDeploymentUser.Arn
|
|
375
|
-
Export:
|
|
376
|
-
Name: !Sub '${AWS::StackName}-UserArn'
|
|
377
|
-
|
|
378
|
-
AccessKeyId:
|
|
379
|
-
Description: 'Access Key ID for the deployment user'
|
|
380
|
-
Value: !Ref FriggDeploymentAccessKey
|
|
381
|
-
Export:
|
|
382
|
-
Name: !Sub '${AWS::StackName}-AccessKeyId'
|
|
383
|
-
|
|
384
|
-
SecretAccessKeyCommand:
|
|
385
|
-
Description: 'Command to retrieve the secret access key'
|
|
386
|
-
Value: !Sub |
|
|
387
|
-
aws secretsmanager get-secret-value --secret-id frigg-deployment-credentials --query SecretString --output text | jq -r .SecretAccessKey
|
|
388
|
-
|
|
389
|
-
CredentialsSecretArn:
|
|
390
|
-
Description: 'ARN of the secret containing deployment credentials'
|
|
391
|
-
Value: !Ref FriggDeploymentCredentials
|
|
392
|
-
Export:
|
|
393
|
-
Name: !Sub '${AWS::StackName}-CredentialsSecretArn'
|