1

我有一种情况,用户应该访问表单的本地网络中的特定 url 192.168.19.*EXECUTE尽管他在 acl 列表中拥有适当的授权UTL_HTTP和特权,但他仍然无法访问列表中允许的 url。

具体来说,我已将 ACL 创建为 sys dba

BEGIN
 dbms_network_acl_admin.create_acl(
      acl => 'acl_name.xml',
      description => 'ACL description',
      principal => 'MYUSER', 
      is_grant => TRUE, 
      privilege => 'connect');
 commit;
dbms_network_acl_admin.assign_acl (
     acl => 'acl_name.xml',
     host => '192.168.19.*',
     lower_port => 1,
     upper_port => 9999);          
commit;
END;
/

以 sys 身份运行以下命令,

SELECT acl, principal, privilege, is_grant
FROM   dba_network_acl_privileges;

我明白了

ACL                     PRINCIPAL PRIVILEGE       IS_GRANT
----------------------- --------- --------------- --------
/sys/acls/acl_name.xml  MYUSER    connect         true    

以 MYUSER 身份连接并运行以下查询,

 SELECT host, lower_port, upper_port, privilege, status
 FROM   user_network_acl_privileges;

我明白了

 HOST               LOWER_PORT UPPER_PORT PRIVILEGE STATUS                  
 ------------------ ---------- ---------- --------- -------
 192.168.19.*       1          9999       connect   GRANTED

所以MYUSER谁被授予EXECUTEon UTL_HTTP,当尝试连接到所需的 url 时,例如:

 select utl_http.request('http://192.168.19.202:7101/gdc') from dual;

得到:

 [Error] Execution (1: 8): ORA-29273: HTTP request failed
 ORA-06512: at "SYS.UTL_HTTP", line 1720
 ORA-24247: network access denied by access control list (ACL)
 ORA-06512: at line 1

我试图删除并重新创建列表,但没有运气,resolve也尝试分配特权,但他仍然无法通过 ACL。

我是否遗漏了阻止用户调用此 url 的内容?

我的版本信息是:

 BANNER                                                                          
 -------------------------------------------------------------------------
 Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production    
 PL/SQL Release 11.2.0.4.0 - Production                                          
 CORE   11.2.0.4.0  Production                                                      
 TNS for IBM/AIX RISC System/6000: Version 11.2.0.4.0 - Production               
 NLSRTL Version 11.2.0.4.0 - Production                                          

 5 rows selected. 
4

0 回答 0