Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

JSON file

mitozv edited this page Apr 9, 2018 · 2 revisions

JSON File WebADE

Setting up WebADE by using JSON file is a new method in configuration of WebADE. The JSON file must be in a project in the NRS Stash repository. It also has to follow the naming conventions and directory structure layout defined for NRS projects.

Refer to the dmod-webade-cfg project as an example on the directory structure and JSON file.

When developing for DMOD the following are the sections in the JSON file that were configured in order to be able to use the Document Management System (DMS)

  • applicationAcronym
  • applicationName
  • actions - this restricts and allows access to specific functions. In the case of DMOD to be able to use the document management system. The actions defined were used to configure WCC.
    "actions": [
        {
            "name": "UPDATE_FILES",
            "description": "Update Files",
            "privilegedInd": false
        },
        {
            "name": "READ_FILES",
            "description": "Read Only Files",
            "privilegedInd": false
        }
    ]
  • roles - groups the actions available to specific user in the application. In the case of DMOD, the DMOD_USER role is allowed to perform UPDATE_FILES to files and the DMOD_VIEWER role is allowed to READ_FILES.
"roles": [
        {
            "name": "DMOD_USER",
            "description": "DMOD User Role",
            "actionNames": [
                "UPDATE_FILES"
            ]
        },
        {
            "name": "DMOD_VIEWER",
            "description": "DMOD File Viewer Role",
            "actionNames": [
                "READ_FILES"
            ]
        }
    ]
  • profile - groups multiple roles from multiple applications into meaningful collections to provide access to the application. In the Authority Delegation And Management (ADAM) system, users can be added into the DMOD_USER profile which will give users the ability to manage the file for DMOD.
 "profiles": [
        {
            "name": "DMOD_USER",
            "description": "DMOD User Profile",
            "secureByOrganization": false,
            "availibleTo": [
                "GOV",
                "BUP",
                "UIN"
            ],
            "effectiveDate": 1510015681555,
            "expiryDate": null,
            "profileRoles": [
                {
                    "applicationCode": "DMOD",
                    "name": "DMOD_USER"
                },
                {
                    "applicationCode": "DMS",
                    "name": "CONTRIBUTOR"
                },
		{
		    "applicationCode": "DMS",
		    "name": "STAFF_USER_UPDATE"
		}
            ]
        },
        {
            "name": "DMOD_CLIENT",
            "description": "DMOD Client User Profile",
            "secureByOrganization": false,
            "availibleTo": [
                "GOV",
                "SCL"
            ],
            "effectiveDate": 1510015681555,
            "expiryDate": null,
            "profileRoles": [
                {
                    "applicationCode": "DMOD",
                    "name": "DMOD_VIEWER"
                },
                {
                    "applicationCode": "DMS",
                    "name": "CONTRIBUTOR"
                },
	        {
		    "applicationCode": "DMS",
		    "name": "STAFF_USER_READ"
	        }                
            ]
        }
    ],
  • serviceClients - The account that is used when accessing the NRS services such as DMS. The DMOD_CLIENT service account is used by document services to request access to read the document on behalf of the anonymous users. The DMOD_UI is used in the DMOD front end during login redirect to the authorization server. The JSON file must not contain any password information. In the case of the serviceClient setup where a secret is required, a placeholder must be used and will have to be configured in the Jenkins credentials.
  "serviceClients": [
        {
            "accountName": "DMOD_CLIENT",
            "secret": "#{dmod_client.password}",
            "oauthScopes": [
                "DMOD.*",
                "DMS.*"
            ],
            "oauthGrantTypes": [
                "refresh_token",
                "client_credentials",
                "authorization_code"
            ],
            "oauthRedirectUrls": [],
            "oauthAccessTokenValidity": null,
            "oauthRefreshTokenValidity": null,
            "oauthAdditionalInformation": "{\"autoapprove\":\"true\"}",
            "authorizations": [
                {
                    "profileName": "DMOD_CLIENT",
                    "effectiveDate": 1510015681555,
                    "expiryDate": null,
                    "enabled": true
                }
            ]
        },
        {
            "accountName": "DMOD_UI",
            "secret": "#{dmod_ui.password}",
            "oauthScopes": [
                "DMOD.*",
                "DMS.*"
            ],
            "oauthGrantTypes": [
                "implicit"
            ],
            "oauthRedirectUrls": [],
            "oauthAccessTokenValidity": null,
            "oauthRefreshTokenValidity": null,
            "oauthAdditionalInformation": "{\"autoapprove\":\"true\",\"jsonwebtoken\":\"true\"}",
            "authorizations": []
        }
    ]
Clone this wiki locally