gpt4 book ai didi

sap - 通过 RFC 连接时列出允许的方法?

转载 作者:行者123 更新时间:2023-12-04 12:39:10 25 4
gpt4 key购买 nike

我可以通过 SAP-RFC 以用户“foo”的身份使用密码“bar”从我的机器连接到 SAP 服务器。
是否可以通过 SAP-RFC 进行自省(introspection)?n我想知道允许用户“foo”执行哪些方法。我正在使用 PyRFC,但 AFAIK 这对于这个问题应该无关紧要。

根据用户 Suncatcher 的说法,它不是开箱即用的。

到目前为止,我的 SAP 知识有限。但是不能像这个伪代码那样循环吗? (此代码应在 SAP 内部运行(作为 ABAP),并且可以通过 RFC 公开)

user = 'foo'
allowed_methods = [] # empty list
for func in get_all_functions_which_are_exported_via_rfc():
if not check_if_user_has_permission_to_call_rfc_function(func, user):
# not allowed
continue
# user is allowed
allowed_methods.append(func)
return allowed_methods

最佳答案

I would like to know which methods user "foo" is allowed to execute.



SAP授权概念中没有method这样的实体,所以不能列出允许的method。

您只能从表 AGR_USERS 中获取为您的用户分配的角色列表。 (如果您有权限阅读它:),然后尝试确定您可以调用哪些功能模块、tcode、程序。当我们谈论 RFC 时,我假设您对功能模块感兴趣。
但是检测所有可用的支持 RFC 的 FM 需要单独的而不是非常简单的开发。

所以答案是 .您不能开箱即用地列出它们。

关于sap - 通过 RFC 连接时列出允许的方法?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51739718/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com