aws_recon 0.5.27 → 0.5.28
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/aws_recon/collectors/glue.rb +94 -75
- data/lib/aws_recon/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c8229a3057964333c58233cb39472a5fb27adadc6098660464018cd16645b5c9
|
4
|
+
data.tar.gz: 222eff40d76d1eeb68a6638a59ef369d53b8ef2994a43b0b765803096933b645
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7f2248fcc733f9f42ae109f5cb96ab0c6e82562182b9e3dbc4404dca72599e224a38c8be7a9fa967d846957427dd6e9edd5387441afcecc2c4de8f55ad001244
|
7
|
+
data.tar.gz: 62f854284d474f8376ac15cae45bae67bd111ed064bdd4fae1c0e6d5ee4a942d905aebee4ac3f12c297c9a5635fe56c58f774f69fa70896974ac211be23a6efb
|
@@ -4,94 +4,113 @@
|
|
4
4
|
# Collect Glue resources
|
5
5
|
#
|
6
6
|
class Glue < Mapper
|
7
|
+
#
|
8
|
+
# Returns an array of resources.
|
9
|
+
#
|
10
|
+
def collect
|
11
|
+
resources = []
|
7
12
|
#
|
8
|
-
#
|
13
|
+
# get_data_catalog_encryption_settings
|
9
14
|
#
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
15
|
+
@client.get_data_catalog_encryption_settings.each_with_index do |response, page|
|
16
|
+
log(response.context.operation_name, page)
|
17
|
+
|
18
|
+
struct = OpenStruct.new(response.to_h)
|
19
|
+
struct.type = 'catalog_encryption_settings'
|
20
|
+
struct.arn = "arn:aws:glue:#{@region}:#{@account}:data-catalog-encryption-settings" # no true ARN
|
21
|
+
resources.push(struct.to_h)
|
22
|
+
end
|
23
|
+
|
24
|
+
#
|
25
|
+
# get_security_configurations
|
26
|
+
#
|
27
|
+
@client.get_security_configurations.each_with_index do |response, page|
|
28
|
+
log(response.context.operation_name, page)
|
29
|
+
|
30
|
+
response.security_configurations.each do |security_configuration|
|
31
|
+
struct = OpenStruct.new(security_configuration.to_h)
|
32
|
+
struct.type = 'security_configuration'
|
33
|
+
struct.arn = "arn:aws:glue:#{@region}:#{@account}:security-configuration/#{security_configuration.name}" # no true ARN
|
21
34
|
resources.push(struct.to_h)
|
22
35
|
end
|
36
|
+
end
|
23
37
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
resources.push(struct.to_h)
|
35
|
-
end
|
36
|
-
end
|
38
|
+
#
|
39
|
+
# get_databases
|
40
|
+
#
|
41
|
+
@client.get_databases.each_with_index do |response, page|
|
42
|
+
log(response.context.operation_name, page)
|
43
|
+
|
44
|
+
response.database_list.each do |database|
|
45
|
+
struct = OpenStruct.new(database.to_h)
|
46
|
+
struct.type = 'database'
|
47
|
+
struct.arn = "arn:aws:glue:#{@region}:#{@account}:database/#{database.name}"
|
37
48
|
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
struct = OpenStruct.new(job.to_h)
|
46
|
-
struct.type = 'job'
|
47
|
-
struct.arn = "arn:aws:glue:#{@region}:#{@account}:job/#{job.name}"
|
48
|
-
resources.push(struct.to_h)
|
49
|
-
end
|
49
|
+
#
|
50
|
+
# get_tables
|
51
|
+
#
|
52
|
+
tables = @client.get_tables({ database_name: database.name })
|
53
|
+
struct.tables = tables.to_h
|
54
|
+
|
55
|
+
resources.push(struct.to_h)
|
50
56
|
end
|
57
|
+
end
|
58
|
+
|
59
|
+
#
|
60
|
+
# get_jobs
|
61
|
+
#
|
62
|
+
@client.get_jobs.each_with_index do |response, page|
|
63
|
+
log(response.context.operation_name, page)
|
51
64
|
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
response.dev_endpoints.each do | dev_endpoint |
|
59
|
-
struct = OpenStruct.new(dev_endpoint.to_h)
|
60
|
-
struct.type = 'dev_endpoint'
|
61
|
-
struct.arn = "arn:aws:glue:#{@region}:#{@account}:devEndpoint/#{dev_endpoint.endpoint_name}"
|
62
|
-
resources.push(struct.to_h)
|
63
|
-
end
|
65
|
+
response.jobs.each do |job|
|
66
|
+
struct = OpenStruct.new(job.to_h)
|
67
|
+
struct.type = 'job'
|
68
|
+
struct.arn = "arn:aws:glue:#{@region}:#{@account}:job/#{job.name}"
|
69
|
+
resources.push(struct.to_h)
|
64
70
|
end
|
71
|
+
end
|
72
|
+
|
73
|
+
#
|
74
|
+
# get_dev_endpoints
|
75
|
+
#
|
76
|
+
@client.get_dev_endpoints.each_with_index do |response, page|
|
77
|
+
log(response.context.operation_name, page)
|
65
78
|
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
response.crawlers.each do | crawler |
|
73
|
-
struct = OpenStruct.new(crawler.to_h)
|
74
|
-
struct.type = 'crawler'
|
75
|
-
struct.arn = "arn:aws:glue:#{@region}:#{@account}:crawler/#{crawler.name}"
|
76
|
-
resources.push(struct.to_h)
|
77
|
-
end
|
79
|
+
response.dev_endpoints.each do |dev_endpoint|
|
80
|
+
struct = OpenStruct.new(dev_endpoint.to_h)
|
81
|
+
struct.type = 'dev_endpoint'
|
82
|
+
struct.arn = "arn:aws:glue:#{@region}:#{@account}:devEndpoint/#{dev_endpoint.endpoint_name}"
|
83
|
+
resources.push(struct.to_h)
|
78
84
|
end
|
85
|
+
end
|
79
86
|
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
end
|
87
|
+
#
|
88
|
+
# get_crawlers
|
89
|
+
#
|
90
|
+
@client.get_crawlers.each_with_index do |response, page|
|
91
|
+
log(response.context.operation_name, page)
|
92
|
+
|
93
|
+
response.crawlers.each do |crawler|
|
94
|
+
struct = OpenStruct.new(crawler.to_h)
|
95
|
+
struct.type = 'crawler'
|
96
|
+
struct.arn = "arn:aws:glue:#{@region}:#{@account}:crawler/#{crawler.name}"
|
97
|
+
resources.push(struct.to_h)
|
92
98
|
end
|
93
|
-
resources
|
94
99
|
end
|
95
100
|
|
101
|
+
#
|
102
|
+
# get_connections
|
103
|
+
#
|
104
|
+
@client.get_connections.each_with_index do |response, page|
|
105
|
+
log(response.context.operation_name, page)
|
106
|
+
|
107
|
+
response.connection_list.each do |connection|
|
108
|
+
struct = OpenStruct.new(connection.to_h)
|
109
|
+
struct.type = 'connection'
|
110
|
+
struct.arn = "arn:aws:glue:#{@region}:#{@account}:connection/#{connection.name}"
|
111
|
+
resources.push(struct.to_h)
|
112
|
+
end
|
113
|
+
end
|
114
|
+
resources
|
115
|
+
end
|
96
116
|
end
|
97
|
-
|
data/lib/aws_recon/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aws_recon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.28
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josh Larsen
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2022-03-
|
12
|
+
date: 2022-03-31 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: aws-sdk
|