Skip to content

Commit

Permalink
feat(jans-core): remove UPDATE_USER and USER_REGISTRATION scripts #1289
Browse files Browse the repository at this point in the history
  • Loading branch information
yuriyz committed May 5, 2022
1 parent 6320af7 commit c34e75d
Show file tree
Hide file tree
Showing 16 changed files with 31 additions and 625 deletions.
32 changes: 16 additions & 16 deletions docs/user/using-jans-cli/cli-custom-scripts.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,11 @@ We need to fill some of these properties with valid data to add this new script.

```
{
"name": "custom_script_update_user",
"name": "custom_script_client",
"aliases": null,
"description": "Testing custom script addition",
"script": "_file /root/update_user.py",
"scriptType": "UPDATE_USER",
"script": "_file /root/client_registration.py",
"scriptType": "CLIENT_REGISTRATION",
"programmingLanguage": "PYTHON",
"moduleProperties": [{
"value1": "myvalue1",
Expand All @@ -128,7 +128,7 @@ We can remove `dn`, `inum`. As because these two items are auto generated with r
### Name of the type of scripts

```
PERSON_AUTHENTICATION, INTROSPECTION, RESOURCE_OWNER_PASSWORD_CREDENTIALS, APPLICATION_SESSION, CACHE_REFRESH, UPDATE_USER, USER_REGISTRATION, CLIENT_REGISTRATION, ID_GENERATOR, UMA_RPT_POLICY, UMA_RPT_CLAIMS, UMA_CLAIMS_GATHERING, CONSENT_GATHERING, DYNAMIC_SCOPE, SPONTANEOUS_SCOPE, END_SESSION, POST_AUTHN, SCIM, CIBA_END_USER_NOTIFICATION, PERSISTENCE_EXTENSION, IDP, UPDATE_TOKEN
PERSON_AUTHENTICATION, INTROSPECTION, RESOURCE_OWNER_PASSWORD_CREDENTIALS, APPLICATION_SESSION, CACHE_REFRESH, CLIENT_REGISTRATION, ID_GENERATOR, UMA_RPT_POLICY, UMA_RPT_CLAIMS, UMA_CLAIMS_GATHERING, CONSENT_GATHERING, DYNAMIC_SCOPE, SPONTANEOUS_SCOPE, END_SESSION, POST_AUTHN, SCIM, CIBA_END_USER_NOTIFICATION, PERSISTENCE_EXTENSION, IDP, UPDATE_TOKEN
```

### Programming Language
Expand All @@ -147,11 +147,11 @@ Server Response:
{
"dn": "inum=61aef81b-b22d-42c0-89d5-b098c976a2b7,ou=scripts,o=jans",
"inum": "61aef81b-b22d-42c0-89d5-b098c976a2b7",
"name": "custom_script_update_user",
"name": "custom_script_client",
"aliases": null,
"description": "Testing custom script addition",
"script": "...",
"scriptType": "UPDATE_USER",
"scriptType": "CLIENT_REGISTRATION",
"programmingLanguage": "PYTHON",
"moduleProperties": [
{
Expand Down Expand Up @@ -186,11 +186,11 @@ As we created a custom script in the [above](cli-custom-scripts.md#adds-a-new-cu
{
"dn": "inum=61aef81b-b22d-42c0-89d5-b098c976a2b7,ou=scripts,o=jans",
"inum": "61aef81b-b22d-42c0-89d5-b098c976a2b7",
"name": "custom_script_update_user",
"name": "custom_script_client",
"aliases": null,
"description": "Testing custom script addition",
"script": "_file /root/update_user.py",
"scriptType": "UPDATE_USER",
"script": "_file /root/client_registrationj.py",
"scriptType": "CLIENT_REGISTRATION",
"programmingLanguage": "PYTHON",
"moduleProperties": [{
"value1": "myvalue1",
Expand Down Expand Up @@ -224,11 +224,11 @@ Server Response:
{
"dn": "inum=61aef81b-b22d-42c0-89d5-b098c976a2b7,ou=scripts,o=jans",
"inum": "61aef81b-b22d-42c0-89d5-b098c976a2b7",
"name": "custom_script_update_user",
"name": "custom_script_client",
"aliases": null,
"description": "Testing custom script addition",
"script": "...",
"scriptType": "UPDATE_USER",
"scriptType": "CLIENT_REGISTRATION",
"programmingLanguage": "PYTHON",
"moduleProperties": [
{
Expand Down Expand Up @@ -269,13 +269,13 @@ The command line is:
/opt/jans/jans-cli/config-cli.py --operation-id get-config-scripts-by-type --url-suffix type:script-type-name
```

