okta-terraform-generator 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +3 -1
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +11 -9
- data/README.md +1 -0
- data/lib/okta-terraform-generator.rb +1 -1
- data/lib/okta-terraform-generator/cli/github_membership.rb +6 -0
- data/lib/oktakit/client/extended_groups.rb +4 -2
- 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: 489381a58a9b430ccf19a8405f78648d41feff3f395193b6b60bd2b10209699e
|
4
|
+
data.tar.gz: 34c8903e835a1ad4ee21805370020f3191bffd53ad71616a6a9e48c6dfc5876e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 55c293adb0498fb6c0928515920e26e978c037dbb40585ac2a6481d2ba9f72db18712004d4325a3ba834507d50eb18c1fab0d719199c08c377511bf79e0d8270
|
7
|
+
data.tar.gz: 450b8f6db62a88fcca704300d304bd0619381a445361a4f84978b1c75a9c0ad0e3ed0e0255ae7360fd955ed098c2bfe950fe727a29b8876359486be2d9f65c19
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
|
|
4
4
|
|
5
5
|
The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).
|
6
6
|
|
7
|
+
## 0.1.2 (2018-07-11)
|
8
|
+
|
9
|
+
Added `--treat-suspended-as-active` option to prevent removing resources that have been temporarily suspended.
|
10
|
+
|
7
11
|
## 0.1.1 (2018-07-06)
|
8
12
|
|
9
13
|
Fixed bug that removes users that had a state of `LOCKED_OUT`, `PASSWORD_EXPIRED` or `RECOVERY`; these users still exist and should not be ignored.
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
okta-terraform-generator (0.1.
|
4
|
+
okta-terraform-generator (0.1.1)
|
5
5
|
facets (~> 3.1)
|
6
6
|
mixlib-cli (~> 1.7)
|
7
7
|
octokit (~> 4.0)
|
@@ -18,9 +18,9 @@ GEM
|
|
18
18
|
safe_yaml (~> 1.0.0)
|
19
19
|
diff-lcs (1.3)
|
20
20
|
facets (3.1.0)
|
21
|
-
faraday (0.15.
|
21
|
+
faraday (0.15.2)
|
22
22
|
multipart-post (>= 1.2, < 3)
|
23
|
-
ffi (1.9.
|
23
|
+
ffi (1.9.25)
|
24
24
|
formatador (0.2.5)
|
25
25
|
guard (2.14.2)
|
26
26
|
formatador (>= 0.2.4)
|
@@ -37,6 +37,7 @@ GEM
|
|
37
37
|
guard-compat (~> 1.1)
|
38
38
|
rspec (>= 2.99.0, < 4.0)
|
39
39
|
hashdiff (0.3.7)
|
40
|
+
jaro_winkler (1.5.1)
|
40
41
|
listen (3.1.5)
|
41
42
|
rb-fsevent (~> 0.9, >= 0.9.4)
|
42
43
|
rb-inotify (~> 0.9, >= 0.9.7)
|
@@ -56,9 +57,9 @@ GEM
|
|
56
57
|
oktakit (0.2.0)
|
57
58
|
sawyer (~> 0.8.1)
|
58
59
|
parallel (1.12.1)
|
59
|
-
parser (2.5.1.
|
60
|
+
parser (2.5.1.2)
|
60
61
|
ast (~> 2.4.0)
|
61
|
-
powerpack (0.1.
|
62
|
+
powerpack (0.1.2)
|
62
63
|
pry (0.11.3)
|
63
64
|
coderay (~> 1.1.0)
|
64
65
|
method_source (~> 0.9.0)
|
@@ -88,9 +89,10 @@ GEM
|
|
88
89
|
diff-lcs (>= 1.2.0, < 2.0)
|
89
90
|
rspec-support (~> 3.7.0)
|
90
91
|
rspec-support (3.7.1)
|
91
|
-
rubocop (0.
|
92
|
+
rubocop (0.58.1)
|
93
|
+
jaro_winkler (~> 1.5.1)
|
92
94
|
parallel (~> 1.10)
|
93
|
-
parser (>= 2.5)
|
95
|
+
parser (>= 2.5, != 2.5.1.1)
|
94
96
|
powerpack (~> 0.1)
|
95
97
|
rainbow (>= 2.2.2, < 4.0)
|
96
98
|
ruby-progressbar (~> 1.7)
|
@@ -104,9 +106,9 @@ GEM
|
|
104
106
|
shellany (0.0.1)
|
105
107
|
terminal-notifier-guard (1.7.0)
|
106
108
|
thor (0.20.0)
|
107
|
-
unicode-display_width (1.
|
109
|
+
unicode-display_width (1.4.0)
|
108
110
|
vcr (4.0.0)
|
109
|
-
webmock (3.4.
|
111
|
+
webmock (3.4.2)
|
110
112
|
addressable (>= 2.3.6)
|
111
113
|
crack (>= 0.3.2)
|
112
114
|
hashdiff
|
data/README.md
CHANGED
@@ -38,6 +38,7 @@ Options:
|
|
38
38
|
-g OKTA_GITHUB_USER_GROUP, Specifies the Okta group containing GitHub users (can be a comma separated list) (required)
|
39
39
|
--okta-github-user-group
|
40
40
|
-t, --okta-token OKTA_TOKEN Specifies the Okta API token (required)
|
41
|
+
--treat-suspended-as-active Treat suspended users as active
|
41
42
|
```
|
42
43
|
|
43
44
|
## Contributing
|
@@ -61,6 +61,12 @@ module OktaTerraformGenerator
|
|
61
61
|
description: 'Specifies the Okta API token',
|
62
62
|
required: true
|
63
63
|
|
64
|
+
option :treat_suspended_as_active,
|
65
|
+
long: '--treat-suspended-as-active',
|
66
|
+
boolean: true,
|
67
|
+
description: 'Treat suspended users as active',
|
68
|
+
proc: proc { |treat_suspended_as_active| $treat_suspended_as_active = true if treat_suspended_as_active }
|
69
|
+
|
64
70
|
def run(argv = ARGV.dup)
|
65
71
|
if argv.size == 1
|
66
72
|
print_usage
|
@@ -22,11 +22,13 @@ module Oktakit
|
|
22
22
|
module ExtendedGroups
|
23
23
|
include Oktakit::Client::Groups
|
24
24
|
|
25
|
-
|
25
|
+
ACTIVE_STATUSES = %w[ACTIVE LOCKED_OUT PASSWORD_EXPIRED RECOVERY].freeze
|
26
26
|
|
27
27
|
def list_active_group_members(group_id)
|
28
28
|
list_group_members(group_id).shift.select do |user|
|
29
|
-
|
29
|
+
active_statuses = ACTIVE_STATUSES.dup
|
30
|
+
active_statuses.push('SUSPENDED') if $treat_suspended_as_active
|
31
|
+
active_statuses.include?(user.status)
|
30
32
|
end
|
31
33
|
end
|
32
34
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: okta-terraform-generator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stephen Hoekstra
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-07-
|
11
|
+
date: 2018-07-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: facets
|