cfn-model 0.4.11 → 0.4.12
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a1706430755f12f30280c2a2baebb5566d50898ede81ec20e503ef91642e08b6
|
4
|
+
data.tar.gz: 30075abf14b456b2ebed049d9af2b68cfee7be938f8bcf9b8936170e651f8eeb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a7223fce1ad56a488c37cfc27c0b35a2b5f0df76c4d3dc7b55ca2d46139b8f2f479e5ae981549ac91844d710cabf2519a73fbc1507426e0ee254976cf0a328d6
|
7
|
+
data.tar.gz: a1e9d39a1f17aa3f0ed0238cb8abc098a2880f3873ff3270ff9f2e6dc6c8dbdc017c96e3c0e6ca30531de5be8adf7a3494cd97b843476a8300ebda657fea977a
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'cfn-model/model/kms_key'
|
4
|
+
require 'cfn-model/model/policy'
|
5
|
+
require_relative 'policy_document_parser'
|
6
|
+
|
7
|
+
class KmsKeyParser
|
8
|
+
def parse(cfn_model:, resource:)
|
9
|
+
kms_key = resource
|
10
|
+
|
11
|
+
new_policy = Policy.new
|
12
|
+
new_policy.policy_document = PolicyDocumentParser.new.parse(kms_key.keyPolicy)
|
13
|
+
kms_key.key_policy = new_policy
|
14
|
+
|
15
|
+
kms_key
|
16
|
+
end
|
17
|
+
end
|
@@ -17,6 +17,7 @@ class ParserRegistry
|
|
17
17
|
'AWS::IAM::Role' => IamRoleParser,
|
18
18
|
'AWS::IAM::Policy' => WithPolicyDocumentParser,
|
19
19
|
'AWS::IAM::ManagedPolicy' => WithPolicyDocumentParser,
|
20
|
+
'AWS::KMS::Key' => KmsKeyParser,
|
20
21
|
'AWS::S3::BucketPolicy' => WithPolicyDocumentParser,
|
21
22
|
'AWS::SNS::TopicPolicy' => WithPolicyDocumentParser,
|
22
23
|
'AWS::SQS::QueuePolicy' => WithPolicyDocumentParser
|
@@ -33,4 +34,4 @@ class ParserRegistry
|
|
33
34
|
# def add_parser(resource_name, parser)
|
34
35
|
# @registry[resource_name] = parser
|
35
36
|
# end
|
36
|
-
end
|
37
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cfn-model
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Kascic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-01-
|
11
|
+
date: 2020-01-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubocop
|
@@ -70,6 +70,7 @@ files:
|
|
70
70
|
- lib/cfn-model/model/iam_policy.rb
|
71
71
|
- lib/cfn-model/model/iam_role.rb
|
72
72
|
- lib/cfn-model/model/iam_user.rb
|
73
|
+
- lib/cfn-model/model/kms_key.rb
|
73
74
|
- lib/cfn-model/model/lambda_principal.rb
|
74
75
|
- lib/cfn-model/model/load_balancer.rb
|
75
76
|
- lib/cfn-model/model/model_element.rb
|
@@ -91,6 +92,7 @@ files:
|
|
91
92
|
- lib/cfn-model/parser/iam_group_parser.rb
|
92
93
|
- lib/cfn-model/parser/iam_role_parser.rb
|
93
94
|
- lib/cfn-model/parser/iam_user_parser.rb
|
95
|
+
- lib/cfn-model/parser/kms_key_parser.rb
|
94
96
|
- lib/cfn-model/parser/load_balancer_parser.rb
|
95
97
|
- lib/cfn-model/parser/load_balancer_v2_parser.rb
|
96
98
|
- lib/cfn-model/parser/parameter_substitution.rb
|
@@ -117,6 +119,7 @@ files:
|
|
117
119
|
- lib/cfn-model/schema/AWS_IAM_Role.yml
|
118
120
|
- lib/cfn-model/schema/AWS_IAM_User.yml
|
119
121
|
- lib/cfn-model/schema/AWS_IAM_UserToGroupAddition.yml
|
122
|
+
- lib/cfn-model/schema/AWS_KMS_Key.yml
|
120
123
|
- lib/cfn-model/schema/AWS_Lambda_Permission.yml
|
121
124
|
- lib/cfn-model/schema/AWS_S3_BucketPolicy.yml
|
122
125
|
- lib/cfn-model/schema/AWS_SNS_TopicPolicy.yml
|