Create ACL Oracle
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
begin DBMS_NETWORK_ACL_ADMIN.CREATE_ACL( acl => 'ACL_TEST.xml', description => 'Allow acl_viacep', principal => 'TI', is_grant => true, privilege => 'connect' ); dbms_network_acl_admin.add_privilege ( acl => 'ACL_TEST.xml', principal => 'TI', is_grant => true, privilege => 'resolve' ); dbms_network_acl_admin.assign_acl( acl => 'ACL_TEST.xml', host => '*' ); commit; end; / PL/SQL procedure successfully completed. |
Set ACL Owners
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
Setando as ACLs para outro Owner begin dbms_network_acl_admin.add_privilege ( acl => 'ACL_TESTE.xml', principal => 'TI', is_grant => true, privilege => 'resolve' ); dbms_network_acl_admin.add_privilege ( acl => 'ACL_TESTE.xml', principal => 'TI', is_grant => true, privilege => 'connect' ); dbms_network_acl_admin.assign_acl( acl => 'ACL_TESTE.xml', host => '*' ); commit; end; / |
Check ACL
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
column owner format a12; column index_name format a18; column status format a10; column domidx_status format a10; column domidx_opstatus format a10; column funcidx_status format a10; SQL> select acl,principal,privilege,is_grant from DBA_NETWORK_ACL_PRIVILEGES; ACL PRINCIPA PRIVILEGE IS_GR ---------------------- -------- ------------ ----- /sys/acls/ACL_TEST.xml TI connect true /sys/acls/ACL_TEST.xml TI resolve true SQL> select acl,host,lower_port,upper_port from DBA_NETWORK_ACLS; ACL HOST LOWER_PORT UPPER_PORT ---------------------- ----- ---------- ---------- /sys/acls/ACL_TEST.xml * |