Tags

/Secure Application Role/

BEGIN
DVSYS.DBMS_MACADM.CREATE_RULE(
rule_name => ‘Check App Session’,
rule_expr =>’TRIM(UPPER(SYS_CONTEXT(”USERENV”,”TERMINAL”))) IN (”XXXAPPSRV1”,”XXXAPPSRV2”,”XXXAPPSRV3”,”XXXDEVAPPSRV1”)’
);

END;

BEGIN
DVSYS.DBMS_MACADM.CREATE_RULE_SET(
rule_set_name => ‘Limit_USER_Access’,
description => ‘Limit_USER_Access’,
enabled => ‘Y’,
eval_options => DBMS_MACUTL.G_RULESET_EVAL_ALL,
audit_options => DBMS_MACUTL.G_RULESET_AUDIT_FAIL,
fail_options => DVSYS.DBMS_MACUTL.G_RULESET_FAIL_SHOW,
fail_message => ‘Rule Set Limit_USER_Access has failed.’,
fail_code => -20000,
handler_options => DBMS_MACUTL.G_RULESET_HANDLER_FAIL,
handler => ‘dbavowner.email_alert’);
END;

SELECT * FROM DVSYS.DBA_DV_RULE_SET
SELECT * FROM DVSYS.DBA_DV_RULE_SET_RULE

BEGIN
DBMS_MACADM.ADD_RULE_TO_RULE_SET(
rule_set_name => ‘Limit_USER_Access’,
rule_name => ‘Check App Session’,
rule_order => 1,
enabled => ‘Y’

);
END;

BEGIN
DVSYS.DBMS_MACADM.CREATE_ROLE(
role_name => ‘serdarrole’,
enabled => ‘Y’,
rule_set_name => ‘Limit_USER_Access’);
END;

create user serdarsil identified by serdarsil;

EXEC DVSYS.DBMS_MACSEC_ROLES.SET_ROLE(‘serdarrole’);

Advertisements