ef-keycloak-connect 1.8.2-RC3 → 1.8.4-patch
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/README.md +16 -1
- package/package.json +1 -1
- package/services/keycloakService.js +484 -175
package/README.md
CHANGED
|
@@ -40,6 +40,7 @@ This adapter is extended from keycloak-connect and have functionalities of both
|
|
|
40
40
|
- getRealmRoles
|
|
41
41
|
- assignRoleToUser
|
|
42
42
|
- authenticateFinesse
|
|
43
|
+
- createRealmAsTenant
|
|
43
44
|
|
|
44
45
|
```
|
|
45
46
|
### Example
|
|
@@ -98,7 +99,9 @@ Sample `config` is given below:
|
|
|
98
99
|
"ef-server-url": "https://<cx instance fqdn>/unified-admin/",
|
|
99
100
|
"FINESSE_USERNAME_ADMIN": "<cisco admin username>",
|
|
100
101
|
"FINESSE_PASSWORD_ADMIN": "<cisco admin username>",
|
|
101
|
-
"SYNC_AGENT_PASSWORD": "<qm sync agent/supervisor password>"
|
|
102
|
+
"SYNC_AGENT_PASSWORD": "<qm sync agent/supervisor password>",
|
|
103
|
+
"MASTER_USERNAME": "master_admin_username",
|
|
104
|
+
"MASTER_PASSWORD": "master_admin_password"
|
|
102
105
|
}
|
|
103
106
|
```
|
|
104
107
|
Here is the definition of each property defined in config file/object.
|
|
@@ -129,6 +132,8 @@ Here is the definition of each property defined in config file/object.
|
|
|
129
132
|
- **FINESSE_PASSWORD_ADMIN:** Finesse Administrator Password of instance in use.
|
|
130
133
|
- **FINESSE_URL**: Finesse Instance URL currently in use.
|
|
131
134
|
- **SYNC_AGENT_PASSWORD**: Password for Users being synced to Keycloak/CX.
|
|
135
|
+
- **MASTER_USERNAME**: Keycloak master admin username.
|
|
136
|
+
- **MASTER_PASSWORD**: Keycloak master password username.
|
|
132
137
|
|
|
133
138
|
For using keycloak-connect features:
|
|
134
139
|
```js
|
|
@@ -420,6 +425,16 @@ It takes a signle argument:
|
|
|
420
425
|
|
|
421
426
|
- adminToken: Admin token is required to authorize the list of roles to return.
|
|
422
427
|
|
|
428
|
+
### createRealmAsTenant(tenantName, realmFile, authzConfigFilePath)
|
|
429
|
+
|
|
430
|
+
This function creates a new Realm as a Teant in keycloak and also import its permission/policies based on configurations given in realm and authz files.
|
|
431
|
+
|
|
432
|
+
It takes 3 arguments:
|
|
433
|
+
|
|
434
|
+
- tenantName: Name of realm that will be created as tenant in keycloak.
|
|
435
|
+
- realmFile: Realm configurations given in a JSON format, against which tenant will be created in keycloak, this is the path of file.
|
|
436
|
+
- authzConfigFilePath: Authz configurations given in a JSON format, against which policies/permissions will be created in keycloak, this is the path of file.
|
|
437
|
+
|
|
423
438
|
### authenticateFinesse(username, password, finesseUrl, userRoles, finesseToken)
|
|
424
439
|
|
|
425
440
|
This function sync finesse user in keycloak, it first authenticates user from finesse, then check for its existance in keycloak. If it exists in keycloak then generates an access_token along with role mapping and return it to user. If user doesn't exist then it creates a user, assign it roles and return the access_token along with role mapping for newly created user.
|