如果我使用 sys 作为 APEX_210200 的 sysdba 创建 ACL,该 ACL 是否适用于 sys

发布于 2025-01-13 14:08:32 字数 1357 浏览 2 评论 0原文

遵循本指南

https ://oracle-base.com/articles/misc/azure-ad-authentication-for-oracle-apex-applications#add-web-credentials

所以运行这个

  l_username varchar2(30) := 'APEX_210200';
begin
  dbms_network_acl_admin.append_host_ace(
    host => 'login.microsoftonline.com',
    lower_port => 443,
    ace  =>  xs$ace_type(privilege_list => xs$name_list('connect'),
                        principal_name => l_username,
                        principal_type => xs_acl.ptype_db));

然后我尝试使用

l_json    CLOB;
BEGIN
apex_web_service.g_request_headers( 1 ).name  := 'User-Agent';
apex_web_service.g_request_headers( 1 ).value := 'Application Express';
l_json := apex_web_service.make_rest_request(
  p_url => 'login.microsoftonline.com',
  p_http_method => 'GET'
);
DBMS_OUTPUT.put_line('l_clob=' || l_json);
END;

但我得到

ORA-06512: at "APEX_210200.WWV_FLOW_WEB_SERVICES", line 1182
ORA-06512: at "APEX_210200.WWV_FLOW_WEB_SERVICES", line 782
ORA-24247: network access denied by access control list (ACL)

但是网络凭据+身份验证方案确实可以在 APEX APP 本身内部工作(登录到 Azure 并返回到应用程序)

我的测试是否会失败,因为我以 sys 身份运行?

Following this guide

https://oracle-base.com/articles/misc/azure-ad-authentication-for-oracle-apex-applications#add-web-credentials

So running this

  l_username varchar2(30) := 'APEX_210200';
begin
  dbms_network_acl_admin.append_host_ace(
    host => 'login.microsoftonline.com',
    lower_port => 443,
    ace  =>  xs$ace_type(privilege_list => xs$name_list('connect'),
                        principal_name => l_username,
                        principal_type => xs_acl.ptype_db));

And then I try to test it with

l_json    CLOB;
BEGIN
apex_web_service.g_request_headers( 1 ).name  := 'User-Agent';
apex_web_service.g_request_headers( 1 ).value := 'Application Express';
l_json := apex_web_service.make_rest_request(
  p_url => 'login.microsoftonline.com',
  p_http_method => 'GET'
);
DBMS_OUTPUT.put_line('l_clob=' || l_json);
END;

But I get

ORA-06512: at "APEX_210200.WWV_FLOW_WEB_SERVICES", line 1182
ORA-06512: at "APEX_210200.WWV_FLOW_WEB_SERVICES", line 782
ORA-24247: network access denied by access control list (ACL)

But the web credentials + Authentication Schemes does work from within the APEX APP itself (logging into Azure and returning to the app)

Does my test fail because I'm running as sys?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文