@l-v-yonsama/multi-platform-database-drivers 0.1.210 → 0.1.211
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.
- package/built/src/drivers/KeycloakDriver.d.ts +34 -34
- package/built/src/drivers/KeycloakDriver.js +315 -35
- package/built/src/drivers/KeycloakDriver.js.map +1 -1
- package/built/src/types/drivers/Keycloak.d.ts +342 -0
- package/built/src/types/drivers/Keycloak.js +12 -0
- package/built/src/types/drivers/Keycloak.js.map +1 -0
- package/built/src/types/drivers/index.d.ts +1 -0
- package/built/src/types/drivers/index.js +1 -0
- package/built/src/types/drivers/index.js.map +1 -1
- package/package.json +3 -2
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
import KcAdminClient from '@keycloak/keycloak-admin-client';
|
|
2
1
|
import { BaseDriver, Scannable } from './BaseDriver';
|
|
3
2
|
import { KeycloakDatabase } from '../resource';
|
|
4
|
-
import { ConnectionSetting, ResultSetData, ScanParams } from '../types';
|
|
5
|
-
import {
|
|
6
|
-
import UserRepresentation from '@keycloak/keycloak-admin-client/lib/defs/userRepresentation';
|
|
7
|
-
import RoleRepresentation from '@keycloak/keycloak-admin-client/lib/defs/roleRepresentation';
|
|
8
|
-
import { RoleQuery } from '@keycloak/keycloak-admin-client/lib/resources/roles';
|
|
9
|
-
import { GroupCountQuery, GroupQuery } from '@keycloak/keycloak-admin-client/lib/resources/groups';
|
|
10
|
-
import RealmRepresentation from '@keycloak/keycloak-admin-client/lib/defs/realmRepresentation';
|
|
11
|
-
import GroupRepresentation from '@keycloak/keycloak-admin-client/lib/defs/groupRepresentation';
|
|
3
|
+
import { ConnectionSetting, GroupCountQuery, GroupQuery, GroupRepresentation, RealmRepresentation, ResultSetData, RoleRepresentation, RoleQuery, ScanParams, UserQuery, UserRepresentation, CredentialRepresentation, RealmParam } from '../types';
|
|
4
|
+
import { Axios } from 'axios';
|
|
12
5
|
export declare class KeycloakDriver extends BaseDriver<KeycloakDatabase> implements Scannable {
|
|
13
|
-
|
|
6
|
+
private issuerClient;
|
|
14
7
|
constructor(conRes: ConnectionSetting);
|
|
15
8
|
connectSub(): Promise<string>;
|
|
9
|
+
getAxiosClient(): Promise<Axios>;
|
|
10
|
+
private getTokenSet;
|
|
16
11
|
test(with_connect?: boolean): Promise<string>;
|
|
17
|
-
createUser(
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
id: string;
|
|
21
|
-
}>;
|
|
22
|
-
getUsers(options?: UserQuery & {
|
|
23
|
-
realm?: string | undefined;
|
|
24
|
-
}): Promise<UserRepresentation[]>;
|
|
12
|
+
createUser(payload?: UserRepresentation & RealmParam): Promise<void>;
|
|
13
|
+
updateUser(payload?: UserRepresentation & RealmParam): Promise<void>;
|
|
14
|
+
getUsers(payload?: UserQuery & RealmParam): Promise<UserRepresentation[]>;
|
|
25
15
|
countUsers(payload?: UserQuery & {
|
|
26
16
|
realm?: string | undefined;
|
|
27
17
|
}): Promise<number>;
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}): Promise<
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
18
|
+
setupNewPassword(payload?: CredentialRepresentation & RealmParam & {
|
|
19
|
+
userId: string;
|
|
20
|
+
}): Promise<void>;
|
|
21
|
+
createRole(payload?: RoleRepresentation & {
|
|
22
|
+
realm?: string | undefined;
|
|
23
|
+
}): Promise<void>;
|
|
24
|
+
updateRole(payload?: RoleRepresentation & {
|
|
25
|
+
realm?: string | undefined;
|
|
26
|
+
}): Promise<void>;
|
|
27
|
+
getRoles(payload?: RoleQuery & RealmParam): Promise<RoleRepresentation[]>;
|
|
28
|
+
getRole(payload: {
|
|
29
|
+
id?: string;
|
|
30
|
+
name?: string;
|
|
31
|
+
} & RealmParam): Promise<RoleRepresentation | undefined>;
|
|
32
|
+
createGroup(payload?: GroupRepresentation & RealmParam): Promise<void>;
|
|
33
|
+
updateGroup(payload?: GroupRepresentation & RealmParam): Promise<void>;
|
|
34
|
+
getGroups(payload?: GroupQuery & RealmParam): Promise<GroupRepresentation[]>;
|
|
35
|
+
getGroup(payload: {
|
|
36
|
+
id?: string;
|
|
37
|
+
name?: string;
|
|
38
|
+
} & RealmParam): Promise<GroupRepresentation | undefined>;
|
|
39
39
|
listMembers(payload?: {
|
|
40
40
|
id: string;
|
|
41
41
|
first?: number | undefined;
|
|
42
42
|
max?: number | undefined;
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
realm?: string | undefined;
|
|
47
|
-
}): Promise<number>;
|
|
43
|
+
} & RealmParam): Promise<UserRepresentation[]>;
|
|
44
|
+
countGroups(payload?: GroupCountQuery & RealmParam): Promise<number>;
|
|
45
|
+
createRealm(payload?: RealmRepresentation): Promise<void>;
|
|
48
46
|
getRealms(payload?: {
|
|
49
47
|
briefRepresentation?: boolean | undefined;
|
|
50
48
|
}): Promise<RealmRepresentation[]>;
|
|
51
49
|
scan(params: ScanParams): Promise<ResultSetData>;
|
|
52
50
|
getInfomationSchemasSub(): Promise<Array<KeycloakDatabase>>;
|
|
53
51
|
closeSub(): Promise<string>;
|
|
52
|
+
private normalizeAttribute;
|
|
53
|
+
private getErrorMessage;
|
|
54
54
|
}
|
|
@@ -2,11 +2,32 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.KeycloakDriver = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const keycloak_admin_client_1 = tslib_1.__importDefault(require("@keycloak/keycloak-admin-client"));
|
|
6
5
|
const BaseDriver_1 = require("./BaseDriver");
|
|
7
6
|
const resource_1 = require("../resource");
|
|
8
7
|
const types_1 = require("../types");
|
|
9
8
|
const utils_1 = require("../utils");
|
|
9
|
+
const axios_1 = tslib_1.__importStar(require("axios"));
|
|
10
|
+
const openid_client_1 = require("openid-client");
|
|
11
|
+
function isKeycloakErrorResponse(o) {
|
|
12
|
+
if (o === null ||
|
|
13
|
+
o === undefined ||
|
|
14
|
+
typeof o !== 'object' ||
|
|
15
|
+
o.errorMessage === undefined ||
|
|
16
|
+
typeof o.errorMessage !== 'string') {
|
|
17
|
+
return false;
|
|
18
|
+
}
|
|
19
|
+
return true;
|
|
20
|
+
}
|
|
21
|
+
function isKeycloakIntermalServerErrorResponse(o) {
|
|
22
|
+
if (o === null ||
|
|
23
|
+
o === undefined ||
|
|
24
|
+
typeof o !== 'object' ||
|
|
25
|
+
o.error === undefined ||
|
|
26
|
+
typeof o.error !== 'string') {
|
|
27
|
+
return false;
|
|
28
|
+
}
|
|
29
|
+
return true;
|
|
30
|
+
}
|
|
10
31
|
class KeycloakDriver extends BaseDriver_1.BaseDriver {
|
|
11
32
|
constructor(conRes) {
|
|
12
33
|
super(conRes);
|
|
@@ -14,20 +35,11 @@ class KeycloakDriver extends BaseDriver_1.BaseDriver {
|
|
|
14
35
|
connectSub() {
|
|
15
36
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
16
37
|
try {
|
|
17
|
-
const { url,
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
if (database) {
|
|
23
|
-
config.realmName = database;
|
|
24
|
-
}
|
|
25
|
-
this.client = new keycloak_admin_client_1.default(config);
|
|
26
|
-
yield this.client.auth({
|
|
27
|
-
username: user,
|
|
28
|
-
password,
|
|
29
|
-
grantType: iamSolution.grantType,
|
|
30
|
-
clientId: iamSolution.clientId,
|
|
38
|
+
const { url, iamSolution } = this.conRes;
|
|
39
|
+
const issuer = yield openid_client_1.Issuer.discover(`${url}/realms/master`);
|
|
40
|
+
this.issuerClient = new issuer.Client({
|
|
41
|
+
client_id: iamSolution.clientId,
|
|
42
|
+
client_secret: 'dummy',
|
|
31
43
|
});
|
|
32
44
|
}
|
|
33
45
|
catch (e) {
|
|
@@ -36,6 +48,32 @@ class KeycloakDriver extends BaseDriver_1.BaseDriver {
|
|
|
36
48
|
return '';
|
|
37
49
|
});
|
|
38
50
|
}
|
|
51
|
+
getAxiosClient() {
|
|
52
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
53
|
+
const { url } = this.conRes;
|
|
54
|
+
const tokenSet = yield this.getTokenSet();
|
|
55
|
+
const client = new axios_1.Axios({
|
|
56
|
+
baseURL: url,
|
|
57
|
+
headers: {
|
|
58
|
+
'Content-Type': 'application/json',
|
|
59
|
+
Authorization: 'Bearer ' + tokenSet.access_token,
|
|
60
|
+
},
|
|
61
|
+
});
|
|
62
|
+
client.defaults.transformRequest = axios_1.default.defaults.transformRequest;
|
|
63
|
+
client.defaults.transformResponse = axios_1.default.defaults.transformResponse;
|
|
64
|
+
return client;
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
getTokenSet() {
|
|
68
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
69
|
+
const { user, password } = this.conRes;
|
|
70
|
+
return yield this.issuerClient.grant({
|
|
71
|
+
grant_type: 'password',
|
|
72
|
+
username: user,
|
|
73
|
+
password: password,
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
}
|
|
39
77
|
test(with_connect = false) {
|
|
40
78
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
41
79
|
let errorReason = '';
|
|
@@ -56,53 +94,270 @@ class KeycloakDriver extends BaseDriver_1.BaseDriver {
|
|
|
56
94
|
return errorReason;
|
|
57
95
|
});
|
|
58
96
|
}
|
|
59
|
-
createUser(
|
|
97
|
+
createUser(payload) {
|
|
98
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
99
|
+
const _a = payload !== null && payload !== void 0 ? payload : {}, { realm } = _a, data = tslib_1.__rest(_a, ["realm"]);
|
|
100
|
+
const realmId = realm !== null && realm !== void 0 ? realm : this.conRes.database;
|
|
101
|
+
const client = yield this.getAxiosClient();
|
|
102
|
+
const res = yield client.post(`/admin/realms/${realmId}/users`, Object.assign({ enabled: true }, data));
|
|
103
|
+
const errorMessage = this.getErrorMessage(res);
|
|
104
|
+
if (errorMessage) {
|
|
105
|
+
throw new Error(errorMessage);
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
updateUser(payload) {
|
|
60
110
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
61
|
-
const
|
|
62
|
-
|
|
111
|
+
const _a = payload !== null && payload !== void 0 ? payload : {}, { realm, id } = _a, data = tslib_1.__rest(_a, ["realm", "id"]);
|
|
112
|
+
const realmId = realm !== null && realm !== void 0 ? realm : this.conRes.database;
|
|
113
|
+
const client = yield this.getAxiosClient();
|
|
114
|
+
const res = yield client.put(`/admin/realms/${realmId}/users/${id}`, Object.assign({}, data));
|
|
115
|
+
const errorMessage = this.getErrorMessage(res);
|
|
116
|
+
if (errorMessage) {
|
|
117
|
+
throw new Error(errorMessage);
|
|
118
|
+
}
|
|
63
119
|
});
|
|
64
120
|
}
|
|
65
|
-
getUsers(
|
|
121
|
+
getUsers(payload) {
|
|
66
122
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
67
|
-
const
|
|
68
|
-
|
|
123
|
+
const _a = payload !== null && payload !== void 0 ? payload : {}, { realm } = _a, params = tslib_1.__rest(_a, ["realm"]);
|
|
124
|
+
const realmId = realm !== null && realm !== void 0 ? realm : this.conRes.database;
|
|
125
|
+
const client = yield this.getAxiosClient();
|
|
126
|
+
const res = yield client.get(`/admin/realms/${realmId}/users`, {
|
|
127
|
+
params,
|
|
128
|
+
});
|
|
129
|
+
const errorMessage = this.getErrorMessage(res);
|
|
130
|
+
if (errorMessage) {
|
|
131
|
+
throw new Error(errorMessage);
|
|
132
|
+
}
|
|
133
|
+
return res.data;
|
|
69
134
|
});
|
|
70
135
|
}
|
|
71
136
|
countUsers(payload) {
|
|
72
137
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
73
|
-
|
|
138
|
+
const { realm } = payload;
|
|
139
|
+
const client = yield this.getAxiosClient();
|
|
140
|
+
const res = yield client.get(`/admin/realms/${realm}/users/count`, {
|
|
141
|
+
params: payload,
|
|
142
|
+
});
|
|
143
|
+
const errorMessage = this.getErrorMessage(res);
|
|
144
|
+
if (errorMessage) {
|
|
145
|
+
throw new Error(errorMessage);
|
|
146
|
+
}
|
|
147
|
+
return res.data;
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
setupNewPassword(payload) {
|
|
151
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
152
|
+
const _a = payload !== null && payload !== void 0 ? payload : {}, { realm, userId } = _a, data = tslib_1.__rest(_a, ["realm", "userId"]);
|
|
153
|
+
const realmId = realm !== null && realm !== void 0 ? realm : this.conRes.database;
|
|
154
|
+
const client = yield this.getAxiosClient();
|
|
155
|
+
const res = yield client.put(`/admin/realms/${realmId}/users/${userId}/reset-password`, Object.assign({}, data));
|
|
156
|
+
const errorMessage = this.getErrorMessage(res);
|
|
157
|
+
if (errorMessage) {
|
|
158
|
+
throw new Error(errorMessage);
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
createRole(payload) {
|
|
163
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
164
|
+
const _a = payload !== null && payload !== void 0 ? payload : {}, { realm, attributes } = _a, data = tslib_1.__rest(_a, ["realm", "attributes"]);
|
|
165
|
+
const realmId = realm !== null && realm !== void 0 ? realm : this.conRes.database;
|
|
166
|
+
if (payload.name === undefined || payload.name === '') {
|
|
167
|
+
throw new Error('name is not defined.');
|
|
168
|
+
}
|
|
169
|
+
const client = yield this.getAxiosClient();
|
|
170
|
+
const res = yield client.post(`/admin/realms/${realmId}/roles`, data);
|
|
171
|
+
const errorMessage = this.getErrorMessage(res);
|
|
172
|
+
if (errorMessage) {
|
|
173
|
+
throw new Error(errorMessage);
|
|
174
|
+
}
|
|
175
|
+
if (attributes) {
|
|
176
|
+
const roleRes = yield this.getRole({
|
|
177
|
+
realm: realmId,
|
|
178
|
+
name: payload.name,
|
|
179
|
+
});
|
|
180
|
+
yield this.updateRole(Object.assign(Object.assign({}, roleRes), { realm: realmId, attributes }));
|
|
181
|
+
}
|
|
74
182
|
});
|
|
75
183
|
}
|
|
76
|
-
|
|
184
|
+
updateRole(payload) {
|
|
77
185
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
78
|
-
const payload =
|
|
79
|
-
|
|
186
|
+
const _a = payload !== null && payload !== void 0 ? payload : {}, { realm, id } = _a, data = tslib_1.__rest(_a, ["realm", "id"]);
|
|
187
|
+
const realmId = realm !== null && realm !== void 0 ? realm : this.conRes.database;
|
|
188
|
+
if (payload.id === undefined || payload.id === '') {
|
|
189
|
+
throw new Error('id is not defined.');
|
|
190
|
+
}
|
|
191
|
+
const client = yield this.getAxiosClient();
|
|
192
|
+
const res = yield client.put(`/admin/realms/${realmId}/roles-by-id/${id}`, data);
|
|
193
|
+
const errorMessage = this.getErrorMessage(res);
|
|
194
|
+
if (errorMessage) {
|
|
195
|
+
throw new Error(errorMessage);
|
|
196
|
+
}
|
|
80
197
|
});
|
|
81
198
|
}
|
|
82
199
|
getRoles(payload) {
|
|
83
200
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
84
|
-
|
|
85
|
-
|
|
201
|
+
const _a = payload !== null && payload !== void 0 ? payload : {}, { realm } = _a, params = tslib_1.__rest(_a, ["realm"]);
|
|
202
|
+
const realmId = realm !== null && realm !== void 0 ? realm : this.conRes.database;
|
|
203
|
+
const client = yield this.getAxiosClient();
|
|
204
|
+
const res = yield client.get(`/admin/realms/${realmId}/roles`, {
|
|
205
|
+
params,
|
|
206
|
+
});
|
|
207
|
+
const errorMessage = this.getErrorMessage(res);
|
|
208
|
+
if (errorMessage) {
|
|
209
|
+
throw new Error(errorMessage);
|
|
210
|
+
}
|
|
211
|
+
return res.data;
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
getRole(payload) {
|
|
215
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
216
|
+
const { realm, id, name } = payload !== null && payload !== void 0 ? payload : {};
|
|
217
|
+
const realmId = realm !== null && realm !== void 0 ? realm : this.conRes.database;
|
|
218
|
+
if (id === undefined && name === undefined) {
|
|
219
|
+
throw new Error('id or name must be defined.');
|
|
220
|
+
}
|
|
221
|
+
if (id !== undefined) {
|
|
222
|
+
const client = yield this.getAxiosClient();
|
|
223
|
+
const res = yield client.get(`/admin/realms/${realmId}/roles-by-id//${id}`);
|
|
224
|
+
const errorMessage = this.getErrorMessage(res);
|
|
225
|
+
if (errorMessage) {
|
|
226
|
+
throw new Error(errorMessage);
|
|
227
|
+
}
|
|
228
|
+
return res.data;
|
|
229
|
+
}
|
|
230
|
+
if (name !== undefined) {
|
|
231
|
+
const client = yield this.getAxiosClient();
|
|
232
|
+
const res = yield client.get(`/admin/realms/${realmId}/roles/${name}`);
|
|
233
|
+
const errorMessage = this.getErrorMessage(res);
|
|
234
|
+
if (errorMessage) {
|
|
235
|
+
throw new Error(errorMessage);
|
|
236
|
+
}
|
|
237
|
+
return res.data;
|
|
238
|
+
}
|
|
239
|
+
return undefined;
|
|
240
|
+
});
|
|
241
|
+
}
|
|
242
|
+
createGroup(payload) {
|
|
243
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
244
|
+
const _a = payload !== null && payload !== void 0 ? payload : {}, { realm, attributes } = _a, data = tslib_1.__rest(_a, ["realm", "attributes"]);
|
|
245
|
+
const realmId = realm !== null && realm !== void 0 ? realm : this.conRes.database;
|
|
246
|
+
if (payload.name === undefined || payload.name === '') {
|
|
247
|
+
throw new Error('name is not defined.');
|
|
248
|
+
}
|
|
249
|
+
const client = yield this.getAxiosClient();
|
|
250
|
+
const res = yield client.post(`/admin/realms/${realmId}/groups`, data);
|
|
251
|
+
const errorMessage = this.getErrorMessage(res);
|
|
252
|
+
if (errorMessage) {
|
|
253
|
+
throw new Error(errorMessage);
|
|
254
|
+
}
|
|
255
|
+
if (attributes) {
|
|
256
|
+
const groupRes = yield this.getGroup({
|
|
257
|
+
realm: realmId,
|
|
258
|
+
name: payload.name,
|
|
259
|
+
});
|
|
260
|
+
yield this.updateGroup(Object.assign(Object.assign({}, groupRes), { realm: realmId, attributes }));
|
|
261
|
+
}
|
|
262
|
+
});
|
|
263
|
+
}
|
|
264
|
+
updateGroup(payload) {
|
|
265
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
266
|
+
const _a = payload !== null && payload !== void 0 ? payload : {}, { id, realm } = _a, data = tslib_1.__rest(_a, ["id", "realm"]);
|
|
267
|
+
const realmId = realm !== null && realm !== void 0 ? realm : this.conRes.database;
|
|
268
|
+
const client = yield this.getAxiosClient();
|
|
269
|
+
const res = yield client.put(`/admin/realms/${realmId}/groups/${id}`, Object.assign(Object.assign({}, data), { attributes: this.normalizeAttribute(data.attributes) }));
|
|
270
|
+
const errorMessage = this.getErrorMessage(res);
|
|
271
|
+
if (errorMessage) {
|
|
272
|
+
throw new Error(errorMessage);
|
|
273
|
+
}
|
|
86
274
|
});
|
|
87
275
|
}
|
|
88
276
|
getGroups(payload) {
|
|
277
|
+
var _a;
|
|
89
278
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
90
|
-
|
|
279
|
+
const _b = payload !== null && payload !== void 0 ? payload : {}, { realm } = _b, params = tslib_1.__rest(_b, ["realm"]);
|
|
280
|
+
const realmId = realm !== null && realm !== void 0 ? realm : this.conRes.database;
|
|
281
|
+
const client = yield this.getAxiosClient();
|
|
282
|
+
const res = yield client.get(`/admin/realms/${realmId}/groups`, {
|
|
283
|
+
params,
|
|
284
|
+
});
|
|
285
|
+
const errorMessage = this.getErrorMessage(res);
|
|
286
|
+
if (errorMessage) {
|
|
287
|
+
throw new Error(errorMessage);
|
|
288
|
+
}
|
|
289
|
+
return (_a = res.data) !== null && _a !== void 0 ? _a : [];
|
|
290
|
+
});
|
|
291
|
+
}
|
|
292
|
+
getGroup(payload) {
|
|
293
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
294
|
+
const { realm, id, name } = payload;
|
|
295
|
+
const realmId = realm !== null && realm !== void 0 ? realm : this.conRes.database;
|
|
296
|
+
const client = yield this.getAxiosClient();
|
|
297
|
+
if (id !== undefined) {
|
|
298
|
+
const res = yield client.get(`/admin/realms/${realmId}/groups/${id}`);
|
|
299
|
+
const errorMessage = this.getErrorMessage(res);
|
|
300
|
+
if (errorMessage) {
|
|
301
|
+
throw new Error(errorMessage);
|
|
302
|
+
}
|
|
303
|
+
return res.data;
|
|
304
|
+
}
|
|
305
|
+
const groups = yield this.getGroups({
|
|
306
|
+
realm,
|
|
307
|
+
search: name,
|
|
308
|
+
});
|
|
309
|
+
return groups.find((it) => it.name === name);
|
|
91
310
|
});
|
|
92
311
|
}
|
|
93
312
|
listMembers(payload) {
|
|
94
313
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
95
|
-
|
|
314
|
+
const { realm, id } = payload;
|
|
315
|
+
const realmId = realm !== null && realm !== void 0 ? realm : this.conRes.database;
|
|
316
|
+
const client = yield this.getAxiosClient();
|
|
317
|
+
const res = yield client.get(`/admin/realms/${realmId}/groups/${id}/members`);
|
|
318
|
+
const errorMessage = this.getErrorMessage(res);
|
|
319
|
+
if (errorMessage) {
|
|
320
|
+
throw new Error(errorMessage);
|
|
321
|
+
}
|
|
322
|
+
return res.data;
|
|
96
323
|
});
|
|
97
324
|
}
|
|
98
325
|
countGroups(payload) {
|
|
99
326
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
100
|
-
|
|
327
|
+
const { realm } = payload, params = tslib_1.__rest(payload, ["realm"]);
|
|
328
|
+
const realmId = realm !== null && realm !== void 0 ? realm : this.conRes.database;
|
|
329
|
+
const client = yield this.getAxiosClient();
|
|
330
|
+
const res = yield client.get(`/admin/realms/${realmId}/groups/count`, {
|
|
331
|
+
params,
|
|
332
|
+
});
|
|
333
|
+
return res.data.count;
|
|
334
|
+
});
|
|
335
|
+
}
|
|
336
|
+
createRealm(payload) {
|
|
337
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
338
|
+
const { realm } = payload, data = tslib_1.__rest(payload, ["realm"]);
|
|
339
|
+
if (realm === undefined || realm === '') {
|
|
340
|
+
throw new Error('realm is not defined.');
|
|
341
|
+
}
|
|
342
|
+
const client = yield this.getAxiosClient();
|
|
343
|
+
const res = yield client.post(`/admin/realms`, Object.assign(Object.assign({}, data), { realm, enabled: true }));
|
|
344
|
+
const errorMessage = this.getErrorMessage(res);
|
|
345
|
+
if (errorMessage) {
|
|
346
|
+
throw new Error(errorMessage);
|
|
347
|
+
}
|
|
101
348
|
});
|
|
102
349
|
}
|
|
103
350
|
getRealms(payload) {
|
|
104
351
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
105
|
-
|
|
352
|
+
const client = yield this.getAxiosClient();
|
|
353
|
+
const res = yield client.get(`/admin/realms`, {
|
|
354
|
+
params: payload,
|
|
355
|
+
});
|
|
356
|
+
const errorMessage = this.getErrorMessage(res);
|
|
357
|
+
if (errorMessage) {
|
|
358
|
+
throw new Error(errorMessage);
|
|
359
|
+
}
|
|
360
|
+
return res.data;
|
|
106
361
|
});
|
|
107
362
|
}
|
|
108
363
|
scan(params) {
|
|
@@ -144,7 +399,6 @@ class KeycloakDriver extends BaseDriver_1.BaseDriver {
|
|
|
144
399
|
emailVerified: user.emailVerified,
|
|
145
400
|
});
|
|
146
401
|
});
|
|
147
|
-
console.log(rdb.toString());
|
|
148
402
|
return rdb.build();
|
|
149
403
|
}
|
|
150
404
|
case 'IamRole': {
|
|
@@ -171,7 +425,6 @@ class KeycloakDriver extends BaseDriver_1.BaseDriver {
|
|
|
171
425
|
containerId: role.containerId,
|
|
172
426
|
});
|
|
173
427
|
});
|
|
174
|
-
console.log(rdb.toString());
|
|
175
428
|
return rdb.build();
|
|
176
429
|
}
|
|
177
430
|
case 'IamGroup': {
|
|
@@ -195,7 +448,6 @@ class KeycloakDriver extends BaseDriver_1.BaseDriver {
|
|
|
195
448
|
subGroupNames: (_c = (_b = (_a = group.subGroups) === null || _a === void 0 ? void 0 : _a.map((it) => { var _a; return (_a = it.name) !== null && _a !== void 0 ? _a : ''; })) === null || _b === void 0 ? void 0 : _b.join(',')) !== null && _c !== void 0 ? _c : '',
|
|
196
449
|
});
|
|
197
450
|
});
|
|
198
|
-
console.log(rdb.toString());
|
|
199
451
|
return rdb.build();
|
|
200
452
|
}
|
|
201
453
|
default:
|
|
@@ -217,7 +469,7 @@ class KeycloakDriver extends BaseDriver_1.BaseDriver {
|
|
|
217
469
|
if (realm.id) {
|
|
218
470
|
realmRes['id'] = realm.id;
|
|
219
471
|
}
|
|
220
|
-
if (realm.realm === this.
|
|
472
|
+
if (realm.realm === this.conRes.database) {
|
|
221
473
|
realmRes.isDefault = true;
|
|
222
474
|
}
|
|
223
475
|
db.addChild(realmRes);
|
|
@@ -256,6 +508,34 @@ class KeycloakDriver extends BaseDriver_1.BaseDriver {
|
|
|
256
508
|
return '';
|
|
257
509
|
});
|
|
258
510
|
}
|
|
511
|
+
normalizeAttribute(attr) {
|
|
512
|
+
if (attr === undefined) {
|
|
513
|
+
return undefined;
|
|
514
|
+
}
|
|
515
|
+
const record = {};
|
|
516
|
+
Object.keys(attr).forEach((key) => {
|
|
517
|
+
const v = attr[key];
|
|
518
|
+
if (Array.isArray(v)) {
|
|
519
|
+
record[key] = v;
|
|
520
|
+
}
|
|
521
|
+
else {
|
|
522
|
+
record[key] = [v];
|
|
523
|
+
}
|
|
524
|
+
});
|
|
525
|
+
return record;
|
|
526
|
+
}
|
|
527
|
+
getErrorMessage(res) {
|
|
528
|
+
var _a, _b, _c, _d;
|
|
529
|
+
const { status, data } = res;
|
|
530
|
+
if (status === axios_1.HttpStatusCode.InternalServerError &&
|
|
531
|
+
isKeycloakIntermalServerErrorResponse(data)) {
|
|
532
|
+
return `${(_b = (_a = res.config) === null || _a === void 0 ? void 0 : _a.method) === null || _b === void 0 ? void 0 : _b.toUpperCase()} ${res.config.url}, ${res.statusText}, ${data.error}`;
|
|
533
|
+
}
|
|
534
|
+
if (isKeycloakErrorResponse(data)) {
|
|
535
|
+
return `${(_d = (_c = res.config) === null || _c === void 0 ? void 0 : _c.method) === null || _d === void 0 ? void 0 : _d.toUpperCase()} ${res.config.url}, ${res.statusText}, ${data.errorMessage}`;
|
|
536
|
+
}
|
|
537
|
+
return undefined;
|
|
538
|
+
}
|
|
259
539
|
}
|
|
260
540
|
exports.KeycloakDriver = KeycloakDriver;
|
|
261
541
|
//# sourceMappingURL=KeycloakDriver.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KeycloakDriver.js","sourceRoot":"","sources":["../../../src/drivers/KeycloakDriver.ts"],"names":[],"mappings":";;;;AAAA,oGAA4D;AAC5D,6CAAqD;AACrD,0CAMqB;AACrB,oCAKkB;AAClB,oCAAkC;AAalC,MAAa,cACX,SAAQ,uBAA4B;IAKpC,YAAY,MAAyB;QACnC,KAAK,CAAC,MAAM,CAAC,CAAC;IAChB,CAAC;IAEK,UAAU;;YACd,IAAI;gBACF,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC;gBAEnE,MAAM,MAAM,GAAqB,EAAE,CAAC;gBACpC,IAAI,GAAG,EAAE;oBACP,MAAM,CAAC,OAAO,GAAG,GAAG,CAAC;iBACtB;gBACD,IAAI,QAAQ,EAAE;oBACZ,MAAM,CAAC,SAAS,GAAG,QAAQ,CAAC;iBAC7B;gBACD,IAAI,CAAC,MAAM,GAAG,IAAI,+BAAa,CAAC,MAAM,CAAC,CAAC;gBAExC,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;oBACrB,QAAQ,EAAE,IAAI;oBACd,QAAQ;oBACR,SAAS,EAAE,WAAW,CAAC,SAAS;oBAChC,QAAQ,EAAE,WAAW,CAAC,QAAQ;iBAC/B,CAAC,CAAC;aACJ;YAAC,OAAO,CAAC,EAAE;gBAEV,O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C,OAAO,GAAG,MAAA,MAAA,GAAG,CAAC,MAAM,0CAAE,MAAM,0CAAE,WAAW,EAAE,IAAI,GAAG,CAAC,MAAM,CAAC,GAAG,KAC3D,GAAG,CAAC,UACN,KAAK,IAAI,CAAC,YAAY,EAAE,CAAC;SAC1B;QAED,OAAO,SAAS,CAAC;IACnB,CAAC;CACF;AAzrBD,wCAyrBC"}
|
|
@@ -0,0 +1,342 @@
|
|
|
1
|
+
export type RealmParam = {
|
|
2
|
+
realm?: string | undefined;
|
|
3
|
+
};
|
|
4
|
+
export type KeycloakErrorResponse = {
|
|
5
|
+
errorMessage: string;
|
|
6
|
+
};
|
|
7
|
+
export type KeycloakInternalServerErrorResponse = {
|
|
8
|
+
error: string;
|
|
9
|
+
};
|
|
10
|
+
export interface RealmRepresentation {
|
|
11
|
+
accessCodeLifespan?: number;
|
|
12
|
+
accessCodeLifespanLogin?: number;
|
|
13
|
+
accessCodeLifespanUserAction?: number;
|
|
14
|
+
accessTokenLifespan?: number;
|
|
15
|
+
accessTokenLifespanForImplicitFlow?: number;
|
|
16
|
+
accountTheme?: string;
|
|
17
|
+
actionTokenGeneratedByAdminLifespan?: number;
|
|
18
|
+
actionTokenGeneratedByUserLifespan?: number;
|
|
19
|
+
adminEventsDetailsEnabled?: boolean;
|
|
20
|
+
adminEventsEnabled?: boolean;
|
|
21
|
+
adminTheme?: string;
|
|
22
|
+
attributes?: Record<string, any>;
|
|
23
|
+
authenticationFlows?: any[];
|
|
24
|
+
authenticatorConfig?: any[];
|
|
25
|
+
browserFlow?: string;
|
|
26
|
+
browserSecurityHeaders?: Record<string, any>;
|
|
27
|
+
bruteForceProtected?: boolean;
|
|
28
|
+
clientAuthenticationFlow?: string;
|
|
29
|
+
clientScopeMappings?: Record<string, any>;
|
|
30
|
+
clientScopes?: any[];
|
|
31
|
+
clients?: ClientRepresentation[];
|
|
32
|
+
clientPolicies?: any;
|
|
33
|
+
clientProfiles?: any;
|
|
34
|
+
components?: {
|
|
35
|
+
[index: string]: any;
|
|
36
|
+
};
|
|
37
|
+
defaultDefaultClientScopes?: string[];
|
|
38
|
+
defaultGroups?: string[];
|
|
39
|
+
defaultLocale?: string;
|
|
40
|
+
defaultOptionalClientScopes?: string[];
|
|
41
|
+
defaultRoles?: string[];
|
|
42
|
+
defaultRole?: RoleRepresentation;
|
|
43
|
+
defaultSignatureAlgorithm?: string;
|
|
44
|
+
directGrantFlow?: string;
|
|
45
|
+
displayName?: string;
|
|
46
|
+
displayNameHtml?: string;
|
|
47
|
+
dockerAuthenticationFlow?: string;
|
|
48
|
+
duplicateEmailsAllowed?: boolean;
|
|
49
|
+
editUsernameAllowed?: boolean;
|
|
50
|
+
emailTheme?: string;
|
|
51
|
+
enabled?: boolean;
|
|
52
|
+
enabledEventTypes?: string[];
|
|
53
|
+
eventsEnabled?: boolean;
|
|
54
|
+
eventsExpiration?: number;
|
|
55
|
+
eventsListeners?: string[];
|
|
56
|
+
failureFactor?: number;
|
|
57
|
+
federatedUsers?: UserRepresentation[];
|
|
58
|
+
groups?: GroupRepresentation[];
|
|
59
|
+
id?: string;
|
|
60
|
+
identityProviderMappers?: any[];
|
|
61
|
+
identityProviders?: IdentityProviderRepresentation[];
|
|
62
|
+
internationalizationEnabled?: boolean;
|
|
63
|
+
keycloakVersion?: string;
|
|
64
|
+
loginTheme?: string;
|
|
65
|
+
loginWithEmailAllowed?: boolean;
|
|
66
|
+
maxDeltaTimeSeconds?: number;
|
|
67
|
+
maxFailureWaitSeconds?: number;
|
|
68
|
+
minimumQuickLoginWaitSeconds?: number;
|
|
69
|
+
notBefore?: number;
|
|
70
|
+
oauth2DeviceCodeLifespan?: number;
|
|
71
|
+
oauth2DevicePollingInterval?: number;
|
|
72
|
+
offlineSessionIdleTimeout?: number;
|
|
73
|
+
offlineSessionMaxLifespan?: number;
|
|
74
|
+
offlineSessionMaxLifespanEnabled?: boolean;
|
|
75
|
+
otpPolicyAlgorithm?: string;
|
|
76
|
+
otpPolicyDigits?: number;
|
|
77
|
+
otpPolicyInitialCounter?: number;
|
|
78
|
+
otpPolicyLookAheadWindow?: number;
|
|
79
|
+
otpPolicyPeriod?: number;
|
|
80
|
+
otpPolicyType?: string;
|
|
81
|
+
otpSupportedApplications?: string[];
|
|
82
|
+
otpPolicyCodeReusable?: boolean;
|
|
83
|
+
passwordPolicy?: string;
|
|
84
|
+
permanentLockout?: boolean;
|
|
85
|
+
protocolMappers?: any[];
|
|
86
|
+
quickLoginCheckMilliSeconds?: number;
|
|
87
|
+
realm?: string;
|
|
88
|
+
refreshTokenMaxReuse?: number;
|
|
89
|
+
registrationAllowed?: boolean;
|
|
90
|
+
registrationEmailAsUsername?: boolean;
|
|
91
|
+
registrationFlow?: string;
|
|
92
|
+
rememberMe?: boolean;
|
|
93
|
+
requiredActions?: RequiredActionProviderRepresentation[];
|
|
94
|
+
resetCredentialsFlow?: string;
|
|
95
|
+
resetPasswordAllowed?: boolean;
|
|
96
|
+
revokeRefreshToken?: boolean;
|
|
97
|
+
roles?: RolesRepresentation;
|
|
98
|
+
scopeMappings?: any[];
|
|
99
|
+
smtpServer?: Record<string, any>;
|
|
100
|
+
sslRequired?: string;
|
|
101
|
+
ssoSessionIdleTimeout?: number;
|
|
102
|
+
ssoSessionIdleTimeoutRememberMe?: number;
|
|
103
|
+
ssoSessionMaxLifespan?: number;
|
|
104
|
+
ssoSessionMaxLifespanRememberMe?: number;
|
|
105
|
+
clientSessionIdleTimeout?: number;
|
|
106
|
+
clientSessionMaxLifespan?: number;
|
|
107
|
+
supportedLocales?: string[];
|
|
108
|
+
userFederationMappers?: any[];
|
|
109
|
+
userFederationProviders?: any[];
|
|
110
|
+
userManagedAccessAllowed?: boolean;
|
|
111
|
+
users?: UserRepresentation[];
|
|
112
|
+
verifyEmail?: boolean;
|
|
113
|
+
waitIncrementSeconds?: number;
|
|
114
|
+
}
|
|
115
|
+
export declare enum RequiredActionAlias {
|
|
116
|
+
VERIFY_EMAIL = "VERIFY_EMAIL",
|
|
117
|
+
UPDATE_PROFILE = "UPDATE_PROFILE",
|
|
118
|
+
CONFIGURE_TOTP = "CONFIGURE_TOTP",
|
|
119
|
+
UPDATE_PASSWORD = "UPDATE_PASSWORD",
|
|
120
|
+
TERMS_AND_CONDITIONS = "TERMS_AND_CONDITIONS"
|
|
121
|
+
}
|
|
122
|
+
export interface RequiredActionProviderRepresentation {
|
|
123
|
+
alias?: string;
|
|
124
|
+
config?: Record<string, any>;
|
|
125
|
+
defaultAction?: boolean;
|
|
126
|
+
enabled?: boolean;
|
|
127
|
+
name?: string;
|
|
128
|
+
providerId?: string;
|
|
129
|
+
priority?: number;
|
|
130
|
+
}
|
|
131
|
+
export interface ClientRepresentation {
|
|
132
|
+
access?: Record<string, boolean>;
|
|
133
|
+
adminUrl?: string;
|
|
134
|
+
attributes?: Record<string, any>;
|
|
135
|
+
authenticationFlowBindingOverrides?: Record<string, any>;
|
|
136
|
+
authorizationServicesEnabled?: boolean;
|
|
137
|
+
authorizationSettings?: any;
|
|
138
|
+
baseUrl?: string;
|
|
139
|
+
bearerOnly?: boolean;
|
|
140
|
+
clientAuthenticatorType?: string;
|
|
141
|
+
clientId?: string;
|
|
142
|
+
consentRequired?: boolean;
|
|
143
|
+
defaultClientScopes?: string[];
|
|
144
|
+
defaultRoles?: string[];
|
|
145
|
+
description?: string;
|
|
146
|
+
directAccessGrantsEnabled?: boolean;
|
|
147
|
+
enabled?: boolean;
|
|
148
|
+
alwaysDisplayInConsole?: boolean;
|
|
149
|
+
frontchannelLogout?: boolean;
|
|
150
|
+
fullScopeAllowed?: boolean;
|
|
151
|
+
id?: string;
|
|
152
|
+
implicitFlowEnabled?: boolean;
|
|
153
|
+
name?: string;
|
|
154
|
+
nodeReRegistrationTimeout?: number;
|
|
155
|
+
notBefore?: number;
|
|
156
|
+
optionalClientScopes?: string[];
|
|
157
|
+
origin?: string;
|
|
158
|
+
protocol?: string;
|
|
159
|
+
protocolMappers?: any[];
|
|
160
|
+
publicClient?: boolean;
|
|
161
|
+
redirectUris?: string[];
|
|
162
|
+
registeredNodes?: Record<string, any>;
|
|
163
|
+
registrationAccessToken?: string;
|
|
164
|
+
rootUrl?: string;
|
|
165
|
+
secret?: string;
|
|
166
|
+
serviceAccountsEnabled?: boolean;
|
|
167
|
+
standardFlowEnabled?: boolean;
|
|
168
|
+
surrogateAuthRequired?: boolean;
|
|
169
|
+
webOrigins?: string[];
|
|
170
|
+
}
|
|
171
|
+
export interface ResourceServerRepresentation {
|
|
172
|
+
id?: string;
|
|
173
|
+
clientId?: string;
|
|
174
|
+
name?: string;
|
|
175
|
+
allowRemoteResourceManagement?: boolean;
|
|
176
|
+
policyEnforcementMode?: any;
|
|
177
|
+
resources?: any[];
|
|
178
|
+
policies?: any[];
|
|
179
|
+
scopes?: any[];
|
|
180
|
+
decisionStrategy?: any;
|
|
181
|
+
}
|
|
182
|
+
export interface IdentityProviderRepresentation {
|
|
183
|
+
addReadTokenRoleOnCreate?: boolean;
|
|
184
|
+
alias?: string;
|
|
185
|
+
config?: Record<string, any>;
|
|
186
|
+
displayName?: string;
|
|
187
|
+
enabled?: boolean;
|
|
188
|
+
firstBrokerLoginFlowAlias?: string;
|
|
189
|
+
internalId?: string;
|
|
190
|
+
linkOnly?: boolean;
|
|
191
|
+
postBrokerLoginFlowAlias?: string;
|
|
192
|
+
providerId?: string;
|
|
193
|
+
storeToken?: boolean;
|
|
194
|
+
trustEmail?: boolean;
|
|
195
|
+
}
|
|
196
|
+
export interface UserRepresentation {
|
|
197
|
+
id?: string;
|
|
198
|
+
createdTimestamp?: number;
|
|
199
|
+
username?: string;
|
|
200
|
+
enabled?: boolean;
|
|
201
|
+
totp?: boolean;
|
|
202
|
+
emailVerified?: boolean;
|
|
203
|
+
disableableCredentialTypes?: string[];
|
|
204
|
+
requiredActions?: (RequiredActionAlias | string)[];
|
|
205
|
+
notBefore?: number;
|
|
206
|
+
access?: Record<string, boolean>;
|
|
207
|
+
attributes?: Record<string, any>;
|
|
208
|
+
clientConsents?: UserConsentRepresentation[];
|
|
209
|
+
clientRoles?: Record<string, any>;
|
|
210
|
+
credentials?: CredentialRepresentation[];
|
|
211
|
+
email?: string;
|
|
212
|
+
federatedIdentities?: FederatedIdentityRepresentation[];
|
|
213
|
+
federationLink?: string;
|
|
214
|
+
firstName?: string;
|
|
215
|
+
groups?: string[];
|
|
216
|
+
lastName?: string;
|
|
217
|
+
origin?: string;
|
|
218
|
+
realmRoles?: string[];
|
|
219
|
+
self?: string;
|
|
220
|
+
serviceAccountClientId?: string;
|
|
221
|
+
userProfileMetadata?: UserProfileMetadata;
|
|
222
|
+
}
|
|
223
|
+
export interface UserConsentRepresentation {
|
|
224
|
+
clientId?: string;
|
|
225
|
+
createDate?: string;
|
|
226
|
+
grantedClientScopes?: string[];
|
|
227
|
+
lastUpdatedDate?: number;
|
|
228
|
+
}
|
|
229
|
+
export interface CredentialRepresentation {
|
|
230
|
+
createdDate?: number;
|
|
231
|
+
credentialData?: string;
|
|
232
|
+
id?: string;
|
|
233
|
+
priority?: number;
|
|
234
|
+
secretData?: string;
|
|
235
|
+
temporary?: boolean;
|
|
236
|
+
type?: string;
|
|
237
|
+
userLabel?: string;
|
|
238
|
+
value?: string;
|
|
239
|
+
}
|
|
240
|
+
export interface UserProfileMetadata {
|
|
241
|
+
attributes?: UserProfileAttributeMetadata[];
|
|
242
|
+
groups?: UserProfileAttributeGroupMetadata[];
|
|
243
|
+
}
|
|
244
|
+
export interface UserProfileAttributeMetadata {
|
|
245
|
+
name?: string;
|
|
246
|
+
displayName?: string;
|
|
247
|
+
required?: boolean;
|
|
248
|
+
readOnly?: boolean;
|
|
249
|
+
group?: string;
|
|
250
|
+
annotations?: Record<string, unknown>;
|
|
251
|
+
validators?: Record<string, Record<string, unknown>>;
|
|
252
|
+
}
|
|
253
|
+
export interface UserProfileAttributeGroupMetadata {
|
|
254
|
+
name?: string;
|
|
255
|
+
displayHeader?: string;
|
|
256
|
+
displayDescription?: string;
|
|
257
|
+
annotations?: Record<string, unknown>;
|
|
258
|
+
}
|
|
259
|
+
export interface FederatedIdentityRepresentation {
|
|
260
|
+
identityProvider?: string;
|
|
261
|
+
userId?: string;
|
|
262
|
+
userName?: string;
|
|
263
|
+
}
|
|
264
|
+
export interface GroupRepresentation {
|
|
265
|
+
id?: string;
|
|
266
|
+
name?: string;
|
|
267
|
+
path?: string;
|
|
268
|
+
subGroups?: GroupRepresentation[];
|
|
269
|
+
access?: Record<string, boolean>;
|
|
270
|
+
attributes?: Record<string, any>;
|
|
271
|
+
clientRoles?: Record<string, any>;
|
|
272
|
+
realmRoles?: string[];
|
|
273
|
+
}
|
|
274
|
+
export interface RolesRepresentation {
|
|
275
|
+
realm?: RoleRepresentation[];
|
|
276
|
+
client?: {
|
|
277
|
+
[index: string]: RoleRepresentation[];
|
|
278
|
+
};
|
|
279
|
+
application?: {
|
|
280
|
+
[index: string]: RoleRepresentation[];
|
|
281
|
+
};
|
|
282
|
+
}
|
|
283
|
+
export interface RoleRepresentation {
|
|
284
|
+
id?: string;
|
|
285
|
+
name?: string;
|
|
286
|
+
description?: string;
|
|
287
|
+
scopeParamRequired?: boolean;
|
|
288
|
+
composite?: boolean;
|
|
289
|
+
composites?: Composites;
|
|
290
|
+
clientRole?: boolean;
|
|
291
|
+
containerId?: string;
|
|
292
|
+
attributes?: {
|
|
293
|
+
[index: string]: string[];
|
|
294
|
+
};
|
|
295
|
+
}
|
|
296
|
+
export interface Composites {
|
|
297
|
+
realm?: string[];
|
|
298
|
+
client?: {
|
|
299
|
+
[index: string]: string[];
|
|
300
|
+
};
|
|
301
|
+
application?: {
|
|
302
|
+
[index: string]: string[];
|
|
303
|
+
};
|
|
304
|
+
}
|
|
305
|
+
export interface RoleMappingPayload extends RoleRepresentation {
|
|
306
|
+
id: string;
|
|
307
|
+
name: string;
|
|
308
|
+
}
|
|
309
|
+
interface SearchQuery {
|
|
310
|
+
search?: string;
|
|
311
|
+
}
|
|
312
|
+
interface PaginationQuery {
|
|
313
|
+
first?: number;
|
|
314
|
+
max?: number;
|
|
315
|
+
}
|
|
316
|
+
interface UserBaseQuery {
|
|
317
|
+
email?: string;
|
|
318
|
+
firstName?: string;
|
|
319
|
+
lastName?: string;
|
|
320
|
+
username?: string;
|
|
321
|
+
}
|
|
322
|
+
export interface UserQuery extends PaginationQuery, SearchQuery, UserBaseQuery {
|
|
323
|
+
exact?: boolean;
|
|
324
|
+
[key: string]: string | number | undefined | boolean;
|
|
325
|
+
}
|
|
326
|
+
export interface GroupQuery {
|
|
327
|
+
first?: number;
|
|
328
|
+
max?: number;
|
|
329
|
+
search?: string;
|
|
330
|
+
briefRepresentation?: boolean;
|
|
331
|
+
}
|
|
332
|
+
export interface GroupCountQuery {
|
|
333
|
+
search?: string;
|
|
334
|
+
top?: boolean;
|
|
335
|
+
}
|
|
336
|
+
export interface RoleQuery {
|
|
337
|
+
first?: number;
|
|
338
|
+
max?: number;
|
|
339
|
+
search?: string;
|
|
340
|
+
briefRepresentation?: boolean;
|
|
341
|
+
}
|
|
342
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RequiredActionAlias = void 0;
|
|
4
|
+
var RequiredActionAlias;
|
|
5
|
+
(function (RequiredActionAlias) {
|
|
6
|
+
RequiredActionAlias["VERIFY_EMAIL"] = "VERIFY_EMAIL";
|
|
7
|
+
RequiredActionAlias["UPDATE_PROFILE"] = "UPDATE_PROFILE";
|
|
8
|
+
RequiredActionAlias["CONFIGURE_TOTP"] = "CONFIGURE_TOTP";
|
|
9
|
+
RequiredActionAlias["UPDATE_PASSWORD"] = "UPDATE_PASSWORD";
|
|
10
|
+
RequiredActionAlias["TERMS_AND_CONDITIONS"] = "TERMS_AND_CONDITIONS";
|
|
11
|
+
})(RequiredActionAlias = exports.RequiredActionAlias || (exports.RequiredActionAlias = {}));
|
|
12
|
+
//# sourceMappingURL=Keycloak.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Keycloak.js","sourceRoot":"","sources":["../../../../src/types/drivers/Keycloak.ts"],"names":[],"mappings":";;;AAsHA,IAAY,mBAMX;AAND,WAAY,mBAAmB;IAC7B,oDAA6B,CAAA;IAC7B,wDAAiC,CAAA;IACjC,wDAAiC,CAAA;IACjC,0DAAmC,CAAA;IACnC,oEAA6C,CAAA;AAC/C,CAAC,EANW,mBAAmB,GAAnB,2BAAmB,KAAnB,2BAAmB,QAM9B"}
|
|
@@ -6,4 +6,5 @@ tslib_1.__exportStar(require("./QueryConditions"), exports);
|
|
|
6
6
|
tslib_1.__exportStar(require("./QueryParams"), exports);
|
|
7
7
|
tslib_1.__exportStar(require("./ScanParams"), exports);
|
|
8
8
|
tslib_1.__exportStar(require("./TransactionControlType"), exports);
|
|
9
|
+
tslib_1.__exportStar(require("./Keycloak"), exports);
|
|
9
10
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/types/drivers/index.ts"],"names":[],"mappings":";;;AAAA,0DAAgC;AAChC,4DAAkC;AAClC,wDAA8B;AAC9B,uDAA6B;AAC7B,mEAAyC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/types/drivers/index.ts"],"names":[],"mappings":";;;AAAA,0DAAgC;AAChC,4DAAkC;AAClC,wDAA8B;AAC9B,uDAA6B;AAC7B,mEAAyC;AACzC,qDAA2B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@l-v-yonsama/multi-platform-database-drivers",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.211",
|
|
4
4
|
"description": "multi-platform database drivers in TypeScript.",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">= 16"
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"@aws-sdk/client-sqs": "^3.398.0",
|
|
72
72
|
"@aws-sdk/credential-providers": "^3.279.0",
|
|
73
73
|
"@aws-sdk/s3-request-presigner": "^3.427.0",
|
|
74
|
-
"
|
|
74
|
+
"axios": "^1.6.0",
|
|
75
75
|
"bytes": "^3.1.2",
|
|
76
76
|
"dayjs": "^1.11.7",
|
|
77
77
|
"enum-values": "^1.2.1",
|
|
@@ -84,6 +84,7 @@
|
|
|
84
84
|
"lodash.isequal": "^4.5.0",
|
|
85
85
|
"mime-lite": "^1.0.3",
|
|
86
86
|
"mysql2": "^3.1.2",
|
|
87
|
+
"openid-client": "^5.6.1",
|
|
87
88
|
"pg": "^8.9.0",
|
|
88
89
|
"pgsql-ast-parser": "^11.0.1",
|
|
89
90
|
"pluralize": "^8.0.0",
|