itr = jsonNode.elements();
23 | while (itr.hasNext()) {
24 | JsonNode credNode = itr.next();
25 | res.add(credNode.traverse(objMapper).readValueAs(BetterUserRepresentation.class));
26 | }
27 | return res;
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/keycloak-export/src/main/resources/META-INF/keycloak-themes.json:
--------------------------------------------------------------------------------
1 | {
2 | "themes": [
3 | {
4 | "name" : "ctexport",
5 | "types": [ "admin" ]
6 | }
7 | ]
8 | }
9 |
--------------------------------------------------------------------------------
/keycloak-export/src/main/resources/META-INF/services/org.keycloak.exportimport.ImportProviderFactory:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright 2016 Red Hat, Inc. and/or its affiliates
3 | # and other contributors as indicated by the @author tags.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 |
18 | io.cloudtrust.keycloak.export.SingleFileImportProviderFactory
--------------------------------------------------------------------------------
/keycloak-export/src/main/resources/META-INF/services/org.keycloak.services.resource.RealmResourceProviderFactory:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright 2016 Red Hat, Inc. and/or its affiliates
3 | # and other contributors as indicated by the @author tags.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 |
18 | io.cloudtrust.keycloak.export.ExportResourceProviderFactory
--------------------------------------------------------------------------------
/keycloak-export/src/main/resources/theme/ctexport/admin/resources/css/styles.css:
--------------------------------------------------------------------------------
1 | html,body {
2 | height: 100%;
3 | }
4 |
5 | form {
6 | margin-top: 20px;
7 | }
8 |
9 | table {
10 | margin-top: 20px;
11 | }
12 |
13 | .required {
14 | color: #f00;
15 | }
16 |
17 | .tooltip-inner {
18 | min-width: 200px;
19 | }
20 |
21 | .margin-top {
22 | margin-top: 20px;
23 | }
24 |
25 | .no-margin-top {
26 | margin-top: 0px !important;
27 | }
28 |
29 | table {
30 | max-width: 100%;
31 | }
32 |
33 | td.clip {
34 | overflow: hidden;
35 | text-overflow: ellipsis;
36 | white-space: nowrap;
37 | max-width: 0;
38 | }
39 |
40 | th.w-10 {
41 | width: 10%;
42 | }
43 |
44 | th.w-15 {
45 | width: 15%;
46 | }
47 |
48 | th.w-20 {
49 | width: 20%;
50 | }
51 |
52 |
53 | th.w-25 {
54 | width: 25%;
55 | }
56 |
57 | th.w-30 {
58 | width: 30%;
59 | }
60 |
61 |
62 | th.w-35 {
63 | width: 35%;
64 | }
65 |
66 | th.w-40 {
67 | width: 40%;
68 | }
69 |
70 | /*********** Loading ***********/
71 |
72 | .loading {
73 | background-color: #f5f5f5;
74 | border: 1px solid #eee;
75 | position: absolute;
76 | bottom: 0px;
77 | left: 0px;
78 | padding: 2px 200px 2px 5px;
79 | }
80 |
81 | /*********** Feedback ***********/
82 |
83 | .feedback-aligner {
84 | position: fixed;
85 | top: 15px;
86 | text-align: center;
87 | width: 100%;
88 | height: 0;
89 | z-index: 100;
90 | }
91 | .feedback-aligner .alert {
92 | border-radius: 2px;
93 | border-width: 1px;
94 | display: inline-block;
95 | position: relative;
96 | }
97 |
98 | /*********** On-Off Switch ***********/
99 |
100 | .onoffswitch {
101 | -moz-user-select: none;
102 | height: 26px;
103 | position: relative;
104 | width: 62px;
105 | }
106 | .onoffswitch .onoffswitch-checkbox {
107 | display: none;
108 | }
109 | .onoffswitch .onoffswitch-label {
110 | border: 1px solid #bbb;
111 | border-radius: 2px;
112 | cursor: pointer;
113 | display: block;
114 | overflow: hidden;
115 | width: 62px;
116 | }
117 | .onoffswitch .onoffswitch-inner {
118 | display: block;
119 | margin-left: -100%;
120 | transition: margin 0.3s ease-in 0s;
121 | width: 200%;
122 | }
123 | .onoffswitch .onoffswitch-inner > span {
124 | -moz-box-sizing: border-box;
125 | color: white;
126 | float: left;
127 | font-size: 11px;
128 | font-family: "Open Sans", sans-serif;
129 | font-weight: bold;
130 | height: 24px;
131 | line-height: 24px;
132 | padding: 0;
133 | width: 50%;
134 | }
135 | .onoffswitch .onoffswitch-switch {
136 | background-image: linear-gradient(top, #fafafa 0%, #ededed 100%);
137 | background-image: -o-linear-gradient(top, #fafafa 0%, #ededed 100%);
138 | background-image: -moz-linear-gradient(top, #fafafa 0%, #ededed 100%);
139 | background-image: -webkit-linear-gradient(top, #fafafa 0%, #ededed 100%);
140 | background-image: -ms-linear-gradient(top, #fafafa 0%, #ededed 100%);
141 | background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #fafafa), color-stop(1, 0, #ededed));
142 | border: 1px solid #aaa;
143 | border-radius: 2px;
144 | bottom: 0;
145 | margin: 0;
146 | position: absolute;
147 | right: 39px;
148 | top: 0;
149 | transition: all 0.3s ease-in 0s;
150 | -webkit-transition: all 0.3s ease-in 0s;
151 | width: 23px;
152 | }
153 | .onoffswitch .onoffswitch-inner .onoffswitch-active {
154 | background-image: linear-gradient(top, #00a9ec 0%, #009bd3 100%);
155 | background-image: -o-linear-gradient(top, #00a9ec 0%, #009bd3 100%);
156 | background-image: -moz-linear-gradient(top, #00a9ec 0%, #009bd3 100%);
157 | background-image: -webkit-linear-gradient(top, #00a9ec 0%, #009bd3 100%);
158 | background-image: -ms-linear-gradient(top, #00a9ec 0%, #009bd3 100%);
159 | background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #00a9ec), color-stop(1, 0, #009bd3));
160 | color: #FFFFFF;
161 | padding-left: 10px;
162 | }
163 | .onoffswitch-checkbox:disabled + .onoffswitch-label .onoffswitch-inner .onoffswitch-active,
164 | .onoffswitch-checkbox:disabled + .onoffswitch-label .onoffswitch-inner .onoffswitch-inactive {
165 | background-image: none;
166 | background-color: #e5e5e5;
167 | color: #9d9fa1;
168 | }
169 | .onoffswitch .onoffswitch-inner .onoffswitch-inactive {
170 | background: linear-gradient(#fefefe, #e8e8e8) repeat scroll 0 0 transparent;
171 | color: #4d5258;
172 | padding-right: 10px;
173 | text-align: right;
174 | }
175 | .onoffswitch .onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-inner {
176 | margin-left: 0;
177 | }
178 | .onoffswitch .onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-switch {
179 | right: 0;
180 | }
181 |
182 |
183 | /*********** Select 2 ***********/
184 |
185 | .select2-container {
186 | width: 100%;
187 | }
188 |
189 | .select2-container-multi .select2-choices .select2-search-field {
190 | height: 26px;
191 | }
192 |
193 | .select2-container-single {
194 | padding: 0;
195 | margin: 0;
196 | }
197 |
198 | .select2-container-single .form-group {
199 | width: 100%;
200 | margin: 0;
201 | }
202 |
203 | .select2-container-single .form-group .input-group {
204 | width: 100%;
205 | }
206 |
207 | /*********** html select ********/
208 | .overflow-select {
209 | overflow: auto;
210 | }
211 |
212 |
213 | /*********** New Menu ***********/
214 |
215 |
216 | .sidebar-pf-left{
217 | background: #292e34;
218 | }
219 |
220 | .sidebar-pf .nav-pills > li a i, .sidebar-pf .nav-pills > li a span{
221 | color: #72767b;
222 | display: inline-block;
223 | margin-right: 10px;
224 | }
225 | .sidebar-pf .nav-pills > li > a{
226 | color: #dbdada;
227 | padding: 0px 20px 0 30px!important;
228 | line-height: 30px;
229 | border-left-width: 12px;
230 | border-left-style: solid;
231 | border-left-color: #292e34;
232 | margin-left: -6px;
233 | }
234 |
235 | .sidebar-pf .nav-pills > li > a:hover{
236 | background: #393f44;
237 | border-color:#292e34;
238 | border-left-color: #393f44;
239 | color: #fff;
240 | }
241 |
242 | .sidebar-pf .nav-pills > li > a:after{
243 | display: none!important;
244 | }
245 |
246 |
247 | .sidebar-pf .nav-pills > li.active > a {
248 | color: #fff;
249 | background: #393f44!important;
250 | border-bottom: 1px solid #000!important;
251 | border-top: 1px solid #000!important;
252 | border-left-color: #39a5dc!important;
253 | }
254 |
255 | .sidebar-pf .nav-pills > li.active a i, .sidebar-pf .nav-pills > li.active a span{
256 | color: #39a5dc;
257 | }
258 |
259 | /*********** Realm selector ***********/
260 |
261 | .realm-selector{
262 | color: #fff;
263 | margin: 0 -20px;
264 | position: relative;
265 | }
266 |
267 | .realm-dropmenu{
268 | display: none;
269 | cursor: pointer;
270 | position: absolute;
271 | top: 60px;
272 | left: 0;
273 | right: 0;
274 | z-index: 999;
275 | background: #fff;
276 | }
277 |
278 | .realm-selector:hover .realm-dropmenu{
279 | display: block;
280 | }
281 |
282 | .realm-add{
283 | padding: 10px;
284 | }
285 |
286 | .realm-selector h2{
287 | font-size: 16px;
288 | line-height: 60px;
289 | padding: 0 20px;
290 | margin: 0;
291 | border-bottom: 1px solid #d5d5d6;
292 | }
293 |
294 | .realm-selector h2 i{
295 | display: inline-block;
296 | float: right;
297 | line-height: 60px;
298 | }
299 |
300 |
301 | .realm-selector ul{
302 | padding-left: 0;
303 | margin: 0;
304 | list-style: none;
305 | max-height: 200px;
306 | overflow-y:auto;
307 | }
308 |
309 |
310 | .realm-selector ul li a{
311 | line-height: 60px;
312 | padding: 0 20px;
313 | border-bottom: 1px solid #d5d5d6;
314 | line-height: 39px;
315 | display: block;
316 | font-size: 14px;
317 | }
318 |
319 |
320 | /*********** Overwrites header defaults ***********/
321 |
322 | .navbar-pf{
323 | border-top: none!important;
324 | }
325 |
326 | .navbar-pf .navbar-brand {
327 | padding: 0;
328 | height: 56px;
329 | line-height: 56px;
330 | background-position: center center;
331 | background-image: url('../img/keyclok-logo.png');
332 | background-size: 148px 30px;
333 | background-repeat: no-repeat;
334 | width: 148px;
335 | }
336 |
337 | .navbar-pf .navbar-utility .dropdown-toggle {
338 | padding: 23px !important;
339 | }
340 |
341 | .clickable {
342 | cursor: pointer;
343 | }
344 |
345 | h1 i {
346 | color: #999999;
347 | font-size: 18px;
348 | margin-left: 10px;
349 | }
350 |
351 | /* Action cell */
352 | .kc-action-cell {
353 | background-color: #eeeeee;
354 | background-image: linear-gradient(to bottom, #fafafa 0%, #ededed 100%);
355 | background-repeat: repeat-x;
356 |
357 | text-align: center;
358 | vertical-align: middle;
359 |
360 | overflow: hidden;
361 | text-overflow: ellipsis;
362 | white-space: nowrap;
363 |
364 | cursor:pointer;
365 | }
366 |
367 | .kc-action-cell:hover {
368 | background-color: #eeeeee;
369 | background-image: none;
370 | }
371 |
372 | .kc-action-cell-disabled {
373 | background-color: #fafafa;
374 | color: #8b8d8f;
375 | background-image: none;
376 | cursor: not-allowed;
377 | }
378 |
379 | .kc-sorter span {
380 | margin-left: 10px;
381 | }
382 |
383 |
384 | /* Time selector */
385 |
386 | .time-selector input {
387 | display: inline-block;
388 | width: 120px;
389 | padding-right: 0;
390 | margin-right: 0;
391 | }
392 |
393 | .time-selector select {
394 | display: inline-block;
395 | width: 80px;
396 | margin-left: 0;
397 | padding-left: 0;
398 | }
399 |
400 | .ace_editor {
401 | height: 600px;
402 | width: 100%;
403 | }
404 |
405 | .kc-button-input-file input {
406 | float: left;
407 | width: 73%;
408 | }
409 |
410 | .kc-button-input-file label {
411 | float: left;
412 | margin-left: 2%;
413 | width: 25%;
414 | }
415 |
416 | table.kc-authz-table-expanded {
417 | margin-top: 0px !important;
418 | }
419 |
420 | .no-gutter > [class*='col-'] {
421 | padding-right:0!important;
422 | padding-left:0!important;
423 | }
424 |
425 | .password-conceal {
426 | font-family: 'text-security-disc';
427 | font-size: 14px;
428 | }
429 |
430 | .input-map input.form-control {
431 | width: 50%;
432 | }
433 |
434 | /* Deactivation styles for user-group membership tree models */
435 |
436 | div[tree-model] li .deactivate {
437 | color: #4a5053;
438 | opacity: 0.4;
439 | }
440 |
441 | div[tree-model] li .deactivate_selected {
442 | background-color: #dcdcdc;
443 | font-weight: bold;
444 | padding: 1px 5px;
445 | }
446 |
447 | /* search highlighting */
448 |
449 | div[tree-model] li .highlight {
450 | background-color: #aaddff;
451 | }
452 |
453 | /* Manage credentials */
454 | table.credentials-table {
455 | margin-top: 0;
456 | margin-bottom: 20px;
457 | }
458 |
459 | table.credentials-table td {
460 | vertical-align: middle !important;
461 | }
462 |
463 | table.credentials-table input[type='text'] {
464 | width: 100%;
465 | }
466 |
467 | td.credential-arrows-cell {
468 | width: 75px;
469 | }
470 |
471 | td.credential-label-cell {
472 | padding: 5px !important;
473 | }
474 |
475 | td.credential-action-cell {
476 | padding: 0px !important;
477 | }
478 |
479 | td.credential-action-cell div.kc-action-cell {
480 | width: 100%;
481 | height: 36px;
482 | line-height: 34px;
483 | }
484 |
485 | td.credential-action-cell.expanded div.kc-action-cell {
486 | border-bottom: 1px solid #d1d1d1;
487 | }
488 |
489 | table.credential-data-table td {
490 | word-break: break-all;
491 | }
492 |
493 | table.credential-data-table tr:first-child td {
494 | border-top: 0;
495 | }
496 |
497 | table.credential-data-table td:first-child {
498 | width: 150px;
499 | }
500 |
501 | table.credential-data-table td.key {
502 | text-align: right;
503 | font-weight: bold;
504 | }
505 |
506 | .modal-sensitive {
507 | color: red;
508 | font-size: 2em;
509 | }
510 |
511 | .sensitive-delete {
512 | text-align: center;
513 | }
514 |
515 | .sensitive-delete input {
516 | width: 90%;
517 | font-size: 2em;
518 | color: red;
519 | }
520 |
--------------------------------------------------------------------------------
/keycloak-export/src/main/resources/theme/ctexport/admin/resources/templates/kc-modal.html:
--------------------------------------------------------------------------------
1 |
7 |
8 | {{message}}
9 |
10 |
You are currently on {{currentHostname}}.
11 |
Confirm the name of the realm to delete:
12 |
13 |
14 |
15 |
16 |
17 |
21 |
--------------------------------------------------------------------------------
/keycloak-export/src/main/resources/theme/ctexport/admin/theme.properties:
--------------------------------------------------------------------------------
1 | parent=keycloak
2 | import=common/keycloak
--------------------------------------------------------------------------------
/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 4.0.0
4 |
5 |
6 | io.cloudtrust
7 | kc-cloudtrust-module
8 | 18.0.0
9 |
10 |
11 | keycloak-export-parent
12 | 18.1.2-SNAPSHOT
13 | Parent for export module
14 | pom
15 |
16 |
17 | scm:git:ssh://git@github.com/cloudtrust/keycloak-export
18 | scm:git:ssh://git@github.com/cloudtrust/keycloak-export
19 | https://github.com/cloudtrust/keycloak-export
20 | HEAD
21 |
22 |
23 |
24 | keycloak-export
25 | keycloak-export-tests
26 |
27 |
28 |
29 | 1.10.0
30 | 4.2
31 |
32 | 1.8
33 | 1.8
34 |
35 |
36 |
37 |
38 | project-release
39 | https://artifactory.svc.elca.ch/artifactory/prj_cloudtrust_release
40 |
41 |
42 | project-snapshot
43 | https://artifactory.svc.elca.ch/artifactory/prj_cloudtrust_snapshot
44 |
45 |
46 |
47 |
48 | project-release
49 | https://artifactory.svc.elca.ch/artifactory/prj_cloudtrust_release
50 |
51 | true
52 |
53 |
54 | false
55 |
56 |
57 |
58 | project-snapshot
59 | https://artifactory.svc.elca.ch/artifactory/prj_cloudtrust_snapshot
60 |
61 | false
62 |
63 |
64 | true
65 |
66 |
67 |
68 |
69 |
--------------------------------------------------------------------------------