日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

SAP CDS view权限控制实现原理介绍

發布時間:2023/12/19 编程问答 36 豆豆
生活随笔 收集整理的這篇文章主要介紹了 SAP CDS view权限控制实现原理介绍 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

Part1 – how to test odata service generated by CDS view
Part2 – what objects are automatically generated after you activate one CDS view
Part3 – how is view source in Eclipse converted to ABAP view in the backend
Part4 – how does annotation @OData.publish work
Part5 – how to create CDS view which supports navigation in OData service
Part6 – consume table function in CDS view
Part7 – unveil the secret of @ObjectModel.readOnly
Part8 – my summary of different approaches for annotation declaration and generation
Part9 – cube view and query view
Part10 – How does CDS view key user extensibility work in S4/HANA
Part11 – CDS view test double framework
Part12 – CDS view source code count tool
Part13 – this blog
Part14 – CDS view performance analysis using PlanViz in HANA studio

There are already lots of blogs in community talking about CDS authorization concept, here I just blog what is so far not mentioned in those blogs.

For demonstration purpose I create a very simple database table ZORDER with two entries:

And a CDS view on top of it:

@AbapCatalog.sqlViewName: 'zvorder' @AbapCatalog.compiler.compareFilter: true @AccessControl.authorizationCheck: #CHECK @EndUserText.label: 'Order for authorization POC' define view zjerry_order as select from zorder {key order_id, order_text, order_type, post_date }

In SAP help, it is documented that “If a CDS entity is specified in several access rules of a CDS role, the resulting access conditions are joined using a logical OR”.
And I create a simple authorization object ZJER_TYPE2 in tcode SU21 which contains field PR_TYPE for order type and ACTVT field with following settings:

And then create an Access Control object:

@EndUserText.label: 'Order DCL POC' @MappingRole: true define role Zjerry_Order_Dcl { grant select on zjerry_orderwhere ( order_type) = aspect pfcg_auth( ZJER_TYPE2, pr_type, ACTVT = '01' )or ( order_type) = aspect pfcg_auth( ZJER_TYPE2, pr_type, ACTVT = '03' ); }

Create a new PFCG role ZJER_AUTH_TEST3 with ACTVT = 01,02 and PR_TYPE = SRVO:

