keycloak-admin 1.1.3 → 1.1.5
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/.github/workflows/ci.yml +1 -4
- data/CHANGELOG.md +200 -188
- data/Gemfile.lock +51 -49
- data/README.md +756 -748
- data/keycloak-admin.gemspec +2 -2
- data/lib/keycloak-admin/client/group_client.rb +17 -0
- data/lib/keycloak-admin/client/role_mapper_client.rb +6 -4
- data/lib/keycloak-admin/client/user_client.rb +12 -0
- data/lib/keycloak-admin/representation/credential_representation.rb +37 -4
- data/lib/keycloak-admin/version.rb +1 -1
- data/spec/client/client_authz_permission_client_spec.rb +1 -1
- data/spec/client/client_authz_policy_client_spec.rb +1 -1
- data/spec/client/group_client_spec.rb +70 -0
- data/spec/client/role_mapper_client_spec.rb +45 -0
- data/spec/client/user_client_spec.rb +45 -0
- data/spec/integration/client_authorization_spec.rb +3 -5
- data/spec/representation/credential_representation_spec.rb +68 -0
- metadata +8 -7
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: dc70b33efe8f4293f7eb0f60eeb30f9468d7866a08e20180b6a3b66c35c96ea8
|
|
4
|
+
data.tar.gz: f9cfd0bec183db13053ecd034c4c0c180a8564c116fdb6ace4271a086622f18b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a3a4bf1e49ea91c845458186565f68636244e515a7ad78d12e69c50ad190de94fd38050a3222ed16eb33f0b5a13d5e1aa65e496ebb48fb732a5248ff6c227953
|
|
7
|
+
data.tar.gz: b60ee39f400e84c57f1627042abbb07b0ca820471d3fe53448c09a2ef8b4cc1acb193ea4f11d63d4b60941f0ee9496ecb6a5fc89bc6007fa1c1eca69a5b37925
|
data/.github/workflows/ci.yml
CHANGED
|
@@ -70,10 +70,7 @@ jobs:
|
|
|
70
70
|
|
|
71
71
|
- uses: actions/checkout@v4
|
|
72
72
|
- name: Set up Ruby
|
|
73
|
-
|
|
74
|
-
# change this to (see https://github.com/ruby/setup-ruby#versioning):
|
|
75
|
-
# uses: ruby/setup-ruby@v1
|
|
76
|
-
uses: ruby/setup-ruby@55283cc23133118229fd3f97f9336ee23a179fcf # v1.146.0
|
|
73
|
+
uses: ruby/setup-ruby@v1
|
|
77
74
|
with:
|
|
78
75
|
ruby-version: ${{ matrix.ruby-version }}
|
|
79
76
|
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
data/CHANGELOG.md
CHANGED
|
@@ -1,189 +1,201 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file.
|
|
4
|
-
|
|
5
|
-
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
-
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
-
|
|
8
|
-
## [1.1.
|
|
9
|
-
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
*
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
*
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
*
|
|
68
|
-
|
|
69
|
-
## [1.0.
|
|
70
|
-
|
|
71
|
-
*
|
|
72
|
-
|
|
73
|
-
## [1.0.
|
|
74
|
-
|
|
75
|
-
*
|
|
76
|
-
|
|
77
|
-
## [1.0.
|
|
78
|
-
|
|
79
|
-
*
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
*
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
*
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
*
|
|
106
|
-
* Add `
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
*
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
*
|
|
158
|
-
*
|
|
159
|
-
*
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
*
|
|
167
|
-
*
|
|
168
|
-
*
|
|
169
|
-
*
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
*
|
|
182
|
-
|
|
183
|
-
## [0.5] -
|
|
184
|
-
|
|
185
|
-
*
|
|
186
|
-
|
|
187
|
-
## [0.
|
|
188
|
-
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [1.1.5] - 2026-01-05
|
|
9
|
+
|
|
10
|
+
* [Feature] Added the ability to list credentials for a given user.
|
|
11
|
+
* [Fix] Implemented safe parsing for nested JSON elements within `CredentialRepresentation` (handling both `credentialData` and `secretData` fields). Please refer to [the official documentation](https://www.keycloak.org/docs-api/latest/rest-api/index.html#CredentialRepresentation).
|
|
12
|
+
* [Breaking] Renamed `CredentialRepresentation` attribute `created_date` $\rightarrow$ `createdDate` to align with the Keycloak Admin API.
|
|
13
|
+
|
|
14
|
+
## [1.1.4] - 2025-11-08
|
|
15
|
+
|
|
16
|
+
* Add remove_realm_level_role_name! action on a GroupClient (thanks to @mkrawc)
|
|
17
|
+
* Dependencies: Update Gemfile.lock to bump byebug → 12.0.0, rspec → 3.13.2, and related dependencies
|
|
18
|
+
* Bug: The 'remove' operation of the 'RoleMapperClient' does not take the global rest options into account
|
|
19
|
+
|
|
20
|
+
## [1.1.3] - 2024-07-12
|
|
21
|
+
|
|
22
|
+
* Client Authorization management support (thanks to @tillawy)
|
|
23
|
+
* GitHub-actions setup to execute `rspec` (thanks to @tillawy)
|
|
24
|
+
|
|
25
|
+
## [1.1.2] - 2024-05-22
|
|
26
|
+
|
|
27
|
+
* Add group endpoints (get, children, delete), support for group attributes (thanks to @mkrawc)
|
|
28
|
+
* GroupClient#save method now can update an existing group (thanks to @mkrawc)
|
|
29
|
+
* RoleClient#save method now can update an existing role (thanks to @mkrawc)
|
|
30
|
+
|
|
31
|
+
## [1.1.1] - 2024-01-21
|
|
32
|
+
|
|
33
|
+
* Add/List realm-role/s to a group, Allow role-names with spaces, List groups assigned to role (thanks to @LiquidMagical)
|
|
34
|
+
|
|
35
|
+
## [1.1.0] - 2023-10-03
|
|
36
|
+
|
|
37
|
+
* Search for groups with parameters (thanks to @@tlloydthwaites)
|
|
38
|
+
* Get client by ID, Find client by Client ID, Update Client (thanks to @gee-forr)
|
|
39
|
+
|
|
40
|
+
## [1.0.24] - 2023-06-07
|
|
41
|
+
|
|
42
|
+
* Revert the modifications on the feature 'Update a User' introduced in `1.0.22`. This implementation had breaking changes such as not being able to update several attributes (`first_name`, `email`, etc).
|
|
43
|
+
|
|
44
|
+
## [1.0.23] - 2023-06-01
|
|
45
|
+
|
|
46
|
+
* Be more permissive about the version of `rest-client` (`~> 2.0`) (thanks to @type-face)
|
|
47
|
+
|
|
48
|
+
## [1.0.22] - 2023-05-29
|
|
49
|
+
|
|
50
|
+
* Fetch user's all active sessions (thanks to @prsanjay)
|
|
51
|
+
* Check whether a user is locked or not (thanks to @prsanjay)
|
|
52
|
+
* Logout users from all the active sessions (thanks to @prsanjay)
|
|
53
|
+
|
|
54
|
+
## [1.0.21] - 2023-02-03
|
|
55
|
+
|
|
56
|
+
* List users who are a member of a group (thanks to @tlloydthwaites)
|
|
57
|
+
|
|
58
|
+
## [1.0.20] - 2022-12-26
|
|
59
|
+
|
|
60
|
+
* Create subgroups (thanks to @neckhair)
|
|
61
|
+
* Add subgroups to `GroupRepresentation` (thanks to @neckhair)
|
|
62
|
+
* Expose `BaseRoleContainingResource.resource_id` (thanks to @neckhair)
|
|
63
|
+
|
|
64
|
+
## [1.0.19] - 2022-12-03
|
|
65
|
+
|
|
66
|
+
* Remove specific realm roles from user (thanks to @tlloydthwaites)
|
|
67
|
+
* Get role by name (thanks to @tlloydthwaites)
|
|
68
|
+
|
|
69
|
+
## [1.0.18] - 2022-11-24
|
|
70
|
+
|
|
71
|
+
* List user realm-level role mappings (thanks to @Kazhuu)
|
|
72
|
+
|
|
73
|
+
## [1.0.17] - 2022-11-02
|
|
74
|
+
|
|
75
|
+
* Delete `Client`
|
|
76
|
+
|
|
77
|
+
## [1.0.16] - 2022-10-15
|
|
78
|
+
|
|
79
|
+
* Remove `rest-client` warning when adding a group (thanks to @tlloydthwaites)
|
|
80
|
+
|
|
81
|
+
## [1.0.15] - 2022-05-23
|
|
82
|
+
|
|
83
|
+
* Delete all "realm" roles mapped to a user
|
|
84
|
+
|
|
85
|
+
## [1.0.14] - 2022-03-30
|
|
86
|
+
|
|
87
|
+
* Update `Gemfile.lock` to avoid wrong CVE detections. The version of Rails should always be specified by the parent project. This change has no functional impact.
|
|
88
|
+
|
|
89
|
+
## [1.0.13] - 2022-03-13
|
|
90
|
+
|
|
91
|
+
* Add client role on users
|
|
92
|
+
* List client roles
|
|
93
|
+
|
|
94
|
+
## [1.0.7] - 2022-03-13
|
|
95
|
+
|
|
96
|
+
* Allow to use multiple `KeycloakAdmin::Client` in the same environment
|
|
97
|
+
|
|
98
|
+
## [1.0.6] - 2022-03-13
|
|
99
|
+
|
|
100
|
+
* When serializing an array to JSON, force the serialization to use `to_json` for each element. In several contexts (e.g. Rails), `to_json` is not used.
|
|
101
|
+
|
|
102
|
+
## [1.0.5] - 2022-03-11
|
|
103
|
+
|
|
104
|
+
* Create `Client`
|
|
105
|
+
* Create `Identity Provider` (Breaking change: `IdentityProviderRepresentation.configuration` has been renamed to `IdentityProviderRepresentation.config`)
|
|
106
|
+
* Add `Identity Provider Mapping`
|
|
107
|
+
* Find service account for a `Client`
|
|
108
|
+
|
|
109
|
+
## [1.0.1] - 2021-10-14
|
|
110
|
+
|
|
111
|
+
* List all `Identity Providers`
|
|
112
|
+
* Add Group on Users (thanks to @tomuench)
|
|
113
|
+
* Remove Group from Users (thanks to @tomuench)
|
|
114
|
+
|
|
115
|
+
## [1.0.0] - 2021-08-03
|
|
116
|
+
|
|
117
|
+
* Add `totp` on Users
|
|
118
|
+
* Add `required_actions` on Users
|
|
119
|
+
|
|
120
|
+
## [0.7.9] - 2020-10-22
|
|
121
|
+
|
|
122
|
+
* Extend `search` function to use complex queries (thanks to @hobbypunk90)
|
|
123
|
+
|
|
124
|
+
## [0.7.8] - 2020-10-15
|
|
125
|
+
|
|
126
|
+
* Bug: `rest_client_options` default value does not match the documentation (was `nil` by default, should be `{}`)
|
|
127
|
+
* Update documentation about client setup (based on Keycloak 11)
|
|
128
|
+
|
|
129
|
+
## [0.7.7] - 2020-07-10
|
|
130
|
+
|
|
131
|
+
* Fix: `Replace request method shorthand with .execute for proper RestClient option support` (thanks to @RomanHargrave)
|
|
132
|
+
* When sending action emails, add lifespan as an optional parameter (thanks to @hobbypunk90)
|
|
133
|
+
|
|
134
|
+
## [0.7.6] - 2020-06-22
|
|
135
|
+
|
|
136
|
+
Thanks to @hobbypunk90
|
|
137
|
+
* Support for action emails and send forgot passsword mail
|
|
138
|
+
|
|
139
|
+
## [0.7.5] - 2020-03-28
|
|
140
|
+
|
|
141
|
+
Thanks to @RomanHargrave
|
|
142
|
+
* Support for working with federated identity provider (broker) links
|
|
143
|
+
|
|
144
|
+
## [0.7.4] - 2019-10-17
|
|
145
|
+
|
|
146
|
+
* Support for Rails 6
|
|
147
|
+
|
|
148
|
+
## [0.7.3] - 2019-07-11
|
|
149
|
+
|
|
150
|
+
Thanks to @cederigo:
|
|
151
|
+
* For a given user, get her list of groups
|
|
152
|
+
|
|
153
|
+
## [0.7.2] - 2019-06-17
|
|
154
|
+
|
|
155
|
+
Thanks to @vlad-ro:
|
|
156
|
+
|
|
157
|
+
* Get list of client role mappings for a group
|
|
158
|
+
* Save client role mappings for a user/group
|
|
159
|
+
* Save realm-level role mappings for a user/group
|
|
160
|
+
|
|
161
|
+
## [0.7.1] - 2019-06-11
|
|
162
|
+
|
|
163
|
+
Thanks to @vlad-ro:
|
|
164
|
+
|
|
165
|
+
* List users
|
|
166
|
+
* List clients
|
|
167
|
+
* List groups, create/save a group
|
|
168
|
+
* List roles, save a role
|
|
169
|
+
* List realms, save/update/delete a realm
|
|
170
|
+
* Get list of client role mappings for a user
|
|
171
|
+
* Support passing rest client options for user save and search
|
|
172
|
+
* Support using gem without ActiveSupport
|
|
173
|
+
|
|
174
|
+
## [0.7.0] - 2019-06-06
|
|
175
|
+
|
|
176
|
+
Thanks to @vlad-ro:
|
|
177
|
+
|
|
178
|
+
* Support passing rest client options
|
|
179
|
+
* More documentation
|
|
180
|
+
* More tests
|
|
181
|
+
* Better handling of timeouts
|
|
182
|
+
|
|
183
|
+
## [0.6.5] - 2019-05-14
|
|
184
|
+
|
|
185
|
+
* Get user
|
|
186
|
+
|
|
187
|
+
## [0.6.2] - 2019-05-14
|
|
188
|
+
|
|
189
|
+
* Update users
|
|
190
|
+
|
|
191
|
+
## [0.6] - 2019-03-06
|
|
192
|
+
|
|
193
|
+
* Save a locale when creating a new user
|
|
194
|
+
|
|
195
|
+
## [0.5] - 2018-01-26
|
|
196
|
+
|
|
197
|
+
* Client to access Custom REST API configurable-token
|
|
198
|
+
|
|
199
|
+
## [0.3] - 2018-01-19
|
|
200
|
+
|
|
189
201
|
* Support of impersonation
|
data/Gemfile.lock
CHANGED
|
@@ -1,49 +1,51 @@
|
|
|
1
|
-
PATH
|
|
2
|
-
remote: .
|
|
3
|
-
specs:
|
|
4
|
-
keycloak-admin (1.1.
|
|
5
|
-
http-cookie (~> 1.0, >= 1.0.3)
|
|
6
|
-
rest-client (~> 2.0)
|
|
7
|
-
|
|
8
|
-
GEM
|
|
9
|
-
remote: https://rubygems.org/
|
|
10
|
-
specs:
|
|
11
|
-
byebug (
|
|
12
|
-
diff-lcs (1.
|
|
13
|
-
domain_name (0.6.20240107)
|
|
14
|
-
http-accept (1.7.0)
|
|
15
|
-
http-cookie (1.0
|
|
16
|
-
domain_name (~> 0.5)
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
rspec-
|
|
30
|
-
|
|
31
|
-
rspec-
|
|
32
|
-
rspec-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
1
|
+
PATH
|
|
2
|
+
remote: .
|
|
3
|
+
specs:
|
|
4
|
+
keycloak-admin (1.1.5)
|
|
5
|
+
http-cookie (~> 1.0, >= 1.0.3)
|
|
6
|
+
rest-client (~> 2.0)
|
|
7
|
+
|
|
8
|
+
GEM
|
|
9
|
+
remote: https://rubygems.org/
|
|
10
|
+
specs:
|
|
11
|
+
byebug (12.0.0)
|
|
12
|
+
diff-lcs (1.6.2)
|
|
13
|
+
domain_name (0.6.20240107)
|
|
14
|
+
http-accept (1.7.0)
|
|
15
|
+
http-cookie (1.1.0)
|
|
16
|
+
domain_name (~> 0.5)
|
|
17
|
+
logger (1.7.0)
|
|
18
|
+
mime-types (3.7.0)
|
|
19
|
+
logger
|
|
20
|
+
mime-types-data (~> 3.2025, >= 3.2025.0507)
|
|
21
|
+
mime-types-data (3.2025.0924)
|
|
22
|
+
netrc (0.11.0)
|
|
23
|
+
rest-client (2.1.0)
|
|
24
|
+
http-accept (>= 1.7.0, < 2.0)
|
|
25
|
+
http-cookie (>= 1.0.2, < 2.0)
|
|
26
|
+
mime-types (>= 1.16, < 4.0)
|
|
27
|
+
netrc (~> 0.8)
|
|
28
|
+
rspec (3.13.2)
|
|
29
|
+
rspec-core (~> 3.13.0)
|
|
30
|
+
rspec-expectations (~> 3.13.0)
|
|
31
|
+
rspec-mocks (~> 3.13.0)
|
|
32
|
+
rspec-core (3.13.6)
|
|
33
|
+
rspec-support (~> 3.13.0)
|
|
34
|
+
rspec-expectations (3.13.5)
|
|
35
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
36
|
+
rspec-support (~> 3.13.0)
|
|
37
|
+
rspec-mocks (3.13.7)
|
|
38
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
39
|
+
rspec-support (~> 3.13.0)
|
|
40
|
+
rspec-support (3.13.6)
|
|
41
|
+
|
|
42
|
+
PLATFORMS
|
|
43
|
+
ruby
|
|
44
|
+
|
|
45
|
+
DEPENDENCIES
|
|
46
|
+
byebug (= 12.0.0)
|
|
47
|
+
keycloak-admin!
|
|
48
|
+
rspec (= 3.13.2)
|
|
49
|
+
|
|
50
|
+
BUNDLED WITH
|
|
51
|
+
2.1.4
|