SQL> conn scott/tiger
Connected.
SQL> SELECT UTL_HTTP.request('https://wsctt.pearsonvue.com/cxfws2/services/Ping','http://www-proxy-abc.us.oracle.com:80','file:/u01/app/oracle/product/12.1.0/dbhome_2/owm/wsctt_102019','abcedef')FROM DUAL;
SELECT UTL_HTTP.request('https://wsctt.pearsonvue.com/cxfws2/services/Ping','http://www-proxy-abc.us.oracle.com:80','file:/u01/app/oracle/product/12.1.0/dbhome_2/owm/wsctt_102019','abcedef')FROM DUAL
*
ERROR at line 1:
ORA-29273: HTTP request failed
ORA-24247: network access denied by access control list (ACL)
ORA-06512: at "SYS.UTL_HTTP", line 1491
ORA-06512: at line 1
SQL>
SQL> conn sys as sysdba
Enter password:
Connected.
SQL> BEGIN
DBMS_NETWORK_ACL_ADMIN.append_host_ace (
host => '*',
lower_port => 1,
upper_port => 9999,
ace => xs$ace_type(privilege_list => xs$name_list('connect'),
principal_name => 'SCOTT',
principal_type => xs_acl.ptype_db));
END;
/
2 3 4 5 6 7 8 9 10
PL/SQL procedure successfully completed.
SQL>
SQL> conn scott/tiger
Connected.
SQL> SELECT UTL_HTTP.request('https://wsctt.pearsonvue.com/cxfws2/services/Ping','http://www-proxy-abc.us.oracle.com:80','file:/u01/app/oracle/product/12.1.0/dbhome_2/owm/wsctt_102019','abcedef')FROM DUAL;
UTL_HTTP.REQUEST('HTTPS://WSCTT.PEARSONVUE.COM/CXFWS2/SERVICES/PING','HTTP://WWW
--------------------------------------------------------------------------------
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:soapen
v="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><soap:Fault><soap:Code>
<soap:Value>soap:Receiver</soap:Value></soap:Code><soap:Reason><soap:Text xml:la
ng="en">Fault occurred while processing.</soap:Text></soap:Reason></soap:Fault><
/soap:Body></soap:Envelope>
SQL>
-- Access wallets in 11g
BEGIN
DBMS_NETWORK_ACL_ADMIN.create_acl (
acl => 'wsctt_102019.xml',
description => 'ACL for scott user to access wsctt_102019 wallet',
principal => 'SCOTT',
is_grant => TRUE,
privilege => 'use-client-certificates',
start_date => NULL,
end_date => NULL);
COMMIT;
END;
/
BEGIN
DBMS_NETWORK_ACL_ADMIN.assign_wallet_acl (
acl => 'wsctt_102019.xml',
wallet_path => 'file:/u01/app/oracle/product/12.1.0/dbhome_2/owm/wsctt_102019');
COMMIT;
END;
/
Connected.
SQL> SELECT UTL_HTTP.request('https://wsctt.pearsonvue.com/cxfws2/services/Ping','http://www-proxy-abc.us.oracle.com:80','file:/u01/app/oracle/product/12.1.0/dbhome_2/owm/wsctt_102019','abcedef')FROM DUAL;
SELECT UTL_HTTP.request('https://wsctt.pearsonvue.com/cxfws2/services/Ping','http://www-proxy-abc.us.oracle.com:80','file:/u01/app/oracle/product/12.1.0/dbhome_2/owm/wsctt_102019','abcedef')FROM DUAL
*
ERROR at line 1:
ORA-29273: HTTP request failed
ORA-24247: network access denied by access control list (ACL)
ORA-06512: at "SYS.UTL_HTTP", line 1491
ORA-06512: at line 1
SQL>
SQL> conn sys as sysdba
Enter password:
Connected.
SQL> BEGIN
DBMS_NETWORK_ACL_ADMIN.append_host_ace (
host => '*',
lower_port => 1,
upper_port => 9999,
ace => xs$ace_type(privilege_list => xs$name_list('connect'),
principal_name => 'SCOTT',
principal_type => xs_acl.ptype_db));
END;
/
2 3 4 5 6 7 8 9 10
PL/SQL procedure successfully completed.
SQL>
SQL> conn scott/tiger
Connected.
SQL> SELECT UTL_HTTP.request('https://wsctt.pearsonvue.com/cxfws2/services/Ping','http://www-proxy-abc.us.oracle.com:80','file:/u01/app/oracle/product/12.1.0/dbhome_2/owm/wsctt_102019','abcedef')FROM DUAL;
UTL_HTTP.REQUEST('HTTPS://WSCTT.PEARSONVUE.COM/CXFWS2/SERVICES/PING','HTTP://WWW
--------------------------------------------------------------------------------
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:soapen
v="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><soap:Fault><soap:Code>
<soap:Value>soap:Receiver</soap:Value></soap:Code><soap:Reason><soap:Text xml:la
ng="en">Fault occurred while processing.</soap:Text></soap:Reason></soap:Fault><
/soap:Body></soap:Envelope>
SQL>
-- Access wallets in 11g
BEGIN
DBMS_NETWORK_ACL_ADMIN.create_acl (
acl => 'wsctt_102019.xml',
description => 'ACL for scott user to access wsctt_102019 wallet',
principal => 'SCOTT',
is_grant => TRUE,
privilege => 'use-client-certificates',
start_date => NULL,
end_date => NULL);
COMMIT;
END;
/
BEGIN
DBMS_NETWORK_ACL_ADMIN.assign_wallet_acl (
acl => 'wsctt_102019.xml',
wallet_path => 'file:/u01/app/oracle/product/12.1.0/dbhome_2/owm/wsctt_102019');
COMMIT;
END;
/
No comments:
Post a Comment