簡體   English   中英

AuthZForce-PEP-IDM即使用戶沒有特定資源的權限,也始終允許訪問

[英]AuthZForce-PEP-IDM Always allow access even when user doesnt have permission for specific resource

我創建了用戶,並只給了他一個角色。(成員)目前,該角色沒有任何Http動詞或路徑的任何權限。 這是我的用戶:

{
organizations: [1]
0:  {
website: ""
description: "AREAS"
roles: [1]
0:  {
name: "Member"
id: "09dc1bdba42c48de9e15e88816284cbc"
}-
-
enabled: true
id: "363ac390cfc94aa293e02547afa78256"
domain_id: "default"
name: "AREAS"
}-
-
displayName: "root"
roles: [0]
app_id: "aea8f4a70b87422cb48068db9f0c6aea"
email: "root"
id: "root"
}

現在,當我嘗試對此用戶沒有權限的地址: http:// localhost / parameters / search_tables /進行GET請求時,它仍然允許我訪問並重定向我。 這是來自pep代理的日志:

2015-11-13 14:55:53.446  - INFO: IDM-Client - Checking token with IDM...
2015-11-13 14:55:53.484  - INFO: AZF-Client - Checking auth with AZF...
2015-11-13 14:55:53.484  - INFO: AZF-Client - Checking authorization
to roles [ '09dc1bdba42c48de9e15e88816284cbc' ] to do  GET  
on  parameters/search_tables/ and app  aea8f4a70b87422cb48068db9f0c6aea
2015-11-13 14:55:53.508  - INFO: Root - Access-token OK. Redirecting to app...
Refused to set unsafe header "accept-encoding"
Refused to set unsafe header "cookie"

我關於授權的配置文件是:

config.azf = {
        enabled: true,
    host: '192.168.4.180',
    port: 8080,
    path: '/authzforce/domains/afb096b2-8951-11e5-980f-6bf3c4dac98a/pdp'
};
config.public_paths = [];

config.tokens_engine = 'oauth2';

我的巴氏政策是:

 <PolicySet PolicySetId="default" Version="1.0" 
PolicyCombiningAlgId="urn:oasis:names:tc:xacml:1.1:policy-combining-
algorithm:ordered-permit-overrides">
<Target />
 <Policy PolicyId="permit-all" Version="1.0" 
 RuleCombiningAlgId="urn:oasis:names:tc:xacml:1.1:rule-combining-
 algorithm:ordered-permit-overrides">
<Target />
<Rule RuleId="permit-all" Effect="Permit" />
 </Policy>
 </PolicySet>

我應該如何制定我的PAP策略以啟用授權級別2,以便僅使用http動詞和資源路徑進行授權?

默認情況下,當未添加任何策略時,Authzforce PAP會允許所有操作。 檢查您的PAP是否具有正確的信息:

GET
/domains/{domainId}/pap/policySet

編輯1:

為了能夠與Authzforce連接,您需要在IdM實例中配置一些Authzforce參數:

  • ACCESS_CONTROL_URL位於fiware-idm/horizon/openstack_dashboard/local/local_settings.py
  • ACCESS_CONTROL_MAGIC_KEY位於fiware-idm/horizon/openstack_dashboard/local/local_settings.py

然后,只需轉到IdM,並檢查權限和角色是否配置正確。 有時,您必須通過轉到應用程序->管理角色來“觸發” IdM中的策略生成,只需單擊“保存”即可觸發XACML生成。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM