For every new access modules repository, the following settings have to be added:
- add git_urls in
config.json
"access_modules": {
"git_urls": [
"https://github.com/browserstack/enigma-access-modules.git",
"https://github-new-access-module.git"
],
....
}To specify a branch add # in the suffix followed by branch name.
"https://github.com/browserstack/enigma-access-modules.git#<branch-name>" "https://<git-username>:<github-token>@github.com/browserstack/enigma-access-modules.git"where github-token is a PAT Token
The added URLs will be integrated by the cloning script scripts/clone_access_modules.py. Once the data is available in the central code, requirements need to be installed as defined by the modules:
pip install -r Acess/access_modules/requirements.txt --no-cache-dir --ignore-installed- configure access_modules in
config.json
"access_modules": {
....
"<module_tag>": {
"properties_key": "properties_value",
},
....
}- Any access requested by the user has to go though the approver which will then be granted accordingly. Engima allows to configure approvers for access modules to be at most 2 approvers for a request.
- By default access modules are configured to have single approver for request to proceed. The user with the permission
ACCESS_APPROVEis allowed to approve or decline the request in that case. - You can configure an access module to have a secondary approver if necessary. This can be done by overriding a function in module class which inherits from BaseEmailAccess class in
access.pyof the access module. - Overide
fetch_approver_permissionsfunction which returnby default. Which says primary approver should have permission{"1": PERMISSION_CONSTANTS["DEFAULT_APPROVER_PERMISSION"]}PERMISSION_CONSTANTS["DEFAULT_APPROVER_PERMISSION"]which is equalACCESS_APPROVE. You can override this by specifing the permission that secondary approver should have. For example lets say permission required for secondary approver isSECONDARY_ACCESS_APPROVEthen your updated funtion looks like follows:def fetch_approver_permissions(self, access_label=None): return {"1": PERMISSION_CONSTANTS["DEFAULT_APPROVER_PERMISSION"], "2": "SECONDARY_ACCESS_APPROVE"}
- Once the function is overridden admin can now create a permission with the label and then assign user that permission (learn more about adding permission is Adding Permissions Section). And the user will be asked for the secondary approver for a request.
- For one click setup it clone all the access modules from the
enigma-access-modulesrepo. So in the UI you can see all the access modules. - Which can be disabled by removing the non required access moduled folder from
Access/access_modulespath.