1. Manage Users

Note

It is strongly recommended to automate user management with an identity management system (IDM) such as Active Directory, which can be coupled with SCURTY directly. Users can still be added manually if necessary, e.g. for testing purposes.

1.1. Add a User

To add a user, execute API_SCURTY.CREATE_USER:

p_user_type

HU (human user), GU (generic user), or TU (technical user), see RED Authorisation Concept.

p_authentication

NULL: password authentication with the default password (parameter sec_hu_def_passwd); only allowed for human users. The password of a human user is expired, so it must be changed at the first login.

Any other text is used as the password; generic and technical users must always get an explicit password.

@LDAP: followed by the distinguished name, or @KRB: followed by the Kerberos principal, for LDAP or Kerberos authentication.

p_private_sbx and p_quota

Create a private sandbox and its quota in GB (default sec_hu_def_quota, 20 GB; negative means unlimited). A quota without a private sandbox is rejected.

p_email

If set, the user receives a mail with the initial password and instructions on how to change it.

The following example adds a human user ‘testuser’ with the default password. The user receives no mail, as no mail address is given.

Example: Add a Human User

1EXECUTE SCRIPT API_SCURTY.CREATE_USER(
2    'testuser'                        -- p_user_name
3   ,'HU'                              -- p_user_type
4   ,null                              -- p_authentication (default password)
5   ,false                             -- p_private_sbx
6   ,null                              -- p_quota
7   ,'test user - will be deleted'     -- p_comment
8   ,null                              -- p_email
9);

The new user account is listed in the view SCURTY.REP_ALL_USERS:

USER_NAME

USER_AUTHENTICATION

PASSWORD_STATE

ACCOUNT_LOCKED

IS_HU

IS_GU

IS_TU

IS_VALID

USBX_STATUS

USBX_QUOTA_GB

USER_COMMENT

TESTUSER

PASSWORD

EXPIRED(GRACE)

false

true

false

false

true

(null)

(null)

test user - will be deleted

1.2. Manage a User

To change a user account, use API_SCURTY.MANAGE_USER. NULL leaves a parameter unchanged, while a blank (’ ‘) restores its default value. Besides the parameters of CREATE_USER, it provides:

p_account_lock

Locks (true) or unlocks (false) the account.

p_expire

Expires the password, so that it must be changed at the next login.

Example: Change the Comment

1EXECUTE SCRIPT API_SCURTY.MANAGE_USER(
2    'TESTUSER'                                   -- p_user_name
3   ,null                                         -- p_account_lock
4   ,null                                         -- p_authentication
5   ,null                                         -- p_expire
6   ,null                                         -- p_private_sbx
7   ,null                                         -- p_quota
8   ,'test user - will be deleted, got changed'   -- p_comment
9);

1.3. Drop a User

To drop a user account, use API_SCURTY.DROP_USER.

Warning

Dropping a user also deletes all its access rights to object groups and tenants and its sandbox master assignments.

Example: Drop the User ‘testuser’

1EXECUTE SCRIPT API_SCURTY.DROP_USER(
2    'testuser'    -- p_user_name
3);

Afterwards the user ‘testuser’ no longer exists in SCURTY.REP_ALL_USERS.

1.4. When Do Changes Take Effect?

User accounts are created and changed immediately. Access rights to object groups, tenants, and sandboxes, as well as changes to search rules, are applied to the database by refresh jobs, which run every 30 minutes by default (SCURTY.ADM_JOBS). The time of the last successful refresh per area is shown in SCURTY.ADM_REFRESH_JOB_STATUS. To apply changes immediately, run the refresh manually:

Example: Run the Security Refresh Manually

1EXECUTE SCRIPT API_SCURTY.REP_REFRESH();   -- object groups, tenants, security columns
2EXECUTE SCRIPT API_SCURTY.SBX_REFRESH();   -- sandboxes
3EXECUTE SCRIPT API_SCURTY.IDM_REFRESH();   -- access rights from the IDM

To exclude a user from row and column level security completely, grant the database role R_SEC_EXEMPT_ACCESS. Grant this role only where it is absolutely necessary.