I use this combination to ensure that the statement before the OR operator will pass ( aspect pfcg_auth( ZJER_TYPE2, pr_type, ACTVT = ’01’ ) ) while the statement after OR will fail ( aspect pfcg_auth( ZJER_TYPE2, pr_type, ACTVT = ’03’ ).
And then assign this PFCG role to my user:

This means from semantic perspective that “it is expected that user WANGJER can only have access to order with process type SRVO“.

Now all preparation is ready. Execute this simple SQL:

SELECT * INTO TABLE @DATA(lt_data) FROM zjerry_order.

Only 1 record with type SRVO is returned, working as expected. But why? How does it work?

Use tcode stauthtrace to perform a trace:

The trace result shows that the evaluation for first statement before OR is done successfully, and the statement after Or fails. According to SAP help, the whole result is still true( true OR false = true ).

What magic thing has happened when the OPEN SQL is executed? Why the record with order type OPPT is automatically filtered out?
Perform a SQL trace with tcode ST05, display execution plan via menu below:

You can find there is a fragment of WHERE statement automatically added. The value for ORDER_TYPE comes from the value of authorization object field PR_TYPE which is mapped to CDS view field ORDER_TYPE in my DCL object.

This behavior is consistent with what is documented in SAP help:

When Open SQL is used to access a CDS entity and an access rule is defined in a role for this entity, the access conditions are evaluated implicitly and their selection restricted so that in SELECT reads, the access condition is added to the selection condition of the statement passed from the database interface to the database using a logical “and”.

Two DCL objects defined on the same CDS view

Again the SAP help said “If a CDS entity is specified in multiple CDS roles, the resulting access conditions are joined using a logical OR”.

Let’s create a new PFCG role ZJER_AUTH_TEST4 which only grants displayauthorization on order type OPPT.

@EndUserText.label: 'display authorization on OPPT' @MappingRole: true define role Zjerry_Order_Dcl2 { grant select on zjerry_orderwhere ( order_type) = aspect pfcg_auth( ZJER_TYPE2, pr_type, ACTVT = '03'); }

Execute the SQL once again under trace mode:
Still one record with type SRVO is returned.

The corresponding automatically appended where statement: since the PFCF role ZJER_AUTH_TEST4 is NOT assigned to my user WANGJER, so when the open SQL is performed on the view, NO corresponding where statement for order type OPPT defined in that PFCG role is appended.

要獲取更多Jerry的原創文章,請關注公眾號"汪子熙":

創作挑戰賽新人創作獎勵來咯,堅持創作打卡瓜分現金大獎

總結

以上是生活随笔為你收集整理的SAP CDS view权限控制实现原理介绍的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。

主站蜘蛛池模板: 超碰中文在线 | 成人精品一区二区三区在线 | 美女100%视频免费观看 | 日本边添边摸边做边爱 | www.爆操| 天天看av| 一本色道久久综合亚洲精品小说 | 处女朱莉第一次 | 五月天六月色 | 久久久久亚洲av片无码 | 国产在线观看一区二区三区 | 中文字幕观看视频 | 超碰在线99| 久草三级 | 日韩综合另类 | av免费网站观看 | 久久国产影院 | 亚洲AV不卡无码一区二区三区 | se综合 | 免费国产 | 91成人免费视频 | cao国产| 李丽珍裸体午夜理伦片 | 亚洲最大看欧美片网站 | 少妇又色又爽 | 午夜18视频在线观看 | 亚洲精品白浆 | 一区二区中文字幕 | 日韩人妻精品在线 | 亚洲第一av | 亚洲一级大片 | 99久久婷婷国产综合精品 | 久久久久久亚洲av毛片大全 | 风韵丰满熟妇啪啪区老熟熟女 | 每日在线更新av | 日韩女优一区 | 就要操av | 欧美性一级片 | 午夜一级黄色片 | www.日本com| 九九99久久 | 白石茉莉奈番号 | 97麻豆视频 | 蜜臀av粉嫩av懂色av | 国产精品免费一区二区三区都可以 | 亚洲图片综合区 | 最新av女优 | 免费在线观看a视频 | xxxx久久| 中文字幕在线日亚洲9 | 白浆在线播放 | 久久久精品视频一区 | 蜜桃在线一区 | 日本国产欧美 | 在线一二区 | 欧美无马| 日本少妇18p | av片手机在线观看 | 欧美性潮喷xxxxx免费视频看 | 午夜影院免费观看 | 紧身裙女教师三上悠亚红杏 | 欧美极品三级 | www..com色| 国产一区二区三区免费观看 | 搡老熟女老女人一区二区 | 久久久精品人妻av一区二区三区 | a级无毛片 | 国产午夜小视频 | 亚洲福利在线视频 | 欧美操操| 国产xxxx| 天天草夜夜 | 91日批视频| 在线观看免费日韩av | 日本久久片 | 不卡一区在线观看 | 亚洲手机看片 | 女女同性被吸乳羞羞 | 日韩成人免费电影 | 性欧美日本 | 欧美一级黄色片在线观看 | 欧美又大粗又爽又黄大片视频 | 99草| 国产精品毛片久久久久久 | av在线网站观看 | 国模吧一区二区三区 | 黄视频免费看在线 | 成人国产精品入口 | 日韩精品在线不卡 | 日韩成人在线看 | 片集网| 欧美成人黄色 | 日本福利一区二区 | 中文字幕在线观看国产 | 日韩视频在线观看一区 | av久热| 精品香蕉视频 | 日本三级网站在线观看 | √天堂中文官网8在线 |