For an example, let's find all the scripts of `UPDATE_USER` type. So, the command line is:
For an example, let's find all the scripts of `CLIENT_REGISTRATION` type. So, the command line is:

```
/opt/jans/jans-cli/config-cli.py --operation-id get-config-scripts-by-type --url-suffix type:UPDATE_USER
/opt/jans/jans-cli/config-cli.py --operation-id get-config-scripts-by-type --url-suffix type:CLIENT_REGISTRATION
```

It returns all the custom scripts that are related to the `UPDATE_USER` type available in the Janssen Server. You will find the name of all the types [here](cli-custom-scripts.md#name-of-the-type-of-scripts)
It returns all the custom scripts that are related to the `CLIENT_REGISTRATION` type available in the Janssen Server. You will find the name of all the types [here](cli-custom-scripts.md#name-of-the-type-of-scripts)

## Get Custom Scripts by it's `inum`

Expand Down Expand Up @@ -309,11 +309,11 @@ Getting access token for scope https://jans.io/oauth/config/scripts.readonly
{
"dn": "inum=61aef81b-b22d-42c0-89d5-b098c976a2b7,ou=scripts,o=jans",
"inum": "61aef81b-b22d-42c0-89d5-b098c976a2b7",
"name": "custom_script_update_user",
"name": "custom_script_client",
"aliases": null,
"description": "Testing custom script addition",
"script": "...",
"scriptType": "UPDATE_USER",
"scriptType": "CLIENT_REGISTRATION",
"programmingLanguage": "PYTHON",
"moduleProperties": [
{
Expand Down
32 changes: 13 additions & 19 deletions docs/user/using-jans-cli/im/im-custom-scripts.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,35 +70,29 @@ Getting access token for scope https://jans.io/oauth/config/scripts.readonly
+----+-------------------------------------+-----------------------------------------------------------+-----------+-----------+
| 22 | PERSON_AUTHENTICATION | uaf | False | 5018-AF9C |
+----+-------------------------------------+-----------------------------------------------------------+-----------+-----------+
| 23 | USER_REGISTRATION | user_registration | False | 6EA0-8F0C |
| 23 | UMA_RPT_POLICY | scim_access_policy | False | 2DAF-F9A5 |
+----+-------------------------------------+-----------------------------------------------------------+-----------+-----------+
| 24 | UMA_RPT_POLICY | scim_access_policy | False | 2DAF-F9A5 |
| 24 | UMA_RPT_POLICY | uma_rpt_policy | False | 2DAF-F995 |
+----+-------------------------------------+-----------------------------------------------------------+-----------+-----------+
| 25 | UMA_RPT_POLICY | uma_rpt_policy | False | 2DAF-F995 |
| 25 | DYNAMIC_SCOPE | org_name | False | 031C-5621 |
+----+-------------------------------------+-----------------------------------------------------------+-----------+-----------+
| 26 | DYNAMIC_SCOPE | org_name | False | 031C-5621 |
| 26 | PERSISTENCE_EXTENSION | persistence_extension | False | 8AF7.D82A |
+----+-------------------------------------+-----------------------------------------------------------+-----------+-----------+
| 27 | PERSISTENCE_EXTENSION | persistence_extension | False | 8AF7.D82A |
| 27 | ID_GENERATOR | id_generator | False | 031C-4A65 |
+----+-------------------------------------+-----------------------------------------------------------+-----------+-----------+
| 28 | ID_GENERATOR | id_generator | False | 031C-4A65 |
| 28 | IDP | idp | False | 8AF7.D82B |
+----+-------------------------------------+-----------------------------------------------------------+-----------+-----------+
| 29 | IDP | idp | False | 8AF7.D82B |
| 29 | CACHE_REFRESH | cache_refresh | False | 13D3-E7AD |
+----+-------------------------------------+-----------------------------------------------------------+-----------+-----------+
| 30 | CACHE_REFRESH | cache_refresh | False | 13D3-E7AD |
| 30 | APPLICATION_SESSION | application_session | False | DAA9-B789 |
+----+-------------------------------------+-----------------------------------------------------------+-----------+-----------+
| 31 | APPLICATION_SESSION | application_session | False | DAA9-B789 |
| 31 | DYNAMIC_SCOPE | dynamic_permission | True | CB5B-3211 |
+----+-------------------------------------+-----------------------------------------------------------+-----------+-----------+
| 32 | DYNAMIC_SCOPE | dynamic_permission | True | CB5B-3211 |
| 32 | SCIM | scim_event_handler | False | A910-56AB |
+----+-------------------------------------+-----------------------------------------------------------+-----------+-----------+
| 33 | SCIM | scim_event_handler | False | A910-56AB |
| 33 | CLIENT_REGISTRATION | client_registration | False | DAA9-B788 |
+----+-------------------------------------+-----------------------------------------------------------+-----------+-----------+
| 34 | CLIENT_REGISTRATION | client_registration | False | DAA9-B788 |
+----+-------------------------------------+-----------------------------------------------------------+-----------+-----------+
| 35 | DYNAMIC_SCOPE | work_phone | False | 031C-5622 |
+----+-------------------------------------+-----------------------------------------------------------+-----------+-----------+
| 36 | USER_REGISTRATION | user_confirm_registration | False | 6EA0-8F0D |
+----+-------------------------------------+-----------------------------------------------------------+-----------+-----------+
| 37 | UPDATE_USER | update_user | False | 522F-CDC5 |
| 34 | DYNAMIC_SCOPE | work_phone | False | 031C-5622 |
+----+-------------------------------------+-----------------------------------------------------------+-----------+-----------+
Expand All @@ -110,7 +104,7 @@ To add a new script, choose option 2 and fill each property:

`dn, inum, display name, valid script`
```
ScriptType: [PERSON_AUTHENTICATION, INTROSPECTION, RESOURCE_OWNER_PASSWORD_CREDENTIALS, APPLICATION_SESSION, CACHE_REFRESH, UPDATE_USER, USER_REGISTRATION, CLIENT_REGISTRATION, ID_GENERATOR, UMA_RPT_POLICY, UMA_RPT_CLAIMS, UMA_CLAIMS_GATHERING, CONSENT_GATHERING, DYNAMIC_SCOPE, SPONTANEOUS_SCOPE, END_SESSION, POST_AUTHN, SCIM, CIBA_END_USER_NOTIFICATION, PERSISTENCE_EXTENSION, IDP]
ScriptType: [PERSON_AUTHENTICATION, INTROSPECTION, RESOURCE_OWNER_PASSWORD_CREDENTIALS, APPLICATION_SESSION, CACHE_REFRESH, CLIENT_REGISTRATION, ID_GENERATOR, UMA_RPT_POLICY, UMA_RPT_CLAIMS, UMA_CLAIMS_GATHERING, CONSENT_GATHERING, DYNAMIC_SCOPE, SPONTANEOUS_SCOPE, END_SESSION, POST_AUTHN, SCIM, CIBA_END_USER_NOTIFICATION, PERSISTENCE_EXTENSION, IDP]
Programming Language: [PYTHON, JAVA]
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,6 @@ public void applicationInitialized(@Observes @Initialized(ApplicationScoped.clas
List<CustomScriptType> supportedCustomScriptTypes = Lists.newArrayList(CustomScriptType.values());

supportedCustomScriptTypes.remove(CustomScriptType.CACHE_REFRESH);
supportedCustomScriptTypes.remove(CustomScriptType.UPDATE_USER);
supportedCustomScriptTypes.remove(CustomScriptType.USER_REGISTRATION);
supportedCustomScriptTypes.remove(CustomScriptType.SCIM);
supportedCustomScriptTypes.remove(CustomScriptType.IDP);
supportedCustomScriptTypes.remove(CustomScriptType.CONFIG_API);
Expand Down
4 changes: 0 additions & 4 deletions jans-cli/cli/jca.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -995,8 +995,6 @@ paths:
- '- resource_owner_password_credentials'
- '- application_session'
- '- cache_refresh'
- '- update_user'
- '- user_registration'
- '- client_registration'
- '- id_generator'
- '- uma_rpt_policy'
Expand Down Expand Up @@ -3404,8 +3402,6 @@ components:
- RESOURCE_OWNER_PASSWORD_CREDENTIALS
- APPLICATION_SESSION
- CACHE_REFRESH
- UPDATE_USER
- USER_REGISTRATION
- CLIENT_REGISTRATION
- ID_GENERATOR
- UMA_RPT_POLICY
Expand Down
4 changes: 0 additions & 4 deletions jans-config-api/docs/jans-config-api-swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -995,8 +995,6 @@ paths:
- '- resource_owner_password_credentials'
- '- application_session'
- '- cache_refresh'
- '- update_user'
- '- user_registration'
- '- client_registration'
- '- id_generator'
- '- uma_rpt_policy'
Expand Down Expand Up @@ -3404,8 +3402,6 @@ components:
- RESOURCE_OWNER_PASSWORD_CREDENTIALS
- APPLICATION_SESSION
- CACHE_REFRESH
- UPDATE_USER
- USER_REGISTRATION
- CLIENT_REGISTRATION
- ID_GENERATOR
- UMA_RPT_POLICY
Expand Down
Loading

0 comments on commit c34e75d

Please sign in to comment.