Before access can be granted, the user to whom the access should be granted to, needs to already exist.
Therefore, the first chapter of this HowTo Guide needs to be followed in advance, before following this guide any further:
Furthermore, the sandbox the user should get access to needs to exist already as well. A sandbox can be created by following the first step in this HowTo Guide:
After having successfully created a sandbox and a user, the script API_SCURTY.GRANT_SBX_MASTER_ACCESS can be used to grant access to the sandbox to the user. One only has to provide the username and the name of the sandbox the access should be granted to, to the beforementioned script. These two parameters are mandatory and have to be provided.
EXECUTE SCRIPT API_SCURTY.GRANT_SBX_MASTER_ACCESS (
'TEST_SBX' -- p_sbx_name
,'TESTUSER' -- p_user_name
);
By issuing the command above an entry is added to the table SCURTY.SBX_MASTERS.
SBX_NAME | SBX_TYPE | USER_NAME |
---|---|---|
TEST_SBX | SBX | TESTUSER |
By providing a username and the name of a sandbox to the script API_SCURTY.REVOKE_SBX_MASTER_ACCESS the access of a specific user to a specific sandbox can be revoked.
EXECUTE SCRIPT API_SCURTY.REVOKE_SBX_MASTER_ACCESS (
'TEST_SBX' -- p_sbx_name
,'TESTUSER' -- p_user_name
);
After the script above is triggered, the entry for the sandbox with the name 'TEST_SBX' for the username 'TESTUSER' will be deleted from the table SCURTY.SBX_MASTERS.