SAP用户权限控制大解析及权限进阶分析
這些個profile name ,profile,role它們的關系如何呢?profile 這個英語詞義是很豐富的,在中文中難找對應的表示同等語義的詞語。
基本概念
activity
activity,活動,類如insert, update,display等等,
這些activity由當年德國開發者設計在tobj表中。
activity 也是可分activity group。如果上升到方法論,我們不難發現,分類始終是人類認識和管理事物的卓越思想和強大手段。
activity category &Authorization group
Role Vs Profile
我們可以看看表T020,那里分出好多K,D, A, M什么的,學習比較一下就清楚了.
profile是什么呢?實際上可以理解為所有的authorization data(有很多authorization group--你可使用OBA7填寫,
權限太細并非好事,和activity組成)的一個集合的名字,通常一個自定義的role產
生一個profile,SAP權限控制是根據profile里的authorization data(objects)來控制的.
role又是什么呢?role只是一個名字而已,然后將profile賦予給它, 比如你SU01建立一個
用戶,我沒有任何role,但是加如SAP_All profile
也是可做任何事情.
SAP本身有很多default role & profile.
最常用的PFCG->authorizations->change authorization data->
進入后選取selection criteria 可看到所有的authorization object
manually可手工加authorization object,比如你使用某個t-code權限出錯誤,abap使用SU53檢查就
知道缺少哪個authorization objec,然后手工加入就可以.
你選去authorization levels就可by account type再細分權限.
有些甚至直接到表字段.而且你甚至可給一個object分配緩存buffer.
實現機制
SAP是如何做到權限控制?下面是一些研究結論。
關于權限方面的幾個t-code.
Role(角色)相關T-code:
PFAC 標準
PFAC_CHG 改變
PFAC_DEL 刪除
PFAC_DIS 顯示
PFAC_INS 新建
PFAC_STR
PFCG 創建
ROLE_CMP 比較
SUPC 批量建立角色profile
SWUJ 測試
SU03 檢測authorzation data
SU25, SU26 檢查updated profile
建立用戶相關T-code:
SU0
SU01
SU01D
SU01_NAV
SU05
SU50, Su51, SU52
SU1
SU10 批量
SU12 批量
SUCOMP:維護用戶公司地址
SU2 change用戶參數
SUIM 用戶信息系統
用戶組
SUGR:維護
SUGRD:顯示
SUGRD_NAV:還是維護
SUGR_NAV:還是顯示
關于profile&Authoraztion Data
SU02:直接創建profile不用role
SU20:細分Authorization Fields
SU21(SU03):****維護Authorization Objects(TOBJ,USR12).
對于憑證你可細分到:
F_BKPF_BED: Accounting Document: Account Authorization for Customers
F_BKPF_BEK: Accounting Document: Account Authorization for Vendors
F_BKPF_BES: Accounting Document: Account Authorization for G/L Accounts
F_BKPF_BLA: Accounting Document: Authorization for Document Types
F_BKPF_BUK: Accounting Document: Authorization for Company Codes
F_BKPF_BUP: Accounting Document: Authorization for Posting Periods
F_BKPF_GSB: Accounting Document: Authorization for Business Areas
F_BKPF_KOA: Accounting Document: Authorization for Account Types
F_BKPF_VW : Accounting Document: Change Default Values for Doc.Type/PsKy
然后你進去還可細分,這些個東西是save在USR12表中的. 在DB層是UTAB.
對具體transaction code細分:
SU22,SU24
SU53:*** 就是你出錯用來檢查沒有那些authoraztion objects.
SU56:分析authoraztion data buffers.
SU87:用來檢查用戶改變產生的history
SU96,SU97,SU98,SU99:干啥的?
SUPC:批量產生role
DB和logical層:
SUKRI:Transaction Combinations Critical for Security
tables:
TOBJ : All avaiable authorzation objects.(全在此)
USR12: 用戶級authoraztion值
-----------------------------
USR01:主數據
USR02:密碼在此
USR04:授權在此
USR03:User address data
USR05:User Master Parameter ID
USR06:Additional Data per User
USR07:Object/values of last authorization check that failed
USR08:Table for user menu entries
USR09:Entries for user menus (work areas)
USR10:User master authorization profiles
USR11:User Master Texts for Profiles (USR10)
USR12:User master authorization values
USR13:Short Texts for Authorizations
USR14:Surchargeable Language Versions per User
USR15:External User Name
USR16:Values for Variables for User Authorizations
USR20:Date of last user master reorganization
USR21:Assign user name address key
USR22:Logon data without kernel access
USR30:Additional Information for User Menu
USR40:Table for illegal passwords
USR41:當前用戶
USREFUS:
USRBF2
USRBF3
UST04:User Profile在此
UST10C: Composite profiles
UST10S: Single profiles (角色對應的
UST12 : Authorizations..............................
權限進階
用戶:
User type用戶類型(干啥用的不講):
通常的用戶類型有
a.dialog (就是normal user)
b.communication
c.system
d.service
e.reference.
通常你在使用任何T-code前一定會有權限檢測的.
AUTHORITY_CHECK:這個函數只是小檢查一下你的user有沒有,什么時候過期.
**如果coding只要使用此函數就夠了.
AUTHORITY_CHECK_TCODE:檢查T-code
這倆函數是真正檢查autorization objects的.
SUSR_USER_AUTH_FOR_OBJ_GET:
AUTHORIZATION_DATA_READ_SELOBJ:
總結
以上是生活随笔為你收集整理的SAP用户权限控制大解析及权限进阶分析的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 权限概览
- 下一篇: SAP:HANA为高性能数据分析保驾护航