aws_security_viz 0.1.5.pre.alpha.pre.87 → 0.1.5.pre.alpha.pre.89
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.
- checksums.yaml +4 -4
- data/README.md +24 -20
- data/exe/aws_security_viz +1 -0
- data/lib/provider/ec2.rb +4 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4798f30512483f07fed20852bc16e029d172c57e
|
4
|
+
data.tar.gz: 00882a51c5f5575d4fb0ff438752c932f4d9d9be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: df7f9fd7f08ba1c5aa3e2652a40a34e1bfa351b584222eddc0821b517587f97b6d9348539e421cc8a4fe9c14b6a359e7038a04f3965cf5ce142b015f48ada684
|
7
|
+
data.tar.gz: 57ca2f30190bd620d3cc62006e8cfedce4c9096cfce7d752e488794fde66d8c381fd429b3f96d8040f50e065f344614215ba663bf0e370cc772d15be428af334
|
data/README.md
CHANGED
@@ -1,20 +1,20 @@
|
|
1
|
-
aws-security-viz -- A tool to visualize aws security groups
|
1
|
+
aws-security-viz -- A tool to visualize aws security groups
|
2
2
|
============================================================
|
3
|
-
[](http://travis-ci.org/anaynayak/aws-security-viz)
|
3
|
+
[](http://travis-ci.org/anaynayak/aws-security-viz)
|
4
4
|
[](https://badge.fury.io/rb/aws_security_viz)
|
5
5
|
[]()
|
6
|
-
[](https://codeclimate.com/github/anaynayak/aws-security-viz)
|
6
|
+
[](https://codeclimate.com/github/anaynayak/aws-security-viz)
|
7
7
|
[](https://gemnasium.com/anaynayak/aws-security-viz)
|
8
8
|
|
9
9
|
## DESCRIPTION
|
10
|
-
Need a quick way to visualize your current aws/amazon ec2 security group configuration? aws-security-viz does just that based on the EC2 security group ingress configuration.
|
10
|
+
Need a quick way to visualize your current aws/amazon ec2 security group configuration? aws-security-viz does just that based on the EC2 security group ingress configuration.
|
11
11
|
|
12
12
|
## FEATURES
|
13
13
|
|
14
|
-
* Output to any of the formats that Graphviz supports.
|
14
|
+
* Output to any of the formats that Graphviz supports.
|
15
15
|
* EC2 classic and VPC security groups
|
16
16
|
|
17
|
-
## INSTALLATION
|
17
|
+
## INSTALLATION
|
18
18
|
```
|
19
19
|
$ gem install aws_security_viz
|
20
20
|
$ aws_security_viz --help
|
@@ -23,7 +23,7 @@ aws-security-viz -- A tool to visualize aws security groups
|
|
23
23
|
## DEPENDENCIES
|
24
24
|
|
25
25
|
* graphviz with triangulation `brew install graphviz --with-gts`
|
26
|
-
* libxml2 `brew install libxml2`*
|
26
|
+
* libxml2 `brew install libxml2`*
|
27
27
|
|
28
28
|
## USAGE
|
29
29
|
|
@@ -45,23 +45,27 @@ To generate a web view
|
|
45
45
|
$ aws_security_viz -a your_aws_key -s your_aws_secret_key -f aws.json
|
46
46
|
```
|
47
47
|
|
48
|
-
* Generates two files: aws.json and view.html.
|
49
|
-
* The json file name needs to be passed in as a html fragment identifier.
|
48
|
+
* Generates two files: aws.json and view.html.
|
49
|
+
* The json file name needs to be passed in as a html fragment identifier.
|
50
50
|
* The generated graph can be viewed in a webserver e.g. http://localhost:3000/view.html#aws.json by using `python -m SimpleHTTPServer 3000` (python2) or `python -m http.server 3000` (python3)
|
51
51
|
|
52
52
|
### Help
|
53
53
|
|
54
|
-
```
|
54
|
+
```
|
55
55
|
$ aws_security_viz --help
|
56
56
|
Options:
|
57
|
-
-a, --access-key=<s>
|
58
|
-
-s, --secret-key=<s>
|
59
|
-
-
|
60
|
-
-
|
61
|
-
-
|
62
|
-
-
|
63
|
-
-
|
64
|
-
-
|
57
|
+
-a, --access-key=<s> AWS access key
|
58
|
+
-s, --secret-key=<s> AWS secret key
|
59
|
+
-e, --session-token=<s> AWS session token
|
60
|
+
-r, --region=<s> AWS region to query (default: us-east-1)
|
61
|
+
-v, --vpc-id=<s> AWS VPC id to show
|
62
|
+
-o, --source-file=<s> JSON source file containing security groups
|
63
|
+
-f, --filename=<s> Output file name (default: aws-security-viz.png)
|
64
|
+
-c, --config=<s> Config file (opts.yml) (default: opts.yml)
|
65
|
+
-l, --color Colored node edges
|
66
|
+
-u, --source-filter=<s> Source filter
|
67
|
+
-t, --target-filter=<s> Target filter
|
68
|
+
-h, --help Show this message
|
65
69
|
```
|
66
70
|
|
67
71
|
#### Advanced configuration
|
@@ -73,13 +77,13 @@ You can generate a configuration file using the following command:
|
|
73
77
|
|
74
78
|
The opts.yml file lets you define the following options:
|
75
79
|
|
76
|
-
* Grouping of CIDR ips
|
80
|
+
* Grouping of CIDR ips
|
77
81
|
* Define exclusion patterns
|
78
82
|
* Change graphviz format (neato, dot, sfdp etc)
|
79
83
|
|
80
84
|
## DEBUGGING
|
81
85
|
|
82
|
-
To generate the graph with debug statements, execute the following command
|
86
|
+
To generate the graph with debug statements, execute the following command
|
83
87
|
|
84
88
|
```
|
85
89
|
$ DEBUG=true aws_security_viz -a your_aws_key -s your_aws_secret_key -f viz.svg
|
data/exe/aws_security_viz
CHANGED
@@ -6,6 +6,7 @@ require 'trollop'
|
|
6
6
|
opts = Trollop::options do
|
7
7
|
opt :access_key, 'AWS access key', :default => ENV['AWS_ACCESS_KEY'] || ENV['AWS_ACCESS_KEY_ID'], :type => :string
|
8
8
|
opt :secret_key, 'AWS secret key', :default => ENV['AWS_SECRET_KEY'] || ENV['AWS_SECRET_ACCESS_KEY'], :type => :string
|
9
|
+
opt :session_token, 'AWS session token', :default => ENV['AWS_SESSION_TOKEN'] || nil, :type => :string
|
9
10
|
opt :region, 'AWS region to query', :default => 'us-east-1', :type => :string
|
10
11
|
opt :vpc_id, 'AWS VPC id to show', :type => :string
|
11
12
|
opt :source_file, 'JSON source file containing security groups', :type => :string
|
data/lib/provider/ec2.rb
CHANGED
@@ -11,6 +11,10 @@ class Ec2Provider
|
|
11
11
|
conn_opts[:aws_access_key_id] = options[:access_key]
|
12
12
|
conn_opts[:aws_secret_access_key] = options[:secret_key]
|
13
13
|
|
14
|
+
if options[:session_token]
|
15
|
+
conn_opts[:aws_session_token] = options[:session_token]
|
16
|
+
end
|
17
|
+
|
14
18
|
@compute = Fog::Compute::AWS.new conn_opts
|
15
19
|
end
|
16
20
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aws_security_viz
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.5.pre.alpha.pre.
|
4
|
+
version: 0.1.5.pre.alpha.pre.89
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Anay Nayak
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-11-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -259,7 +259,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
259
259
|
version: 1.3.1
|
260
260
|
requirements: []
|
261
261
|
rubyforge_project:
|
262
|
-
rubygems_version: 2.6.
|
262
|
+
rubygems_version: 2.6.14
|
263
263
|
signing_key:
|
264
264
|
specification_version: 4
|
265
265
|
summary: Visualize your aws security groups
|