cf-uaac 4.16.0 → 4.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/cf-uaac.gemspec +1 -1
- data/lib/uaa/cli/client_reg.rb +25 -0
- data/lib/uaa/stub/uaa.rb +7 -0
- data/spec/client_reg_spec.rb +8 -0
- data/version.txt +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 59c20844fe851fa5ee2b6a2cfaee7841a362044e647a98abe417616549bebee9
|
4
|
+
data.tar.gz: be7dc84aadceee22588768f956c717cdc6073b534366d90b1778deb882bcfb6a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 12a1f968a42a661efe5a9e695ce3ea2914c9f36f17343981594b4336b919d818d5d01d6b77ffe7d5a35eb2b78d3c5cbc21dda516cd6aa5fbfba4f7113a5457c7
|
7
|
+
data.tar.gz: 8fc709d8d477a19969e60b2b550a75987dee6cdd97d4f5c1f0b8e57e826a56ed5ea909e9019c437fedc22336d85d622560179970ca3ca0da2221c72b0327f072
|
data/cf-uaac.gemspec
CHANGED
@@ -31,7 +31,7 @@ Gem::Specification.new do |s|
|
|
31
31
|
s.require_paths = ['lib']
|
32
32
|
|
33
33
|
# dependencies
|
34
|
-
s.add_runtime_dependency 'cf-uaa-lib', '~> 4.0.
|
34
|
+
s.add_runtime_dependency 'cf-uaa-lib', '~> 4.0.4'
|
35
35
|
s.add_development_dependency 'rake', '~> 13.0'
|
36
36
|
s.add_development_dependency 'rspec', '~> 3.12'
|
37
37
|
s.add_development_dependency 'simplecov', '~> 0.22.0'
|
data/lib/uaa/cli/client_reg.rb
CHANGED
@@ -121,6 +121,31 @@ class ClientCli < CommonCli
|
|
121
121
|
}
|
122
122
|
end
|
123
123
|
|
124
|
+
define_option :jwks_uri, '--jwks_uri <token_keys endpoint>', 'JWKS token key endpoint'
|
125
|
+
define_option :jwks, '--jwks <json token key set>', 'JWKS token key'
|
126
|
+
desc 'client jwt add [id]', 'Add client jwt trust', :jwks_uri, :jwks do |id|
|
127
|
+
pp scim_request { |cr|
|
128
|
+
###change_clientjwt(client_id, jwks_uri = nil, jwks = nil, kid = nil, changeMode = nil)
|
129
|
+
cr.change_clientjwt(clientid(id), opts[:jwks_uri], opts[:jwks], nil, 'ADD')
|
130
|
+
'client jwt successfully added'
|
131
|
+
}
|
132
|
+
end
|
133
|
+
|
134
|
+
desc 'client jwt update [id]', 'Update client jwt trust', :jwks_uri, :jwks do |id|
|
135
|
+
pp scim_request { |cr|
|
136
|
+
cr.change_clientjwt(clientid(id), opts[:jwks_uri], opts[:jwks], nil, 'UPDATE')
|
137
|
+
'client jwt successfully set'
|
138
|
+
}
|
139
|
+
end
|
140
|
+
|
141
|
+
define_option :kid, '--kid <key id in json token keys>', 'JWKS token key'
|
142
|
+
desc 'client jwt delete [id]', 'Delete client jwt trust', :kid do |id|
|
143
|
+
pp scim_request { |cr|
|
144
|
+
cr.change_clientjwt(clientid(id), '*', nil, opts[:kid], 'DELETE')
|
145
|
+
'client jwt successfully deleted'
|
146
|
+
}
|
147
|
+
end
|
148
|
+
|
124
149
|
private
|
125
150
|
|
126
151
|
def update_client(cr, info)
|
data/lib/uaa/stub/uaa.rb
CHANGED
@@ -414,6 +414,13 @@ class StubUAAConn < Stub::Base
|
|
414
414
|
reply.json(status: 'ok', message: 'secret updated')
|
415
415
|
end
|
416
416
|
|
417
|
+
route :put, %r{^/oauth/clients/([^/]+)/clientjwt$}, 'content-type' => %r{application/json} do
|
418
|
+
info = Util.json_parse(request.body, :down)
|
419
|
+
return not_found(match[1]) unless id = server.scim.id(match[1], :client)
|
420
|
+
return bad_request('no client_id given') unless info['client_id']
|
421
|
+
reply.json(status: 'ok', message: 'client jwt updated')
|
422
|
+
end
|
423
|
+
|
417
424
|
#----------------------------------------------------------------------------
|
418
425
|
# users and groups endpoints
|
419
426
|
#
|
data/spec/client_reg_spec.rb
CHANGED
@@ -78,6 +78,14 @@ describe ClientCli do
|
|
78
78
|
Cli.output.string.should include 'access_denied'
|
79
79
|
end
|
80
80
|
|
81
|
+
it "changes it's client jwt" do
|
82
|
+
Cli.run("token client get #{@test_client} -s #{@test_secret}").should be
|
83
|
+
Cli.run('token decode').should be
|
84
|
+
Cli.run("client jwt add #{@test_client} --jwks_uri http://localhost:8080/uaa/token_keys").should be
|
85
|
+
Cli.run("client jwt update #{@test_client} --jwks_uri http://localhost:8080/uaa/token_keys").should be
|
86
|
+
Cli.run("client jwt delete #{@test_client} ").should be
|
87
|
+
end
|
88
|
+
|
81
89
|
context 'as updated client' do
|
82
90
|
|
83
91
|
before :all do
|
data/version.txt
CHANGED
@@ -1 +1 @@
|
|
1
|
-
4.
|
1
|
+
4.17.0
|
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: 4.
|
4
|
+
version: 4.17.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: 2023-
|
15
|
+
date: 2023-10-19 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: cf-uaa-lib
|
@@ -20,14 +20,14 @@ dependencies:
|
|
20
20
|
requirements:
|
21
21
|
- - "~>"
|
22
22
|
- !ruby/object:Gem::Version
|
23
|
-
version: 4.0.
|
23
|
+
version: 4.0.4
|
24
24
|
type: :runtime
|
25
25
|
prerelease: false
|
26
26
|
version_requirements: !ruby/object:Gem::Requirement
|
27
27
|
requirements:
|
28
28
|
- - "~>"
|
29
29
|
- !ruby/object:Gem::Version
|
30
|
-
version: 4.0.
|
30
|
+
version: 4.0.4
|
31
31
|
- !ruby/object:Gem::Dependency
|
32
32
|
name: rake
|
33
33
|
requirement: !ruby/object:Gem::Requirement
|