cf-uaac 3.2.0 → 3.3.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.
- checksums.yaml +4 -4
- data/.travis.yml +4 -0
- data/bin/uaas +3 -3
- data/cf-uaac.gemspec +1 -1
- data/curl_auth.sh +3 -0
- data/lib/{cli → uaa/cli}/base.rb +0 -0
- data/lib/{cli → uaa/cli}/client_reg.rb +1 -1
- data/lib/{cli → uaa/cli}/common.rb +2 -2
- data/lib/{cli → uaa/cli}/config.rb +0 -0
- data/lib/{cli → uaa/cli}/curl.rb +1 -1
- data/lib/{cli → uaa/cli}/favicon.ico +0 -0
- data/lib/{cli → uaa/cli}/group.rb +4 -3
- data/lib/{cli → uaa/cli}/info.rb +1 -1
- data/lib/{cli → uaa/cli}/runner.rb +7 -7
- data/lib/{cli → uaa/cli}/token.rb +2 -2
- data/lib/{cli → uaa/cli}/user.rb +1 -1
- data/lib/{cli → uaa/cli}/version.rb +1 -1
- data/lib/{stub → uaa/stub}/scim.rb +2 -2
- data/lib/{stub → uaa/stub}/server.rb +0 -0
- data/lib/{stub → uaa/stub}/uaa.rb +3 -3
- data/lib/uaac_cli.rb +2 -2
- data/spec/group_spec.rb +19 -8
- data/spec/http_spec.rb +2 -2
- data/spec/info_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- data/spec/ssl_integration_spec.rb +2 -2
- metadata +19 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 827ceb84606f676c8b5ed9ca4bcd21b83480bf8b
|
4
|
+
data.tar.gz: e4026f4b33775ecfdaa7c2aa0d41c23f394a989c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f53de23a8a23d324eaa3979a81f73a077e001249c99ba1c407fcaeab2dde12a18f6b70d46ab43f56b551029872a7f1088a230ac19c7fd330763b6214d2d1551b
|
7
|
+
data.tar.gz: 15ff20c9f4ed4a3d787a0bfe4e52791f62f93bc1ef970b1c9271bdd44b058a02e791c7426f20045753ad72367e4078e5c7e8f77efcb089a792219c3100d6a13e
|
data/.travis.yml
CHANGED
data/bin/uaas
CHANGED
@@ -14,9 +14,9 @@
|
|
14
14
|
#++
|
15
15
|
|
16
16
|
$:.unshift File.expand_path File.join __FILE__, '..', '..', 'lib'
|
17
|
-
require 'stub/uaa'
|
18
|
-
require 'cli/base'
|
19
|
-
require 'cli/version'
|
17
|
+
require 'uaa/stub/uaa'
|
18
|
+
require 'uaa/cli/base'
|
19
|
+
require 'uaa/cli/version'
|
20
20
|
|
21
21
|
module CF::UAA
|
22
22
|
|
data/cf-uaac.gemspec
CHANGED
data/curl_auth.sh
ADDED
data/lib/{cli → uaa/cli}/base.rb
RENAMED
File without changes
|
File without changes
|
data/lib/{cli → uaa/cli}/curl.rb
RENAMED
File without changes
|
@@ -12,7 +12,7 @@
|
|
12
12
|
#++
|
13
13
|
|
14
14
|
require 'set'
|
15
|
-
require 'cli/common'
|
15
|
+
require 'uaa/cli/common'
|
16
16
|
require 'uaa'
|
17
17
|
|
18
18
|
module CF::UAA
|
@@ -52,9 +52,10 @@ class GroupCli < CommonCli
|
|
52
52
|
response = scim_request { |scim| scim.list_group_mappings(start, count) }
|
53
53
|
|
54
54
|
if response
|
55
|
-
grouped_group_mappings =
|
55
|
+
grouped_group_mappings = {}
|
56
56
|
response["resources"].each do |resource|
|
57
|
-
grouped_group_mappings
|
57
|
+
grouped_group_mappings[resource['origin']] ||= Array.new
|
58
|
+
grouped_group_mappings[resource['origin']] << {resource['displayname'] => resource['externalgroup']}
|
58
59
|
end
|
59
60
|
response["resources"] = grouped_group_mappings
|
60
61
|
pp response
|
data/lib/{cli → uaa/cli}/info.rb
RENAMED
@@ -11,13 +11,13 @@
|
|
11
11
|
# subcomponent's license, as noted in the LICENSE file.
|
12
12
|
#++
|
13
13
|
|
14
|
-
require 'cli/common'
|
15
|
-
require 'cli/token'
|
16
|
-
require 'cli/user'
|
17
|
-
require 'cli/group'
|
18
|
-
require 'cli/info'
|
19
|
-
require 'cli/client_reg'
|
20
|
-
require 'cli/curl'
|
14
|
+
require 'uaa/cli/common'
|
15
|
+
require 'uaa/cli/token'
|
16
|
+
require 'uaa/cli/user'
|
17
|
+
require 'uaa/cli/group'
|
18
|
+
require 'uaa/cli/info'
|
19
|
+
require 'uaa/cli/client_reg'
|
20
|
+
require 'uaa/cli/curl'
|
21
21
|
|
22
22
|
module CF::UAA
|
23
23
|
|
data/lib/{cli → uaa/cli}/user.rb
RENAMED
@@ -288,7 +288,7 @@ class StubScim
|
|
288
288
|
group = group_id ? ref_by_id(group_id, :group) : ref_by_name(group_name, :group)
|
289
289
|
return unless group
|
290
290
|
(group[:external_groups] ||= Hash.new)
|
291
|
-
group[:external_groups][external_group] =
|
291
|
+
group[:external_groups][external_group] = origin
|
292
292
|
group
|
293
293
|
end
|
294
294
|
|
@@ -303,7 +303,7 @@ class StubScim
|
|
303
303
|
@things_by_id.each do |id, thing|
|
304
304
|
if thing[:rtype] == :group
|
305
305
|
thing[:external_groups].each do |key, value|
|
306
|
-
group_mappings << { groupid: thing[:id], displayname: thing[:displayname], externalgroup: key }
|
306
|
+
group_mappings << { groupid: thing[:id], displayname: thing[:displayname], externalgroup: key, origin: value }
|
307
307
|
end if thing[:external_groups]
|
308
308
|
end
|
309
309
|
end unless @things_by_id.empty?
|
File without changes
|
data/lib/uaac_cli.rb
CHANGED
data/spec/group_spec.rb
CHANGED
@@ -172,10 +172,11 @@ describe GroupCli do
|
|
172
172
|
it "lists all the mappings between uaa scopes and external groups" do
|
173
173
|
Cli.run "context #{@test_client}"
|
174
174
|
Cli.run "group map ldap-id --name #{@test_group}"
|
175
|
-
Cli.output.string.should include
|
176
|
-
|
175
|
+
Cli.output.string.should include("Successfully mapped")
|
176
|
+
Cli.run "group map ldap-id-2 --name #{@test_group}"
|
177
|
+
Cli.output.string.should include("Successfully mapped")
|
177
178
|
Cli.run "group mappings"
|
178
|
-
Cli.output.string.should include("#{@test_group}: ldap-id")
|
179
|
+
Cli.output.string.should include("ldap: \n -\n #{@test_group}: ldap-id\n -\n #{@test_group}: ldap-id-2")
|
179
180
|
end
|
180
181
|
|
181
182
|
it "lists mappings between uaa scopes and external groups with pagination" do
|
@@ -192,10 +193,15 @@ describe GroupCli do
|
|
192
193
|
Cli.output.string.should include "Successfully mapped #{@test_group} to ldap-id"
|
193
194
|
|
194
195
|
Cli.run "group mappings"
|
195
|
-
Cli.output.string.should include("#{@test_group}: ldap-id"
|
196
|
+
Cli.output.string.should include("#{@test_group}: ldap-id")
|
197
|
+
Cli.output.string.should include("#{@test_group}: ldap-id-2")
|
198
|
+
Cli.output.string.should include("#{@test_group}: ldap-id-3")
|
199
|
+
Cli.output.string.should include("#{@test_group}: ldap-id-4")
|
196
200
|
|
197
201
|
Cli.run "group mappings --start 1 --count 3"
|
198
|
-
Cli.output.string.should include("#{@test_group}: ldap-id"
|
202
|
+
Cli.output.string.should include("#{@test_group}: ldap-id")
|
203
|
+
Cli.output.string.should include("#{@test_group}: ldap-id-2")
|
204
|
+
Cli.output.string.should include("#{@test_group}: ldap-id-3")
|
199
205
|
Cli.output.string.should_not include("ldap-id-4")
|
200
206
|
|
201
207
|
Cli.run "group mappings --start 1 --count -3"
|
@@ -207,17 +213,22 @@ describe GroupCli do
|
|
207
213
|
Cli.output.string.should include("Please enter a valid count")
|
208
214
|
|
209
215
|
Cli.run "group mappings --start -1 --count 5"
|
210
|
-
Cli.output.string.should include("#{@test_group}: ldap-id"
|
216
|
+
Cli.output.string.should include("#{@test_group}: ldap-id")
|
217
|
+
Cli.output.string.should include("#{@test_group}: ldap-id-2")
|
218
|
+
Cli.output.string.should include("#{@test_group}: ldap-id-3")
|
211
219
|
|
212
220
|
Cli.run "group mappings --start a --count 1"
|
213
221
|
Cli.output.string.should_not include("ldap-id", "ldap-id-2", "ldap-id-3")
|
214
222
|
Cli.output.string.should include("Please enter a valid start index")
|
215
223
|
|
216
224
|
Cli.run "group mappings --start 2"
|
217
|
-
Cli.output.string.should include("#{@test_group}: ldap-id-2"
|
225
|
+
Cli.output.string.should include("#{@test_group}: ldap-id-2")
|
226
|
+
Cli.output.string.should include("#{@test_group}: ldap-id-3")
|
227
|
+
Cli.output.string.should include("#{@test_group}: ldap-id-4")
|
218
228
|
|
219
229
|
Cli.run "group mappings --count 2"
|
220
|
-
Cli.output.string.should include("#{@test_group}: ldap-id"
|
230
|
+
Cli.output.string.should include("#{@test_group}: ldap-id")
|
231
|
+
Cli.output.string.should include("#{@test_group}: ldap-id-2")
|
221
232
|
end
|
222
233
|
|
223
234
|
it "maps a uaa scope to an external group" do
|
data/spec/http_spec.rb
CHANGED
data/spec/info_spec.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cf-uaac
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dave Syer
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2016-
|
15
|
+
date: 2016-06-24 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: bundler
|
@@ -229,21 +229,22 @@ files:
|
|
229
229
|
- bin/uaac-completion.sh
|
230
230
|
- bin/uaas
|
231
231
|
- cf-uaac.gemspec
|
232
|
-
-
|
233
|
-
- lib/cli/
|
234
|
-
- lib/cli/
|
235
|
-
- lib/cli/
|
236
|
-
- lib/cli/
|
237
|
-
- lib/cli/
|
238
|
-
- lib/cli/
|
239
|
-
- lib/cli/
|
240
|
-
- lib/cli/
|
241
|
-
- lib/cli/
|
242
|
-
- lib/cli/
|
243
|
-
- lib/cli/
|
244
|
-
- lib/
|
245
|
-
- lib/stub/
|
246
|
-
- lib/stub/
|
232
|
+
- curl_auth.sh
|
233
|
+
- lib/uaa/cli/base.rb
|
234
|
+
- lib/uaa/cli/client_reg.rb
|
235
|
+
- lib/uaa/cli/common.rb
|
236
|
+
- lib/uaa/cli/config.rb
|
237
|
+
- lib/uaa/cli/curl.rb
|
238
|
+
- lib/uaa/cli/favicon.ico
|
239
|
+
- lib/uaa/cli/group.rb
|
240
|
+
- lib/uaa/cli/info.rb
|
241
|
+
- lib/uaa/cli/runner.rb
|
242
|
+
- lib/uaa/cli/token.rb
|
243
|
+
- lib/uaa/cli/user.rb
|
244
|
+
- lib/uaa/cli/version.rb
|
245
|
+
- lib/uaa/stub/scim.rb
|
246
|
+
- lib/uaa/stub/server.rb
|
247
|
+
- lib/uaa/stub/uaa.rb
|
247
248
|
- lib/uaac_cli.rb
|
248
249
|
- spec/client_reg_spec.rb
|
249
250
|
- spec/common_spec.rb
|
@@ -276,7 +277,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
276
277
|
version: '0'
|
277
278
|
requirements: []
|
278
279
|
rubyforge_project: cf-uaac
|
279
|
-
rubygems_version: 2.
|
280
|
+
rubygems_version: 2.4.5
|
280
281
|
signing_key:
|
281
282
|
specification_version: 4
|
282
283
|
summary: Command line interface for CloudFoundry UAA
|