Merge ~freyes/ubuntu/+source/keystone:upstream into ~ubuntu-openstack-dev/ubuntu/+source/keystone:upstream

Proposed by Felipe Reyes
Status: Merged
Merged at revision: 1fde32da7e51eae8f6a38e5825ad803a3b89a314
Proposed branch: ~freyes/ubuntu/+source/keystone:upstream
Merge into: ~ubuntu-openstack-dev/ubuntu/+source/keystone:upstream
Diff against target: 6994 lines (+1097/-1613)
98 files modified
.zuul.yaml (+13/-14)
AUTHORS (+0/-12)
ChangeLog (+7/-52)
PKG-INFO (+63/-67)
README.rst (+1/-1)
api-ref/source/v3/authenticate-v3.inc (+1/-1)
dev/null (+0/-6)
devstack/plugin.sh (+0/-7)
doc/source/admin/cli-manage-projects-users-and-roles.rst (+2/-2)
doc/source/admin/domain-specific-config.inc (+0/-6)
doc/source/admin/identity-concepts.rst (+9/-9)
doc/source/admin/service-api-protection.rst (+43/-138)
doc/source/admin/upgrading.rst (+1/-1)
doc/source/conf.py (+1/-5)
doc/source/configuration/policy.rst (+0/-9)
doc/source/contributor/how-can-i-help.rst (+1/-1)
doc/source/getting-started/community.rst (+3/-3)
doc/source/getting-started/policy_mapping.rst (+1/-1)
keystone.egg-info/PKG-INFO (+63/-67)
keystone.egg-info/SOURCES.txt (+2/-16)
keystone.egg-info/requires.txt (+3/-3)
keystone/api/s3tokens.py (+1/-4)
keystone/cmd/status.py (+0/-3)
keystone/common/policies/application_credential.py (+16/-17)
keystone/common/policies/consumer.py (+23/-24)
keystone/common/policies/credential.py (+15/-15)
keystone/common/policies/domain.py (+20/-20)
keystone/common/policies/domain_config.py (+17/-17)
keystone/common/policies/ec2_credential.py (+16/-17)
keystone/common/policies/endpoint.py (+19/-19)
keystone/common/policies/endpoint_group.py (+38/-37)
keystone/common/policies/grant.py (+43/-44)
keystone/common/policies/group.py (+40/-40)
keystone/common/policies/identity_provider.py (+21/-22)
keystone/common/policies/implied_role.py (+23/-23)
keystone/common/policies/mapping.py (+22/-23)
keystone/common/policies/policy.py (+19/-19)
keystone/common/policies/policy_association.py (+37/-38)
keystone/common/policies/project.py (+52/-52)
keystone/common/policies/project_endpoint.py (+23/-23)
keystone/common/policies/protocol.py (+24/-25)
keystone/common/policies/region.py (+15/-16)
keystone/common/policies/role.py (+43/-44)
keystone/common/policies/role_assignment.py (+11/-12)
keystone/common/policies/service.py (+23/-24)
keystone/common/policies/service_provider.py (+23/-24)
keystone/common/policies/token.py (+12/-12)
keystone/common/policies/trust.py (+24/-24)
keystone/common/policies/user.py (+20/-20)
keystone/common/rbac_enforcer/enforcer.py (+0/-8)
keystone/common/sql/core.py (+0/-10)
keystone/common/utils.py (+2/-2)
keystone/conf/__init__.py (+0/-7)
keystone/conf/memcache.py (+1/-25)
keystone/federation/idp.py (+2/-10)
keystone/identity/mapping_backends/sql.py (+1/-1)
keystone/identity/shadow_backends/sql.py (+1/-2)
keystone/locale/en_GB/LC_MESSAGES/keystone.po (+2/-14)
keystone/models/revoke_model.py (+1/-1)
keystone/tests/unit/assignment/test_backends.py (+3/-3)
keystone/tests/unit/catalog/test_backends.py (+18/-24)
keystone/tests/unit/common/test_notifications.py (+1/-1)
keystone/tests/unit/config_files/backend_ldap_sql.conf (+1/-1)
keystone/tests/unit/config_files/backend_multi_ldap_sql.conf (+1/-1)
keystone/tests/unit/config_files/backend_sql.conf (+1/-1)
keystone/tests/unit/config_files/deprecated.conf (+8/-0)
keystone/tests/unit/config_files/deprecated_override.conf (+15/-0)
keystone/tests/unit/contrib/federation/test_utils.py (+3/-3)
keystone/tests/unit/core.py (+11/-4)
keystone/tests/unit/endpoint_policy/backends/test_base.py (+1/-1)
keystone/tests/unit/identity/shadow_users/test_backend.py (+2/-2)
keystone/tests/unit/identity/test_backends.py (+16/-20)
keystone/tests/unit/ksfixtures/__init__.py (+0/-1)
keystone/tests/unit/policy/backends/test_base.py (+1/-1)
keystone/tests/unit/resource/test_backends.py (+19/-26)
keystone/tests/unit/test_associate_project_endpoint_extension.py (+4/-4)
keystone/tests/unit/test_backend_id_mapping_sql.py (+4/-24)
keystone/tests/unit/test_backend_ldap.py (+23/-29)
keystone/tests/unit/test_backend_sql.py (+2/-2)
keystone/tests/unit/test_backend_templated.py (+2/-2)
keystone/tests/unit/test_config.py (+35/-1)
keystone/tests/unit/test_contrib_s3_core.py (+0/-82)
keystone/tests/unit/test_hacking_checks.py (+1/-1)
keystone/tests/unit/test_policy.py (+4/-6)
keystone/tests/unit/test_sql_banned_operations.py (+1/-6)
keystone/tests/unit/test_sql_upgrade.py (+2/-21)
keystone/tests/unit/test_v3.py (+2/-2)
keystone/tests/unit/test_v3_assignment.py (+1/-1)
keystone/tests/unit/test_v3_federation.py (+6/-6)
keystone/trust/backends/base.py (+1/-1)
keystone/trust/backends/sql.py (+1/-5)
keystone/trust/core.py (+9/-9)
lower-constraints.txt (+3/-4)
releasenotes/source/index.rst (+0/-3)
releasenotes/source/locale/en_GB/LC_MESSAGES/releasenotes.po (+3/-124)
requirements.txt (+3/-3)
setup.cfg (+4/-4)
tox.ini (+21/-25)
Reviewer Review Type Date Requested Status
Corey Bryant Pending
Review via email: mp+416277@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/.zuul.yaml b/.zuul.yaml
index fc3eebb..daadbc7 100644
--- a/.zuul.yaml
+++ b/.zuul.yaml
@@ -33,14 +33,6 @@
33 USE_PYTHON3: True33 USE_PYTHON3: True
3434
35- job:35- job:
36 name: keystone-dsvm-py3-functional-fips
37 parent: keystone-dsvm-py3-functional
38 nodeset: devstack-single-node-centos-8-stream
39 description: |
40 Functional testing for a FIPS enabled Centos 8 system
41 pre-run: playbooks/enable-fips.yaml
42
43- job:
44 name: keystone-dsvm-functional-federation-opensuse1536 name: keystone-dsvm-functional-federation-opensuse15
45 parent: keystone-dsvm-functional37 parent: keystone-dsvm-functional
46 nodeset: devstack-single-node-opensuse-1538 nodeset: devstack-single-node-opensuse-15
@@ -110,6 +102,15 @@
110 osa_test_repo: openstack/openstack-ansible-os_keystone102 osa_test_repo: openstack/openstack-ansible-os_keystone
111103
112- job:104- job:
105 name: keystone-tox-protection
106 parent: openstack-tox-py37
107 timeout: 3600
108 vars:
109 tox_envlist: protection
110 bindep_profile: test py37
111 python_version: 3.7
112
113- job:
113 name: keystone-dsvm-ldap-domain-specific-driver114 name: keystone-dsvm-ldap-domain-specific-driver
114 parent: devstack-tempest115 parent: devstack-tempest
115 vars:116 vars:
@@ -209,7 +210,6 @@
209 - check-requirements210 - check-requirements
210 - integrated-gate-py3211 - integrated-gate-py3
211 - release-notes-jobs-python3212 - release-notes-jobs-python3
212 - openstack-python3-wallaby-jobs-arm64
213 check:213 check:
214 jobs:214 jobs:
215 - keystone-dsvm-py3-functional:215 - keystone-dsvm-py3-functional:
@@ -220,9 +220,6 @@
220 - ^etc/.*$220 - ^etc/.*$
221 - ^keystone/tests/unit/.*$221 - ^keystone/tests/unit/.*$
222 - ^releasenotes/.*$222 - ^releasenotes/.*$
223 - keystone-dsvm-py3-functional-fips:
224 voting: false
225 irrelevant-files: *irrelevant-files
226 - keystone-dsvm-py3-functional-federation-ubuntu-focal:223 - keystone-dsvm-py3-functional-federation-ubuntu-focal:
227 voting: false224 voting: false
228 irrelevant-files: *irrelevant-files225 irrelevant-files: *irrelevant-files
@@ -248,7 +245,7 @@
248 irrelevant-files: *tempest-irrelevant-files245 irrelevant-files: *tempest-irrelevant-files
249 - tempest-ipv6-only:246 - tempest-ipv6-only:
250 irrelevant-files: *tempest-irrelevant-files247 irrelevant-files: *tempest-irrelevant-files
251 - keystone-protection-functional248 - keystone-tox-protection
252 gate:249 gate:
253 jobs:250 jobs:
254 - keystone-dsvm-py3-functional:251 - keystone-dsvm-py3-functional:
@@ -261,7 +258,7 @@
261 irrelevant-files: *tempest-irrelevant-files258 irrelevant-files: *tempest-irrelevant-files
262 - tempest-ipv6-only:259 - tempest-ipv6-only:
263 irrelevant-files: *tempest-irrelevant-files260 irrelevant-files: *tempest-irrelevant-files
264 - keystone-protection-functional261 - keystone-tox-protection
265 experimental:262 experimental:
266 jobs:263 jobs:
267 - keystone-tox-patch_cover264 - keystone-tox-patch_cover
@@ -271,6 +268,8 @@
271 irrelevant-files: *irrelevant-files268 irrelevant-files: *irrelevant-files
272 - tempest-pg-full:269 - tempest-pg-full:
273 irrelevant-files: *tempest-irrelevant-files270 irrelevant-files: *tempest-irrelevant-files
271 - tempest-full-py3-opensuse15:
272 irrelevant-files: *tempest-irrelevant-files
274 - keystone-dsvm-functional-federation-centos7:273 - keystone-dsvm-functional-federation-centos7:
275 irrelevant-files: *irrelevant-files274 irrelevant-files: *irrelevant-files
276 - keystone-dsvm-functional-federation-ubuntu-xenial:275 - keystone-dsvm-functional-federation-ubuntu-xenial:
diff --git a/AUTHORS b/AUTHORS
index e0e5154..558a789 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -1,7 +1,6 @@
1Adam Gandelman <adam.gandelman@canonical.com>1Adam Gandelman <adam.gandelman@canonical.com>
2Adam Young <ayoung@f17httpd.ayoung530>2Adam Young <ayoung@f17httpd.ayoung530>
3Adam Young <ayoung@redhat.com>3Adam Young <ayoung@redhat.com>
4Ade Lee <alee@redhat.com>
5Adipudi Praveena <padipudi@padipudi.(none)>4Adipudi Praveena <padipudi@padipudi.(none)>
6Adrian Turjak <adriant@catalyst.net.nz>5Adrian Turjak <adriant@catalyst.net.nz>
7Ajaya Agrawal <ajku.agr@gmail.com>6Ajaya Agrawal <ajku.agr@gmail.com>
@@ -177,7 +176,6 @@ Ghe Rivero <ghe@debian.org>
177Gordon Chung <chungg@ca.ibm.com>176Gordon Chung <chungg@ca.ibm.com>
178Graham Hayes <graham.hayes@hpe.com>177Graham Hayes <graham.hayes@hpe.com>
179Grzegorz Grasza <grzegorz.grasza@intel.com>178Grzegorz Grasza <grzegorz.grasza@intel.com>
180Grzegorz Grasza <xek@redhat.com>
181Guang Yee <guang.yee@hpe.com>179Guang Yee <guang.yee@hpe.com>
182Guang Yee <guang.yee@suse.com>180Guang Yee <guang.yee@suse.com>
183Guo Shan <guoshan@awcloud.com>181Guo Shan <guoshan@awcloud.com>
@@ -199,7 +197,6 @@ Hervé Beraud <hberaud@redhat.com>
199Hidekazu Nakamura <hid-nakamura@vf.jp.nec.com>197Hidekazu Nakamura <hid-nakamura@vf.jp.nec.com>
200Hieu LE <hieulq@vn.fujitsu.com>198Hieu LE <hieulq@vn.fujitsu.com>
201Hirofumi Ichihara <ichihara.hirofumi@lab.ntt.co.jp>199Hirofumi Ichihara <ichihara.hirofumi@lab.ntt.co.jp>
202Hironori Shiina <shiina.hironori@jp.fujitsu.com>
203Hongbin Lu <hongbin034@gmail.com>200Hongbin Lu <hongbin034@gmail.com>
204Hugh Saunders <hugh@wherenow.org>201Hugh Saunders <hugh@wherenow.org>
205Hugo Nicodemos <hugonicodemos@gmail.com>202Hugo Nicodemos <hugonicodemos@gmail.com>
@@ -348,7 +345,6 @@ Matthew Thode <mthode@mthode.org>
348Matthew Treinish <mtreinish@kortar.org>345Matthew Treinish <mtreinish@kortar.org>
349Matthew Treinish <treinish@linux.vnet.ibm.com>346Matthew Treinish <treinish@linux.vnet.ibm.com>
350Matthieu Huin <mhu@enovance.com>347Matthieu Huin <mhu@enovance.com>
351Maurice Escher <maurice.escher@sap.com>
352Michael Basnight <mbasnight@gmail.com>348Michael Basnight <mbasnight@gmail.com>
353Michael J Fork <mjfork@us.ibm.com>349Michael J Fork <mjfork@us.ibm.com>
354Michael Krotscheck <krotscheck@gmail.com>350Michael Krotscheck <krotscheck@gmail.com>
@@ -422,7 +418,6 @@ Robert Collins <rbtcollins@hp.com>
422Robert Collins <robertc@robertcollins.net>418Robert Collins <robertc@robertcollins.net>
423Robert H. Hyerle <hyerle@hp.com>419Robert H. Hyerle <hyerle@hp.com>
424Robin Norwood <robin.norwood@gmail.com>420Robin Norwood <robin.norwood@gmail.com>
425Rodolfo Alonso Hernandez <ralonsoh@redhat.com>
426Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>421Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
427Rodrigo Duarte <rduartes@redhat.com>422Rodrigo Duarte <rduartes@redhat.com>
428Rodrigo Duarte Sousa <rduartes@redhat.com>423Rodrigo Duarte Sousa <rduartes@redhat.com>
@@ -484,12 +479,10 @@ Sreyansh Jain <taishiroy2904@gmail.com>
484Stanisław Pitucha <stanislaw.pitucha@hp.com>479Stanisław Pitucha <stanislaw.pitucha@hp.com>
485Stef T <stelford@internap.com>480Stef T <stelford@internap.com>
486Stephen Finucane <sfinucan@redhat.com>481Stephen Finucane <sfinucan@redhat.com>
487Stephen Finucane <stephenfin@redhat.com>
488Steve Baker <sbaker@redhat.com>482Steve Baker <sbaker@redhat.com>
489Steve Martinelli <s.martinelli@gmail.com>483Steve Martinelli <s.martinelli@gmail.com>
490Steve Martinelli <stevemar@ca.ibm.com>484Steve Martinelli <stevemar@ca.ibm.com>
491Steven Hardy <shardy@redhat.com>485Steven Hardy <shardy@redhat.com>
492Stuart Grace <stuart.grace@bbc.co.uk>
493Stuart McLaren <stuart.mclaren@hp.com>486Stuart McLaren <stuart.mclaren@hp.com>
494Suramya Shah <shah.suramya@gmail.com>487Suramya Shah <shah.suramya@gmail.com>
495Sushil Kumar <sushil.kumar2@globallogic.com>488Sushil Kumar <sushil.kumar2@globallogic.com>
@@ -499,7 +492,6 @@ Sylvain Afchain <sylvain.afchain@enovance.com>
499THOMAS J. COCOZZELLO <tjcocozz@us.ibm.com>492THOMAS J. COCOZZELLO <tjcocozz@us.ibm.com>
500Tahmina Ahmed <tahmina.csebuet@gmail.com>493Tahmina Ahmed <tahmina.csebuet@gmail.com>
501Taishi Roy <taishiroy2904@gmail.com>494Taishi Roy <taishiroy2904@gmail.com>
502Takashi Kajinami <tkajinam@redhat.com>
503Takashi NATSUME <natsume.takashi@lab.ntt.co.jp>495Takashi NATSUME <natsume.takashi@lab.ntt.co.jp>
504Telles Nobrega <tellesmvn@lsd.ufcg.edu.br>496Telles Nobrega <tellesmvn@lsd.ufcg.edu.br>
505Theodore Ilie <theodorex.ilie@intel.com>497Theodore Ilie <theodorex.ilie@intel.com>
@@ -564,7 +556,6 @@ Yong Sheng Gong <gongysh@cn.ibm.com>
564Yong Sheng Gong <gongysh@unitedstack.com>556Yong Sheng Gong <gongysh@unitedstack.com>
565You Ji <jiyou09@gmail.com>557You Ji <jiyou09@gmail.com>
566You Yamagata <bi.yamagata@gmail.com>558You Yamagata <bi.yamagata@gmail.com>
567YuehuiLei <leiyuehui-s@inspur.com>
568Yuiko Takada <takada-yuiko@mxn.nes.nec.co.jp>559Yuiko Takada <takada-yuiko@mxn.nes.nec.co.jp>
569Yun Mao <yunmao@gmail.com>560Yun Mao <yunmao@gmail.com>
570Yuriy Taraday <yorik.sar@gmail.com>561Yuriy Taraday <yorik.sar@gmail.com>
@@ -672,7 +663,6 @@ prashkre <prashkre@in.ibm.com>
672qinglin.cheng <qinglin.cheng@easystack.cn>663qinglin.cheng <qinglin.cheng@easystack.cn>
673r-sekine <r-sekine@intellilink.co.jp>664r-sekine <r-sekine@intellilink.co.jp>
674rajat29 <rajat.sharma@nectechnologies.in>665rajat29 <rajat.sharma@nectechnologies.in>
675ricolin <rico.lin.guanyu@gmail.com>
676rocky <haigang.xu@easystack.cn>666rocky <haigang.xu@easystack.cn>
677root <root@newapps.(none)>667root <root@newapps.(none)>
678rpedde <ron@pedde.com>668rpedde <ron@pedde.com>
@@ -699,7 +689,6 @@ wanghui <wang_hui@inspur.com>
699wanglong <wl3617@qq.com>689wanglong <wl3617@qq.com>
700wangqiangbj <wangqiangbj@inspur.com>690wangqiangbj <wangqiangbj@inspur.com>
701wangxiyuan <wangxiyuan@huawei.com>691wangxiyuan <wangxiyuan@huawei.com>
702wangzihao <wangzihao@yovole.com>
703werner mendizabal <nonameentername@gmail.com>692werner mendizabal <nonameentername@gmail.com>
704whoami-rajat <rajatdhasmana@gmail.com>693whoami-rajat <rajatdhasmana@gmail.com>
705wingwj <wingwj@gmail.com>694wingwj <wingwj@gmail.com>
@@ -710,7 +699,6 @@ xingzhou <xingzhou@cn.ibm.com>
710xuhaigang <haigang.xu@easystack.cn>699xuhaigang <haigang.xu@easystack.cn>
711xurong00037997 <xu.rong@zte.com.cn>700xurong00037997 <xu.rong@zte.com.cn>
712yanghuichan <yanghc@fiberhome.com>701yanghuichan <yanghc@fiberhome.com>
713yangshaoxue <yang.shaoxue@99cloud.net>
714yangweiwei <yangweiwei@cmss.chinamobile.com>702yangweiwei <yangweiwei@cmss.chinamobile.com>
715yangyapeng <yang.yapeng@99cloud.net>703yangyapeng <yang.yapeng@99cloud.net>
716yaroslavmt <yaroslavmt@gmail.com>704yaroslavmt <yaroslavmt@gmail.com>
diff --git a/ChangeLog b/ChangeLog
index d5d2a11..2f980e8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,64 +1,21 @@
1CHANGES1CHANGES
2=======2=======
33
4* Add 'WarningsFixture'418.1.0
5* Add support for pysaml2 >= 7.1.0
6* tox: Random fixups
7* Deprecate ineffective [memcache] options
8* Fix response code of 'Revoke Token' in api-ref
9* Accept STS and IAM services from Ceph Obj Gateway
10* Fix oslo policy warning assert in unit tests
11* Temporary exclude the common.sql.core.py from sphinx-apidoc target
12* Remove broken tempest-full-py3-opensuse15 job
13* Fix typos in application credential policies
14* Fix typo in identity provider policies
15* Update master for stable/xena
16* Improve performance on trust deletion
17* Replace deprecated assertDictContainsSubset
18
1920.0.0
20------5------
216
7* Fix typos in application credential policies
22* Fix typos in ec2 credential policies8* Fix typos in ec2 credential policies
23* Fix oslo policy DeprecatedRule warnings9* Fix typo in identity provider policies
24* Update local\_id limit to 255 characters
25* Add FIPS check job
26* Replace deprecated import of ABCs from collections
27* Moving IRC network reference to OFTC
28* Update master for stable/wallaby
29* Remove use of deprecated oslo.db options
30* docs: Fix failing build
31* Make DB queries compatible with SQLAlchemy 1.4.x
32* fix get\_security\_compliance\_domain\_config policy rule typo
33* setup.cfg: Replace dashes with underscores
34* Hide AccountLocked exception from end users10* Hide AccountLocked exception from end users
35* Retry update\_user when sqlalchemy raises StaleDataErrors11* Retry update\_user when sqlalchemy raises StaleDataErrors
36* Imported Translations from Zanata
37
3819.0.0.0rc1
39-----------
40
41* Add job for keystone functional protection tests
42* trivial: Update minor wording nit in RBAC persona documentation
43* Clarify top-level personas in RBAC documentation
44* Clarify \`\`reader\`\` role implementation in persona admin guide
45* [goal] Deprecate the JSON formatted policy file
46* Ignore oslo.db deprecating sqlalchemy-migrate warning
47* Add openstack-python3-wallaby-jobs-arm64 job
48* Support bytes type in generate\_public\_ID()12* Support bytes type in generate\_public\_ID()
49* Imported Translations from Zanata
50* Drop lower-constraints job
51* fix E741 ambiguous variable name
52* fix E225 missing whitespace around operator
53* Use app cred user ID in policy enforcement13* Use app cred user ID in policy enforcement
54* Generalize release note for bug 187893814* Update TOX\_CONSTRAINTS\_FILE for stable/victoria
55* Use enforce\_new\_defaults when setting up keystone protection tests15* Drop lower-constraints job
16* Delete system role assignments from system\_assignment table
56* Implement more robust connection handling for asynchronous LDAP calls17* Implement more robust connection handling for asynchronous LDAP calls
57* Imported Translations from Zanata18* Update .gitreview for stable/victoria
58* Update master for stable/victoria
59* Add vine to lower-constraints
60* Simplify default config test
61* Replace assertItemsEqual with assertCountEqual
6219
6318.0.02018.0.0
64------21------
@@ -75,9 +32,7 @@ CHANGES
75* Spelling Fix32* Spelling Fix
76* NIT: Spelling Fix33* NIT: Spelling Fix
77* Properly handle octet (byte) strings when converting LDAP responses34* Properly handle octet (byte) strings when converting LDAP responses
78* Add support for functional RBAC tests
79* Fix invalid assertTrue which should be assertEqual35* Fix invalid assertTrue which should be assertEqual
80* Delete system role assignments from system\_assignment table
81* Fix api-ref for list endpoints36* Fix api-ref for list endpoints
82* Fix lower-constraint for PyMySQL37* Fix lower-constraint for PyMySQL
83* Fix doc for package mod\_wsgi on Centos8/RHEL838* Fix doc for package mod\_wsgi on Centos8/RHEL8
diff --git a/PKG-INFO b/PKG-INFO
index 3b63a18..c4bc751 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,11 +1,73 @@
1Metadata-Version: 2.11Metadata-Version: 2.1
2Name: keystone2Name: keystone
3Version: 20.1.0.dev273Version: 18.1.0
4Summary: OpenStack Identity4Summary: OpenStack Identity
5Home-page: https://docs.openstack.org/keystone/latest5Home-page: https://docs.openstack.org/keystone/latest
6Author: OpenStack6Author: OpenStack
7Author-email: openstack-discuss@lists.openstack.org7Author-email: openstack-discuss@lists.openstack.org
8License: UNKNOWN8License: UNKNOWN
9Description: ==================
10 OpenStack Keystone
11 ==================
12
13 .. image:: https://governance.openstack.org/tc/badges/keystone.svg
14 :target: https://governance.openstack.org/tc/reference/tags/index.html
15
16 .. Change things from this point on
17
18 OpenStack Keystone provides authentication, authorization and service discovery
19 mechanisms via HTTP primarily for use by projects in the OpenStack family. It
20 is most commonly deployed as an HTTP interface to existing identity systems,
21 such as LDAP.
22
23 Developer documentation, the source of which is in ``doc/source/``, is
24 published at:
25
26 https://docs.openstack.org/keystone/latest
27
28 The API reference and documentation are available at:
29
30 https://docs.openstack.org/api-ref/identity
31
32 The canonical client library is available at:
33
34 https://opendev.org/openstack/python-keystoneclient
35
36 Documentation for cloud administrators is available at:
37
38 https://docs.openstack.org/
39
40 The source of documentation for cloud administrators is available at:
41
42 https://opendev.org/openstack/openstack-manuals
43
44 Information about our team meeting is available at:
45
46 https://wiki.openstack.org/wiki/Meetings/KeystoneMeeting
47
48 Release notes is available at:
49
50 https://docs.openstack.org/releasenotes/keystone
51
52 Bugs and feature requests are tracked on Launchpad at:
53
54 https://bugs.launchpad.net/keystone
55
56 Future design work is tracked at:
57
58 https://specs.openstack.org/openstack/keystone-specs
59
60 Contributors are encouraged to join IRC (``#openstack-keystone`` on freenode):
61
62 https://wiki.openstack.org/wiki/IRC
63
64 Source for the project:
65
66 https://opendev.org/openstack/keystone
67
68 For information on contributing to Keystone, see ``CONTRIBUTING.rst``.
69
70
9Platform: UNKNOWN71Platform: UNKNOWN
10Classifier: Environment :: OpenStack72Classifier: Environment :: OpenStack
11Classifier: Intended Audience :: Information Technology73Classifier: Intended Audience :: Information Technology
@@ -24,69 +86,3 @@ Provides-Extra: ldap
24Provides-Extra: memcache86Provides-Extra: memcache
25Provides-Extra: mongodb87Provides-Extra: mongodb
26Provides-Extra: test88Provides-Extra: test
27License-File: LICENSE
28License-File: AUTHORS
29
30==================
31OpenStack Keystone
32==================
33
34.. image:: https://governance.openstack.org/tc/badges/keystone.svg
35 :target: https://governance.openstack.org/tc/reference/tags/index.html
36
37.. Change things from this point on
38
39OpenStack Keystone provides authentication, authorization and service discovery
40mechanisms via HTTP primarily for use by projects in the OpenStack family. It
41is most commonly deployed as an HTTP interface to existing identity systems,
42such as LDAP.
43
44Developer documentation, the source of which is in ``doc/source/``, is
45published at:
46
47 https://docs.openstack.org/keystone/latest
48
49The API reference and documentation are available at:
50
51 https://docs.openstack.org/api-ref/identity
52
53The canonical client library is available at:
54
55 https://opendev.org/openstack/python-keystoneclient
56
57Documentation for cloud administrators is available at:
58
59 https://docs.openstack.org/
60
61The source of documentation for cloud administrators is available at:
62
63 https://opendev.org/openstack/openstack-manuals
64
65Information about our team meeting is available at:
66
67 https://wiki.openstack.org/wiki/Meetings/KeystoneMeeting
68
69Release notes is available at:
70
71 https://docs.openstack.org/releasenotes/keystone
72
73Bugs and feature requests are tracked on Launchpad at:
74
75 https://bugs.launchpad.net/keystone
76
77Future design work is tracked at:
78
79 https://specs.openstack.org/openstack/keystone-specs
80
81Contributors are encouraged to join IRC (``#openstack-keystone`` on OFTC):
82
83 https://wiki.openstack.org/wiki/IRC
84
85Source for the project:
86
87 https://opendev.org/openstack/keystone
88
89For information on contributing to Keystone, see ``CONTRIBUTING.rst``.
90
91
92
diff --git a/README.rst b/README.rst
index 520a71e..2a19ff5 100644
--- a/README.rst
+++ b/README.rst
@@ -49,7 +49,7 @@ Future design work is tracked at:
4949
50 https://specs.openstack.org/openstack/keystone-specs50 https://specs.openstack.org/openstack/keystone-specs
5151
52Contributors are encouraged to join IRC (``#openstack-keystone`` on OFTC):52Contributors are encouraged to join IRC (``#openstack-keystone`` on freenode):
5353
54 https://wiki.openstack.org/wiki/IRC54 https://wiki.openstack.org/wiki/IRC
5555
diff --git a/api-ref/source/v3/authenticate-v3.inc b/api-ref/source/v3/authenticate-v3.inc
index d69972a..11f19cb 100644
--- a/api-ref/source/v3/authenticate-v3.inc
+++ b/api-ref/source/v3/authenticate-v3.inc
@@ -965,7 +965,7 @@ Status Codes
965965
966.. rest_status_code:: success status.yaml966.. rest_status_code:: success status.yaml
967967
968 - 204968 - 201
969969
970.. rest_status_code:: error status.yaml970.. rest_status_code:: error status.yaml
971971
diff --git a/devstack/lib/scope.sh b/devstack/lib/scope.sh
972deleted file mode 100644972deleted file mode 100644
index 255ed69..0000000
--- a/devstack/lib/scope.sh
+++ /dev/null
@@ -1,26 +0,0 @@
1# Copyright 2019 SUSE LLC
2#
3# Licensed under the Apache License, Version 2.0 (the "License"); you may
4# not use this file except in compliance with the License. You may obtain
5# a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12# License for the specific language governing permissions and limitations
13# under the License.
14
15function configure_enforce_scope {
16 iniset $KEYSTONE_CONF oslo_policy enforce_scope true
17 iniset $KEYSTONE_CONF oslo_policy enforce_new_defaults true
18 iniset $KEYSTONE_CONF oslo_policy policy_file policy.yaml
19 sudo systemctl restart devstack@keystone
20}
21
22function configure_protection_tests {
23 iniset $TEMPEST_CONFIG identity-feature-enabled enforce_scope true
24 iniset $TEMPEST_CONFIG auth admin_system true
25 iniset $TEMPEST_CONFIG auth admin_project_name ''
26}
diff --git a/devstack/plugin.sh b/devstack/plugin.sh
index 8f7a385..924b820 100644
--- a/devstack/plugin.sh
+++ b/devstack/plugin.sh
@@ -15,7 +15,6 @@
1515
16KEYSTONE_PLUGIN=$DEST/keystone/devstack16KEYSTONE_PLUGIN=$DEST/keystone/devstack
17source $KEYSTONE_PLUGIN/lib/federation.sh17source $KEYSTONE_PLUGIN/lib/federation.sh
18source $KEYSTONE_PLUGIN/lib/scope.sh
1918
20# For more information on Devstack plugins, including a more detailed19# For more information on Devstack plugins, including a more detailed
21# explanation on when the different steps are executed please see:20# explanation on when the different steps are executed please see:
@@ -48,12 +47,6 @@ elif [[ "$1" == "stack" && "$2" == "test-config" ]]; then
48 if is_service_enabled keystone-saml2-federation; then47 if is_service_enabled keystone-saml2-federation; then
49 configure_tests_settings48 configure_tests_settings
50 fi49 fi
51 if [[ "$(trueorfalse False KEYSTONE_ENFORCE_SCOPE)" == "True" ]] ; then
52 # devstack and tempest assume enforce_scope is false, so need to wait
53 # until the final phase to turn it on
54 configure_enforce_scope
55 configure_protection_tests
56 fi
57fi50fi
5851
59if [[ "$1" == "unstack" ]]; then52if [[ "$1" == "unstack" ]]; then
diff --git a/doc/source/admin/cli-manage-projects-users-and-roles.rst b/doc/source/admin/cli-manage-projects-users-and-roles.rst
index 8d2f837..f27979d 100644
--- a/doc/source/admin/cli-manage-projects-users-and-roles.rst
+++ b/doc/source/admin/cli-manage-projects-users-and-roles.rst
@@ -10,8 +10,8 @@ define which actions users can perform. You assign roles to
10user-project pairs.10user-project pairs.
1111
12You can define actions for OpenStack service roles in the12You can define actions for OpenStack service roles in the
13``/etc/PROJECT/policy.yaml`` files. For example, define actions for13``/etc/PROJECT/policy.json`` files. For example, define actions for
14Compute service roles in the ``/etc/nova/policy.yaml`` file.14Compute service roles in the ``/etc/nova/policy.json`` file.
1515
16You can manage projects, users, and roles independently from each other.16You can manage projects, users, and roles independently from each other.
1717
diff --git a/doc/source/admin/domain-specific-config.inc b/doc/source/admin/domain-specific-config.inc
index 2d8f993..3797e30 100644
--- a/doc/source/admin/domain-specific-config.inc
+++ b/doc/source/admin/domain-specific-config.inc
@@ -146,12 +146,6 @@ then the same public ID will be created. This is useful if you are running
146multiple keystones and want to ensure the same ID would be generated whichever146multiple keystones and want to ensure the same ID would be generated whichever
147server you hit.147server you hit.
148148
149.. NOTE::
150
151 In case of the LDAP backend, the names of users and groups are not hashed.
152 As a result, these are length limited to 255 characters. Longer names
153 will result in an error.
154
155While keystone will dynamically maintain the identity mapping, including149While keystone will dynamically maintain the identity mapping, including
156removing entries when entities are deleted via the keystone, for those entities150removing entries when entities are deleted via the keystone, for those entities
157in backends that are managed outside of keystone (e.g. a read-only LDAP),151in backends that are managed outside of keystone (e.g. a read-only LDAP),
diff --git a/doc/source/admin/identity-concepts.rst b/doc/source/admin/identity-concepts.rst
index 0f8cfc5..3d615c0 100644
--- a/doc/source/admin/identity-concepts.rst
+++ b/doc/source/admin/identity-concepts.rst
@@ -122,9 +122,9 @@ Identity user management examples:
122 Individual services assign meaning to roles, typically through122 Individual services assign meaning to roles, typically through
123 limiting or granting access to users with the role to the123 limiting or granting access to users with the role to the
124 operations that the service supports. Role access is typically124 operations that the service supports. Role access is typically
125 configured in the service's ``policy.yaml`` file. For example,125 configured in the service's ``policy.json`` file. For example,
126 to limit Compute access to the ``compute-user`` role, edit the126 to limit Compute access to the ``compute-user`` role, edit the
127 Compute service's ``policy.yaml`` file to require this role for127 Compute service's ``policy.json`` file to require this role for
128 Compute operations.128 Compute operations.
129129
130The Identity service assigns a project and a role to a user. You might130The Identity service assigns a project and a role to a user. You might
@@ -139,25 +139,25 @@ A user can have different roles in different projects. For example, Alice
139might also have the ``admin`` role in the ``Cyberdyne`` project. A user139might also have the ``admin`` role in the ``Cyberdyne`` project. A user
140can also have multiple roles in the same project.140can also have multiple roles in the same project.
141141
142The ``/etc/[SERVICE_CODENAME]/policy.yaml`` file controls the142The ``/etc/[SERVICE_CODENAME]/policy.json`` file controls the
143tasks that users can perform for a given service. For example, the143tasks that users can perform for a given service. For example, the
144``/etc/nova/policy.yaml`` file specifies the access policy for the144``/etc/nova/policy.json`` file specifies the access policy for the
145Compute service, the ``/etc/glance/policy.yaml`` file specifies145Compute service, the ``/etc/glance/policy.json`` file specifies
146the access policy for the Image service, and the146the access policy for the Image service, and the
147``/etc/keystone/policy.yaml`` file specifies the access policy for147``/etc/keystone/policy.json`` file specifies the access policy for
148the Identity service.148the Identity service.
149149
150The default ``policy.yaml`` files in the Compute, Identity, and150The default ``policy.json`` files in the Compute, Identity, and
151Image services recognize only the ``admin`` role. Any user with151Image services recognize only the ``admin`` role. Any user with
152any role in a project can access all operations that do not require the152any role in a project can access all operations that do not require the
153``admin`` role.153``admin`` role.
154154
155To restrict users from performing operations in, for example, the155To restrict users from performing operations in, for example, the
156Compute service, you must create a role in the Identity service and156Compute service, you must create a role in the Identity service and
157then modify the ``/etc/nova/policy.yaml`` file so that this role157then modify the ``/etc/nova/policy.json`` file so that this role
158is required for Compute operations.158is required for Compute operations.
159159
160For example, the following line in the ``/etc/cinder/policy.yaml``160For example, the following line in the ``/etc/cinder/policy.json``
161file does not restrict which users can create volumes:161file does not restrict which users can create volumes:
162162
163.. code-block:: none163.. code-block:: none
diff --git a/doc/source/admin/service-api-protection.rst b/doc/source/admin/service-api-protection.rst
index 47886ae..80b8af1 100644
--- a/doc/source/admin/service-api-protection.rst
+++ b/doc/source/admin/service-api-protection.rst
@@ -10,16 +10,14 @@ Like most OpenStack services, keystone protects its API using role-based access
10control (RBAC).10control (RBAC).
1111
12Users can access different APIs depending on the roles they have on a project,12Users can access different APIs depending on the roles they have on a project,
13domain, or system, which we refer to as scope.13domain, or system.
1414
15As of the Rocky release, keystone provides three roles called ``admin``,15As of the Rocky release, keystone provides three roles called ``admin``,
16``member``, and ``reader`` by default. Operators can grant these roles to any16``member``, and ``reader`` by default. Operators can grant these roles to any
17actor (e.g., group or user) on any scope (e.g., system, domain, or project).17actor (e.g., group or user) on any target (e.g., system, domain, or project).
18If you need a refresher on authorization scopes and token types, please refer18If you need a refresher on authorization scopes and token types, please refer
19to the `token guide`_. The following sections describe how each default role19to the `token guide`_. The following sections describe how each default role
20behaves with keystone's API across different scopes. Additionally, other20behaves with keystone's API across different scopes.
21service developers can use this document as a guide for implementing similar
22patterns in their services.
2321
24Default roles and behaviors across scopes allow operators to delegate more22Default roles and behaviors across scopes allow operators to delegate more
25functionality to their team, auditors, customers, and users without maintaining23functionality to their team, auditors, customers, and users without maintaining
@@ -31,10 +29,9 @@ custom policies.
31Roles Definitions29Roles Definitions
32-----------------30-----------------
3331
34The default roles provided by keystone, via ``keystone-manage boostrap``, are32The default roles imply one another. The ``admin`` role implies the ``member``
35related through role implications. The ``admin`` role implies the ``member``33role, and the ``member`` role implies the ``reader`` role. This implication
36role, and the ``member`` role implies the ``reader`` role. These implications34means users with the ``admin`` role automatically have the ``member`` and
37mean users with the ``admin`` role automatically have the ``member`` and
38``reader`` roles. Additionally, users with the ``member`` role automatically35``reader`` roles. Additionally, users with the ``member`` role automatically
39have the ``reader`` role. Implying roles reduces role assignments and forms a36have the ``reader`` role. Implying roles reduces role assignments and forms a
40natural hierarchy between the default roles. It also reduces the complexity of37natural hierarchy between the default roles. It also reduces the complexity of
@@ -54,26 +51,6 @@ Instead of:
54Reader51Reader
55======52======
5653
57.. warning::
58
59 While it's possible to use the ``reader`` role to perform audits, we highly
60 recommend assessing the viability of using ``reader`` for auditing from the
61 perspective of the compliance target you're pursuing.
62
63 The ``reader`` role is the least-privileged role within the role hierarchy
64 described here. As such, OpenStack development teams, by default, do not
65 advocate exposing sensitive information to users with the ``reader`` role,
66 regardless of the scope. We have noted the need for a formal, read-only,
67 role that is useful for inspecting all applicable resources within a
68 particular scope, but it shouldn't be implemented as the lowest level of
69 authorization. This work will come in a subsequent release where we support
70 an elevated read-only role, that implies ``reader``, but also exposes
71 sensitive information, where applicable.
72
73 This will allow operators to grant third-party auditors a permissive role
74 for viewing sensitive information, specifically for compliance targets that
75 require it.
76
77The ``reader`` role provides read-only access to resources within the system, a54The ``reader`` role provides read-only access to resources within the system, a
78domain, or a project. Depending on the assignment scope, two users with the55domain, or a project. Depending on the assignment scope, two users with the
79``reader`` role can expect different API behaviors. For example, a user with56``reader`` role can expect different API behaviors. For example, a user with
@@ -87,20 +64,6 @@ roles. For example, to accomplish this without analyzing assignment scope, you
87would need ``system-reader``, ``domain-reader``, and ``project-reader`` roles64would need ``system-reader``, ``domain-reader``, and ``project-reader`` roles
88in addition to custom policies for each service.65in addition to custom policies for each service.
8966
90It's imperative to note that ``reader`` is the least authoritative role in the
91hierarchy because assignments using ``admin`` or ``member`` ultimately include
92the ``reader`` role. We document this explicitly so that ``reader`` roles are not
93overloaded with read-only access to sensitive information. For example, a deployment
94pursuing a specific compliance target may want to leverage the ``reader`` role
95to perform the audit. If the audit requires the auditor to evaluate sensitive
96information, like license keys or administrative metadata, within a given
97scope, auditors shouldn't expect to perform these operations with the
98``reader`` role. We justify this design decision because sensitive information
99should be explicitly protected, and not implicitly exposed.
100
101The ``reader`` role should be implemented and used from the perspective of
102least-privilege, which may or may not fulfill your auditing use case.
103
104Member67Member
105======68======
10669
@@ -132,30 +95,9 @@ services are addressing this individually at their own pace).
132 As of the Train release, keystone applies the following personas95 As of the Train release, keystone applies the following personas
133 consistently across its API.96 consistently across its API.
13497
135---------------98---------------------
136System Personas
137---------------
138
139This section describes authorization personas typically used for operators and
140deployers. You can find all users with system role assignments using the
141following query:
142
143.. code-block:: console
144
145 $ openstack role assignment list --names --system all
146 +--------+------------------------+------------------------+---------+--------+--------+-----------+
147 | Role | User | Group | Project | Domain | System | Inherited |
148 +--------+------------------------+------------------------+---------+--------+--------+-----------+
149 | admin | | system-admins@Default | | | all | False |
150 | admin | admin@Default | | | | all | False |
151 | admin | operator@Default | | | | all | False |
152 | reader | | system-support@Default | | | all | False |
153 | admin | operator@Default | | | | all | False |
154 | member | system-support@Default | | | | all | False |
155 +--------+------------------------+------------------------+---------+--------+--------+-----------+
156
157System Administrators99System Administrators
158=====================100---------------------
159101
160*System administrators* are allowed to manage every resource in keystone.102*System administrators* are allowed to manage every resource in keystone.
161System administrators are typically operators and cloud administrators. They103System administrators are typically operators and cloud administrators. They
@@ -169,7 +111,7 @@ assignments:
169111
170.. code-block:: console112.. code-block:: console
171113
172 $ openstack role assignment list --names --system all --role admin114 $ openstack role assignment list --names --system all
173 +-------+------------------+-----------------------+---------+--------+--------+-----------+115 +-------+------------------+-----------------------+---------+--------+--------+-----------+
174 | Role | User | Group | Project | Domain | System | Inherited |116 | Role | User | Group | Project | Domain | System | Inherited |
175 +-------+------------------+-----------------------+---------+--------+--------+-----------+117 +-------+------------------+-----------------------+---------+--------+--------+-----------+
@@ -178,57 +120,38 @@ assignments:
178 | admin | operator@Default | | | | all | False |120 | admin | operator@Default | | | | all | False |
179 +-------+------------------+-----------------------+---------+--------+--------+-----------+121 +-------+------------------+-----------------------+---------+--------+--------+-----------+
180122
123-------------------------------
181System Members & System Readers124System Members & System Readers
182===============================125-------------------------------
183126
184In keystone, *system members* and *system readers* are very similar and have127In keystone, *system members* and *system readers* are very similar and have
185the same authorization. Users with these roles on the system can view all128the same authorization. Users with these roles on the system can view all
186resources within keystone. They can list role assignments, users, projects, and129resources within keystone. They can audit role assignments, users, projects,
187group memberships, among other resources.130and group memberships, among other resources.
188131
189The *system reader* persona is useful for members of a support team or auditors132The *system reader* persona is useful for auditors or members of a support
190if the audit doesn't require access to sensitive information. You can find133team. You can find *system members* and *system readers* in your deployment
191*system members* and *system readers* in your deployment with the following134with the following assignments:
192assignments:
193135
194.. code-block:: console136.. code-block:: console
195137
196 $ openstack role assignment list --names --system all --role member --role reader138 $ openstack role assignment list --names --system all --role member --role reader
197 +--------+------------------------+------------------------+---------+--------+--------+-----------+139 +--------+------------------------+-------------------------+---------+--------+--------+-----------+
198 | Role | User | Group | Project | Domain | System | Inherited |140 | Role | User | Group | Project | Domain | System | Inherited |
199 +--------+------------------------+------------------------+---------+--------+--------+-----------+141 +--------+------------------------+-------------------------+---------+--------+--------+-----------+
200 | reader | | system-support@Default | | | all | False |142 | reader | | system-auditors@Default | | | all | False |
201 | admin | operator@Default | | | | all | False |143 | admin | operator@Default | | | | all | False |
202 | member | system-support@Default | | | | all | False |144 | member | system-support@Default | | | | all | False |
203 +--------+------------------------+------------------------+---------+--------+--------+-----------+145 +--------+------------------------+-------------------------+---------+--------+--------+-----------+
204146
205.. warning::147.. warning::
206148
207 Filtering system role assignments is currently broken and is being tracked149 Filtering system role assignments is currently broken and is being tracked
208 as a `bug <https://bugs.launchpad.net/keystone/+bug/1846817>`_.150 as a `bug <https://bugs.launchpad.net/keystone/+bug/1846817>`_.
209151
210---------------152---------------------
211Domain Personas
212---------------
213
214This section describes authorization personas for people who manage their own
215domains, which contain projects, users, and groups. You can find all users with
216role assignments on a specific domain using the following query:
217
218.. code-block:: console
219
220 $ openstack role assignment list --names --domain foobar
221 +--------+-----------------+----------------------+---------+--------+--------+-----------+
222 | Role | User | Group | Project | Domain | System | Inherited |
223 +--------+-----------------+----------------------+---------+--------+--------+-----------+
224 | reader | support@Default | | | foobar | | False |
225 | admin | jsmith@Default | | | foobar | | False |
226 | admin | | foobar-admins@foobar | | foobar | | False |
227 | member | jdoe@foobar | | | foobar | | False |
228 +--------+-----------------+----------------------+---------+--------+--------+-----------+
229
230Domain Administrators153Domain Administrators
231=====================154---------------------
232155
233*Domain administrators* can manage most aspects of the domain or its contents.156*Domain administrators* can manage most aspects of the domain or its contents.
234These users can create new projects and users within their domain. They can157These users can create new projects and users within their domain. They can
@@ -251,18 +174,18 @@ assignment:
251 | admin | | foobar-admins@foobar | | foobar | | False |174 | admin | | foobar-admins@foobar | | foobar | | False |
252 +-------+----------------+----------------------+---------+--------+--------+-----------+175 +-------+----------------+----------------------+---------+--------+--------+-----------+
253176
177-------------------------------
254Domain Members & Domain Readers178Domain Members & Domain Readers
255===============================179-------------------------------
256180
257Domain members and domain readers have the same relationship as system members181Domain members and domain readers have the same relationship as system members
258and system readers. They're allowed to view resources and information about182and system readers. They're allowed to view resources and information about
259their domain. They aren't allowed to access system-specific information or183their domain. They aren't allowed to access system-specific information or
260information about projects, groups, and users outside their domain.184information about projects, groups, and users outside their domain.
261185
262The domain member and domain reader use-cases are great for support teams,186The domain member and domain reader use-cases are great for auditing, support,
263monitoring the details of an account, or auditing resources within a domain187or monitoring the details of an account. You can find domain members and domain
264assuming the audit doesn't validate sensitive information. You can find domain188readers with the following role assignments:
265members and domain readers with the following role assignments:
266189
267.. code-block:: console190.. code-block:: console
268191
@@ -276,35 +199,16 @@ members and domain readers with the following role assignments:
276 +--------+-----------------+-------+---------+--------+--------+-----------+199 +--------+-----------------+-------+---------+--------+--------+-----------+
277 | Role | User | Group | Project | Domain | System | Inherited |200 | Role | User | Group | Project | Domain | System | Inherited |
278 +--------+-----------------+-------+---------+--------+--------+-----------+201 +--------+-----------------+-------+---------+--------+--------+-----------+
279 | reader | support@Default | | | foobar | | False |202 | reader | auditor@Default | | | foobar | | False |
280 +--------+-----------------+-------+---------+--------+--------+-----------+203 +--------+-----------------+-------+---------+--------+--------+-----------+
281204
282----------------
283Project Personas
284----------------
285
286This section describes authorization personas for users operating within a
287project. These personas are commonly used by end users. You can find all users
288with role assignments on a specific project using the following query:
289
290.. code-block:: console
291
292 $ openstack role assignment list --names --project production
293 +--------+----------------+----------------------------+-------------------+--------+--------+-----------+
294 | Role | User | Group | Project | Domain | System | Inherited |
295 +--------+----------------+----------------------------+-------------------+--------+--------+-----------+
296 | admin | jsmith@Default | | production@foobar | | | False |
297 | admin | | production-admins@foobar | production@foobar | | | False |
298 | member | | foobar-operators@Default | production@foobar | | | False |
299 | reader | alice@Default | | production@foobar | | | False |
300 | reader | | production-support@Default | production@foobar | | | False |
301 +--------+----------------+----------------------------+-------------------+--------+--------+-----------+
302205
206----------------------
303Project Administrators207Project Administrators
304======================208----------------------
305209
306*Project administrators* can only view and modify data within the project they210*Project administrators* can only view and modify data within the project in
307have authorization on. They're able to view information about their projects211their role assignment. They're able to view information about their projects
308and set tags on their projects. They're not allowed to view system or domain212and set tags on their projects. They're not allowed to view system or domain
309resources, as that would violate the tenancy of their role assignment. Since213resources, as that would violate the tenancy of their role assignment. Since
310the majority of the resources in keystone's API are system and domain-specific,214the majority of the resources in keystone's API are system and domain-specific,
@@ -323,8 +227,9 @@ role assignment:
323 | admin | | production-admins@foobar | production@foobar | | | False |227 | admin | | production-admins@foobar | production@foobar | | | False |
324 +-------+----------------+--------------------------+-------------------+--------+--------+-----------+228 +-------+----------------+--------------------------+-------------------+--------+--------+-----------+
325229
230---------------------------------
326Project Members & Project Readers231Project Members & Project Readers
327=================================232---------------------------------
328233
329*Project members* and *project readers* can discover information about their234*Project members* and *project readers* can discover information about their
330projects. They can access important information like resource limits for their235projects. They can access important information like resource limits for their
@@ -344,12 +249,12 @@ the following role assignments:
344 | member | | foobar-operators@Default | production@foobar | | | False |249 | member | | foobar-operators@Default | production@foobar | | | False |
345 +--------+------+--------------------------+-------------------+--------+--------+-----------+250 +--------+------+--------------------------+-------------------+--------+--------+-----------+
346 $ openstack role assignment list --names --project production --role reader251 $ openstack role assignment list --names --project production --role reader
347 +--------+---------------+----------------------------+-------------------+--------+--------+-----------+252 +--------+-----------------+----------------------------+-------------------+--------+--------+-----------+
348 | Role | User | Group | Project | Domain | System | Inherited |253 | Role | User | Group | Project | Domain | System | Inherited |
349 +--------+---------------+----------------------------+-------------------+--------+--------+-----------+254 +--------+-----------------+----------------------------+-------------------+--------+--------+-----------+
350 | reader | alice@Default | | production@foobar | | | False |255 | reader | auditor@Default | | production@foobar | | | False |
351 | reader | | production-support@Default | production@foobar | | | False |256 | reader | | production-support@Default | production@foobar | | | False |
352 +--------+---------------+----------------------------+-------------------+--------+--------+-----------+257 +--------+-----------------+----------------------------+-------------------+--------+--------+-----------+
353258
354----------------259----------------
355Writing Policies260Writing Policies
diff --git a/doc/source/admin/upgrading.rst b/doc/source/admin/upgrading.rst
index 709d98d..687dba4 100644
--- a/doc/source/admin/upgrading.rst
+++ b/doc/source/admin/upgrading.rst
@@ -42,7 +42,7 @@ Plan your upgrade:
42 to re-read the release notes for the previous release (or two!).42 to re-read the release notes for the previous release (or two!).
4343
44* Prepare your new configuration files, including ``keystone.conf``,44* Prepare your new configuration files, including ``keystone.conf``,
45 ``logging.conf``, ``policy.yaml``, ``keystone-paste.ini``, and anything else45 ``logging.conf``, ``policy.json``, ``keystone-paste.ini``, and anything else
46 in ``/etc/keystone/``, by customizing the corresponding files from the next46 in ``/etc/keystone/``, by customizing the corresponding files from the next
47 release.47 release.
4848
diff --git a/doc/source/conf.py b/doc/source/conf.py
index 45cd82f..819c1d9 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -55,11 +55,7 @@ apidoc_output_dir = 'api'
55apidoc_excluded_paths = [55apidoc_excluded_paths = [
56 'tests/*',56 'tests/*',
57 'tests',57 'tests',
58 'test',58 'test']
59 # TODO(gmann): with new release of SQLAlchemy(1.4.27) TypeDecorator used
60 # in common/sql/core.py file started failing. Remove this oncethe issue of
61 # TypeDecorator is fixed.
62 'common/sql/core.py']
63apidoc_separate_modules = True59apidoc_separate_modules = True
6460
65# sphinxcontrib.seqdiag options61# sphinxcontrib.seqdiag options
diff --git a/doc/source/configuration/policy.rst b/doc/source/configuration/policy.rst
index 3f80c5e..daafdea 100644
--- a/doc/source/configuration/policy.rst
+++ b/doc/source/configuration/policy.rst
@@ -2,15 +2,6 @@
2Policy configuration2Policy configuration
3====================3====================
44
5.. warning::
6
7 JSON formatted policy file is deprecated since Keystone 19.0.0 (Wallaby).
8 This `oslopolicy-convert-json-to-yaml`__ tool will migrate your existing
9 JSON-formatted policy file to YAML in a backward-compatible way.
10
11.. __: https://docs.openstack.org/oslo.policy/latest/cli/oslopolicy-convert-json-to-yaml.html
12
13
14Configuration5Configuration
15~~~~~~~~~~~~~6~~~~~~~~~~~~~
167
diff --git a/doc/source/contributor/how-can-i-help.rst b/doc/source/contributor/how-can-i-help.rst
index 47c2f4a..4e37af0 100644
--- a/doc/source/contributor/how-can-i-help.rst
+++ b/doc/source/contributor/how-can-i-help.rst
@@ -50,7 +50,7 @@ become part of the team:
50 You can also subscribe to email notifications for new bugs.50 You can also subscribe to email notifications for new bugs.
51* Subscribe to the openstack-discuss@lists.openstack.org mailing list (filter on51* Subscribe to the openstack-discuss@lists.openstack.org mailing list (filter on
52 subject tag ``[keystone]``) and join the #openstack-keystone IRC channel on52 subject tag ``[keystone]``) and join the #openstack-keystone IRC channel on
53 OFTC. Help answer user support questions if you or your organization has53 freenode. Help answer user support questions if you or your organization has
54 faced and solved a similar problem, or chime in on design discussions that54 faced and solved a similar problem, or chime in on design discussions that
55 will affect you and your organization.55 will affect you and your organization.
56* Check out the low hanging fruit bugs, submit patches to fix them:56* Check out the low hanging fruit bugs, submit patches to fix them:
diff --git a/doc/source/getting-started/community.rst b/doc/source/getting-started/community.rst
index 4598cd8..47145ad 100644
--- a/doc/source/getting-started/community.rst
+++ b/doc/source/getting-started/community.rst
@@ -34,10 +34,10 @@ from feature designs to documentation to testing to deployment scripts.
34.. _Launchpad: https://launchpad.net/keystone34.. _Launchpad: https://launchpad.net/keystone
35.. _wiki: https://wiki.openstack.org/35.. _wiki: https://wiki.openstack.org/
3636
37#openstack-keystone on OFTC IRC Network37#openstack-keystone on Freenode IRC Network
38---------------------------------------38-------------------------------------------
3939
40You can find Keystone folks in `<irc://oftc.net/#openstack-keystone>`_.40You can find Keystone folks in `<irc://freenode.net/#openstack-keystone>`_.
41This is usually the best place to ask questions and find your way around. IRC41This is usually the best place to ask questions and find your way around. IRC
42stands for Internet Relay Chat and it is a way to chat online in real time.42stands for Internet Relay Chat and it is a way to chat online in real time.
43You can also ask a question and come back to the log files to read the answer43You can also ask a question and come back to the log files to read the answer
diff --git a/doc/source/getting-started/policy_mapping.rst b/doc/source/getting-started/policy_mapping.rst
index a7cb27c..2975b45 100644
--- a/doc/source/getting-started/policy_mapping.rst
+++ b/doc/source/getting-started/policy_mapping.rst
@@ -2,7 +2,7 @@
2Mapping of policy target to API2Mapping of policy target to API
3===============================3===============================
44
5The following table shows the target in the policy.yaml file for each API.5The following table shows the target in the policy.json file for each API.
66
7========================================================= ===7========================================================= ===
8Target API8Target API
diff --git a/keystone.egg-info/PKG-INFO b/keystone.egg-info/PKG-INFO
index 3b63a18..c4bc751 100644
--- a/keystone.egg-info/PKG-INFO
+++ b/keystone.egg-info/PKG-INFO
@@ -1,11 +1,73 @@
1Metadata-Version: 2.11Metadata-Version: 2.1
2Name: keystone2Name: keystone
3Version: 20.1.0.dev273Version: 18.1.0
4Summary: OpenStack Identity4Summary: OpenStack Identity
5Home-page: https://docs.openstack.org/keystone/latest5Home-page: https://docs.openstack.org/keystone/latest
6Author: OpenStack6Author: OpenStack
7Author-email: openstack-discuss@lists.openstack.org7Author-email: openstack-discuss@lists.openstack.org
8License: UNKNOWN8License: UNKNOWN
9Description: ==================
10 OpenStack Keystone
11 ==================
12
13 .. image:: https://governance.openstack.org/tc/badges/keystone.svg
14 :target: https://governance.openstack.org/tc/reference/tags/index.html
15
16 .. Change things from this point on
17
18 OpenStack Keystone provides authentication, authorization and service discovery
19 mechanisms via HTTP primarily for use by projects in the OpenStack family. It
20 is most commonly deployed as an HTTP interface to existing identity systems,
21 such as LDAP.
22
23 Developer documentation, the source of which is in ``doc/source/``, is
24 published at:
25
26 https://docs.openstack.org/keystone/latest
27
28 The API reference and documentation are available at:
29
30 https://docs.openstack.org/api-ref/identity
31
32 The canonical client library is available at:
33
34 https://opendev.org/openstack/python-keystoneclient
35
36 Documentation for cloud administrators is available at:
37
38 https://docs.openstack.org/
39
40 The source of documentation for cloud administrators is available at:
41
42 https://opendev.org/openstack/openstack-manuals
43
44 Information about our team meeting is available at:
45
46 https://wiki.openstack.org/wiki/Meetings/KeystoneMeeting
47
48 Release notes is available at:
49
50 https://docs.openstack.org/releasenotes/keystone
51
52 Bugs and feature requests are tracked on Launchpad at:
53
54 https://bugs.launchpad.net/keystone
55
56 Future design work is tracked at:
57
58 https://specs.openstack.org/openstack/keystone-specs
59
60 Contributors are encouraged to join IRC (``#openstack-keystone`` on freenode):
61
62 https://wiki.openstack.org/wiki/IRC
63
64 Source for the project:
65
66 https://opendev.org/openstack/keystone
67
68 For information on contributing to Keystone, see ``CONTRIBUTING.rst``.
69
70
9Platform: UNKNOWN71Platform: UNKNOWN
10Classifier: Environment :: OpenStack72Classifier: Environment :: OpenStack
11Classifier: Intended Audience :: Information Technology73Classifier: Intended Audience :: Information Technology
@@ -24,69 +86,3 @@ Provides-Extra: ldap
24Provides-Extra: memcache86Provides-Extra: memcache
25Provides-Extra: mongodb87Provides-Extra: mongodb
26Provides-Extra: test88Provides-Extra: test
27License-File: LICENSE
28License-File: AUTHORS
29
30==================
31OpenStack Keystone
32==================
33
34.. image:: https://governance.openstack.org/tc/badges/keystone.svg
35 :target: https://governance.openstack.org/tc/reference/tags/index.html
36
37.. Change things from this point on
38
39OpenStack Keystone provides authentication, authorization and service discovery
40mechanisms via HTTP primarily for use by projects in the OpenStack family. It
41is most commonly deployed as an HTTP interface to existing identity systems,
42such as LDAP.
43
44Developer documentation, the source of which is in ``doc/source/``, is
45published at:
46
47 https://docs.openstack.org/keystone/latest
48
49The API reference and documentation are available at:
50
51 https://docs.openstack.org/api-ref/identity
52
53The canonical client library is available at:
54
55 https://opendev.org/openstack/python-keystoneclient
56
57Documentation for cloud administrators is available at:
58
59 https://docs.openstack.org/
60
61The source of documentation for cloud administrators is available at:
62
63 https://opendev.org/openstack/openstack-manuals
64
65Information about our team meeting is available at:
66
67 https://wiki.openstack.org/wiki/Meetings/KeystoneMeeting
68
69Release notes is available at:
70
71 https://docs.openstack.org/releasenotes/keystone
72
73Bugs and feature requests are tracked on Launchpad at:
74
75 https://bugs.launchpad.net/keystone
76
77Future design work is tracked at:
78
79 https://specs.openstack.org/openstack/keystone-specs
80
81Contributors are encouraged to join IRC (``#openstack-keystone`` on OFTC):
82
83 https://wiki.openstack.org/wiki/IRC
84
85Source for the project:
86
87 https://opendev.org/openstack/keystone
88
89For information on contributing to Keystone, see ``CONTRIBUTING.rst``.
90
91
92
diff --git a/keystone.egg-info/SOURCES.txt b/keystone.egg-info/SOURCES.txt
index fc8c6b6..b1af601 100644
--- a/keystone.egg-info/SOURCES.txt
+++ b/keystone.egg-info/SOURCES.txt
@@ -315,7 +315,6 @@ devstack/files/federation/shib_apache_alias.txt
315devstack/files/federation/shib_apache_handler.txt315devstack/files/federation/shib_apache_handler.txt
316devstack/files/federation/shibboleth2.xml316devstack/files/federation/shibboleth2.xml
317devstack/lib/federation.sh317devstack/lib/federation.sh
318devstack/lib/scope.sh
319doc/Makefile318doc/Makefile
320doc/README.rst319doc/README.rst
321doc/requirements.txt320doc/requirements.txt
@@ -473,7 +472,6 @@ keystone.egg-info/SOURCES.txt
473keystone.egg-info/dependency_links.txt472keystone.egg-info/dependency_links.txt
474keystone.egg-info/entry_points.txt473keystone.egg-info/entry_points.txt
475keystone.egg-info/not-zip-safe474keystone.egg-info/not-zip-safe
476keystone.egg-info/pbr.json
477keystone.egg-info/requires.txt475keystone.egg-info/requires.txt
478keystone.egg-info/top_level.txt476keystone.egg-info/top_level.txt
479keystone/api/__init__.py477keystone/api/__init__.py
@@ -705,7 +703,6 @@ keystone/common/sql/contract_repo/versions/075_placeholder.py
705keystone/common/sql/contract_repo/versions/076_placeholder.py703keystone/common/sql/contract_repo/versions/076_placeholder.py
706keystone/common/sql/contract_repo/versions/077_placeholder.py704keystone/common/sql/contract_repo/versions/077_placeholder.py
707keystone/common/sql/contract_repo/versions/078_placeholder.py705keystone/common/sql/contract_repo/versions/078_placeholder.py
708keystone/common/sql/contract_repo/versions/079_contract_update_local_id_limit.py
709keystone/common/sql/contract_repo/versions/__init__.py706keystone/common/sql/contract_repo/versions/__init__.py
710keystone/common/sql/data_migration_repo/README707keystone/common/sql/data_migration_repo/README
711keystone/common/sql/data_migration_repo/__init__.py708keystone/common/sql/data_migration_repo/__init__.py
@@ -789,7 +786,6 @@ keystone/common/sql/data_migration_repo/versions/075_placeholder.py
789keystone/common/sql/data_migration_repo/versions/076_placeholder.py786keystone/common/sql/data_migration_repo/versions/076_placeholder.py
790keystone/common/sql/data_migration_repo/versions/077_placeholder.py787keystone/common/sql/data_migration_repo/versions/077_placeholder.py
791keystone/common/sql/data_migration_repo/versions/078_placeholder.py788keystone/common/sql/data_migration_repo/versions/078_placeholder.py
792keystone/common/sql/data_migration_repo/versions/079_migrate_update_local_id_limit.py
793keystone/common/sql/data_migration_repo/versions/__init__.py789keystone/common/sql/data_migration_repo/versions/__init__.py
794keystone/common/sql/expand_repo/README790keystone/common/sql/expand_repo/README
795keystone/common/sql/expand_repo/__init__.py791keystone/common/sql/expand_repo/__init__.py
@@ -873,7 +869,6 @@ keystone/common/sql/expand_repo/versions/075_placeholder.py
873keystone/common/sql/expand_repo/versions/076_placeholder.py869keystone/common/sql/expand_repo/versions/076_placeholder.py
874keystone/common/sql/expand_repo/versions/077_placeholder.py870keystone/common/sql/expand_repo/versions/077_placeholder.py
875keystone/common/sql/expand_repo/versions/078_placeholder.py871keystone/common/sql/expand_repo/versions/078_placeholder.py
876keystone/common/sql/expand_repo/versions/079_expand_update_local_id_limit.py
877keystone/common/sql/expand_repo/versions/__init__.py872keystone/common/sql/expand_repo/versions/__init__.py
878keystone/common/sql/migrate_repo/README873keystone/common/sql/migrate_repo/README
879keystone/common/sql/migrate_repo/__init__.py874keystone/common/sql/migrate_repo/__init__.py
@@ -1235,6 +1230,8 @@ keystone/tests/unit/config_files/backend_multi_ldap_sql.conf
1235keystone/tests/unit/config_files/backend_pool_liveldap.conf1230keystone/tests/unit/config_files/backend_pool_liveldap.conf
1236keystone/tests/unit/config_files/backend_sql.conf1231keystone/tests/unit/config_files/backend_sql.conf
1237keystone/tests/unit/config_files/backend_tls_liveldap.conf1232keystone/tests/unit/config_files/backend_tls_liveldap.conf
1233keystone/tests/unit/config_files/deprecated.conf
1234keystone/tests/unit/config_files/deprecated_override.conf
1238keystone/tests/unit/config_files/test_auth_plugin.conf1235keystone/tests/unit/config_files/test_auth_plugin.conf
1239keystone/tests/unit/config_files/domain_configs_default_ldap_one_sql/keystone.domain1.conf1236keystone/tests/unit/config_files/domain_configs_default_ldap_one_sql/keystone.domain1.conf
1240keystone/tests/unit/config_files/domain_configs_multi_ldap/keystone.Default.conf1237keystone/tests/unit/config_files/domain_configs_multi_ldap/keystone.Default.conf
@@ -1281,7 +1278,6 @@ keystone/tests/unit/ksfixtures/key_repository.py
1281keystone/tests/unit/ksfixtures/ldapdb.py1278keystone/tests/unit/ksfixtures/ldapdb.py
1282keystone/tests/unit/ksfixtures/policy.py1279keystone/tests/unit/ksfixtures/policy.py
1283keystone/tests/unit/ksfixtures/temporaryfile.py1280keystone/tests/unit/ksfixtures/temporaryfile.py
1284keystone/tests/unit/ksfixtures/warnings.py
1285keystone/tests/unit/limit/__init__.py1281keystone/tests/unit/limit/__init__.py
1286keystone/tests/unit/limit/test_backends.py1282keystone/tests/unit/limit/test_backends.py
1287keystone/tests/unit/policy/__init__.py1283keystone/tests/unit/policy/__init__.py
@@ -1328,7 +1324,6 @@ keystone/trust/backends/__init__.py
1328keystone/trust/backends/base.py1324keystone/trust/backends/base.py
1329keystone/trust/backends/sql.py1325keystone/trust/backends/sql.py
1330keystone_tempest_plugin/README.rst1326keystone_tempest_plugin/README.rst
1331playbooks/enable-fips.yaml
1332rally-jobs/README.rst1327rally-jobs/README.rst
1333rally-jobs/keystone.yaml1328rally-jobs/keystone.yaml
1334releasenotes/notes/.placeholder1329releasenotes/notes/.placeholder
@@ -1573,11 +1568,8 @@ releasenotes/notes/bug-1885753-51df25f3ff1d9ae8.yaml
1573releasenotes/notes/bug-1886017-bc2ad648d57101a2.yaml1568releasenotes/notes/bug-1886017-bc2ad648d57101a2.yaml
1574releasenotes/notes/bug-1889936-78d6853b5212b8f1.yaml1569releasenotes/notes/bug-1889936-78d6853b5212b8f1.yaml
1575releasenotes/notes/bug-1896125-b17a4d12730fe493.yaml1570releasenotes/notes/bug-1896125-b17a4d12730fe493.yaml
1576releasenotes/notes/bug-1897280-e7065c4368a325ad.yaml
1577releasenotes/notes/bug-1901207-13762f85b8a04481.yaml1571releasenotes/notes/bug-1901207-13762f85b8a04481.yaml
1578releasenotes/notes/bug-1901654-69b9f35d11cd0c75.yaml1572releasenotes/notes/bug-1901654-69b9f35d11cd0c75.yaml
1579releasenotes/notes/bug-1929066-6e741c9182620a37.yaml
1580releasenotes/notes/bug-1941020-f694395a9bcea72f.yaml
1581releasenotes/notes/bug1828565-0790c4c60ba34100.yaml1573releasenotes/notes/bug1828565-0790c4c60ba34100.yaml
1582releasenotes/notes/bug_1526462-df9a3f3974d9040f.yaml1574releasenotes/notes/bug_1526462-df9a3f3974d9040f.yaml
1583releasenotes/notes/bug_1543048_and_1668503-7ead4e15faaab778.yaml1575releasenotes/notes/bug_1543048_and_1668503-7ead4e15faaab778.yaml
@@ -1588,7 +1580,6 @@ releasenotes/notes/catalog-caching-12f2532cfb71325a.yaml
1588releasenotes/notes/catalog_project_id-519f5a70f9f7c4c6.yaml1580releasenotes/notes/catalog_project_id-519f5a70f9f7c4c6.yaml
1589releasenotes/notes/convert-keystone-to-flask-80d980e239b662b0.yaml1581releasenotes/notes/convert-keystone-to-flask-80d980e239b662b0.yaml
1590releasenotes/notes/deprecate-endpoint-policy-cfg-option-d018acab72a398a0.yaml1582releasenotes/notes/deprecate-endpoint-policy-cfg-option-d018acab72a398a0.yaml
1591releasenotes/notes/deprecate-json-formatted-policy-file-95f6307f88358f58.yaml
1592releasenotes/notes/deprecate-memcache-token-persistence-eac88c80147ea241.yaml1583releasenotes/notes/deprecate-memcache-token-persistence-eac88c80147ea241.yaml
1593releasenotes/notes/deprecate-policies-api-b104fbd1d2367b1b.yaml1584releasenotes/notes/deprecate-policies-api-b104fbd1d2367b1b.yaml
1594releasenotes/notes/deprecate-v2-apis-894284c17be881d2.yaml1585releasenotes/notes/deprecate-v2-apis-894284c17be881d2.yaml
@@ -1678,15 +1669,10 @@ releasenotes/source/stein.rst
1678releasenotes/source/train.rst1669releasenotes/source/train.rst
1679releasenotes/source/unreleased.rst1670releasenotes/source/unreleased.rst
1680releasenotes/source/ussuri.rst1671releasenotes/source/ussuri.rst
1681releasenotes/source/victoria.rst
1682releasenotes/source/wallaby.rst
1683releasenotes/source/xena.rst
1684releasenotes/source/_static/.placeholder1672releasenotes/source/_static/.placeholder
1685releasenotes/source/_templates/.placeholder1673releasenotes/source/_templates/.placeholder
1686releasenotes/source/locale/en_GB/LC_MESSAGES/releasenotes.po1674releasenotes/source/locale/en_GB/LC_MESSAGES/releasenotes.po
1687releasenotes/source/locale/fr/LC_MESSAGES/releasenotes.po
1688releasenotes/source/locale/ja/LC_MESSAGES/releasenotes.po1675releasenotes/source/locale/ja/LC_MESSAGES/releasenotes.po
1689releasenotes/source/locale/ko_KR/LC_MESSAGES/releasenotes.po
1690tools/cover.sh1676tools/cover.sh
1691tools/fast8.sh1677tools/fast8.sh
1692tools/sample_data.sh1678tools/sample_data.sh
diff --git a/keystone.egg-info/pbr.json b/keystone.egg-info/pbr.json
1693deleted file mode 1006441679deleted file mode 100644
index 7de0b70..0000000
--- a/keystone.egg-info/pbr.json
+++ /dev/null
@@ -1 +0,0 @@
1{"git_version": "2ddf8f321", "is_release": false}
2\ No newline at end of file0\ No newline at end of file
diff --git a/keystone.egg-info/requires.txt b/keystone.egg-info/requires.txt
index 7ca68f2..b85b25d 100644
--- a/keystone.egg-info/requires.txt
+++ b/keystone.egg-info/requires.txt
@@ -11,16 +11,16 @@ keystonemiddleware>=7.0.0
11msgpack>=0.5.011msgpack>=0.5.0
12oauthlib>=0.6.212oauthlib>=0.6.2
13oslo.cache>=1.26.013oslo.cache>=1.26.0
14oslo.config>=6.8.014oslo.config>=5.2.0
15oslo.context>=2.22.015oslo.context>=2.22.0
16oslo.db>=6.0.016oslo.db>=6.0.0
17oslo.i18n>=3.15.317oslo.i18n>=3.15.3
18oslo.log>=3.44.018oslo.log>=3.44.0
19oslo.messaging>=5.29.019oslo.messaging>=5.29.0
20oslo.middleware>=3.31.020oslo.middleware>=3.31.0
21oslo.policy>=3.7.021oslo.policy>=3.0.2
22oslo.serialization!=2.19.1,>=2.18.022oslo.serialization!=2.19.1,>=2.18.0
23oslo.upgradecheck>=1.3.023oslo.upgradecheck>=0.1.0
24oslo.utils>=3.33.024oslo.utils>=3.33.0
25osprofiler>=1.4.025osprofiler>=1.4.0
26passlib>=1.7.026passlib>=1.7.0
diff --git a/keystone/api/s3tokens.py b/keystone/api/s3tokens.py
index 4a8439d..73d0b39 100644
--- a/keystone/api/s3tokens.py
+++ b/keystone/api/s3tokens.py
@@ -56,10 +56,7 @@ def _calculate_signature_v4(string_to_sign, secret_key):
56 if len(parts) != 4 or parts[0] != b'AWS4-HMAC-SHA256':56 if len(parts) != 4 or parts[0] != b'AWS4-HMAC-SHA256':
57 raise exception.Unauthorized(message=_('Invalid EC2 signature.'))57 raise exception.Unauthorized(message=_('Invalid EC2 signature.'))
58 scope = parts[2].split(b'/')58 scope = parts[2].split(b'/')
59 if len(scope) != 4 or scope[3] != b'aws4_request':59 if len(scope) != 4 or scope[2] != b's3' or scope[3] != b'aws4_request':
60 raise exception.Unauthorized(message=_('Invalid EC2 signature.'))
61 allowed_services = [b's3', b'iam', b'sts']
62 if scope[2] not in allowed_services:
63 raise exception.Unauthorized(message=_('Invalid EC2 signature.'))60 raise exception.Unauthorized(message=_('Invalid EC2 signature.'))
6461
65 def _sign(key, msg):62 def _sign(key, msg):
diff --git a/keystone/cmd/status.py b/keystone/cmd/status.py
index 64b2e62..3585c2e 100644
--- a/keystone/cmd/status.py
+++ b/keystone/cmd/status.py
@@ -12,7 +12,6 @@
1212
13from oslo_policy import _checks13from oslo_policy import _checks
14from oslo_policy import policy14from oslo_policy import policy
15from oslo_upgradecheck import common_checks
16from oslo_upgradecheck import upgradecheck15from oslo_upgradecheck import upgradecheck
1716
18from keystone.common import driver_hints17from keystone.common import driver_hints
@@ -87,8 +86,6 @@ class Checks(upgradecheck.UpgradeCommands):
87 check_trust_policies_are_not_empty),86 check_trust_policies_are_not_empty),
88 ("Check default roles are immutable",87 ("Check default roles are immutable",
89 check_default_roles_are_immutable),88 check_default_roles_are_immutable),
90 ("Policy File JSON to YAML Migration",
91 (common_checks.check_policy_json, {'conf': CONF})),
92 )89 )
9390
9491
diff --git a/keystone/common/policies/application_credential.py b/keystone/common/policies/application_credential.py
index bae998a..e44c661 100644
--- a/keystone/common/policies/application_credential.py
+++ b/keystone/common/policies/application_credential.py
@@ -18,30 +18,23 @@ from keystone.common.policies import base
18collection_path = '/v3/users/{user_id}/application_credentials'18collection_path = '/v3/users/{user_id}/application_credentials'
19resource_path = collection_path + '/{application_credential_id}'19resource_path = collection_path + '/{application_credential_id}'
2020
21DEPRECATED_REASON = (
22 "The application credential API is now aware of system scope and default "
23 "roles."
24)
25
26deprecated_list_application_credentials_for_user = policy.DeprecatedRule(21deprecated_list_application_credentials_for_user = policy.DeprecatedRule(
27 name=base.IDENTITY % 'list_application_credentials',22 name=base.IDENTITY % 'list_application_credentials',
28 check_str=base.RULE_ADMIN_OR_OWNER,23 check_str=base.RULE_ADMIN_OR_OWNER
29 deprecated_reason=DEPRECATED_REASON,
30 deprecated_since=versionutils.deprecated.TRAIN
31)24)
32deprecated_get_application_credentials_for_user = policy.DeprecatedRule(25deprecated_get_application_credentials_for_user = policy.DeprecatedRule(
33 name=base.IDENTITY % 'get_application_credential',26 name=base.IDENTITY % 'get_application_credential',
34 check_str=base.RULE_ADMIN_OR_OWNER,27 check_str=base.RULE_ADMIN_OR_OWNER
35 deprecated_reason=DEPRECATED_REASON,
36 deprecated_since=versionutils.deprecated.TRAIN
37)28)
38deprecated_delete_application_credentials_for_user = policy.DeprecatedRule(29deprecated_delete_application_credentials_for_user = policy.DeprecatedRule(
39 name=base.IDENTITY % 'delete_application_credential',30 name=base.IDENTITY % 'delete_application_credential',
40 check_str=base.RULE_ADMIN_OR_OWNER,31 check_str=base.RULE_ADMIN_OR_OWNER
41 deprecated_reason=DEPRECATED_REASON,
42 deprecated_since=versionutils.deprecated.TRAIN
43)32)
4433
34DEPRECATED_REASON = (
35 "The application credential API is now aware of system scope and default "
36 "roles."
37)
4538
46application_credential_policies = [39application_credential_policies = [
47 policy.DocumentedRuleDefault(40 policy.DocumentedRuleDefault(
@@ -53,7 +46,9 @@ application_credential_policies = [
53 'method': 'GET'},46 'method': 'GET'},
54 {'path': resource_path,47 {'path': resource_path,
55 'method': 'HEAD'}],48 'method': 'HEAD'}],
56 deprecated_rule=deprecated_get_application_credentials_for_user),49 deprecated_rule=deprecated_get_application_credentials_for_user,
50 deprecated_reason=DEPRECATED_REASON,
51 deprecated_since=versionutils.deprecated.TRAIN),
57 policy.DocumentedRuleDefault(52 policy.DocumentedRuleDefault(
58 name=base.IDENTITY % 'list_application_credentials',53 name=base.IDENTITY % 'list_application_credentials',
59 check_str=base.RULE_SYSTEM_READER_OR_OWNER,54 check_str=base.RULE_SYSTEM_READER_OR_OWNER,
@@ -63,7 +58,9 @@ application_credential_policies = [
63 'method': 'GET'},58 'method': 'GET'},
64 {'path': collection_path,59 {'path': collection_path,
65 'method': 'HEAD'}],60 'method': 'HEAD'}],
66 deprecated_rule=deprecated_list_application_credentials_for_user),61 deprecated_rule=deprecated_list_application_credentials_for_user,
62 deprecated_reason=DEPRECATED_REASON,
63 deprecated_since=versionutils.deprecated.TRAIN),
67 policy.DocumentedRuleDefault(64 policy.DocumentedRuleDefault(
68 name=base.IDENTITY % 'create_application_credential',65 name=base.IDENTITY % 'create_application_credential',
69 check_str=base.RULE_OWNER,66 check_str=base.RULE_OWNER,
@@ -78,7 +75,9 @@ application_credential_policies = [
78 description='Delete an application credential.',75 description='Delete an application credential.',
79 operations=[{'path': resource_path,76 operations=[{'path': resource_path,
80 'method': 'DELETE'}],77 'method': 'DELETE'}],
81 deprecated_rule=deprecated_delete_application_credentials_for_user)78 deprecated_rule=deprecated_delete_application_credentials_for_user,
79 deprecated_reason=DEPRECATED_REASON,
80 deprecated_since=versionutils.deprecated.TRAIN)
82]81]
8382
8483
diff --git a/keystone/common/policies/consumer.py b/keystone/common/policies/consumer.py
index 7931bf0..bf9a6bd 100644
--- a/keystone/common/policies/consumer.py
+++ b/keystone/common/policies/consumer.py
@@ -15,41 +15,30 @@ from oslo_policy import policy
1515
16from keystone.common.policies import base16from keystone.common.policies import base
1717
18DEPRECATED_REASON = (
19 "The OAUTH1 consumer API is now aware of system scope and default roles."
20)
21
22deprecated_get_consumer = policy.DeprecatedRule(18deprecated_get_consumer = policy.DeprecatedRule(
23 name=base.IDENTITY % 'get_consumer',19 name=base.IDENTITY % 'get_consumer',
24 check_str=base.RULE_ADMIN_REQUIRED,20 check_str=base.RULE_ADMIN_REQUIRED
25 deprecated_reason=DEPRECATED_REASON,
26 deprecated_since=versionutils.deprecated.TRAIN
27)21)
28deprecated_list_consumers = policy.DeprecatedRule(22deprecated_list_consumers = policy.DeprecatedRule(
29 name=base.IDENTITY % 'list_consumers',23 name=base.IDENTITY % 'list_consumers',
30 check_str=base.RULE_ADMIN_REQUIRED,24 check_str=base.RULE_ADMIN_REQUIRED
31 deprecated_reason=DEPRECATED_REASON,
32 deprecated_since=versionutils.deprecated.TRAIN
33)25)
34deprecated_create_consumer = policy.DeprecatedRule(26deprecated_create_consumer = policy.DeprecatedRule(
35 name=base.IDENTITY % 'create_consumer',27 name=base.IDENTITY % 'create_consumer',
36 check_str=base.RULE_ADMIN_REQUIRED,28 check_str=base.RULE_ADMIN_REQUIRED
37 deprecated_reason=DEPRECATED_REASON,
38 deprecated_since=versionutils.deprecated.TRAIN
39)29)
40deprecated_update_consumer = policy.DeprecatedRule(30deprecated_update_consumer = policy.DeprecatedRule(
41 name=base.IDENTITY % 'update_consumer',31 name=base.IDENTITY % 'update_consumer',
42 check_str=base.RULE_ADMIN_REQUIRED,32 check_str=base.RULE_ADMIN_REQUIRED
43 deprecated_reason=DEPRECATED_REASON,
44 deprecated_since=versionutils.deprecated.TRAIN
45)33)
46deprecated_delete_consumer = policy.DeprecatedRule(34deprecated_delete_consumer = policy.DeprecatedRule(
47 name=base.IDENTITY % 'delete_consumer',35 name=base.IDENTITY % 'delete_consumer',
48 check_str=base.RULE_ADMIN_REQUIRED,36 check_str=base.RULE_ADMIN_REQUIRED
49 deprecated_reason=DEPRECATED_REASON,
50 deprecated_since=versionutils.deprecated.TRAIN
51)37)
5238
39DEPRECATED_REASON = (
40 "The OAUTH1 consumer API is now aware of system scope and default roles."
41)
5342
54consumer_policies = [43consumer_policies = [
55 policy.DocumentedRuleDefault(44 policy.DocumentedRuleDefault(
@@ -59,7 +48,9 @@ consumer_policies = [
59 description='Show OAUTH1 consumer details.',48 description='Show OAUTH1 consumer details.',
60 operations=[{'path': '/v3/OS-OAUTH1/consumers/{consumer_id}',49 operations=[{'path': '/v3/OS-OAUTH1/consumers/{consumer_id}',
61 'method': 'GET'}],50 'method': 'GET'}],
62 deprecated_rule=deprecated_get_consumer),51 deprecated_rule=deprecated_get_consumer,
52 deprecated_reason=DEPRECATED_REASON,
53 deprecated_since=versionutils.deprecated.TRAIN),
63 policy.DocumentedRuleDefault(54 policy.DocumentedRuleDefault(
64 name=base.IDENTITY % 'list_consumers',55 name=base.IDENTITY % 'list_consumers',
65 check_str=base.SYSTEM_READER,56 check_str=base.SYSTEM_READER,
@@ -67,7 +58,9 @@ consumer_policies = [
67 description='List OAUTH1 consumers.',58 description='List OAUTH1 consumers.',
68 operations=[{'path': '/v3/OS-OAUTH1/consumers',59 operations=[{'path': '/v3/OS-OAUTH1/consumers',
69 'method': 'GET'}],60 'method': 'GET'}],
70 deprecated_rule=deprecated_list_consumers),61 deprecated_rule=deprecated_list_consumers,
62 deprecated_reason=DEPRECATED_REASON,
63 deprecated_since=versionutils.deprecated.TRAIN),
71 policy.DocumentedRuleDefault(64 policy.DocumentedRuleDefault(
72 name=base.IDENTITY % 'create_consumer',65 name=base.IDENTITY % 'create_consumer',
73 check_str=base.SYSTEM_ADMIN,66 check_str=base.SYSTEM_ADMIN,
@@ -75,7 +68,9 @@ consumer_policies = [
75 description='Create OAUTH1 consumer.',68 description='Create OAUTH1 consumer.',
76 operations=[{'path': '/v3/OS-OAUTH1/consumers',69 operations=[{'path': '/v3/OS-OAUTH1/consumers',
77 'method': 'POST'}],70 'method': 'POST'}],
78 deprecated_rule=deprecated_create_consumer),71 deprecated_rule=deprecated_create_consumer,
72 deprecated_reason=DEPRECATED_REASON,
73 deprecated_since=versionutils.deprecated.TRAIN),
79 policy.DocumentedRuleDefault(74 policy.DocumentedRuleDefault(
80 name=base.IDENTITY % 'update_consumer',75 name=base.IDENTITY % 'update_consumer',
81 check_str=base.SYSTEM_ADMIN,76 check_str=base.SYSTEM_ADMIN,
@@ -83,7 +78,9 @@ consumer_policies = [
83 description='Update OAUTH1 consumer.',78 description='Update OAUTH1 consumer.',
84 operations=[{'path': '/v3/OS-OAUTH1/consumers/{consumer_id}',79 operations=[{'path': '/v3/OS-OAUTH1/consumers/{consumer_id}',
85 'method': 'PATCH'}],80 'method': 'PATCH'}],
86 deprecated_rule=deprecated_update_consumer),81 deprecated_rule=deprecated_update_consumer,
82 deprecated_reason=DEPRECATED_REASON,
83 deprecated_since=versionutils.deprecated.TRAIN),
87 policy.DocumentedRuleDefault(84 policy.DocumentedRuleDefault(
88 name=base.IDENTITY % 'delete_consumer',85 name=base.IDENTITY % 'delete_consumer',
89 check_str=base.SYSTEM_ADMIN,86 check_str=base.SYSTEM_ADMIN,
@@ -91,7 +88,9 @@ consumer_policies = [
91 description='Delete OAUTH1 consumer.',88 description='Delete OAUTH1 consumer.',
92 operations=[{'path': '/v3/OS-OAUTH1/consumers/{consumer_id}',89 operations=[{'path': '/v3/OS-OAUTH1/consumers/{consumer_id}',
93 'method': 'DELETE'}],90 'method': 'DELETE'}],
94 deprecated_rule=deprecated_delete_consumer),91 deprecated_rule=deprecated_delete_consumer,
92 deprecated_reason=DEPRECATED_REASON,
93 deprecated_since=versionutils.deprecated.TRAIN),
95]94]
9695
9796
diff --git a/keystone/common/policies/credential.py b/keystone/common/policies/credential.py
index 675e318..52a9fa8 100644
--- a/keystone/common/policies/credential.py
+++ b/keystone/common/policies/credential.py
@@ -21,33 +21,23 @@ DEPRECATED_REASON = (
2121
22deprecated_get_credential = policy.DeprecatedRule(22deprecated_get_credential = policy.DeprecatedRule(
23 name=base.IDENTITY % 'get_credential',23 name=base.IDENTITY % 'get_credential',
24 check_str=base.RULE_ADMIN_REQUIRED,24 check_str=base.RULE_ADMIN_REQUIRED
25 deprecated_reason=DEPRECATED_REASON,
26 deprecated_since=versionutils.deprecated.STEIN
27)25)
28deprecated_list_credentials = policy.DeprecatedRule(26deprecated_list_credentials = policy.DeprecatedRule(
29 name=base.IDENTITY % 'list_credentials',27 name=base.IDENTITY % 'list_credentials',
30 check_str=base.RULE_ADMIN_REQUIRED,28 check_str=base.RULE_ADMIN_REQUIRED
31 deprecated_reason=DEPRECATED_REASON,
32 deprecated_since=versionutils.deprecated.STEIN
33)29)
34deprecated_create_credential = policy.DeprecatedRule(30deprecated_create_credential = policy.DeprecatedRule(
35 name=base.IDENTITY % 'create_credential',31 name=base.IDENTITY % 'create_credential',
36 check_str=base.RULE_ADMIN_REQUIRED,32 check_str=base.RULE_ADMIN_REQUIRED
37 deprecated_reason=DEPRECATED_REASON,
38 deprecated_since=versionutils.deprecated.STEIN
39)33)
40deprecated_update_credential = policy.DeprecatedRule(34deprecated_update_credential = policy.DeprecatedRule(
41 name=base.IDENTITY % 'update_credential',35 name=base.IDENTITY % 'update_credential',
42 check_str=base.RULE_ADMIN_REQUIRED,36 check_str=base.RULE_ADMIN_REQUIRED
43 deprecated_reason=DEPRECATED_REASON,
44 deprecated_since=versionutils.deprecated.STEIN
45)37)
46deprecated_delete_credential = policy.DeprecatedRule(38deprecated_delete_credential = policy.DeprecatedRule(
47 name=base.IDENTITY % 'delete_credential',39 name=base.IDENTITY % 'delete_credential',
48 check_str=base.RULE_ADMIN_REQUIRED,40 check_str=base.RULE_ADMIN_REQUIRED
49 deprecated_reason=DEPRECATED_REASON,
50 deprecated_since=versionutils.deprecated.STEIN
51)41)
5242
5343
@@ -60,6 +50,8 @@ credential_policies = [
60 operations=[{'path': '/v3/credentials/{credential_id}',50 operations=[{'path': '/v3/credentials/{credential_id}',
61 'method': 'GET'}],51 'method': 'GET'}],
62 deprecated_rule=deprecated_get_credential,52 deprecated_rule=deprecated_get_credential,
53 deprecated_reason=DEPRECATED_REASON,
54 deprecated_since=versionutils.deprecated.STEIN
63 ),55 ),
64 policy.DocumentedRuleDefault(56 policy.DocumentedRuleDefault(
65 name=base.IDENTITY % 'list_credentials',57 name=base.IDENTITY % 'list_credentials',
@@ -69,6 +61,8 @@ credential_policies = [
69 operations=[{'path': '/v3/credentials',61 operations=[{'path': '/v3/credentials',
70 'method': 'GET'}],62 'method': 'GET'}],
71 deprecated_rule=deprecated_list_credentials,63 deprecated_rule=deprecated_list_credentials,
64 deprecated_reason=DEPRECATED_REASON,
65 deprecated_since=versionutils.deprecated.STEIN
72 ),66 ),
73 policy.DocumentedRuleDefault(67 policy.DocumentedRuleDefault(
74 name=base.IDENTITY % 'create_credential',68 name=base.IDENTITY % 'create_credential',
@@ -78,6 +72,8 @@ credential_policies = [
78 operations=[{'path': '/v3/credentials',72 operations=[{'path': '/v3/credentials',
79 'method': 'POST'}],73 'method': 'POST'}],
80 deprecated_rule=deprecated_create_credential,74 deprecated_rule=deprecated_create_credential,
75 deprecated_reason=DEPRECATED_REASON,
76 deprecated_since=versionutils.deprecated.STEIN
81 ),77 ),
82 policy.DocumentedRuleDefault(78 policy.DocumentedRuleDefault(
83 name=base.IDENTITY % 'update_credential',79 name=base.IDENTITY % 'update_credential',
@@ -87,6 +83,8 @@ credential_policies = [
87 operations=[{'path': '/v3/credentials/{credential_id}',83 operations=[{'path': '/v3/credentials/{credential_id}',
88 'method': 'PATCH'}],84 'method': 'PATCH'}],
89 deprecated_rule=deprecated_update_credential,85 deprecated_rule=deprecated_update_credential,
86 deprecated_reason=DEPRECATED_REASON,
87 deprecated_since=versionutils.deprecated.STEIN
90 ),88 ),
91 policy.DocumentedRuleDefault(89 policy.DocumentedRuleDefault(
92 name=base.IDENTITY % 'delete_credential',90 name=base.IDENTITY % 'delete_credential',
@@ -96,6 +94,8 @@ credential_policies = [
96 operations=[{'path': '/v3/credentials/{credential_id}',94 operations=[{'path': '/v3/credentials/{credential_id}',
97 'method': 'DELETE'}],95 'method': 'DELETE'}],
98 deprecated_rule=deprecated_delete_credential,96 deprecated_rule=deprecated_delete_credential,
97 deprecated_reason=DEPRECATED_REASON,
98 deprecated_since=versionutils.deprecated.STEIN
99 )99 )
100]100]
101101
diff --git a/keystone/common/policies/domain.py b/keystone/common/policies/domain.py
index cd743ee..7d3e3d7 100644
--- a/keystone/common/policies/domain.py
+++ b/keystone/common/policies/domain.py
@@ -21,33 +21,23 @@ DEPRECATED_REASON = (
2121
22deprecated_list_domains = policy.DeprecatedRule(22deprecated_list_domains = policy.DeprecatedRule(
23 name=base.IDENTITY % 'list_domains',23 name=base.IDENTITY % 'list_domains',
24 check_str=base.RULE_ADMIN_REQUIRED,24 check_str=base.RULE_ADMIN_REQUIRED
25 deprecated_reason=DEPRECATED_REASON,
26 deprecated_since=versionutils.deprecated.STEIN
27)25)
28deprecated_get_domain = policy.DeprecatedRule(26deprecated_get_domain = policy.DeprecatedRule(
29 name=base.IDENTITY % 'get_domain',27 name=base.IDENTITY % 'get_domain',
30 check_str=base.RULE_ADMIN_OR_TARGET_DOMAIN,28 check_str=base.RULE_ADMIN_OR_TARGET_DOMAIN
31 deprecated_reason=DEPRECATED_REASON,
32 deprecated_since=versionutils.deprecated.STEIN
33)29)
34deprecated_update_domain = policy.DeprecatedRule(30deprecated_update_domain = policy.DeprecatedRule(
35 name=base.IDENTITY % 'update_domain',31 name=base.IDENTITY % 'update_domain',
36 check_str=base.RULE_ADMIN_REQUIRED,32 check_str=base.RULE_ADMIN_REQUIRED
37 deprecated_reason=DEPRECATED_REASON,
38 deprecated_since=versionutils.deprecated.STEIN
39)33)
40deprecated_create_domain = policy.DeprecatedRule(34deprecated_create_domain = policy.DeprecatedRule(
41 name=base.IDENTITY % 'create_domain',35 name=base.IDENTITY % 'create_domain',
42 check_str=base.RULE_ADMIN_REQUIRED,36 check_str=base.RULE_ADMIN_REQUIRED
43 deprecated_reason=DEPRECATED_REASON,
44 deprecated_since=versionutils.deprecated.STEIN
45)37)
46deprecated_delete_domain = policy.DeprecatedRule(38deprecated_delete_domain = policy.DeprecatedRule(
47 name=base.IDENTITY % 'delete_domain',39 name=base.IDENTITY % 'delete_domain',
48 check_str=base.RULE_ADMIN_REQUIRED,40 check_str=base.RULE_ADMIN_REQUIRED
49 deprecated_reason=DEPRECATED_REASON,
50 deprecated_since=versionutils.deprecated.STEIN
51)41)
52SYSTEM_USER_OR_DOMAIN_USER_OR_PROJECT_USER = (42SYSTEM_USER_OR_DOMAIN_USER_OR_PROJECT_USER = (
53 '(role:reader and system_scope:all) or '43 '(role:reader and system_scope:all) or '
@@ -66,7 +56,9 @@ domain_policies = [
66 description='Show domain details.',56 description='Show domain details.',
67 operations=[{'path': '/v3/domains/{domain_id}',57 operations=[{'path': '/v3/domains/{domain_id}',
68 'method': 'GET'}],58 'method': 'GET'}],
69 deprecated_rule=deprecated_get_domain),59 deprecated_rule=deprecated_get_domain,
60 deprecated_reason=DEPRECATED_REASON,
61 deprecated_since=versionutils.deprecated.STEIN),
70 policy.DocumentedRuleDefault(62 policy.DocumentedRuleDefault(
71 name=base.IDENTITY % 'list_domains',63 name=base.IDENTITY % 'list_domains',
72 check_str=base.SYSTEM_READER,64 check_str=base.SYSTEM_READER,
@@ -74,7 +66,9 @@ domain_policies = [
74 description='List domains.',66 description='List domains.',
75 operations=[{'path': '/v3/domains',67 operations=[{'path': '/v3/domains',
76 'method': 'GET'}],68 'method': 'GET'}],
77 deprecated_rule=deprecated_list_domains),69 deprecated_rule=deprecated_list_domains,
70 deprecated_reason=DEPRECATED_REASON,
71 deprecated_since=versionutils.deprecated.STEIN),
78 policy.DocumentedRuleDefault(72 policy.DocumentedRuleDefault(
79 name=base.IDENTITY % 'create_domain',73 name=base.IDENTITY % 'create_domain',
80 check_str=base.SYSTEM_ADMIN,74 check_str=base.SYSTEM_ADMIN,
@@ -82,7 +76,9 @@ domain_policies = [
82 description='Create domain.',76 description='Create domain.',
83 operations=[{'path': '/v3/domains',77 operations=[{'path': '/v3/domains',
84 'method': 'POST'}],78 'method': 'POST'}],
85 deprecated_rule=deprecated_create_domain),79 deprecated_rule=deprecated_create_domain,
80 deprecated_reason=DEPRECATED_REASON,
81 deprecated_since=versionutils.deprecated.STEIN),
86 policy.DocumentedRuleDefault(82 policy.DocumentedRuleDefault(
87 name=base.IDENTITY % 'update_domain',83 name=base.IDENTITY % 'update_domain',
88 check_str=base.SYSTEM_ADMIN,84 check_str=base.SYSTEM_ADMIN,
@@ -90,7 +86,9 @@ domain_policies = [
90 description='Update domain.',86 description='Update domain.',
91 operations=[{'path': '/v3/domains/{domain_id}',87 operations=[{'path': '/v3/domains/{domain_id}',
92 'method': 'PATCH'}],88 'method': 'PATCH'}],
93 deprecated_rule=deprecated_update_domain),89 deprecated_rule=deprecated_update_domain,
90 deprecated_reason=DEPRECATED_REASON,
91 deprecated_since=versionutils.deprecated.STEIN),
94 policy.DocumentedRuleDefault(92 policy.DocumentedRuleDefault(
95 name=base.IDENTITY % 'delete_domain',93 name=base.IDENTITY % 'delete_domain',
96 check_str=base.SYSTEM_ADMIN,94 check_str=base.SYSTEM_ADMIN,
@@ -98,7 +96,9 @@ domain_policies = [
98 description='Delete domain.',96 description='Delete domain.',
99 operations=[{'path': '/v3/domains/{domain_id}',97 operations=[{'path': '/v3/domains/{domain_id}',
100 'method': 'DELETE'}],98 'method': 'DELETE'}],
101 deprecated_rule=deprecated_delete_domain),99 deprecated_rule=deprecated_delete_domain,
100 deprecated_reason=DEPRECATED_REASON,
101 deprecated_since=versionutils.deprecated.STEIN),
102]102]
103103
104104
diff --git a/keystone/common/policies/domain_config.py b/keystone/common/policies/domain_config.py
index b1c8fda..a157f0d 100644
--- a/keystone/common/policies/domain_config.py
+++ b/keystone/common/policies/domain_config.py
@@ -15,46 +15,36 @@ from oslo_policy import policy
1515
16from keystone.common.policies import base16from keystone.common.policies import base
1717
18DEPRECATED_REASON = (
19 "The domain config API is now aware of system scope and default roles."
20)
21
22deprecated_get_domain_config = policy.DeprecatedRule(18deprecated_get_domain_config = policy.DeprecatedRule(
23 name=base.IDENTITY % 'get_domain_config',19 name=base.IDENTITY % 'get_domain_config',
24 check_str=base.RULE_ADMIN_REQUIRED,20 check_str=base.RULE_ADMIN_REQUIRED,
25 deprecated_reason=DEPRECATED_REASON,
26 deprecated_since=versionutils.deprecated.TRAIN
27)21)
2822
29deprecated_get_domain_config_default = policy.DeprecatedRule(23deprecated_get_domain_config_default = policy.DeprecatedRule(
30 name=base.IDENTITY % 'get_domain_config_default',24 name=base.IDENTITY % 'get_domain_config_default',
31 check_str=base.RULE_ADMIN_REQUIRED,25 check_str=base.RULE_ADMIN_REQUIRED,
32 deprecated_reason=DEPRECATED_REASON,
33 deprecated_since=versionutils.deprecated.TRAIN
34)26)
3527
36deprecated_create_domain_config = policy.DeprecatedRule(28deprecated_create_domain_config = policy.DeprecatedRule(
37 name=base.IDENTITY % 'create_domain_config',29 name=base.IDENTITY % 'create_domain_config',
38 check_str=base.RULE_ADMIN_REQUIRED,30 check_str=base.RULE_ADMIN_REQUIRED,
39 deprecated_reason=DEPRECATED_REASON,
40 deprecated_since=versionutils.deprecated.TRAIN
41)31)
4232
43deprecated_update_domain_config = policy.DeprecatedRule(33deprecated_update_domain_config = policy.DeprecatedRule(
44 name=base.IDENTITY % 'update_domain_config',34 name=base.IDENTITY % 'update_domain_config',
45 check_str=base.RULE_ADMIN_REQUIRED,35 check_str=base.RULE_ADMIN_REQUIRED,
46 deprecated_reason=DEPRECATED_REASON,
47 deprecated_since=versionutils.deprecated.TRAIN
48)36)
4937
50deprecated_delete_domain_config = policy.DeprecatedRule(38deprecated_delete_domain_config = policy.DeprecatedRule(
51 name=base.IDENTITY % 'delete_domain_config',39 name=base.IDENTITY % 'delete_domain_config',
52 check_str=base.RULE_ADMIN_REQUIRED,40 check_str=base.RULE_ADMIN_REQUIRED,
53 deprecated_reason=DEPRECATED_REASON,
54 deprecated_since=versionutils.deprecated.TRAIN
55)41)
5642
5743
44DEPRECATED_REASON = (
45 "The domain config API is now aware of system scope and default roles."
46)
47
58domain_config_policies = [48domain_config_policies = [
59 policy.DocumentedRuleDefault(49 policy.DocumentedRuleDefault(
60 name=base.IDENTITY % 'create_domain_config',50 name=base.IDENTITY % 'create_domain_config',
@@ -75,7 +65,9 @@ domain_config_policies = [
75 'method': 'PUT'65 'method': 'PUT'
76 }66 }
77 ],67 ],
78 deprecated_rule=deprecated_create_domain_config68 deprecated_rule=deprecated_create_domain_config,
69 deprecated_reason=DEPRECATED_REASON,
70 deprecated_since=versionutils.deprecated.TRAIN
79 ),71 ),
80 policy.DocumentedRuleDefault(72 policy.DocumentedRuleDefault(
81 name=base.IDENTITY % 'get_domain_config',73 name=base.IDENTITY % 'get_domain_config',
@@ -111,6 +103,8 @@ domain_config_policies = [
111 }103 }
112 ],104 ],
113 deprecated_rule=deprecated_get_domain_config,105 deprecated_rule=deprecated_get_domain_config,
106 deprecated_reason=DEPRECATED_REASON,
107 deprecated_since=versionutils.deprecated.TRAIN
114 ),108 ),
115 policy.DocumentedRuleDefault(109 policy.DocumentedRuleDefault(
116 name=base.IDENTITY % 'get_security_compliance_domain_config',110 name=base.IDENTITY % 'get_security_compliance_domain_config',
@@ -130,12 +124,12 @@ domain_config_policies = [
130 'method': 'HEAD'124 'method': 'HEAD'
131 },125 },
132 {126 {
133 'path': ('/v3/domains/{domain_id}/config/'127 'path': ('v3/domains/{domain_id}/config/'
134 'security_compliance/{option}'),128 'security_compliance/{option}'),
135 'method': 'GET'129 'method': 'GET'
136 },130 },
137 {131 {
138 'path': ('/v3/domains/{domain_id}/config/'132 'path': ('v3/domains/{domain_id}/config/'
139 'security_compliance/{option}'),133 'security_compliance/{option}'),
140 'method': 'HEAD'134 'method': 'HEAD'
141 }135 }
@@ -162,6 +156,8 @@ domain_config_policies = [
162 }156 }
163 ],157 ],
164 deprecated_rule=deprecated_update_domain_config,158 deprecated_rule=deprecated_update_domain_config,
159 deprecated_reason=DEPRECATED_REASON,
160 deprecated_since=versionutils.deprecated.TRAIN
165 ),161 ),
166 policy.DocumentedRuleDefault(162 policy.DocumentedRuleDefault(
167 name=base.IDENTITY % 'delete_domain_config',163 name=base.IDENTITY % 'delete_domain_config',
@@ -184,6 +180,8 @@ domain_config_policies = [
184 }180 }
185 ],181 ],
186 deprecated_rule=deprecated_delete_domain_config,182 deprecated_rule=deprecated_delete_domain_config,
183 deprecated_reason=DEPRECATED_REASON,
184 deprecated_since=versionutils.deprecated.TRAIN
187 ),185 ),
188 policy.DocumentedRuleDefault(186 policy.DocumentedRuleDefault(
189 name=base.IDENTITY % 'get_domain_config_default',187 name=base.IDENTITY % 'get_domain_config_default',
@@ -218,6 +216,8 @@ domain_config_policies = [
218 }216 }
219 ],217 ],
220 deprecated_rule=deprecated_get_domain_config_default,218 deprecated_rule=deprecated_get_domain_config_default,
219 deprecated_reason=DEPRECATED_REASON,
220 deprecated_since=versionutils.deprecated.TRAIN
221 )221 )
222]222]
223223
diff --git a/keystone/common/policies/ec2_credential.py b/keystone/common/policies/ec2_credential.py
index 9e52709..266a80e 100644
--- a/keystone/common/policies/ec2_credential.py
+++ b/keystone/common/policies/ec2_credential.py
@@ -15,35 +15,26 @@ from oslo_policy import policy
1515
16from keystone.common.policies import base16from keystone.common.policies import base
1717
18DEPRECATED_REASON = (
19 "The EC2 credential API is now aware of system scope and default roles."
20)
21
22deprecated_ec2_get_credential = policy.DeprecatedRule(18deprecated_ec2_get_credential = policy.DeprecatedRule(
23 name=base.IDENTITY % 'ec2_get_credential',19 name=base.IDENTITY % 'ec2_get_credential',
24 check_str=base.RULE_ADMIN_OR_CREDENTIAL_OWNER,20 check_str=base.RULE_ADMIN_OR_CREDENTIAL_OWNER
25 deprecated_reason=DEPRECATED_REASON,
26 deprecated_since=versionutils.deprecated.TRAIN
27)21)
28deprecated_ec2_list_credentials = policy.DeprecatedRule(22deprecated_ec2_list_credentials = policy.DeprecatedRule(
29 name=base.IDENTITY % 'ec2_list_credentials',23 name=base.IDENTITY % 'ec2_list_credentials',
30 check_str=base.RULE_ADMIN_OR_OWNER,24 check_str=base.RULE_ADMIN_OR_OWNER
31 deprecated_reason=DEPRECATED_REASON,
32 deprecated_since=versionutils.deprecated.TRAIN
33)25)
34deprecated_ec2_create_credential = policy.DeprecatedRule(26deprecated_ec2_create_credential = policy.DeprecatedRule(
35 name=base.IDENTITY % 'ec2_create_credential',27 name=base.IDENTITY % 'ec2_create_credential',
36 check_str=base.RULE_ADMIN_OR_OWNER,28 check_str=base.RULE_ADMIN_OR_OWNER
37 deprecated_reason=DEPRECATED_REASON,
38 deprecated_since=versionutils.deprecated.TRAIN
39)29)
40deprecated_ec2_delete_credential = policy.DeprecatedRule(30deprecated_ec2_delete_credential = policy.DeprecatedRule(
41 name=base.IDENTITY % 'ec2_delete_credential',31 name=base.IDENTITY % 'ec2_delete_credential',
42 check_str=base.RULE_ADMIN_OR_CREDENTIAL_OWNER,32 check_str=base.RULE_ADMIN_OR_CREDENTIAL_OWNER
43 deprecated_reason=DEPRECATED_REASON,
44 deprecated_since=versionutils.deprecated.TRAIN
45)33)
4634
35DEPRECATED_REASON = (
36 "The EC2 credential API is now aware of system scope and default roles."
37)
4738
48ec2_credential_policies = [39ec2_credential_policies = [
49 policy.DocumentedRuleDefault(40 policy.DocumentedRuleDefault(
@@ -54,7 +45,9 @@ ec2_credential_policies = [
54 operations=[{'path': ('/v3/users/{user_id}/credentials/OS-EC2/'45 operations=[{'path': ('/v3/users/{user_id}/credentials/OS-EC2/'
55 '{credential_id}'),46 '{credential_id}'),
56 'method': 'GET'}],47 'method': 'GET'}],
57 deprecated_rule=deprecated_ec2_get_credential48 deprecated_rule=deprecated_ec2_get_credential,
49 deprecated_reason=DEPRECATED_REASON,
50 deprecated_since=versionutils.deprecated.TRAIN
58 ),51 ),
59 policy.DocumentedRuleDefault(52 policy.DocumentedRuleDefault(
60 name=base.IDENTITY % 'ec2_list_credentials',53 name=base.IDENTITY % 'ec2_list_credentials',
@@ -64,6 +57,8 @@ ec2_credential_policies = [
64 operations=[{'path': '/v3/users/{user_id}/credentials/OS-EC2',57 operations=[{'path': '/v3/users/{user_id}/credentials/OS-EC2',
65 'method': 'GET'}],58 'method': 'GET'}],
66 deprecated_rule=deprecated_ec2_list_credentials,59 deprecated_rule=deprecated_ec2_list_credentials,
60 deprecated_reason=DEPRECATED_REASON,
61 deprecated_since=versionutils.deprecated.TRAIN
67 ),62 ),
68 policy.DocumentedRuleDefault(63 policy.DocumentedRuleDefault(
69 name=base.IDENTITY % 'ec2_create_credential',64 name=base.IDENTITY % 'ec2_create_credential',
@@ -73,6 +68,8 @@ ec2_credential_policies = [
73 operations=[{'path': '/v3/users/{user_id}/credentials/OS-EC2',68 operations=[{'path': '/v3/users/{user_id}/credentials/OS-EC2',
74 'method': 'POST'}],69 'method': 'POST'}],
75 deprecated_rule=deprecated_ec2_create_credential,70 deprecated_rule=deprecated_ec2_create_credential,
71 deprecated_reason=DEPRECATED_REASON,
72 deprecated_since=versionutils.deprecated.TRAIN
76 ),73 ),
77 policy.DocumentedRuleDefault(74 policy.DocumentedRuleDefault(
78 name=base.IDENTITY % 'ec2_delete_credential',75 name=base.IDENTITY % 'ec2_delete_credential',
@@ -83,6 +80,8 @@ ec2_credential_policies = [
83 '{credential_id}'),80 '{credential_id}'),
84 'method': 'DELETE'}],81 'method': 'DELETE'}],
85 deprecated_rule=deprecated_ec2_delete_credential,82 deprecated_rule=deprecated_ec2_delete_credential,
83 deprecated_reason=DEPRECATED_REASON,
84 deprecated_since=versionutils.deprecated.TRAIN
86 )85 )
87]86]
8887
diff --git a/keystone/common/policies/endpoint.py b/keystone/common/policies/endpoint.py
index 7858249..b99a40e 100644
--- a/keystone/common/policies/endpoint.py
+++ b/keystone/common/policies/endpoint.py
@@ -15,34 +15,24 @@ from oslo_policy import policy
1515
16from keystone.common.policies import base16from keystone.common.policies import base
1717
18DEPRECATED_REASON = (
19 "The endpoint API is now aware of system scope and default roles."
20)
21
22deprecated_get_endpoint = policy.DeprecatedRule(18deprecated_get_endpoint = policy.DeprecatedRule(
23 name=base.IDENTITY % 'get_endpoint', check_str=base.RULE_ADMIN_REQUIRED,19 name=base.IDENTITY % 'get_endpoint', check_str=base.RULE_ADMIN_REQUIRED,
24 deprecated_reason=DEPRECATED_REASON,
25 deprecated_since=versionutils.deprecated.STEIN
26)20)
27deprecated_list_endpoints = policy.DeprecatedRule(21deprecated_list_endpoints = policy.DeprecatedRule(
28 name=base.IDENTITY % 'list_endpoints', check_str=base.RULE_ADMIN_REQUIRED,22 name=base.IDENTITY % 'list_endpoints', check_str=base.RULE_ADMIN_REQUIRED,
29 deprecated_reason=DEPRECATED_REASON,
30 deprecated_since=versionutils.deprecated.STEIN
31)23)
32deprecated_update_endpoint = policy.DeprecatedRule(24deprecated_update_endpoint = policy.DeprecatedRule(
33 name=base.IDENTITY % 'update_endpoint', check_str=base.RULE_ADMIN_REQUIRED,25 name=base.IDENTITY % 'update_endpoint', check_str=base.RULE_ADMIN_REQUIRED,
34 deprecated_reason=DEPRECATED_REASON,
35 deprecated_since=versionutils.deprecated.STEIN
36)26)
37deprecated_create_endpoint = policy.DeprecatedRule(27deprecated_create_endpoint = policy.DeprecatedRule(
38 name=base.IDENTITY % 'create_endpoint', check_str=base.RULE_ADMIN_REQUIRED,28 name=base.IDENTITY % 'create_endpoint', check_str=base.RULE_ADMIN_REQUIRED,
39 deprecated_reason=DEPRECATED_REASON,
40 deprecated_since=versionutils.deprecated.STEIN
41)29)
42deprecated_delete_endpoint = policy.DeprecatedRule(30deprecated_delete_endpoint = policy.DeprecatedRule(
43 name=base.IDENTITY % 'delete_endpoint', check_str=base.RULE_ADMIN_REQUIRED,31 name=base.IDENTITY % 'delete_endpoint', check_str=base.RULE_ADMIN_REQUIRED,
44 deprecated_reason=DEPRECATED_REASON,32)
45 deprecated_since=versionutils.deprecated.STEIN33
34DEPRECATED_REASON = (
35 "The endpoint API is now aware of system scope and default roles."
46)36)
4737
4838
@@ -54,7 +44,9 @@ endpoint_policies = [
54 description='Show endpoint details.',44 description='Show endpoint details.',
55 operations=[{'path': '/v3/endpoints/{endpoint_id}',45 operations=[{'path': '/v3/endpoints/{endpoint_id}',
56 'method': 'GET'}],46 'method': 'GET'}],
57 deprecated_rule=deprecated_get_endpoint),47 deprecated_rule=deprecated_get_endpoint,
48 deprecated_reason=DEPRECATED_REASON,
49 deprecated_since=versionutils.deprecated.STEIN),
58 policy.DocumentedRuleDefault(50 policy.DocumentedRuleDefault(
59 name=base.IDENTITY % 'list_endpoints',51 name=base.IDENTITY % 'list_endpoints',
60 check_str=base.SYSTEM_READER,52 check_str=base.SYSTEM_READER,
@@ -62,7 +54,9 @@ endpoint_policies = [
62 description='List endpoints.',54 description='List endpoints.',
63 operations=[{'path': '/v3/endpoints',55 operations=[{'path': '/v3/endpoints',
64 'method': 'GET'}],56 'method': 'GET'}],
65 deprecated_rule=deprecated_list_endpoints),57 deprecated_rule=deprecated_list_endpoints,
58 deprecated_reason=DEPRECATED_REASON,
59 deprecated_since=versionutils.deprecated.STEIN),
66 policy.DocumentedRuleDefault(60 policy.DocumentedRuleDefault(
67 name=base.IDENTITY % 'create_endpoint',61 name=base.IDENTITY % 'create_endpoint',
68 check_str=base.SYSTEM_ADMIN,62 check_str=base.SYSTEM_ADMIN,
@@ -70,7 +64,9 @@ endpoint_policies = [
70 description='Create endpoint.',64 description='Create endpoint.',
71 operations=[{'path': '/v3/endpoints',65 operations=[{'path': '/v3/endpoints',
72 'method': 'POST'}],66 'method': 'POST'}],
73 deprecated_rule=deprecated_create_endpoint),67 deprecated_rule=deprecated_create_endpoint,
68 deprecated_reason=DEPRECATED_REASON,
69 deprecated_since=versionutils.deprecated.STEIN),
74 policy.DocumentedRuleDefault(70 policy.DocumentedRuleDefault(
75 name=base.IDENTITY % 'update_endpoint',71 name=base.IDENTITY % 'update_endpoint',
76 check_str=base.SYSTEM_ADMIN,72 check_str=base.SYSTEM_ADMIN,
@@ -78,7 +74,9 @@ endpoint_policies = [
78 description='Update endpoint.',74 description='Update endpoint.',
79 operations=[{'path': '/v3/endpoints/{endpoint_id}',75 operations=[{'path': '/v3/endpoints/{endpoint_id}',
80 'method': 'PATCH'}],76 'method': 'PATCH'}],
81 deprecated_rule=deprecated_update_endpoint),77 deprecated_rule=deprecated_update_endpoint,
78 deprecated_reason=DEPRECATED_REASON,
79 deprecated_since=versionutils.deprecated.STEIN),
82 policy.DocumentedRuleDefault(80 policy.DocumentedRuleDefault(
83 name=base.IDENTITY % 'delete_endpoint',81 name=base.IDENTITY % 'delete_endpoint',
84 check_str=base.SYSTEM_ADMIN,82 check_str=base.SYSTEM_ADMIN,
@@ -86,7 +84,9 @@ endpoint_policies = [
86 description='Delete endpoint.',84 description='Delete endpoint.',
87 operations=[{'path': '/v3/endpoints/{endpoint_id}',85 operations=[{'path': '/v3/endpoints/{endpoint_id}',
88 'method': 'DELETE'}],86 'method': 'DELETE'}],
89 deprecated_rule=deprecated_delete_endpoint)87 deprecated_rule=deprecated_delete_endpoint,
88 deprecated_reason=DEPRECATED_REASON,
89 deprecated_since=versionutils.deprecated.STEIN)
90]90]
9191
9292
diff --git a/keystone/common/policies/endpoint_group.py b/keystone/common/policies/endpoint_group.py
index 741e0b7..691a6fe 100644
--- a/keystone/common/policies/endpoint_group.py
+++ b/keystone/common/policies/endpoint_group.py
@@ -15,85 +15,64 @@ from oslo_policy import policy
1515
16from keystone.common.policies import base16from keystone.common.policies import base
1717
18DEPRECATED_REASON = (
19 "The endpoint groups API is now aware of system scope and default roles."
20)
21
22deprecated_list_endpoint_groups = policy.DeprecatedRule(18deprecated_list_endpoint_groups = policy.DeprecatedRule(
23 name=base.IDENTITY % 'list_endpoint_groups',19 name=base.IDENTITY % 'list_endpoint_groups',
24 check_str=base.RULE_ADMIN_REQUIRED,20 check_str=base.RULE_ADMIN_REQUIRED,
25 deprecated_reason=DEPRECATED_REASON,
26 deprecated_since=versionutils.deprecated.TRAIN
27)21)
2822
29deprecated_get_endpoint_group = policy.DeprecatedRule(23deprecated_get_endpoint_group = policy.DeprecatedRule(
30 name=base.IDENTITY % 'get_endpoint_group',24 name=base.IDENTITY % 'get_endpoint_group',
31 check_str=base.RULE_ADMIN_REQUIRED,25 check_str=base.RULE_ADMIN_REQUIRED,
32 deprecated_reason=DEPRECATED_REASON,
33 deprecated_since=versionutils.deprecated.TRAIN
34)26)
3527
36deprecated_list_projects_assoc_with_endpoint_group = policy.DeprecatedRule(28deprecated_list_projects_assoc_with_endpoint_group = policy.DeprecatedRule(
37 name=base.IDENTITY % 'list_projects_associated_with_endpoint_group',29 name=base.IDENTITY % 'list_projects_associated_with_endpoint_group',
38 check_str=base.RULE_ADMIN_REQUIRED,30 check_str=base.RULE_ADMIN_REQUIRED,
39 deprecated_reason=DEPRECATED_REASON,
40 deprecated_since=versionutils.deprecated.TRAIN
41)31)
4232
43deprecated_list_endpoints_assoc_with_endpoint_group = policy.DeprecatedRule(33deprecated_list_endpoints_assoc_with_endpoint_group = policy.DeprecatedRule(
44 name=base.IDENTITY % 'list_endpoints_associated_with_endpoint_group',34 name=base.IDENTITY % 'list_endpoints_associated_with_endpoint_group',
45 check_str=base.RULE_ADMIN_REQUIRED,35 check_str=base.RULE_ADMIN_REQUIRED,
46 deprecated_reason=DEPRECATED_REASON,
47 deprecated_since=versionutils.deprecated.TRAIN
48)36)
4937
50deprecated_get_endpoint_group_in_project = policy.DeprecatedRule(38deprecated_get_endpoint_group_in_project = policy.DeprecatedRule(
51 name=base.IDENTITY % 'get_endpoint_group_in_project',39 name=base.IDENTITY % 'get_endpoint_group_in_project',
52 check_str=base.RULE_ADMIN_REQUIRED,40 check_str=base.RULE_ADMIN_REQUIRED,
53 deprecated_reason=DEPRECATED_REASON,
54 deprecated_since=versionutils.deprecated.TRAIN
55)41)
5642
57deprecated_list_endpoint_groups_for_project = policy.DeprecatedRule(43deprecated_list_endpoint_groups_for_project = policy.DeprecatedRule(
58 name=base.IDENTITY % 'list_endpoint_groups_for_project',44 name=base.IDENTITY % 'list_endpoint_groups_for_project',
59 check_str=base.RULE_ADMIN_REQUIRED,45 check_str=base.RULE_ADMIN_REQUIRED,
60 deprecated_reason=DEPRECATED_REASON,
61 deprecated_since=versionutils.deprecated.TRAIN
62)46)
6347
64deprecated_create_endpoint_group = policy.DeprecatedRule(48deprecated_create_endpoint_group = policy.DeprecatedRule(
65 name=base.IDENTITY % 'create_endpoint_group',49 name=base.IDENTITY % 'create_endpoint_group',
66 check_str=base.RULE_ADMIN_REQUIRED,50 check_str=base.RULE_ADMIN_REQUIRED,
67 deprecated_reason=DEPRECATED_REASON,
68 deprecated_since=versionutils.deprecated.TRAIN
69)51)
7052
71deprecated_update_endpoint_group = policy.DeprecatedRule(53deprecated_update_endpoint_group = policy.DeprecatedRule(
72 name=base.IDENTITY % 'update_endpoint_group',54 name=base.IDENTITY % 'update_endpoint_group',
73 check_str=base.RULE_ADMIN_REQUIRED,55 check_str=base.RULE_ADMIN_REQUIRED,
74 deprecated_reason=DEPRECATED_REASON,
75 deprecated_since=versionutils.deprecated.TRAIN
76)56)
7757
78deprecated_delete_endpoint_group = policy.DeprecatedRule(58deprecated_delete_endpoint_group = policy.DeprecatedRule(
79 name=base.IDENTITY % 'delete_endpoint_group',59 name=base.IDENTITY % 'delete_endpoint_group',
80 check_str=base.RULE_ADMIN_REQUIRED,60 check_str=base.RULE_ADMIN_REQUIRED,
81 deprecated_reason=DEPRECATED_REASON,
82 deprecated_since=versionutils.deprecated.TRAIN
83)61)
8462
85deprecated_add_endpoint_group_to_project = policy.DeprecatedRule(63deprecated_add_endpoint_group_to_project = policy.DeprecatedRule(
86 name=base.IDENTITY % 'add_endpoint_group_to_project',64 name=base.IDENTITY % 'add_endpoint_group_to_project',
87 check_str=base.RULE_ADMIN_REQUIRED,65 check_str=base.RULE_ADMIN_REQUIRED,
88 deprecated_reason=DEPRECATED_REASON,
89 deprecated_since=versionutils.deprecated.TRAIN
90)66)
9167
92deprecated_remove_endpoint_group_from_project = policy.DeprecatedRule(68deprecated_remove_endpoint_group_from_project = policy.DeprecatedRule(
93 name=base.IDENTITY % 'remove_endpoint_group_from_project',69 name=base.IDENTITY % 'remove_endpoint_group_from_project',
94 check_str=base.RULE_ADMIN_REQUIRED,70 check_str=base.RULE_ADMIN_REQUIRED,
95 deprecated_reason=DEPRECATED_REASON,71)
96 deprecated_since=versionutils.deprecated.TRAIN72
73
74DEPRECATED_REASON = (
75 "The endpoint groups API is now aware of system scope and default roles."
97)76)
9877
9978
@@ -105,7 +84,9 @@ group_endpoint_policies = [
105 description='Create endpoint group.',84 description='Create endpoint group.',
106 operations=[{'path': '/v3/OS-EP-FILTER/endpoint_groups',85 operations=[{'path': '/v3/OS-EP-FILTER/endpoint_groups',
107 'method': 'POST'}],86 'method': 'POST'}],
108 deprecated_rule=deprecated_create_endpoint_group),87 deprecated_rule=deprecated_create_endpoint_group,
88 deprecated_reason=DEPRECATED_REASON,
89 deprecated_since=versionutils.deprecated.TRAIN),
109 policy.DocumentedRuleDefault(90 policy.DocumentedRuleDefault(
110 name=base.IDENTITY % 'list_endpoint_groups',91 name=base.IDENTITY % 'list_endpoint_groups',
111 check_str=base.SYSTEM_READER,92 check_str=base.SYSTEM_READER,
@@ -113,7 +94,9 @@ group_endpoint_policies = [
113 description='List endpoint groups.',94 description='List endpoint groups.',
114 operations=[{'path': '/v3/OS-EP-FILTER/endpoint_groups',95 operations=[{'path': '/v3/OS-EP-FILTER/endpoint_groups',
115 'method': 'GET'}],96 'method': 'GET'}],
116 deprecated_rule=deprecated_list_endpoint_groups),97 deprecated_rule=deprecated_list_endpoint_groups,
98 deprecated_reason=DEPRECATED_REASON,
99 deprecated_since=versionutils.deprecated.TRAIN),
117 policy.DocumentedRuleDefault(100 policy.DocumentedRuleDefault(
118 name=base.IDENTITY % 'get_endpoint_group',101 name=base.IDENTITY % 'get_endpoint_group',
119 check_str=base.SYSTEM_READER,102 check_str=base.SYSTEM_READER,
@@ -125,7 +108,9 @@ group_endpoint_policies = [
125 {'path': ('/v3/OS-EP-FILTER/endpoint_groups/'108 {'path': ('/v3/OS-EP-FILTER/endpoint_groups/'
126 '{endpoint_group_id}'),109 '{endpoint_group_id}'),
127 'method': 'HEAD'}],110 'method': 'HEAD'}],
128 deprecated_rule=deprecated_get_endpoint_group),111 deprecated_rule=deprecated_get_endpoint_group,
112 deprecated_reason=DEPRECATED_REASON,
113 deprecated_since=versionutils.deprecated.TRAIN),
129 policy.DocumentedRuleDefault(114 policy.DocumentedRuleDefault(
130 name=base.IDENTITY % 'update_endpoint_group',115 name=base.IDENTITY % 'update_endpoint_group',
131 check_str=base.SYSTEM_ADMIN,116 check_str=base.SYSTEM_ADMIN,
@@ -134,7 +119,9 @@ group_endpoint_policies = [
134 operations=[{'path': ('/v3/OS-EP-FILTER/endpoint_groups/'119 operations=[{'path': ('/v3/OS-EP-FILTER/endpoint_groups/'
135 '{endpoint_group_id}'),120 '{endpoint_group_id}'),
136 'method': 'PATCH'}],121 'method': 'PATCH'}],
137 deprecated_rule=deprecated_update_endpoint_group),122 deprecated_rule=deprecated_update_endpoint_group,
123 deprecated_reason=DEPRECATED_REASON,
124 deprecated_since=versionutils.deprecated.TRAIN),
138 policy.DocumentedRuleDefault(125 policy.DocumentedRuleDefault(
139 name=base.IDENTITY % 'delete_endpoint_group',126 name=base.IDENTITY % 'delete_endpoint_group',
140 check_str=base.SYSTEM_ADMIN,127 check_str=base.SYSTEM_ADMIN,
@@ -143,7 +130,9 @@ group_endpoint_policies = [
143 operations=[{'path': ('/v3/OS-EP-FILTER/endpoint_groups/'130 operations=[{'path': ('/v3/OS-EP-FILTER/endpoint_groups/'
144 '{endpoint_group_id}'),131 '{endpoint_group_id}'),
145 'method': 'DELETE'}],132 'method': 'DELETE'}],
146 deprecated_rule=deprecated_delete_endpoint_group),133 deprecated_rule=deprecated_delete_endpoint_group,
134 deprecated_reason=DEPRECATED_REASON,
135 deprecated_since=versionutils.deprecated.TRAIN),
147 policy.DocumentedRuleDefault(136 policy.DocumentedRuleDefault(
148 name=base.IDENTITY % 'list_projects_associated_with_endpoint_group',137 name=base.IDENTITY % 'list_projects_associated_with_endpoint_group',
149 check_str=base.SYSTEM_READER,138 check_str=base.SYSTEM_READER,
@@ -153,7 +142,9 @@ group_endpoint_policies = [
153 operations=[{'path': ('/v3/OS-EP-FILTER/endpoint_groups/'142 operations=[{'path': ('/v3/OS-EP-FILTER/endpoint_groups/'
154 '{endpoint_group_id}/projects'),143 '{endpoint_group_id}/projects'),
155 'method': 'GET'}],144 'method': 'GET'}],
156 deprecated_rule=deprecated_list_projects_assoc_with_endpoint_group),145 deprecated_rule=deprecated_list_projects_assoc_with_endpoint_group,
146 deprecated_reason=DEPRECATED_REASON,
147 deprecated_since=versionutils.deprecated.TRAIN),
157 policy.DocumentedRuleDefault(148 policy.DocumentedRuleDefault(
158 name=base.IDENTITY % 'list_endpoints_associated_with_endpoint_group',149 name=base.IDENTITY % 'list_endpoints_associated_with_endpoint_group',
159 check_str=base.SYSTEM_READER,150 check_str=base.SYSTEM_READER,
@@ -162,7 +153,9 @@ group_endpoint_policies = [
162 operations=[{'path': ('/v3/OS-EP-FILTER/endpoint_groups/'153 operations=[{'path': ('/v3/OS-EP-FILTER/endpoint_groups/'
163 '{endpoint_group_id}/endpoints'),154 '{endpoint_group_id}/endpoints'),
164 'method': 'GET'}],155 'method': 'GET'}],
165 deprecated_rule=deprecated_list_endpoints_assoc_with_endpoint_group),156 deprecated_rule=deprecated_list_endpoints_assoc_with_endpoint_group,
157 deprecated_reason=DEPRECATED_REASON,
158 deprecated_since=versionutils.deprecated.TRAIN),
166 policy.DocumentedRuleDefault(159 policy.DocumentedRuleDefault(
167 name=base.IDENTITY % 'get_endpoint_group_in_project',160 name=base.IDENTITY % 'get_endpoint_group_in_project',
168 check_str=base.SYSTEM_READER,161 check_str=base.SYSTEM_READER,
@@ -175,7 +168,9 @@ group_endpoint_policies = [
175 {'path': ('/v3/OS-EP-FILTER/endpoint_groups/'168 {'path': ('/v3/OS-EP-FILTER/endpoint_groups/'
176 '{endpoint_group_id}/projects/{project_id}'),169 '{endpoint_group_id}/projects/{project_id}'),
177 'method': 'HEAD'}],170 'method': 'HEAD'}],
178 deprecated_rule=deprecated_get_endpoint_group_in_project),171 deprecated_rule=deprecated_get_endpoint_group_in_project,
172 deprecated_reason=DEPRECATED_REASON,
173 deprecated_since=versionutils.deprecated.TRAIN),
179 policy.DocumentedRuleDefault(174 policy.DocumentedRuleDefault(
180 name=base.IDENTITY % 'list_endpoint_groups_for_project',175 name=base.IDENTITY % 'list_endpoint_groups_for_project',
181 check_str=base.SYSTEM_READER,176 check_str=base.SYSTEM_READER,
@@ -184,7 +179,9 @@ group_endpoint_policies = [
184 operations=[{'path': ('/v3/OS-EP-FILTER/projects/{project_id}/'179 operations=[{'path': ('/v3/OS-EP-FILTER/projects/{project_id}/'
185 'endpoint_groups'),180 'endpoint_groups'),
186 'method': 'GET'}],181 'method': 'GET'}],
187 deprecated_rule=deprecated_list_endpoint_groups_for_project),182 deprecated_rule=deprecated_list_endpoint_groups_for_project,
183 deprecated_reason=DEPRECATED_REASON,
184 deprecated_since=versionutils.deprecated.TRAIN),
188 policy.DocumentedRuleDefault(185 policy.DocumentedRuleDefault(
189 name=base.IDENTITY % 'add_endpoint_group_to_project',186 name=base.IDENTITY % 'add_endpoint_group_to_project',
190 check_str=base.SYSTEM_ADMIN,187 check_str=base.SYSTEM_ADMIN,
@@ -193,7 +190,9 @@ group_endpoint_policies = [
193 operations=[{'path': ('/v3/OS-EP-FILTER/endpoint_groups/'190 operations=[{'path': ('/v3/OS-EP-FILTER/endpoint_groups/'
194 '{endpoint_group_id}/projects/{project_id}'),191 '{endpoint_group_id}/projects/{project_id}'),
195 'method': 'PUT'}],192 'method': 'PUT'}],
196 deprecated_rule=deprecated_add_endpoint_group_to_project),193 deprecated_rule=deprecated_add_endpoint_group_to_project,
194 deprecated_reason=DEPRECATED_REASON,
195 deprecated_since=versionutils.deprecated.TRAIN),
197 policy.DocumentedRuleDefault(196 policy.DocumentedRuleDefault(
198 name=base.IDENTITY % 'remove_endpoint_group_from_project',197 name=base.IDENTITY % 'remove_endpoint_group_from_project',
199 check_str=base.SYSTEM_ADMIN,198 check_str=base.SYSTEM_ADMIN,
@@ -202,7 +201,9 @@ group_endpoint_policies = [
202 operations=[{'path': ('/v3/OS-EP-FILTER/endpoint_groups/'201 operations=[{'path': ('/v3/OS-EP-FILTER/endpoint_groups/'
203 '{endpoint_group_id}/projects/{project_id}'),202 '{endpoint_group_id}/projects/{project_id}'),
204 'method': 'DELETE'}],203 'method': 'DELETE'}],
205 deprecated_rule=deprecated_remove_endpoint_group_from_project)204 deprecated_rule=deprecated_remove_endpoint_group_from_project,
205 deprecated_reason=DEPRECATED_REASON,
206 deprecated_since=versionutils.deprecated.TRAIN)
206]207]
207208
208209
diff --git a/keystone/common/policies/grant.py b/keystone/common/policies/grant.py
index 0e1b928..09ef1c9 100644
--- a/keystone/common/policies/grant.py
+++ b/keystone/common/policies/grant.py
@@ -66,79 +66,54 @@ SYSTEM_ADMIN_OR_DOMAIN_ADMIN = (
66 '(' + DOMAIN_MATCHES_ROLE + ')'66 '(' + DOMAIN_MATCHES_ROLE + ')'
67)67)
6868
69DEPRECATED_REASON = (
70 "The assignment API is now aware of system scope and default roles."
71)
72
73deprecated_check_system_grant_for_user = policy.DeprecatedRule(69deprecated_check_system_grant_for_user = policy.DeprecatedRule(
74 name=base.IDENTITY % 'check_system_grant_for_user',70 name=base.IDENTITY % 'check_system_grant_for_user',
75 check_str=base.RULE_ADMIN_REQUIRED,71 check_str=base.RULE_ADMIN_REQUIRED
76 deprecated_reason=DEPRECATED_REASON,
77 deprecated_since=versionutils.deprecated.STEIN
78)72)
79deprecated_list_system_grants_for_user = policy.DeprecatedRule(73deprecated_list_system_grants_for_user = policy.DeprecatedRule(
80 name=base.IDENTITY % 'list_system_grants_for_user',74 name=base.IDENTITY % 'list_system_grants_for_user',
81 check_str=base.RULE_ADMIN_REQUIRED,75 check_str=base.RULE_ADMIN_REQUIRED
82 deprecated_reason=DEPRECATED_REASON,
83 deprecated_since=versionutils.deprecated.STEIN
84)76)
85deprecated_create_system_grant_for_user = policy.DeprecatedRule(77deprecated_create_system_grant_for_user = policy.DeprecatedRule(
86 name=base.IDENTITY % 'create_system_grant_for_user',78 name=base.IDENTITY % 'create_system_grant_for_user',
87 check_str=base.RULE_ADMIN_REQUIRED,79 check_str=base.RULE_ADMIN_REQUIRED
88 deprecated_reason=DEPRECATED_REASON,
89 deprecated_since=versionutils.deprecated.STEIN
90)80)
91deprecated_revoke_system_grant_for_user = policy.DeprecatedRule(81deprecated_revoke_system_grant_for_user = policy.DeprecatedRule(
92 name=base.IDENTITY % 'revoke_system_grant_for_user',82 name=base.IDENTITY % 'revoke_system_grant_for_user',
93 check_str=base.RULE_ADMIN_REQUIRED,83 check_str=base.RULE_ADMIN_REQUIRED
94 deprecated_reason=DEPRECATED_REASON,
95 deprecated_since=versionutils.deprecated.STEIN
96)84)
97deprecated_check_system_grant_for_group = policy.DeprecatedRule(85deprecated_check_system_grant_for_group = policy.DeprecatedRule(
98 name=base.IDENTITY % 'check_system_grant_for_group',86 name=base.IDENTITY % 'check_system_grant_for_group',
99 check_str=base.RULE_ADMIN_REQUIRED,87 check_str=base.RULE_ADMIN_REQUIRED
100 deprecated_reason=DEPRECATED_REASON,
101 deprecated_since=versionutils.deprecated.STEIN
102)88)
103deprecated_list_system_grants_for_group = policy.DeprecatedRule(89deprecated_list_system_grants_for_group = policy.DeprecatedRule(
104 name=base.IDENTITY % 'list_system_grants_for_group',90 name=base.IDENTITY % 'list_system_grants_for_group',
105 check_str=base.RULE_ADMIN_REQUIRED,91 check_str=base.RULE_ADMIN_REQUIRED
106 deprecated_reason=DEPRECATED_REASON,
107 deprecated_since=versionutils.deprecated.STEIN
108)92)
109deprecated_create_system_grant_for_group = policy.DeprecatedRule(93deprecated_create_system_grant_for_group = policy.DeprecatedRule(
110 name=base.IDENTITY % 'create_system_grant_for_group',94 name=base.IDENTITY % 'create_system_grant_for_group',
111 check_str=base.RULE_ADMIN_REQUIRED,95 check_str=base.RULE_ADMIN_REQUIRED
112 deprecated_reason=DEPRECATED_REASON,
113 deprecated_since=versionutils.deprecated.STEIN
114)96)
115deprecated_revoke_system_grant_for_group = policy.DeprecatedRule(97deprecated_revoke_system_grant_for_group = policy.DeprecatedRule(
116 name=base.IDENTITY % 'revoke_system_grant_for_group',98 name=base.IDENTITY % 'revoke_system_grant_for_group',
117 check_str=base.RULE_ADMIN_REQUIRED,99 check_str=base.RULE_ADMIN_REQUIRED
118 deprecated_reason=DEPRECATED_REASON,
119 deprecated_since=versionutils.deprecated.STEIN
120)100)
121deprecated_list_grants = policy.DeprecatedRule(101deprecated_list_grants = policy.DeprecatedRule(
122 name=base.IDENTITY % 'list_grants', check_str=base.RULE_ADMIN_REQUIRED,102 name=base.IDENTITY % 'list_grants', check_str=base.RULE_ADMIN_REQUIRED
123 deprecated_reason=DEPRECATED_REASON,
124 deprecated_since=versionutils.deprecated.STEIN
125)103)
126deprecated_check_grant = policy.DeprecatedRule(104deprecated_check_grant = policy.DeprecatedRule(
127 name=base.IDENTITY % 'check_grant', check_str=base.RULE_ADMIN_REQUIRED,105 name=base.IDENTITY % 'check_grant', check_str=base.RULE_ADMIN_REQUIRED
128 deprecated_reason=DEPRECATED_REASON,
129 deprecated_since=versionutils.deprecated.STEIN
130)106)
131deprecated_create_grant = policy.DeprecatedRule(107deprecated_create_grant = policy.DeprecatedRule(
132 name=base.IDENTITY % 'create_grant', check_str=base.RULE_ADMIN_REQUIRED,108 name=base.IDENTITY % 'create_grant', check_str=base.RULE_ADMIN_REQUIRED
133 deprecated_reason=DEPRECATED_REASON,
134 deprecated_since=versionutils.deprecated.STEIN
135)109)
136deprecated_revoke_grant = policy.DeprecatedRule(110deprecated_revoke_grant = policy.DeprecatedRule(
137 name=base.IDENTITY % 'revoke_grant', check_str=base.RULE_ADMIN_REQUIRED,111 name=base.IDENTITY % 'revoke_grant', check_str=base.RULE_ADMIN_REQUIRED
138 deprecated_reason=DEPRECATED_REASON,
139 deprecated_since=versionutils.deprecated.STEIN
140)112)
141113
114DEPRECATED_REASON = (
115 "The assignment API is now aware of system scope and default roles."
116)
142117
143resource_paths = [118resource_paths = [
144 '/projects/{project_id}/users/{user_id}/roles/{role_id}',119 '/projects/{project_id}/users/{user_id}/roles/{role_id}',
@@ -192,7 +167,9 @@ grant_policies = [
192 'are inherited to all projects in the subtree, if '167 'are inherited to all projects in the subtree, if '
193 'applicable.'),168 'applicable.'),
194 operations=list_operations(resource_paths, ['HEAD', 'GET']),169 operations=list_operations(resource_paths, ['HEAD', 'GET']),
195 deprecated_rule=deprecated_check_grant),170 deprecated_rule=deprecated_check_grant,
171 deprecated_reason=DEPRECATED_REASON,
172 deprecated_since=versionutils.deprecated.STEIN),
196 policy.DocumentedRuleDefault(173 policy.DocumentedRuleDefault(
197 name=base.IDENTITY % 'list_grants',174 name=base.IDENTITY % 'list_grants',
198 check_str=SYSTEM_READER_OR_DOMAIN_READER_LIST,175 check_str=SYSTEM_READER_OR_DOMAIN_READER_LIST,
@@ -204,7 +181,9 @@ grant_policies = [
204 'domains, where grants are inherited to all projects '181 'domains, where grants are inherited to all projects '
205 'in the specified domain.'),182 'in the specified domain.'),
206 operations=list_grants_operations,183 operations=list_grants_operations,
207 deprecated_rule=deprecated_list_grants),184 deprecated_rule=deprecated_list_grants,
185 deprecated_reason=DEPRECATED_REASON,
186 deprecated_since=versionutils.deprecated.STEIN),
208 policy.DocumentedRuleDefault(187 policy.DocumentedRuleDefault(
209 name=base.IDENTITY % 'create_grant',188 name=base.IDENTITY % 'create_grant',
210 check_str=SYSTEM_ADMIN_OR_DOMAIN_ADMIN,189 check_str=SYSTEM_ADMIN_OR_DOMAIN_ADMIN,
@@ -216,7 +195,9 @@ grant_policies = [
216 'are inherited to all projects in the subtree, if '195 'are inherited to all projects in the subtree, if '
217 'applicable.'),196 'applicable.'),
218 operations=list_operations(resource_paths, ['PUT']),197 operations=list_operations(resource_paths, ['PUT']),
219 deprecated_rule=deprecated_create_grant),198 deprecated_rule=deprecated_create_grant,
199 deprecated_reason=DEPRECATED_REASON,
200 deprecated_since=versionutils.deprecated.STEIN),
220 policy.DocumentedRuleDefault(201 policy.DocumentedRuleDefault(
221 name=base.IDENTITY % 'revoke_grant',202 name=base.IDENTITY % 'revoke_grant',
222 check_str=SYSTEM_ADMIN_OR_DOMAIN_ADMIN,203 check_str=SYSTEM_ADMIN_OR_DOMAIN_ADMIN,
@@ -230,7 +211,9 @@ grant_policies = [
230 'the target would remove the logical effect of '211 'the target would remove the logical effect of '
231 'inheriting it to the target\'s projects subtree.'),212 'inheriting it to the target\'s projects subtree.'),
232 operations=list_operations(resource_paths, ['DELETE']),213 operations=list_operations(resource_paths, ['DELETE']),
233 deprecated_rule=deprecated_revoke_grant),214 deprecated_rule=deprecated_revoke_grant,
215 deprecated_reason=DEPRECATED_REASON,
216 deprecated_since=versionutils.deprecated.STEIN),
234 policy.DocumentedRuleDefault(217 policy.DocumentedRuleDefault(
235 name=base.IDENTITY % 'list_system_grants_for_user',218 name=base.IDENTITY % 'list_system_grants_for_user',
236 check_str=base.SYSTEM_READER,219 check_str=base.SYSTEM_READER,
@@ -243,6 +226,8 @@ grant_policies = [
243 }226 }
244 ],227 ],
245 deprecated_rule=deprecated_list_system_grants_for_user,228 deprecated_rule=deprecated_list_system_grants_for_user,
229 deprecated_reason=DEPRECATED_REASON,
230 deprecated_since=versionutils.deprecated.STEIN
246 ),231 ),
247 policy.DocumentedRuleDefault(232 policy.DocumentedRuleDefault(
248 name=base.IDENTITY % 'check_system_grant_for_user',233 name=base.IDENTITY % 'check_system_grant_for_user',
@@ -256,6 +241,8 @@ grant_policies = [
256 }241 }
257 ],242 ],
258 deprecated_rule=deprecated_check_system_grant_for_user,243 deprecated_rule=deprecated_check_system_grant_for_user,
244 deprecated_reason=DEPRECATED_REASON,
245 deprecated_since=versionutils.deprecated.STEIN
259 ),246 ),
260 policy.DocumentedRuleDefault(247 policy.DocumentedRuleDefault(
261 name=base.IDENTITY % 'create_system_grant_for_user',248 name=base.IDENTITY % 'create_system_grant_for_user',
@@ -269,6 +256,8 @@ grant_policies = [
269 }256 }
270 ],257 ],
271 deprecated_rule=deprecated_create_system_grant_for_user,258 deprecated_rule=deprecated_create_system_grant_for_user,
259 deprecated_reason=DEPRECATED_REASON,
260 deprecated_since=versionutils.deprecated.STEIN
272 ),261 ),
273 policy.DocumentedRuleDefault(262 policy.DocumentedRuleDefault(
274 name=base.IDENTITY % 'revoke_system_grant_for_user',263 name=base.IDENTITY % 'revoke_system_grant_for_user',
@@ -282,6 +271,8 @@ grant_policies = [
282 }271 }
283 ],272 ],
284 deprecated_rule=deprecated_revoke_system_grant_for_user,273 deprecated_rule=deprecated_revoke_system_grant_for_user,
274 deprecated_reason=DEPRECATED_REASON,
275 deprecated_since=versionutils.deprecated.STEIN
285 ),276 ),
286 policy.DocumentedRuleDefault(277 policy.DocumentedRuleDefault(
287 name=base.IDENTITY % 'list_system_grants_for_group',278 name=base.IDENTITY % 'list_system_grants_for_group',
@@ -295,6 +286,8 @@ grant_policies = [
295 }286 }
296 ],287 ],
297 deprecated_rule=deprecated_list_system_grants_for_group,288 deprecated_rule=deprecated_list_system_grants_for_group,
289 deprecated_reason=DEPRECATED_REASON,
290 deprecated_since=versionutils.deprecated.STEIN
298 ),291 ),
299 policy.DocumentedRuleDefault(292 policy.DocumentedRuleDefault(
300 name=base.IDENTITY % 'check_system_grant_for_group',293 name=base.IDENTITY % 'check_system_grant_for_group',
@@ -308,6 +301,8 @@ grant_policies = [
308 }301 }
309 ],302 ],
310 deprecated_rule=deprecated_check_system_grant_for_group,303 deprecated_rule=deprecated_check_system_grant_for_group,
304 deprecated_reason=DEPRECATED_REASON,
305 deprecated_since=versionutils.deprecated.STEIN
311 ),306 ),
312 policy.DocumentedRuleDefault(307 policy.DocumentedRuleDefault(
313 name=base.IDENTITY % 'create_system_grant_for_group',308 name=base.IDENTITY % 'create_system_grant_for_group',
@@ -321,6 +316,8 @@ grant_policies = [
321 }316 }
322 ],317 ],
323 deprecated_rule=deprecated_create_system_grant_for_group,318 deprecated_rule=deprecated_create_system_grant_for_group,
319 deprecated_reason=DEPRECATED_REASON,
320 deprecated_since=versionutils.deprecated.STEIN
324 ),321 ),
325 policy.DocumentedRuleDefault(322 policy.DocumentedRuleDefault(
326 name=base.IDENTITY % 'revoke_system_grant_for_group',323 name=base.IDENTITY % 'revoke_system_grant_for_group',
@@ -334,6 +331,8 @@ grant_policies = [
334 }331 }
335 ],332 ],
336 deprecated_rule=deprecated_revoke_system_grant_for_group,333 deprecated_rule=deprecated_revoke_system_grant_for_group,
334 deprecated_reason=DEPRECATED_REASON,
335 deprecated_since=versionutils.deprecated.STEIN
337 )336 )
338]337]
339338
diff --git a/keystone/common/policies/group.py b/keystone/common/policies/group.py
index 0106bad..d33da92 100644
--- a/keystone/common/policies/group.py
+++ b/keystone/common/policies/group.py
@@ -51,63 +51,43 @@ DEPRECATED_REASON = (
5151
52deprecated_get_group = policy.DeprecatedRule(52deprecated_get_group = policy.DeprecatedRule(
53 name=base.IDENTITY % 'get_group',53 name=base.IDENTITY % 'get_group',
54 check_str=base.RULE_ADMIN_REQUIRED,54 check_str=base.RULE_ADMIN_REQUIRED
55 deprecated_reason=DEPRECATED_REASON,
56 deprecated_since=versionutils.deprecated.STEIN
57)55)
58deprecated_list_groups = policy.DeprecatedRule(56deprecated_list_groups = policy.DeprecatedRule(
59 name=base.IDENTITY % 'list_groups',57 name=base.IDENTITY % 'list_groups',
60 check_str=base.RULE_ADMIN_REQUIRED,58 check_str=base.RULE_ADMIN_REQUIRED
61 deprecated_reason=DEPRECATED_REASON,
62 deprecated_since=versionutils.deprecated.STEIN
63)59)
64deprecated_list_groups_for_user = policy.DeprecatedRule(60deprecated_list_groups_for_user = policy.DeprecatedRule(
65 name=base.IDENTITY % 'list_groups_for_user',61 name=base.IDENTITY % 'list_groups_for_user',
66 check_str=base.RULE_ADMIN_OR_OWNER,62 check_str=base.RULE_ADMIN_OR_OWNER
67 deprecated_reason=DEPRECATED_REASON,
68 deprecated_since=versionutils.deprecated.STEIN
69)63)
70deprecated_list_users_in_group = policy.DeprecatedRule(64deprecated_list_users_in_group = policy.DeprecatedRule(
71 name=base.IDENTITY % 'list_users_in_group',65 name=base.IDENTITY % 'list_users_in_group',
72 check_str=base.RULE_ADMIN_REQUIRED,66 check_str=base.RULE_ADMIN_REQUIRED
73 deprecated_reason=DEPRECATED_REASON,
74 deprecated_since=versionutils.deprecated.STEIN
75)67)
76deprecated_check_user_in_group = policy.DeprecatedRule(68deprecated_check_user_in_group = policy.DeprecatedRule(
77 name=base.IDENTITY % 'check_user_in_group',69 name=base.IDENTITY % 'check_user_in_group',
78 check_str=base.RULE_ADMIN_REQUIRED,70 check_str=base.RULE_ADMIN_REQUIRED
79 deprecated_reason=DEPRECATED_REASON,
80 deprecated_since=versionutils.deprecated.STEIN
81)71)
82deprecated_create_group = policy.DeprecatedRule(72deprecated_create_group = policy.DeprecatedRule(
83 name=base.IDENTITY % 'create_group',73 name=base.IDENTITY % 'create_group',
84 check_str=base.RULE_ADMIN_REQUIRED,74 check_str=base.RULE_ADMIN_REQUIRED
85 deprecated_reason=DEPRECATED_REASON,
86 deprecated_since=versionutils.deprecated.STEIN
87)75)
88deprecated_update_group = policy.DeprecatedRule(76deprecated_update_group = policy.DeprecatedRule(
89 name=base.IDENTITY % 'update_group',77 name=base.IDENTITY % 'update_group',
90 check_str=base.RULE_ADMIN_REQUIRED,78 check_str=base.RULE_ADMIN_REQUIRED
91 deprecated_reason=DEPRECATED_REASON,
92 deprecated_since=versionutils.deprecated.STEIN
93)79)
94deprecated_delete_group = policy.DeprecatedRule(80deprecated_delete_group = policy.DeprecatedRule(
95 name=base.IDENTITY % 'delete_group',81 name=base.IDENTITY % 'delete_group',
96 check_str=base.RULE_ADMIN_REQUIRED,82 check_str=base.RULE_ADMIN_REQUIRED
97 deprecated_reason=DEPRECATED_REASON,
98 deprecated_since=versionutils.deprecated.STEIN
99)83)
100deprecated_remove_user_from_group = policy.DeprecatedRule(84deprecated_remove_user_from_group = policy.DeprecatedRule(
101 name=base.IDENTITY % 'remove_user_from_group',85 name=base.IDENTITY % 'remove_user_from_group',
102 check_str=base.RULE_ADMIN_REQUIRED,86 check_str=base.RULE_ADMIN_REQUIRED
103 deprecated_reason=DEPRECATED_REASON,
104 deprecated_since=versionutils.deprecated.STEIN
105)87)
106deprecated_add_user_to_group = policy.DeprecatedRule(88deprecated_add_user_to_group = policy.DeprecatedRule(
107 name=base.IDENTITY % 'add_user_to_group',89 name=base.IDENTITY % 'add_user_to_group',
108 check_str=base.RULE_ADMIN_REQUIRED,90 check_str=base.RULE_ADMIN_REQUIRED
109 deprecated_reason=DEPRECATED_REASON,
110 deprecated_since=versionutils.deprecated.STEIN
111)91)
11292
113group_policies = [93group_policies = [
@@ -120,7 +100,9 @@ group_policies = [
120 'method': 'GET'},100 'method': 'GET'},
121 {'path': '/v3/groups/{group_id}',101 {'path': '/v3/groups/{group_id}',
122 'method': 'HEAD'}],102 'method': 'HEAD'}],
123 deprecated_rule=deprecated_get_group),103 deprecated_rule=deprecated_get_group,
104 deprecated_reason=DEPRECATED_REASON,
105 deprecated_since=versionutils.deprecated.STEIN),
124 policy.DocumentedRuleDefault(106 policy.DocumentedRuleDefault(
125 name=base.IDENTITY % 'list_groups',107 name=base.IDENTITY % 'list_groups',
126 check_str=SYSTEM_READER_OR_DOMAIN_READER,108 check_str=SYSTEM_READER_OR_DOMAIN_READER,
@@ -130,7 +112,9 @@ group_policies = [
130 'method': 'GET'},112 'method': 'GET'},
131 {'path': '/v3/groups',113 {'path': '/v3/groups',
132 'method': 'HEAD'}],114 'method': 'HEAD'}],
133 deprecated_rule=deprecated_list_groups),115 deprecated_rule=deprecated_list_groups,
116 deprecated_reason=DEPRECATED_REASON,
117 deprecated_since=versionutils.deprecated.STEIN),
134 policy.DocumentedRuleDefault(118 policy.DocumentedRuleDefault(
135 name=base.IDENTITY % 'list_groups_for_user',119 name=base.IDENTITY % 'list_groups_for_user',
136 check_str=SYSTEM_READER_OR_DOMAIN_READER_FOR_TARGET_USER_OR_OWNER,120 check_str=SYSTEM_READER_OR_DOMAIN_READER_FOR_TARGET_USER_OR_OWNER,
@@ -140,7 +124,9 @@ group_policies = [
140 'method': 'GET'},124 'method': 'GET'},
141 {'path': '/v3/users/{user_id}/groups',125 {'path': '/v3/users/{user_id}/groups',
142 'method': 'HEAD'}],126 'method': 'HEAD'}],
143 deprecated_rule=deprecated_list_groups_for_user),127 deprecated_rule=deprecated_list_groups_for_user,
128 deprecated_reason=DEPRECATED_REASON,
129 deprecated_since=versionutils.deprecated.STEIN),
144 policy.DocumentedRuleDefault(130 policy.DocumentedRuleDefault(
145 name=base.IDENTITY % 'create_group',131 name=base.IDENTITY % 'create_group',
146 check_str=SYSTEM_ADMIN_OR_DOMAIN_ADMIN,132 check_str=SYSTEM_ADMIN_OR_DOMAIN_ADMIN,
@@ -148,7 +134,9 @@ group_policies = [
148 description='Create group.',134 description='Create group.',
149 operations=[{'path': '/v3/groups',135 operations=[{'path': '/v3/groups',
150 'method': 'POST'}],136 'method': 'POST'}],
151 deprecated_rule=deprecated_create_group),137 deprecated_rule=deprecated_create_group,
138 deprecated_reason=DEPRECATED_REASON,
139 deprecated_since=versionutils.deprecated.STEIN),
152 policy.DocumentedRuleDefault(140 policy.DocumentedRuleDefault(
153 name=base.IDENTITY % 'update_group',141 name=base.IDENTITY % 'update_group',
154 check_str=SYSTEM_ADMIN_OR_DOMAIN_ADMIN,142 check_str=SYSTEM_ADMIN_OR_DOMAIN_ADMIN,
@@ -156,7 +144,9 @@ group_policies = [
156 description='Update group.',144 description='Update group.',
157 operations=[{'path': '/v3/groups/{group_id}',145 operations=[{'path': '/v3/groups/{group_id}',
158 'method': 'PATCH'}],146 'method': 'PATCH'}],
159 deprecated_rule=deprecated_update_group),147 deprecated_rule=deprecated_update_group,
148 deprecated_reason=DEPRECATED_REASON,
149 deprecated_since=versionutils.deprecated.STEIN),
160 policy.DocumentedRuleDefault(150 policy.DocumentedRuleDefault(
161 name=base.IDENTITY % 'delete_group',151 name=base.IDENTITY % 'delete_group',
162 check_str=SYSTEM_ADMIN_OR_DOMAIN_ADMIN,152 check_str=SYSTEM_ADMIN_OR_DOMAIN_ADMIN,
@@ -164,7 +154,9 @@ group_policies = [
164 description='Delete group.',154 description='Delete group.',
165 operations=[{'path': '/v3/groups/{group_id}',155 operations=[{'path': '/v3/groups/{group_id}',
166 'method': 'DELETE'}],156 'method': 'DELETE'}],
167 deprecated_rule=deprecated_delete_group),157 deprecated_rule=deprecated_delete_group,
158 deprecated_reason=DEPRECATED_REASON,
159 deprecated_since=versionutils.deprecated.STEIN),
168 policy.DocumentedRuleDefault(160 policy.DocumentedRuleDefault(
169 name=base.IDENTITY % 'list_users_in_group',161 name=base.IDENTITY % 'list_users_in_group',
170 check_str=SYSTEM_READER_OR_DOMAIN_READER,162 check_str=SYSTEM_READER_OR_DOMAIN_READER,
@@ -174,7 +166,9 @@ group_policies = [
174 'method': 'GET'},166 'method': 'GET'},
175 {'path': '/v3/groups/{group_id}/users',167 {'path': '/v3/groups/{group_id}/users',
176 'method': 'HEAD'}],168 'method': 'HEAD'}],
177 deprecated_rule=deprecated_list_users_in_group),169 deprecated_rule=deprecated_list_users_in_group,
170 deprecated_reason=DEPRECATED_REASON,
171 deprecated_since=versionutils.deprecated.STEIN),
178 policy.DocumentedRuleDefault(172 policy.DocumentedRuleDefault(
179 name=base.IDENTITY % 'remove_user_from_group',173 name=base.IDENTITY % 'remove_user_from_group',
180 check_str=SYSTEM_ADMIN_OR_DOMAIN_ADMIN_FOR_TARGET_GROUP_USER,174 check_str=SYSTEM_ADMIN_OR_DOMAIN_ADMIN_FOR_TARGET_GROUP_USER,
@@ -182,7 +176,9 @@ group_policies = [
182 description='Remove user from group.',176 description='Remove user from group.',
183 operations=[{'path': '/v3/groups/{group_id}/users/{user_id}',177 operations=[{'path': '/v3/groups/{group_id}/users/{user_id}',
184 'method': 'DELETE'}],178 'method': 'DELETE'}],
185 deprecated_rule=deprecated_remove_user_from_group),179 deprecated_rule=deprecated_remove_user_from_group,
180 deprecated_reason=DEPRECATED_REASON,
181 deprecated_since=versionutils.deprecated.STEIN),
186 policy.DocumentedRuleDefault(182 policy.DocumentedRuleDefault(
187 name=base.IDENTITY % 'check_user_in_group',183 name=base.IDENTITY % 'check_user_in_group',
188 check_str=SYSTEM_READER_OR_DOMAIN_READER_FOR_TARGET_GROUP_USER,184 check_str=SYSTEM_READER_OR_DOMAIN_READER_FOR_TARGET_GROUP_USER,
@@ -192,7 +188,9 @@ group_policies = [
192 'method': 'HEAD'},188 'method': 'HEAD'},
193 {'path': '/v3/groups/{group_id}/users/{user_id}',189 {'path': '/v3/groups/{group_id}/users/{user_id}',
194 'method': 'GET'}],190 'method': 'GET'}],
195 deprecated_rule=deprecated_check_user_in_group),191 deprecated_rule=deprecated_check_user_in_group,
192 deprecated_reason=DEPRECATED_REASON,
193 deprecated_since=versionutils.deprecated.STEIN),
196 policy.DocumentedRuleDefault(194 policy.DocumentedRuleDefault(
197 name=base.IDENTITY % 'add_user_to_group',195 name=base.IDENTITY % 'add_user_to_group',
198 check_str=SYSTEM_ADMIN_OR_DOMAIN_ADMIN_FOR_TARGET_GROUP_USER,196 check_str=SYSTEM_ADMIN_OR_DOMAIN_ADMIN_FOR_TARGET_GROUP_USER,
@@ -200,7 +198,9 @@ group_policies = [
200 description='Add user to group.',198 description='Add user to group.',
201 operations=[{'path': '/v3/groups/{group_id}/users/{user_id}',199 operations=[{'path': '/v3/groups/{group_id}/users/{user_id}',
202 'method': 'PUT'}],200 'method': 'PUT'}],
203 deprecated_rule=deprecated_add_user_to_group)201 deprecated_rule=deprecated_add_user_to_group,
202 deprecated_reason=DEPRECATED_REASON,
203 deprecated_since=versionutils.deprecated.STEIN)
204]204]
205205
206206
diff --git a/keystone/common/policies/identity_provider.py b/keystone/common/policies/identity_provider.py
index c1b4d5a..8d6ad46 100644
--- a/keystone/common/policies/identity_provider.py
+++ b/keystone/common/policies/identity_provider.py
@@ -15,41 +15,30 @@ from oslo_policy import policy
1515
16from keystone.common.policies import base16from keystone.common.policies import base
1717
18DEPRECATED_REASON = (
19 "The identity provider API is now aware of system scope and default roles."
20)
21
22deprecated_get_idp = policy.DeprecatedRule(18deprecated_get_idp = policy.DeprecatedRule(
23 name=base.IDENTITY % 'get_identity_provider',19 name=base.IDENTITY % 'get_identity_provider',
24 check_str=base.RULE_ADMIN_REQUIRED,20 check_str=base.RULE_ADMIN_REQUIRED
25 deprecated_reason=DEPRECATED_REASON,
26 deprecated_since=versionutils.deprecated.STEIN
27)21)
28deprecated_list_idp = policy.DeprecatedRule(22deprecated_list_idp = policy.DeprecatedRule(
29 name=base.IDENTITY % 'list_identity_providers',23 name=base.IDENTITY % 'list_identity_providers',
30 check_str=base.RULE_ADMIN_REQUIRED,24 check_str=base.RULE_ADMIN_REQUIRED
31 deprecated_reason=DEPRECATED_REASON,
32 deprecated_since=versionutils.deprecated.STEIN
33)25)
34deprecated_update_idp = policy.DeprecatedRule(26deprecated_update_idp = policy.DeprecatedRule(
35 name=base.IDENTITY % 'update_identity_provider',27 name=base.IDENTITY % 'update_identity_provider',
36 check_str=base.RULE_ADMIN_REQUIRED,28 check_str=base.RULE_ADMIN_REQUIRED
37 deprecated_reason=DEPRECATED_REASON,
38 deprecated_since=versionutils.deprecated.STEIN
39)29)
40deprecated_create_idp = policy.DeprecatedRule(30deprecated_create_idp = policy.DeprecatedRule(
41 name=base.IDENTITY % 'create_identity_provider',31 name=base.IDENTITY % 'create_identity_provider',
42 check_str=base.RULE_ADMIN_REQUIRED,32 check_str=base.RULE_ADMIN_REQUIRED
43 deprecated_reason=DEPRECATED_REASON,
44 deprecated_since=versionutils.deprecated.STEIN
45)33)
46deprecated_delete_idp = policy.DeprecatedRule(34deprecated_delete_idp = policy.DeprecatedRule(
47 name=base.IDENTITY % 'delete_identity_provider',35 name=base.IDENTITY % 'delete_identity_provider',
48 check_str=base.RULE_ADMIN_REQUIRED,36 check_str=base.RULE_ADMIN_REQUIRED
49 deprecated_reason=DEPRECATED_REASON,
50 deprecated_since=versionutils.deprecated.STEIN
51)37)
5238
39DEPRECATED_REASON = (
40 "The identity provider API is now aware of system scope and default roles."
41)
5342
54identity_provider_policies = [43identity_provider_policies = [
55 policy.DocumentedRuleDefault(44 policy.DocumentedRuleDefault(
@@ -65,7 +54,9 @@ identity_provider_policies = [
65 description='Create identity provider.',54 description='Create identity provider.',
66 operations=[{'path': '/v3/OS-FEDERATION/identity_providers/{idp_id}',55 operations=[{'path': '/v3/OS-FEDERATION/identity_providers/{idp_id}',
67 'method': 'PUT'}],56 'method': 'PUT'}],
68 deprecated_rule=deprecated_create_idp),57 deprecated_rule=deprecated_create_idp,
58 deprecated_reason=DEPRECATED_REASON,
59 deprecated_since=versionutils.deprecated.STEIN),
69 policy.DocumentedRuleDefault(60 policy.DocumentedRuleDefault(
70 name=base.IDENTITY % 'list_identity_providers',61 name=base.IDENTITY % 'list_identity_providers',
71 check_str=base.SYSTEM_READER,62 check_str=base.SYSTEM_READER,
@@ -82,6 +73,8 @@ identity_provider_policies = [
82 }73 }
83 ],74 ],
84 deprecated_rule=deprecated_list_idp,75 deprecated_rule=deprecated_list_idp,
76 deprecated_reason=DEPRECATED_REASON,
77 deprecated_since=versionutils.deprecated.STEIN
85 ),78 ),
86 policy.DocumentedRuleDefault(79 policy.DocumentedRuleDefault(
87 name=base.IDENTITY % 'get_identity_provider',80 name=base.IDENTITY % 'get_identity_provider',
@@ -99,6 +92,8 @@ identity_provider_policies = [
99 }92 }
100 ],93 ],
101 deprecated_rule=deprecated_get_idp,94 deprecated_rule=deprecated_get_idp,
95 deprecated_reason=DEPRECATED_REASON,
96 deprecated_since=versionutils.deprecated.STEIN
102 ),97 ),
103 policy.DocumentedRuleDefault(98 policy.DocumentedRuleDefault(
104 name=base.IDENTITY % 'update_identity_provider',99 name=base.IDENTITY % 'update_identity_provider',
@@ -107,7 +102,9 @@ identity_provider_policies = [
107 description='Update identity provider.',102 description='Update identity provider.',
108 operations=[{'path': '/v3/OS-FEDERATION/identity_providers/{idp_id}',103 operations=[{'path': '/v3/OS-FEDERATION/identity_providers/{idp_id}',
109 'method': 'PATCH'}],104 'method': 'PATCH'}],
110 deprecated_rule=deprecated_update_idp),105 deprecated_rule=deprecated_update_idp,
106 deprecated_reason=DEPRECATED_REASON,
107 deprecated_since=versionutils.deprecated.STEIN),
111 policy.DocumentedRuleDefault(108 policy.DocumentedRuleDefault(
112 name=base.IDENTITY % 'delete_identity_provider',109 name=base.IDENTITY % 'delete_identity_provider',
113 check_str=base.SYSTEM_ADMIN,110 check_str=base.SYSTEM_ADMIN,
@@ -115,7 +112,9 @@ identity_provider_policies = [
115 description='Delete identity provider.',112 description='Delete identity provider.',
116 operations=[{'path': '/v3/OS-FEDERATION/identity_providers/{idp_id}',113 operations=[{'path': '/v3/OS-FEDERATION/identity_providers/{idp_id}',
117 'method': 'DELETE'}],114 'method': 'DELETE'}],
118 deprecated_rule=deprecated_delete_idp),115 deprecated_rule=deprecated_delete_idp,
116 deprecated_reason=DEPRECATED_REASON,
117 deprecated_since=versionutils.deprecated.STEIN),
119]118]
120119
121120
diff --git a/keystone/common/policies/implied_role.py b/keystone/common/policies/implied_role.py
index 01bcc00..6d164b0 100644
--- a/keystone/common/policies/implied_role.py
+++ b/keystone/common/policies/implied_role.py
@@ -15,45 +15,33 @@ from oslo_policy import policy
1515
16from keystone.common.policies import base16from keystone.common.policies import base
1717
18DEPRECATED_REASON = (
19 "The implied role API is now aware of system scope and default roles."
20)
21
22deprecated_get_implied_role = policy.DeprecatedRule(18deprecated_get_implied_role = policy.DeprecatedRule(
23 name=base.IDENTITY % 'get_implied_role',19 name=base.IDENTITY % 'get_implied_role',
24 check_str=base.RULE_ADMIN_REQUIRED,20 check_str=base.RULE_ADMIN_REQUIRED
25 deprecated_reason=DEPRECATED_REASON,
26 deprecated_since=versionutils.deprecated.TRAIN
27)21)
28deprecated_list_implied_roles = policy.DeprecatedRule(22deprecated_list_implied_roles = policy.DeprecatedRule(
29 name=base.IDENTITY % 'list_implied_roles',23 name=base.IDENTITY % 'list_implied_roles',
30 check_str=base.RULE_ADMIN_REQUIRED,24 check_str=base.RULE_ADMIN_REQUIRED,
31 deprecated_reason=DEPRECATED_REASON,
32 deprecated_since=versionutils.deprecated.TRAIN
33)25)
34deprecated_list_role_inference_rules = policy.DeprecatedRule(26deprecated_list_role_inference_rules = policy.DeprecatedRule(
35 name=base.IDENTITY % 'list_role_inference_rules',27 name=base.IDENTITY % 'list_role_inference_rules',
36 check_str=base.RULE_ADMIN_REQUIRED,28 check_str=base.RULE_ADMIN_REQUIRED,
37 deprecated_reason=DEPRECATED_REASON,
38 deprecated_since=versionutils.deprecated.TRAIN
39)29)
40deprecated_check_implied_role = policy.DeprecatedRule(30deprecated_check_implied_role = policy.DeprecatedRule(
41 name=base.IDENTITY % 'check_implied_role',31 name=base.IDENTITY % 'check_implied_role',
42 check_str=base.RULE_ADMIN_REQUIRED,32 check_str=base.RULE_ADMIN_REQUIRED,
43 deprecated_reason=DEPRECATED_REASON,
44 deprecated_since=versionutils.deprecated.TRAIN
45)33)
46deprecated_create_implied_role = policy.DeprecatedRule(34deprecated_create_implied_role = policy.DeprecatedRule(
47 name=base.IDENTITY % 'create_implied_role',35 name=base.IDENTITY % 'create_implied_role',
48 check_str=base.RULE_ADMIN_REQUIRED,36 check_str=base.RULE_ADMIN_REQUIRED,
49 deprecated_reason=DEPRECATED_REASON,
50 deprecated_since=versionutils.deprecated.TRAIN
51)37)
52deprecated_delete_implied_role = policy.DeprecatedRule(38deprecated_delete_implied_role = policy.DeprecatedRule(
53 name=base.IDENTITY % 'delete_implied_role',39 name=base.IDENTITY % 'delete_implied_role',
54 check_str=base.RULE_ADMIN_REQUIRED,40 check_str=base.RULE_ADMIN_REQUIRED,
55 deprecated_reason=DEPRECATED_REASON,41)
56 deprecated_since=versionutils.deprecated.TRAIN42
43DEPRECATED_REASON = (
44 "The implied role API is now aware of system scope and default roles."
57)45)
5846
5947
@@ -73,7 +61,9 @@ implied_role_policies = [
73 operations=[61 operations=[
74 {'path': '/v3/roles/{prior_role_id}/implies/{implied_role_id}',62 {'path': '/v3/roles/{prior_role_id}/implies/{implied_role_id}',
75 'method': 'GET'}],63 'method': 'GET'}],
76 deprecated_rule=deprecated_get_implied_role),64 deprecated_rule=deprecated_get_implied_role,
65 deprecated_reason=DEPRECATED_REASON,
66 deprecated_since=versionutils.deprecated.TRAIN),
77 policy.DocumentedRuleDefault(67 policy.DocumentedRuleDefault(
78 name=base.IDENTITY % 'list_implied_roles',68 name=base.IDENTITY % 'list_implied_roles',
79 check_str=base.SYSTEM_READER,69 check_str=base.SYSTEM_READER,
@@ -87,7 +77,9 @@ implied_role_policies = [
87 operations=[77 operations=[
88 {'path': '/v3/roles/{prior_role_id}/implies', 'method': 'GET'},78 {'path': '/v3/roles/{prior_role_id}/implies', 'method': 'GET'},
89 {'path': '/v3/roles/{prior_role_id}/implies', 'method': 'HEAD'}],79 {'path': '/v3/roles/{prior_role_id}/implies', 'method': 'HEAD'}],
90 deprecated_rule=deprecated_list_implied_roles),80 deprecated_rule=deprecated_list_implied_roles,
81 deprecated_reason=DEPRECATED_REASON,
82 deprecated_since=versionutils.deprecated.TRAIN),
91 policy.DocumentedRuleDefault(83 policy.DocumentedRuleDefault(
92 name=base.IDENTITY % 'create_implied_role',84 name=base.IDENTITY % 'create_implied_role',
93 check_str=base.SYSTEM_ADMIN,85 check_str=base.SYSTEM_ADMIN,
@@ -99,7 +91,9 @@ implied_role_policies = [
99 operations=[91 operations=[
100 {'path': '/v3/roles/{prior_role_id}/implies/{implied_role_id}',92 {'path': '/v3/roles/{prior_role_id}/implies/{implied_role_id}',
101 'method': 'PUT'}],93 'method': 'PUT'}],
102 deprecated_rule=deprecated_create_implied_role),94 deprecated_rule=deprecated_create_implied_role,
95 deprecated_reason=DEPRECATED_REASON,
96 deprecated_since=versionutils.deprecated.TRAIN),
103 policy.DocumentedRuleDefault(97 policy.DocumentedRuleDefault(
104 name=base.IDENTITY % 'delete_implied_role',98 name=base.IDENTITY % 'delete_implied_role',
105 check_str=base.SYSTEM_ADMIN,99 check_str=base.SYSTEM_ADMIN,
@@ -112,7 +106,9 @@ implied_role_policies = [
112 operations=[106 operations=[
113 {'path': '/v3/roles/{prior_role_id}/implies/{implied_role_id}',107 {'path': '/v3/roles/{prior_role_id}/implies/{implied_role_id}',
114 'method': 'DELETE'}],108 'method': 'DELETE'}],
115 deprecated_rule=deprecated_delete_implied_role),109 deprecated_rule=deprecated_delete_implied_role,
110 deprecated_reason=DEPRECATED_REASON,
111 deprecated_since=versionutils.deprecated.TRAIN),
116 policy.DocumentedRuleDefault(112 policy.DocumentedRuleDefault(
117 name=base.IDENTITY % 'list_role_inference_rules',113 name=base.IDENTITY % 'list_role_inference_rules',
118 check_str=base.SYSTEM_READER,114 check_str=base.SYSTEM_READER,
@@ -124,7 +120,9 @@ implied_role_policies = [
124 operations=[120 operations=[
125 {'path': '/v3/role_inferences', 'method': 'GET'},121 {'path': '/v3/role_inferences', 'method': 'GET'},
126 {'path': '/v3/role_inferences', 'method': 'HEAD'}],122 {'path': '/v3/role_inferences', 'method': 'HEAD'}],
127 deprecated_rule=deprecated_list_role_inference_rules),123 deprecated_rule=deprecated_list_role_inference_rules,
124 deprecated_reason=DEPRECATED_REASON,
125 deprecated_since=versionutils.deprecated.TRAIN),
128 policy.DocumentedRuleDefault(126 policy.DocumentedRuleDefault(
129 name=base.IDENTITY % 'check_implied_role',127 name=base.IDENTITY % 'check_implied_role',
130 check_str=base.SYSTEM_READER,128 check_str=base.SYSTEM_READER,
@@ -136,7 +134,9 @@ implied_role_policies = [
136 operations=[134 operations=[
137 {'path': '/v3/roles/{prior_role_id}/implies/{implied_role_id}',135 {'path': '/v3/roles/{prior_role_id}/implies/{implied_role_id}',
138 'method': 'HEAD'}],136 'method': 'HEAD'}],
139 deprecated_rule=deprecated_check_implied_role),137 deprecated_rule=deprecated_check_implied_role,
138 deprecated_reason=DEPRECATED_REASON,
139 deprecated_since=versionutils.deprecated.TRAIN),
140]140]
141141
142142
diff --git a/keystone/common/policies/mapping.py b/keystone/common/policies/mapping.py
index 6c4f0de..498bc7c 100644
--- a/keystone/common/policies/mapping.py
+++ b/keystone/common/policies/mapping.py
@@ -15,41 +15,30 @@ from oslo_policy import policy
1515
16from keystone.common.policies import base16from keystone.common.policies import base
1717
18DEPRECATED_REASON = (
19 "The federated mapping API is now aware of system scope and default roles."
20)
21
22deprecated_get_mapping = policy.DeprecatedRule(18deprecated_get_mapping = policy.DeprecatedRule(
23 name=base.IDENTITY % 'get_mapping',19 name=base.IDENTITY % 'get_mapping',
24 check_str=base.RULE_ADMIN_REQUIRED,20 check_str=base.RULE_ADMIN_REQUIRED
25 deprecated_reason=DEPRECATED_REASON,
26 deprecated_since=versionutils.deprecated.STEIN
27)21)
28deprecated_list_mappings = policy.DeprecatedRule(22deprecated_list_mappings = policy.DeprecatedRule(
29 name=base.IDENTITY % 'list_mappings',23 name=base.IDENTITY % 'list_mappings',
30 check_str=base.RULE_ADMIN_REQUIRED,24 check_str=base.RULE_ADMIN_REQUIRED
31 deprecated_reason=DEPRECATED_REASON,
32 deprecated_since=versionutils.deprecated.STEIN
33)25)
34deprecated_update_mapping = policy.DeprecatedRule(26deprecated_update_mapping = policy.DeprecatedRule(
35 name=base.IDENTITY % 'update_mapping',27 name=base.IDENTITY % 'update_mapping',
36 check_str=base.RULE_ADMIN_REQUIRED,28 check_str=base.RULE_ADMIN_REQUIRED
37 deprecated_reason=DEPRECATED_REASON,
38 deprecated_since=versionutils.deprecated.STEIN
39)29)
40deprecated_create_mapping = policy.DeprecatedRule(30deprecated_create_mapping = policy.DeprecatedRule(
41 name=base.IDENTITY % 'create_mapping',31 name=base.IDENTITY % 'create_mapping',
42 check_str=base.RULE_ADMIN_REQUIRED,32 check_str=base.RULE_ADMIN_REQUIRED
43 deprecated_reason=DEPRECATED_REASON,
44 deprecated_since=versionutils.deprecated.STEIN
45)33)
46deprecated_delete_mapping = policy.DeprecatedRule(34deprecated_delete_mapping = policy.DeprecatedRule(
47 name=base.IDENTITY % 'delete_mapping',35 name=base.IDENTITY % 'delete_mapping',
48 check_str=base.RULE_ADMIN_REQUIRED,36 check_str=base.RULE_ADMIN_REQUIRED
49 deprecated_reason=DEPRECATED_REASON,
50 deprecated_since=versionutils.deprecated.STEIN
51)37)
5238
39DEPRECATED_REASON = (
40 "The federated mapping API is now aware of system scope and default roles."
41)
5342
54mapping_policies = [43mapping_policies = [
55 policy.DocumentedRuleDefault(44 policy.DocumentedRuleDefault(
@@ -66,7 +55,9 @@ mapping_policies = [
66 'more sets of rules.'),55 'more sets of rules.'),
67 operations=[{'path': '/v3/OS-FEDERATION/mappings/{mapping_id}',56 operations=[{'path': '/v3/OS-FEDERATION/mappings/{mapping_id}',
68 'method': 'PUT'}],57 'method': 'PUT'}],
69 deprecated_rule=deprecated_create_mapping),58 deprecated_rule=deprecated_create_mapping,
59 deprecated_reason=DEPRECATED_REASON,
60 deprecated_since=versionutils.deprecated.STEIN),
70 policy.DocumentedRuleDefault(61 policy.DocumentedRuleDefault(
71 name=base.IDENTITY % 'get_mapping',62 name=base.IDENTITY % 'get_mapping',
72 check_str=base.SYSTEM_READER,63 check_str=base.SYSTEM_READER,
@@ -82,7 +73,9 @@ mapping_policies = [
82 'method': 'HEAD'73 'method': 'HEAD'
83 }74 }
84 ],75 ],
85 deprecated_rule=deprecated_get_mapping76 deprecated_rule=deprecated_get_mapping,
77 deprecated_reason=DEPRECATED_REASON,
78 deprecated_since=versionutils.deprecated.STEIN
86 ),79 ),
87 policy.DocumentedRuleDefault(80 policy.DocumentedRuleDefault(
88 name=base.IDENTITY % 'list_mappings',81 name=base.IDENTITY % 'list_mappings',
@@ -100,6 +93,8 @@ mapping_policies = [
100 }93 }
101 ],94 ],
102 deprecated_rule=deprecated_list_mappings,95 deprecated_rule=deprecated_list_mappings,
96 deprecated_reason=DEPRECATED_REASON,
97 deprecated_since=versionutils.deprecated.STEIN
103 ),98 ),
104 policy.DocumentedRuleDefault(99 policy.DocumentedRuleDefault(
105 name=base.IDENTITY % 'delete_mapping',100 name=base.IDENTITY % 'delete_mapping',
@@ -108,7 +103,9 @@ mapping_policies = [
108 description='Delete a federated mapping.',103 description='Delete a federated mapping.',
109 operations=[{'path': '/v3/OS-FEDERATION/mappings/{mapping_id}',104 operations=[{'path': '/v3/OS-FEDERATION/mappings/{mapping_id}',
110 'method': 'DELETE'}],105 'method': 'DELETE'}],
111 deprecated_rule=deprecated_delete_mapping),106 deprecated_rule=deprecated_delete_mapping,
107 deprecated_reason=DEPRECATED_REASON,
108 deprecated_since=versionutils.deprecated.STEIN),
112 policy.DocumentedRuleDefault(109 policy.DocumentedRuleDefault(
113 name=base.IDENTITY % 'update_mapping',110 name=base.IDENTITY % 'update_mapping',
114 check_str=base.SYSTEM_ADMIN,111 check_str=base.SYSTEM_ADMIN,
@@ -116,7 +113,9 @@ mapping_policies = [
116 description='Update a federated mapping.',113 description='Update a federated mapping.',
117 operations=[{'path': '/v3/OS-FEDERATION/mappings/{mapping_id}',114 operations=[{'path': '/v3/OS-FEDERATION/mappings/{mapping_id}',
118 'method': 'PATCH'}],115 'method': 'PATCH'}],
119 deprecated_rule=deprecated_update_mapping)116 deprecated_rule=deprecated_update_mapping,
117 deprecated_reason=DEPRECATED_REASON,
118 deprecated_since=versionutils.deprecated.STEIN)
120]119]
121120
122121
diff --git a/keystone/common/policies/policy.py b/keystone/common/policies/policy.py
index 502fa9d..4c912f3 100644
--- a/keystone/common/policies/policy.py
+++ b/keystone/common/policies/policy.py
@@ -15,43 +15,33 @@ from oslo_policy import policy
1515
16from keystone.common.policies import base16from keystone.common.policies import base
1717
18DEPRECATED_REASON = (
19 "The policy API is now aware of system scope and default roles."
20)
21
22deprecated_get_policy = policy.DeprecatedRule(18deprecated_get_policy = policy.DeprecatedRule(
23 name=base.IDENTITY % 'get_policy',19 name=base.IDENTITY % 'get_policy',
24 check_str=base.RULE_ADMIN_REQUIRED,20 check_str=base.RULE_ADMIN_REQUIRED,
25 deprecated_reason=DEPRECATED_REASON,
26 deprecated_since=versionutils.deprecated.TRAIN
27)21)
2822
29deprecated_list_policies = policy.DeprecatedRule(23deprecated_list_policies = policy.DeprecatedRule(
30 name=base.IDENTITY % 'list_policies',24 name=base.IDENTITY % 'list_policies',
31 check_str=base.RULE_ADMIN_REQUIRED,25 check_str=base.RULE_ADMIN_REQUIRED,
32 deprecated_reason=DEPRECATED_REASON,
33 deprecated_since=versionutils.deprecated.TRAIN
34)26)
3527
36deprecated_update_policy = policy.DeprecatedRule(28deprecated_update_policy = policy.DeprecatedRule(
37 name=base.IDENTITY % 'update_policy',29 name=base.IDENTITY % 'update_policy',
38 check_str=base.RULE_ADMIN_REQUIRED,30 check_str=base.RULE_ADMIN_REQUIRED,
39 deprecated_reason=DEPRECATED_REASON,
40 deprecated_since=versionutils.deprecated.TRAIN
41)31)
4232
43deprecated_create_policy = policy.DeprecatedRule(33deprecated_create_policy = policy.DeprecatedRule(
44 name=base.IDENTITY % 'create_policy',34 name=base.IDENTITY % 'create_policy',
45 check_str=base.RULE_ADMIN_REQUIRED,35 check_str=base.RULE_ADMIN_REQUIRED,
46 deprecated_reason=DEPRECATED_REASON,
47 deprecated_since=versionutils.deprecated.TRAIN
48)36)
4937
50deprecated_delete_policy = policy.DeprecatedRule(38deprecated_delete_policy = policy.DeprecatedRule(
51 name=base.IDENTITY % 'delete_policy',39 name=base.IDENTITY % 'delete_policy',
52 check_str=base.RULE_ADMIN_REQUIRED,40 check_str=base.RULE_ADMIN_REQUIRED,
53 deprecated_reason=DEPRECATED_REASON,41)
54 deprecated_since=versionutils.deprecated.TRAIN42
43DEPRECATED_REASON = (
44 "The policy API is now aware of system scope and default roles."
55)45)
5646
5747
@@ -65,7 +55,9 @@ policy_policies = [
65 description='Show policy details.',55 description='Show policy details.',
66 operations=[{'path': '/v3/policies/{policy_id}',56 operations=[{'path': '/v3/policies/{policy_id}',
67 'method': 'GET'}],57 'method': 'GET'}],
68 deprecated_rule=deprecated_get_policy),58 deprecated_rule=deprecated_get_policy,
59 deprecated_reason=DEPRECATED_REASON,
60 deprecated_since=versionutils.deprecated.TRAIN),
69 policy.DocumentedRuleDefault(61 policy.DocumentedRuleDefault(
70 name=base.IDENTITY % 'list_policies',62 name=base.IDENTITY % 'list_policies',
71 check_str=base.SYSTEM_READER,63 check_str=base.SYSTEM_READER,
@@ -73,7 +65,9 @@ policy_policies = [
73 description='List policies.',65 description='List policies.',
74 operations=[{'path': '/v3/policies',66 operations=[{'path': '/v3/policies',
75 'method': 'GET'}],67 'method': 'GET'}],
76 deprecated_rule=deprecated_list_policies),68 deprecated_rule=deprecated_list_policies,
69 deprecated_reason=DEPRECATED_REASON,
70 deprecated_since=versionutils.deprecated.TRAIN),
77 policy.DocumentedRuleDefault(71 policy.DocumentedRuleDefault(
78 name=base.IDENTITY % 'create_policy',72 name=base.IDENTITY % 'create_policy',
79 check_str=base.SYSTEM_ADMIN,73 check_str=base.SYSTEM_ADMIN,
@@ -81,7 +75,9 @@ policy_policies = [
81 description='Create policy.',75 description='Create policy.',
82 operations=[{'path': '/v3/policies',76 operations=[{'path': '/v3/policies',
83 'method': 'POST'}],77 'method': 'POST'}],
84 deprecated_rule=deprecated_create_policy),78 deprecated_rule=deprecated_create_policy,
79 deprecated_reason=DEPRECATED_REASON,
80 deprecated_since=versionutils.deprecated.TRAIN),
85 policy.DocumentedRuleDefault(81 policy.DocumentedRuleDefault(
86 name=base.IDENTITY % 'update_policy',82 name=base.IDENTITY % 'update_policy',
87 check_str=base.SYSTEM_ADMIN,83 check_str=base.SYSTEM_ADMIN,
@@ -89,7 +85,9 @@ policy_policies = [
89 description='Update policy.',85 description='Update policy.',
90 operations=[{'path': '/v3/policies/{policy_id}',86 operations=[{'path': '/v3/policies/{policy_id}',
91 'method': 'PATCH'}],87 'method': 'PATCH'}],
92 deprecated_rule=deprecated_update_policy),88 deprecated_rule=deprecated_update_policy,
89 deprecated_reason=DEPRECATED_REASON,
90 deprecated_since=versionutils.deprecated.TRAIN),
93 policy.DocumentedRuleDefault(91 policy.DocumentedRuleDefault(
94 name=base.IDENTITY % 'delete_policy',92 name=base.IDENTITY % 'delete_policy',
95 check_str=base.SYSTEM_ADMIN,93 check_str=base.SYSTEM_ADMIN,
@@ -97,7 +95,9 @@ policy_policies = [
97 description='Delete policy.',95 description='Delete policy.',
98 operations=[{'path': '/v3/policies/{policy_id}',96 operations=[{'path': '/v3/policies/{policy_id}',
99 'method': 'DELETE'}],97 'method': 'DELETE'}],
100 deprecated_rule=deprecated_delete_policy)98 deprecated_rule=deprecated_delete_policy,
99 deprecated_reason=DEPRECATED_REASON,
100 deprecated_since=versionutils.deprecated.TRAIN)
101]101]
102102
103103
diff --git a/keystone/common/policies/policy_association.py b/keystone/common/policies/policy_association.py
index 1cf6f86..af57900 100644
--- a/keystone/common/policies/policy_association.py
+++ b/keystone/common/policies/policy_association.py
@@ -19,88 +19,65 @@ from keystone.common.policies import base
19# System-scoped tokens should be required to manage policy associations to19# System-scoped tokens should be required to manage policy associations to
20# existing system-level resources.20# existing system-level resources.
2121
22DEPRECATED_REASON = (
23 "The policy association API is now aware of system scope and default "
24 "roles."
25)
26
27deprecated_check_policy_assoc_for_endpoint = policy.DeprecatedRule(22deprecated_check_policy_assoc_for_endpoint = policy.DeprecatedRule(
28 name=base.IDENTITY % 'check_policy_association_for_endpoint',23 name=base.IDENTITY % 'check_policy_association_for_endpoint',
29 check_str=base.RULE_ADMIN_REQUIRED,24 check_str=base.RULE_ADMIN_REQUIRED,
30 deprecated_reason=DEPRECATED_REASON,
31 deprecated_since=versionutils.deprecated.TRAIN
32)25)
3326
34deprecated_check_policy_assoc_for_service = policy.DeprecatedRule(27deprecated_check_policy_assoc_for_service = policy.DeprecatedRule(
35 name=base.IDENTITY % 'check_policy_association_for_service',28 name=base.IDENTITY % 'check_policy_association_for_service',
36 check_str=base.RULE_ADMIN_REQUIRED,29 check_str=base.RULE_ADMIN_REQUIRED,
37 deprecated_reason=DEPRECATED_REASON,
38 deprecated_since=versionutils.deprecated.TRAIN
39)30)
4031
41deprecated_check_policy_assoc_for_region_and_service = policy.DeprecatedRule(32deprecated_check_policy_assoc_for_region_and_service = policy.DeprecatedRule(
42 name=base.IDENTITY % 'check_policy_association_for_region_and_service',33 name=base.IDENTITY % 'check_policy_association_for_region_and_service',
43 check_str=base.RULE_ADMIN_REQUIRED,34 check_str=base.RULE_ADMIN_REQUIRED,
44 deprecated_reason=DEPRECATED_REASON,
45 deprecated_since=versionutils.deprecated.TRAIN
46)35)
4736
48deprecated_get_policy_for_endpoint = policy.DeprecatedRule(37deprecated_get_policy_for_endpoint = policy.DeprecatedRule(
49 name=base.IDENTITY % 'get_policy_for_endpoint',38 name=base.IDENTITY % 'get_policy_for_endpoint',
50 check_str=base.RULE_ADMIN_REQUIRED,39 check_str=base.RULE_ADMIN_REQUIRED,
51 deprecated_reason=DEPRECATED_REASON,
52 deprecated_since=versionutils.deprecated.TRAIN
53)40)
5441
55deprecated_list_endpoints_for_policy = policy.DeprecatedRule(42deprecated_list_endpoints_for_policy = policy.DeprecatedRule(
56 name=base.IDENTITY % 'list_endpoints_for_policy',43 name=base.IDENTITY % 'list_endpoints_for_policy',
57 check_str=base.RULE_ADMIN_REQUIRED,44 check_str=base.RULE_ADMIN_REQUIRED,
58 deprecated_reason=DEPRECATED_REASON,
59 deprecated_since=versionutils.deprecated.TRAIN
60)45)
6146
62deprecated_create_policy_assoc_for_endpoint = policy.DeprecatedRule(47deprecated_create_policy_assoc_for_endpoint = policy.DeprecatedRule(
63 name=base.IDENTITY % 'create_policy_association_for_endpoint',48 name=base.IDENTITY % 'create_policy_association_for_endpoint',
64 check_str=base.RULE_ADMIN_REQUIRED,49 check_str=base.RULE_ADMIN_REQUIRED,
65 deprecated_reason=DEPRECATED_REASON,
66 deprecated_since=versionutils.deprecated.TRAIN
67)50)
6851
69deprecated_delete_policy_assoc_for_endpoint = policy.DeprecatedRule(52deprecated_delete_policy_assoc_for_endpoint = policy.DeprecatedRule(
70 name=base.IDENTITY % 'delete_policy_association_for_endpoint',53 name=base.IDENTITY % 'delete_policy_association_for_endpoint',
71 check_str=base.RULE_ADMIN_REQUIRED,54 check_str=base.RULE_ADMIN_REQUIRED,
72 deprecated_reason=DEPRECATED_REASON,
73 deprecated_since=versionutils.deprecated.TRAIN
74)55)
7556
76deprecated_create_policy_assoc_for_service = policy.DeprecatedRule(57deprecated_create_policy_assoc_for_service = policy.DeprecatedRule(
77 name=base.IDENTITY % 'create_policy_association_for_service',58 name=base.IDENTITY % 'create_policy_association_for_service',
78 check_str=base.RULE_ADMIN_REQUIRED,59 check_str=base.RULE_ADMIN_REQUIRED,
79 deprecated_reason=DEPRECATED_REASON,
80 deprecated_since=versionutils.deprecated.TRAIN
81)60)
8261
83deprecated_delete_policy_assoc_for_service = policy.DeprecatedRule(62deprecated_delete_policy_assoc_for_service = policy.DeprecatedRule(
84 name=base.IDENTITY % 'delete_policy_association_for_service',63 name=base.IDENTITY % 'delete_policy_association_for_service',
85 check_str=base.RULE_ADMIN_REQUIRED,64 check_str=base.RULE_ADMIN_REQUIRED,
86 deprecated_reason=DEPRECATED_REASON,
87 deprecated_since=versionutils.deprecated.TRAIN
88)65)
8966
90deprecated_create_policy_assoc_for_region_and_service = policy.DeprecatedRule(67deprecated_create_policy_assoc_for_region_and_service = policy.DeprecatedRule(
91 name=base.IDENTITY % 'create_policy_association_for_region_and_service',68 name=base.IDENTITY % 'create_policy_association_for_region_and_service',
92 check_str=base.RULE_ADMIN_REQUIRED,69 check_str=base.RULE_ADMIN_REQUIRED,
93 deprecated_reason=DEPRECATED_REASON,
94 deprecated_since=versionutils.deprecated.TRAIN
95)70)
9671
97deprecated_delete_policy_assoc_for_region_and_service = policy.DeprecatedRule(72deprecated_delete_policy_assoc_for_region_and_service = policy.DeprecatedRule(
98 name=base.IDENTITY % 'delete_policy_association_for_region_and_service',73 name=base.IDENTITY % 'delete_policy_association_for_region_and_service',
99 check_str=base.RULE_ADMIN_REQUIRED,74 check_str=base.RULE_ADMIN_REQUIRED,
100 deprecated_reason=DEPRECATED_REASON,
101 deprecated_since=versionutils.deprecated.TRAIN
102)75)
10376
77DEPRECATED_REASON = (
78 "The policy association API is now aware of system scope and default "
79 "roles."
80)
10481
105policy_association_policies = [82policy_association_policies = [
106 policy.DocumentedRuleDefault(83 policy.DocumentedRuleDefault(
@@ -111,7 +88,9 @@ policy_association_policies = [
111 operations=[{'path': ('/v3/policies/{policy_id}/OS-ENDPOINT-POLICY/'88 operations=[{'path': ('/v3/policies/{policy_id}/OS-ENDPOINT-POLICY/'
112 'endpoints/{endpoint_id}'),89 'endpoints/{endpoint_id}'),
113 'method': 'PUT'}],90 'method': 'PUT'}],
114 deprecated_rule=deprecated_create_policy_assoc_for_endpoint),91 deprecated_rule=deprecated_create_policy_assoc_for_endpoint,
92 deprecated_reason=DEPRECATED_REASON,
93 deprecated_since=versionutils.deprecated.TRAIN),
115 policy.DocumentedRuleDefault(94 policy.DocumentedRuleDefault(
116 name=base.IDENTITY % 'check_policy_association_for_endpoint',95 name=base.IDENTITY % 'check_policy_association_for_endpoint',
117 check_str=base.SYSTEM_READER,96 check_str=base.SYSTEM_READER,
@@ -123,7 +102,9 @@ policy_association_policies = [
123 {'path': ('/v3/policies/{policy_id}/OS-ENDPOINT-POLICY/'102 {'path': ('/v3/policies/{policy_id}/OS-ENDPOINT-POLICY/'
124 'endpoints/{endpoint_id}'),103 'endpoints/{endpoint_id}'),
125 'method': 'HEAD'}],104 'method': 'HEAD'}],
126 deprecated_rule=deprecated_check_policy_assoc_for_endpoint),105 deprecated_rule=deprecated_check_policy_assoc_for_endpoint,
106 deprecated_reason=DEPRECATED_REASON,
107 deprecated_since=versionutils.deprecated.TRAIN),
127 policy.DocumentedRuleDefault(108 policy.DocumentedRuleDefault(
128 name=base.IDENTITY % 'delete_policy_association_for_endpoint',109 name=base.IDENTITY % 'delete_policy_association_for_endpoint',
129 check_str=base.SYSTEM_ADMIN,110 check_str=base.SYSTEM_ADMIN,
@@ -132,7 +113,9 @@ policy_association_policies = [
132 operations=[{'path': ('/v3/policies/{policy_id}/OS-ENDPOINT-POLICY/'113 operations=[{'path': ('/v3/policies/{policy_id}/OS-ENDPOINT-POLICY/'
133 'endpoints/{endpoint_id}'),114 'endpoints/{endpoint_id}'),
134 'method': 'DELETE'}],115 'method': 'DELETE'}],
135 deprecated_rule=deprecated_delete_policy_assoc_for_endpoint),116 deprecated_rule=deprecated_delete_policy_assoc_for_endpoint,
117 deprecated_reason=DEPRECATED_REASON,
118 deprecated_since=versionutils.deprecated.TRAIN),
136 policy.DocumentedRuleDefault(119 policy.DocumentedRuleDefault(
137 name=base.IDENTITY % 'create_policy_association_for_service',120 name=base.IDENTITY % 'create_policy_association_for_service',
138 check_str=base.SYSTEM_ADMIN,121 check_str=base.SYSTEM_ADMIN,
@@ -141,7 +124,9 @@ policy_association_policies = [
141 operations=[{'path': ('/v3/policies/{policy_id}/OS-ENDPOINT-POLICY/'124 operations=[{'path': ('/v3/policies/{policy_id}/OS-ENDPOINT-POLICY/'
142 'services/{service_id}'),125 'services/{service_id}'),
143 'method': 'PUT'}],126 'method': 'PUT'}],
144 deprecated_rule=deprecated_create_policy_assoc_for_service),127 deprecated_rule=deprecated_create_policy_assoc_for_service,
128 deprecated_reason=DEPRECATED_REASON,
129 deprecated_since=versionutils.deprecated.TRAIN),
145 policy.DocumentedRuleDefault(130 policy.DocumentedRuleDefault(
146 name=base.IDENTITY % 'check_policy_association_for_service',131 name=base.IDENTITY % 'check_policy_association_for_service',
147 check_str=base.SYSTEM_READER,132 check_str=base.SYSTEM_READER,
@@ -153,7 +138,9 @@ policy_association_policies = [
153 {'path': ('/v3/policies/{policy_id}/OS-ENDPOINT-POLICY/'138 {'path': ('/v3/policies/{policy_id}/OS-ENDPOINT-POLICY/'
154 'services/{service_id}'),139 'services/{service_id}'),
155 'method': 'HEAD'}],140 'method': 'HEAD'}],
156 deprecated_rule=deprecated_check_policy_assoc_for_service),141 deprecated_rule=deprecated_check_policy_assoc_for_service,
142 deprecated_reason=DEPRECATED_REASON,
143 deprecated_since=versionutils.deprecated.TRAIN),
157 policy.DocumentedRuleDefault(144 policy.DocumentedRuleDefault(
158 name=base.IDENTITY % 'delete_policy_association_for_service',145 name=base.IDENTITY % 'delete_policy_association_for_service',
159 check_str=base.SYSTEM_ADMIN,146 check_str=base.SYSTEM_ADMIN,
@@ -162,7 +149,9 @@ policy_association_policies = [
162 operations=[{'path': ('/v3/policies/{policy_id}/OS-ENDPOINT-POLICY/'149 operations=[{'path': ('/v3/policies/{policy_id}/OS-ENDPOINT-POLICY/'
163 'services/{service_id}'),150 'services/{service_id}'),
164 'method': 'DELETE'}],151 'method': 'DELETE'}],
165 deprecated_rule=deprecated_delete_policy_assoc_for_service),152 deprecated_rule=deprecated_delete_policy_assoc_for_service,
153 deprecated_reason=DEPRECATED_REASON,
154 deprecated_since=versionutils.deprecated.TRAIN),
166 policy.DocumentedRuleDefault(155 policy.DocumentedRuleDefault(
167 name=base.IDENTITY % (156 name=base.IDENTITY % (
168 'create_policy_association_for_region_and_service'),157 'create_policy_association_for_region_and_service'),
@@ -173,7 +162,9 @@ policy_association_policies = [
173 operations=[{'path': ('/v3/policies/{policy_id}/OS-ENDPOINT-POLICY/'162 operations=[{'path': ('/v3/policies/{policy_id}/OS-ENDPOINT-POLICY/'
174 'services/{service_id}/regions/{region_id}'),163 'services/{service_id}/regions/{region_id}'),
175 'method': 'PUT'}],164 'method': 'PUT'}],
176 deprecated_rule=deprecated_create_policy_assoc_for_region_and_service),165 deprecated_rule=deprecated_create_policy_assoc_for_region_and_service,
166 deprecated_reason=DEPRECATED_REASON,
167 deprecated_since=versionutils.deprecated.TRAIN),
177 policy.DocumentedRuleDefault(168 policy.DocumentedRuleDefault(
178 name=base.IDENTITY % 'check_policy_association_for_region_and_service',169 name=base.IDENTITY % 'check_policy_association_for_region_and_service',
179 check_str=base.SYSTEM_READER,170 check_str=base.SYSTEM_READER,
@@ -185,7 +176,9 @@ policy_association_policies = [
185 {'path': ('/v3/policies/{policy_id}/OS-ENDPOINT-POLICY/'176 {'path': ('/v3/policies/{policy_id}/OS-ENDPOINT-POLICY/'
186 'services/{service_id}/regions/{region_id}'),177 'services/{service_id}/regions/{region_id}'),
187 'method': 'HEAD'}],178 'method': 'HEAD'}],
188 deprecated_rule=deprecated_check_policy_assoc_for_region_and_service),179 deprecated_rule=deprecated_check_policy_assoc_for_region_and_service,
180 deprecated_reason=DEPRECATED_REASON,
181 deprecated_since=versionutils.deprecated.TRAIN),
189 policy.DocumentedRuleDefault(182 policy.DocumentedRuleDefault(
190 name=base.IDENTITY % (183 name=base.IDENTITY % (
191 'delete_policy_association_for_region_and_service'),184 'delete_policy_association_for_region_and_service'),
@@ -195,7 +188,9 @@ policy_association_policies = [
195 operations=[{'path': ('/v3/policies/{policy_id}/OS-ENDPOINT-POLICY/'188 operations=[{'path': ('/v3/policies/{policy_id}/OS-ENDPOINT-POLICY/'
196 'services/{service_id}/regions/{region_id}'),189 'services/{service_id}/regions/{region_id}'),
197 'method': 'DELETE'}],190 'method': 'DELETE'}],
198 deprecated_rule=deprecated_delete_policy_assoc_for_region_and_service),191 deprecated_rule=deprecated_delete_policy_assoc_for_region_and_service,
192 deprecated_reason=DEPRECATED_REASON,
193 deprecated_since=versionutils.deprecated.TRAIN),
199 policy.DocumentedRuleDefault(194 policy.DocumentedRuleDefault(
200 name=base.IDENTITY % 'get_policy_for_endpoint',195 name=base.IDENTITY % 'get_policy_for_endpoint',
201 check_str=base.SYSTEM_READER,196 check_str=base.SYSTEM_READER,
@@ -207,7 +202,9 @@ policy_association_policies = [
207 {'path': ('/v3/endpoints/{endpoint_id}/OS-ENDPOINT-POLICY/'202 {'path': ('/v3/endpoints/{endpoint_id}/OS-ENDPOINT-POLICY/'
208 'policy'),203 'policy'),
209 'method': 'HEAD'}],204 'method': 'HEAD'}],
210 deprecated_rule=deprecated_get_policy_for_endpoint),205 deprecated_rule=deprecated_get_policy_for_endpoint,
206 deprecated_reason=DEPRECATED_REASON,
207 deprecated_since=versionutils.deprecated.TRAIN),
211 policy.DocumentedRuleDefault(208 policy.DocumentedRuleDefault(
212 name=base.IDENTITY % 'list_endpoints_for_policy',209 name=base.IDENTITY % 'list_endpoints_for_policy',
213 check_str=base.SYSTEM_READER,210 check_str=base.SYSTEM_READER,
@@ -216,7 +213,9 @@ policy_association_policies = [
216 operations=[{'path': ('/v3/policies/{policy_id}/OS-ENDPOINT-POLICY/'213 operations=[{'path': ('/v3/policies/{policy_id}/OS-ENDPOINT-POLICY/'
217 'endpoints'),214 'endpoints'),
218 'method': 'GET'}],215 'method': 'GET'}],
219 deprecated_rule=deprecated_list_endpoints_for_policy)216 deprecated_rule=deprecated_list_endpoints_for_policy,
217 deprecated_reason=DEPRECATED_REASON,
218 deprecated_since=versionutils.deprecated.TRAIN)
220]219]
221220
222221
diff --git a/keystone/common/policies/project.py b/keystone/common/policies/project.py
index db7cdee..c7b7c0a 100644
--- a/keystone/common/policies/project.py
+++ b/keystone/common/policies/project.py
@@ -52,84 +52,60 @@ SYSTEM_ADMIN_OR_DOMAIN_ADMIN = (
52 '(role:admin and domain_id:%(target.project.domain_id)s)'52 '(role:admin and domain_id:%(target.project.domain_id)s)'
53)53)
5454
55DEPRECATED_REASON = (
56 "The project API is now aware of system scope and default roles."
57)
58
59deprecated_list_projects = policy.DeprecatedRule(55deprecated_list_projects = policy.DeprecatedRule(
60 name=base.IDENTITY % 'list_projects',56 name=base.IDENTITY % 'list_projects',
61 check_str=base.RULE_ADMIN_REQUIRED,57 check_str=base.RULE_ADMIN_REQUIRED
62 deprecated_reason=DEPRECATED_REASON,
63 deprecated_since=versionutils.deprecated.STEIN
64)58)
65deprecated_get_project = policy.DeprecatedRule(59deprecated_get_project = policy.DeprecatedRule(
66 name=base.IDENTITY % 'get_project',60 name=base.IDENTITY % 'get_project',
67 check_str=base.RULE_ADMIN_OR_TARGET_PROJECT,61 check_str=base.RULE_ADMIN_OR_TARGET_PROJECT
68 deprecated_reason=DEPRECATED_REASON,
69 deprecated_since=versionutils.deprecated.STEIN
70)62)
71deprecated_list_user_projects = policy.DeprecatedRule(63deprecated_list_user_projects = policy.DeprecatedRule(
72 name=base.IDENTITY % 'list_user_projects',64 name=base.IDENTITY % 'list_user_projects',
73 check_str=base.RULE_ADMIN_OR_OWNER,65 check_str=base.RULE_ADMIN_OR_OWNER
74 deprecated_reason=DEPRECATED_REASON,
75 deprecated_since=versionutils.deprecated.STEIN
76)66)
77deprecated_create_project = policy.DeprecatedRule(67deprecated_create_project = policy.DeprecatedRule(
78 name=base.IDENTITY % 'create_project',68 name=base.IDENTITY % 'create_project',
79 check_str=base.RULE_ADMIN_REQUIRED,69 check_str=base.RULE_ADMIN_REQUIRED
80 deprecated_reason=DEPRECATED_REASON,
81 deprecated_since=versionutils.deprecated.STEIN
82)70)
83deprecated_update_project = policy.DeprecatedRule(71deprecated_update_project = policy.DeprecatedRule(
84 name=base.IDENTITY % 'update_project',72 name=base.IDENTITY % 'update_project',
85 check_str=base.RULE_ADMIN_REQUIRED,73 check_str=base.RULE_ADMIN_REQUIRED
86 deprecated_reason=DEPRECATED_REASON,
87 deprecated_since=versionutils.deprecated.STEIN
88)74)
89deprecated_delete_project = policy.DeprecatedRule(75deprecated_delete_project = policy.DeprecatedRule(
90 name=base.IDENTITY % 'delete_project',76 name=base.IDENTITY % 'delete_project',
91 check_str=base.RULE_ADMIN_REQUIRED,77 check_str=base.RULE_ADMIN_REQUIRED
92 deprecated_reason=DEPRECATED_REASON,
93 deprecated_since=versionutils.deprecated.STEIN
94)78)
95deprecated_list_project_tags = policy.DeprecatedRule(79deprecated_list_project_tags = policy.DeprecatedRule(
96 name=base.IDENTITY % 'list_project_tags',80 name=base.IDENTITY % 'list_project_tags',
97 check_str=base.RULE_ADMIN_OR_TARGET_PROJECT,81 check_str=base.RULE_ADMIN_OR_TARGET_PROJECT
98 deprecated_reason=DEPRECATED_REASON,
99 deprecated_since=versionutils.deprecated.TRAIN
100)82)
101deprecated_get_project_tag = policy.DeprecatedRule(83deprecated_get_project_tag = policy.DeprecatedRule(
102 name=base.IDENTITY % 'get_project_tag',84 name=base.IDENTITY % 'get_project_tag',
103 check_str=base.RULE_ADMIN_OR_TARGET_PROJECT,85 check_str=base.RULE_ADMIN_OR_TARGET_PROJECT
104 deprecated_reason=DEPRECATED_REASON,
105 deprecated_since=versionutils.deprecated.TRAIN
106)86)
107deprecated_update_project_tag = policy.DeprecatedRule(87deprecated_update_project_tag = policy.DeprecatedRule(
108 name=base.IDENTITY % 'update_project_tags',88 name=base.IDENTITY % 'update_project_tags',
109 check_str=base.RULE_ADMIN_REQUIRED,89 check_str=base.RULE_ADMIN_REQUIRED
110 deprecated_reason=DEPRECATED_REASON,
111 deprecated_since=versionutils.deprecated.TRAIN
112)90)
113deprecated_create_project_tag = policy.DeprecatedRule(91deprecated_create_project_tag = policy.DeprecatedRule(
114 name=base.IDENTITY % 'create_project_tag',92 name=base.IDENTITY % 'create_project_tag',
115 check_str=base.RULE_ADMIN_REQUIRED,93 check_str=base.RULE_ADMIN_REQUIRED
116 deprecated_reason=DEPRECATED_REASON,
117 deprecated_since=versionutils.deprecated.TRAIN
118)94)
119deprecated_delete_project_tag = policy.DeprecatedRule(95deprecated_delete_project_tag = policy.DeprecatedRule(
120 name=base.IDENTITY % 'delete_project_tag',96 name=base.IDENTITY % 'delete_project_tag',
121 check_str=base.RULE_ADMIN_REQUIRED,97 check_str=base.RULE_ADMIN_REQUIRED
122 deprecated_reason=DEPRECATED_REASON,
123 deprecated_since=versionutils.deprecated.TRAIN
124)98)
125deprecated_delete_project_tags = policy.DeprecatedRule(99deprecated_delete_project_tags = policy.DeprecatedRule(
126 name=base.IDENTITY % 'delete_project_tags',100 name=base.IDENTITY % 'delete_project_tags',
127 check_str=base.RULE_ADMIN_REQUIRED,101 check_str=base.RULE_ADMIN_REQUIRED
128 deprecated_reason=DEPRECATED_REASON,
129 deprecated_since=versionutils.deprecated.TRAIN
130)102)
131103
132104
105DEPRECATED_REASON = (
106 "The project API is now aware of system scope and default roles."
107)
108
133TAGS_DEPRECATED_REASON = """109TAGS_DEPRECATED_REASON = """
134As of the Train release, the project tags API understands how to handle110As of the Train release, the project tags API understands how to handle
135system-scoped tokens in addition to project and domain tokens, making the API111system-scoped tokens in addition to project and domain tokens, making the API
@@ -146,7 +122,9 @@ project_policies = [
146 description='Show project details.',122 description='Show project details.',
147 operations=[{'path': '/v3/projects/{project_id}',123 operations=[{'path': '/v3/projects/{project_id}',
148 'method': 'GET'}],124 'method': 'GET'}],
149 deprecated_rule=deprecated_get_project),125 deprecated_rule=deprecated_get_project,
126 deprecated_reason=DEPRECATED_REASON,
127 deprecated_since=versionutils.deprecated.STEIN),
150 policy.DocumentedRuleDefault(128 policy.DocumentedRuleDefault(
151 name=base.IDENTITY % 'list_projects',129 name=base.IDENTITY % 'list_projects',
152 check_str=SYSTEM_READER_OR_DOMAIN_READER,130 check_str=SYSTEM_READER_OR_DOMAIN_READER,
@@ -158,7 +136,9 @@ project_policies = [
158 description='List projects.',136 description='List projects.',
159 operations=[{'path': '/v3/projects',137 operations=[{'path': '/v3/projects',
160 'method': 'GET'}],138 'method': 'GET'}],
161 deprecated_rule=deprecated_list_projects),139 deprecated_rule=deprecated_list_projects,
140 deprecated_reason=DEPRECATED_REASON,
141 deprecated_since=versionutils.deprecated.STEIN),
162 policy.DocumentedRuleDefault(142 policy.DocumentedRuleDefault(
163 name=base.IDENTITY % 'list_user_projects',143 name=base.IDENTITY % 'list_user_projects',
164 check_str=SYSTEM_READER_OR_DOMAIN_READER_OR_OWNER,144 check_str=SYSTEM_READER_OR_DOMAIN_READER_OR_OWNER,
@@ -166,7 +146,9 @@ project_policies = [
166 description='List projects for user.',146 description='List projects for user.',
167 operations=[{'path': '/v3/users/{user_id}/projects',147 operations=[{'path': '/v3/users/{user_id}/projects',
168 'method': 'GET'}],148 'method': 'GET'}],
169 deprecated_rule=deprecated_list_user_projects),149 deprecated_rule=deprecated_list_user_projects,
150 deprecated_reason=DEPRECATED_REASON,
151 deprecated_since=versionutils.deprecated.STEIN),
170 policy.DocumentedRuleDefault(152 policy.DocumentedRuleDefault(
171 name=base.IDENTITY % 'create_project',153 name=base.IDENTITY % 'create_project',
172 check_str=SYSTEM_ADMIN_OR_DOMAIN_ADMIN,154 check_str=SYSTEM_ADMIN_OR_DOMAIN_ADMIN,
@@ -174,7 +156,9 @@ project_policies = [
174 description='Create project.',156 description='Create project.',
175 operations=[{'path': '/v3/projects',157 operations=[{'path': '/v3/projects',
176 'method': 'POST'}],158 'method': 'POST'}],
177 deprecated_rule=deprecated_create_project),159 deprecated_rule=deprecated_create_project,
160 deprecated_reason=DEPRECATED_REASON,
161 deprecated_since=versionutils.deprecated.STEIN),
178 policy.DocumentedRuleDefault(162 policy.DocumentedRuleDefault(
179 name=base.IDENTITY % 'update_project',163 name=base.IDENTITY % 'update_project',
180 check_str=SYSTEM_ADMIN_OR_DOMAIN_ADMIN,164 check_str=SYSTEM_ADMIN_OR_DOMAIN_ADMIN,
@@ -182,7 +166,9 @@ project_policies = [
182 description='Update project.',166 description='Update project.',
183 operations=[{'path': '/v3/projects/{project_id}',167 operations=[{'path': '/v3/projects/{project_id}',
184 'method': 'PATCH'}],168 'method': 'PATCH'}],
185 deprecated_rule=deprecated_update_project),169 deprecated_rule=deprecated_update_project,
170 deprecated_reason=DEPRECATED_REASON,
171 deprecated_since=versionutils.deprecated.STEIN),
186 policy.DocumentedRuleDefault(172 policy.DocumentedRuleDefault(
187 name=base.IDENTITY % 'delete_project',173 name=base.IDENTITY % 'delete_project',
188 check_str=SYSTEM_ADMIN_OR_DOMAIN_ADMIN,174 check_str=SYSTEM_ADMIN_OR_DOMAIN_ADMIN,
@@ -190,7 +176,9 @@ project_policies = [
190 description='Delete project.',176 description='Delete project.',
191 operations=[{'path': '/v3/projects/{project_id}',177 operations=[{'path': '/v3/projects/{project_id}',
192 'method': 'DELETE'}],178 'method': 'DELETE'}],
193 deprecated_rule=deprecated_delete_project),179 deprecated_rule=deprecated_delete_project,
180 deprecated_reason=DEPRECATED_REASON,
181 deprecated_since=versionutils.deprecated.STEIN),
194 policy.DocumentedRuleDefault(182 policy.DocumentedRuleDefault(
195 name=base.IDENTITY % 'list_project_tags',183 name=base.IDENTITY % 'list_project_tags',
196 check_str=SYSTEM_READER_OR_DOMAIN_READER_OR_PROJECT_USER,184 check_str=SYSTEM_READER_OR_DOMAIN_READER_OR_PROJECT_USER,
@@ -200,7 +188,9 @@ project_policies = [
200 'method': 'GET'},188 'method': 'GET'},
201 {'path': '/v3/projects/{project_id}/tags',189 {'path': '/v3/projects/{project_id}/tags',
202 'method': 'HEAD'}],190 'method': 'HEAD'}],
203 deprecated_rule=deprecated_list_project_tags),191 deprecated_rule=deprecated_list_project_tags,
192 deprecated_reason=TAGS_DEPRECATED_REASON,
193 deprecated_since=versionutils.deprecated.TRAIN),
204 policy.DocumentedRuleDefault(194 policy.DocumentedRuleDefault(
205 name=base.IDENTITY % 'get_project_tag',195 name=base.IDENTITY % 'get_project_tag',
206 check_str=SYSTEM_READER_OR_DOMAIN_READER_OR_PROJECT_USER,196 check_str=SYSTEM_READER_OR_DOMAIN_READER_OR_PROJECT_USER,
@@ -210,7 +200,9 @@ project_policies = [
210 'method': 'GET'},200 'method': 'GET'},
211 {'path': '/v3/projects/{project_id}/tags/{value}',201 {'path': '/v3/projects/{project_id}/tags/{value}',
212 'method': 'HEAD'}],202 'method': 'HEAD'}],
213 deprecated_rule=deprecated_get_project_tag),203 deprecated_rule=deprecated_get_project_tag,
204 deprecated_reason=TAGS_DEPRECATED_REASON,
205 deprecated_since=versionutils.deprecated.TRAIN),
214 policy.DocumentedRuleDefault(206 policy.DocumentedRuleDefault(
215 name=base.IDENTITY % 'update_project_tags',207 name=base.IDENTITY % 'update_project_tags',
216 check_str=SYSTEM_ADMIN_OR_DOMAIN_ADMIN_OR_PROJECT_ADMIN,208 check_str=SYSTEM_ADMIN_OR_DOMAIN_ADMIN_OR_PROJECT_ADMIN,
@@ -218,7 +210,9 @@ project_policies = [
218 description='Replace all tags on a project with the new set of tags.',210 description='Replace all tags on a project with the new set of tags.',
219 operations=[{'path': '/v3/projects/{project_id}/tags',211 operations=[{'path': '/v3/projects/{project_id}/tags',
220 'method': 'PUT'}],212 'method': 'PUT'}],
221 deprecated_rule=deprecated_update_project_tag),213 deprecated_rule=deprecated_update_project_tag,
214 deprecated_reason=TAGS_DEPRECATED_REASON,
215 deprecated_since=versionutils.deprecated.TRAIN),
222 policy.DocumentedRuleDefault(216 policy.DocumentedRuleDefault(
223 name=base.IDENTITY % 'create_project_tag',217 name=base.IDENTITY % 'create_project_tag',
224 check_str=SYSTEM_ADMIN_OR_DOMAIN_ADMIN_OR_PROJECT_ADMIN,218 check_str=SYSTEM_ADMIN_OR_DOMAIN_ADMIN_OR_PROJECT_ADMIN,
@@ -226,7 +220,9 @@ project_policies = [
226 description='Add a single tag to a project.',220 description='Add a single tag to a project.',
227 operations=[{'path': '/v3/projects/{project_id}/tags/{value}',221 operations=[{'path': '/v3/projects/{project_id}/tags/{value}',
228 'method': 'PUT'}],222 'method': 'PUT'}],
229 deprecated_rule=deprecated_create_project_tag),223 deprecated_rule=deprecated_create_project_tag,
224 deprecated_reason=TAGS_DEPRECATED_REASON,
225 deprecated_since=versionutils.deprecated.TRAIN),
230 policy.DocumentedRuleDefault(226 policy.DocumentedRuleDefault(
231 name=base.IDENTITY % 'delete_project_tags',227 name=base.IDENTITY % 'delete_project_tags',
232 check_str=SYSTEM_ADMIN_OR_DOMAIN_ADMIN_OR_PROJECT_ADMIN,228 check_str=SYSTEM_ADMIN_OR_DOMAIN_ADMIN_OR_PROJECT_ADMIN,
@@ -234,7 +230,9 @@ project_policies = [
234 description='Remove all tags from a project.',230 description='Remove all tags from a project.',
235 operations=[{'path': '/v3/projects/{project_id}/tags',231 operations=[{'path': '/v3/projects/{project_id}/tags',
236 'method': 'DELETE'}],232 'method': 'DELETE'}],
237 deprecated_rule=deprecated_delete_project_tags),233 deprecated_rule=deprecated_delete_project_tags,
234 deprecated_reason=TAGS_DEPRECATED_REASON,
235 deprecated_since=versionutils.deprecated.TRAIN),
238 policy.DocumentedRuleDefault(236 policy.DocumentedRuleDefault(
239 name=base.IDENTITY % 'delete_project_tag',237 name=base.IDENTITY % 'delete_project_tag',
240 check_str=SYSTEM_ADMIN_OR_DOMAIN_ADMIN_OR_PROJECT_ADMIN,238 check_str=SYSTEM_ADMIN_OR_DOMAIN_ADMIN_OR_PROJECT_ADMIN,
@@ -242,7 +240,9 @@ project_policies = [
242 description='Delete a specified tag from project.',240 description='Delete a specified tag from project.',
243 operations=[{'path': '/v3/projects/{project_id}/tags/{value}',241 operations=[{'path': '/v3/projects/{project_id}/tags/{value}',
244 'method': 'DELETE'}],242 'method': 'DELETE'}],
245 deprecated_rule=deprecated_delete_project_tag)243 deprecated_rule=deprecated_delete_project_tag,
244 deprecated_reason=TAGS_DEPRECATED_REASON,
245 deprecated_since=versionutils.deprecated.TRAIN)
246]246]
247247
248248
diff --git a/keystone/common/policies/project_endpoint.py b/keystone/common/policies/project_endpoint.py
index 86a020e..c04cddd 100644
--- a/keystone/common/policies/project_endpoint.py
+++ b/keystone/common/policies/project_endpoint.py
@@ -15,49 +15,39 @@ from oslo_policy import policy
1515
16from keystone.common.policies import base16from keystone.common.policies import base
1717
18DEPRECATED_REASON = """
19As of the Train release, the project endpoint API now understands default
20roles and system-scoped tokens, making the API more granular by default without
21compromising security. The new policy defaults account for these changes
22automatically. Be sure to take these new defaults into consideration if you are
23relying on overrides in your deployment for the project endpoint API.
24"""
25
26deprecated_list_projects_for_endpoint = policy.DeprecatedRule(18deprecated_list_projects_for_endpoint = policy.DeprecatedRule(
27 name=base.IDENTITY % 'list_projects_for_endpoint',19 name=base.IDENTITY % 'list_projects_for_endpoint',
28 check_str=base.RULE_ADMIN_REQUIRED,20 check_str=base.RULE_ADMIN_REQUIRED,
29 deprecated_reason=DEPRECATED_REASON,
30 deprecated_since=versionutils.deprecated.TRAIN
31)21)
3222
33deprecated_add_endpoint_to_project = policy.DeprecatedRule(23deprecated_add_endpoint_to_project = policy.DeprecatedRule(
34 name=base.IDENTITY % 'add_endpoint_to_project',24 name=base.IDENTITY % 'add_endpoint_to_project',
35 check_str=base.RULE_ADMIN_REQUIRED,25 check_str=base.RULE_ADMIN_REQUIRED,
36 deprecated_reason=DEPRECATED_REASON,
37 deprecated_since=versionutils.deprecated.TRAIN
38)26)
3927
40deprecated_check_endpoint_in_project = policy.DeprecatedRule(28deprecated_check_endpoint_in_project = policy.DeprecatedRule(
41 name=base.IDENTITY % 'check_endpoint_in_project',29 name=base.IDENTITY % 'check_endpoint_in_project',
42 check_str=base.RULE_ADMIN_REQUIRED,30 check_str=base.RULE_ADMIN_REQUIRED,
43 deprecated_reason=DEPRECATED_REASON,
44 deprecated_since=versionutils.deprecated.TRAIN
45)31)
4632
47deprecated_list_endpoints_for_project = policy.DeprecatedRule(33deprecated_list_endpoints_for_project = policy.DeprecatedRule(
48 name=base.IDENTITY % 'list_endpoints_for_project',34 name=base.IDENTITY % 'list_endpoints_for_project',
49 check_str=base.RULE_ADMIN_REQUIRED,35 check_str=base.RULE_ADMIN_REQUIRED,
50 deprecated_reason=DEPRECATED_REASON,
51 deprecated_since=versionutils.deprecated.TRAIN
52)36)
5337
54deprecated_remove_endpoint_from_project = policy.DeprecatedRule(38deprecated_remove_endpoint_from_project = policy.DeprecatedRule(
55 name=base.IDENTITY % 'remove_endpoint_from_project',39 name=base.IDENTITY % 'remove_endpoint_from_project',
56 check_str=base.RULE_ADMIN_REQUIRED,40 check_str=base.RULE_ADMIN_REQUIRED,
57 deprecated_reason=DEPRECATED_REASON,
58 deprecated_since=versionutils.deprecated.TRAIN
59)41)
6042
43DEPRECATED_REASON = """
44As of the Train release, the project endpoint API now understands default
45roles and system-scoped tokens, making the API more granular by default without
46compromising security. The new policy defaults account for these changes
47automatically. Be sure to take these new defaults into consideration if you are
48relying on overrides in your deployment for the project endpoint API.
49"""
50
6151
62project_endpoint_policies = [52project_endpoint_policies = [
6353
@@ -73,7 +63,9 @@ project_endpoint_policies = [
73 operations=[{'path': ('/v3/OS-EP-FILTER/endpoints/{endpoint_id}/'63 operations=[{'path': ('/v3/OS-EP-FILTER/endpoints/{endpoint_id}/'
74 'projects'),64 'projects'),
75 'method': 'GET'}],65 'method': 'GET'}],
76 deprecated_rule=deprecated_list_projects_for_endpoint),66 deprecated_rule=deprecated_list_projects_for_endpoint,
67 deprecated_reason=DEPRECATED_REASON,
68 deprecated_since=versionutils.deprecated.TRAIN),
77 policy.DocumentedRuleDefault(69 policy.DocumentedRuleDefault(
78 name=base.IDENTITY % 'add_endpoint_to_project',70 name=base.IDENTITY % 'add_endpoint_to_project',
79 check_str=base.SYSTEM_ADMIN,71 check_str=base.SYSTEM_ADMIN,
@@ -82,7 +74,9 @@ project_endpoint_policies = [
82 operations=[{'path': ('/v3/OS-EP-FILTER/projects/{project_id}/'74 operations=[{'path': ('/v3/OS-EP-FILTER/projects/{project_id}/'
83 'endpoints/{endpoint_id}'),75 'endpoints/{endpoint_id}'),
84 'method': 'PUT'}],76 'method': 'PUT'}],
85 deprecated_rule=deprecated_add_endpoint_to_project),77 deprecated_rule=deprecated_add_endpoint_to_project,
78 deprecated_reason=DEPRECATED_REASON,
79 deprecated_since=versionutils.deprecated.TRAIN),
86 policy.DocumentedRuleDefault(80 policy.DocumentedRuleDefault(
87 name=base.IDENTITY % 'check_endpoint_in_project',81 name=base.IDENTITY % 'check_endpoint_in_project',
88 check_str=base.SYSTEM_READER,82 check_str=base.SYSTEM_READER,
@@ -94,7 +88,9 @@ project_endpoint_policies = [
94 {'path': ('/v3/OS-EP-FILTER/projects/{project_id}/'88 {'path': ('/v3/OS-EP-FILTER/projects/{project_id}/'
95 'endpoints/{endpoint_id}'),89 'endpoints/{endpoint_id}'),
96 'method': 'HEAD'}],90 'method': 'HEAD'}],
97 deprecated_rule=deprecated_check_endpoint_in_project),91 deprecated_rule=deprecated_check_endpoint_in_project,
92 deprecated_reason=DEPRECATED_REASON,
93 deprecated_since=versionutils.deprecated.TRAIN),
98 policy.DocumentedRuleDefault(94 policy.DocumentedRuleDefault(
99 name=base.IDENTITY % 'list_endpoints_for_project',95 name=base.IDENTITY % 'list_endpoints_for_project',
100 check_str=base.SYSTEM_READER,96 check_str=base.SYSTEM_READER,
@@ -103,7 +99,9 @@ project_endpoint_policies = [
103 operations=[{'path': ('/v3/OS-EP-FILTER/projects/{project_id}/'99 operations=[{'path': ('/v3/OS-EP-FILTER/projects/{project_id}/'
104 'endpoints'),100 'endpoints'),
105 'method': 'GET'}],101 'method': 'GET'}],
106 deprecated_rule=deprecated_list_endpoints_for_project),102 deprecated_rule=deprecated_list_endpoints_for_project,
103 deprecated_reason=DEPRECATED_REASON,
104 deprecated_since=versionutils.deprecated.TRAIN),
107 policy.DocumentedRuleDefault(105 policy.DocumentedRuleDefault(
108 name=base.IDENTITY % 'remove_endpoint_from_project',106 name=base.IDENTITY % 'remove_endpoint_from_project',
109 check_str=base.SYSTEM_ADMIN,107 check_str=base.SYSTEM_ADMIN,
@@ -113,7 +111,9 @@ project_endpoint_policies = [
113 operations=[{'path': ('/v3/OS-EP-FILTER/projects/{project_id}/'111 operations=[{'path': ('/v3/OS-EP-FILTER/projects/{project_id}/'
114 'endpoints/{endpoint_id}'),112 'endpoints/{endpoint_id}'),
115 'method': 'DELETE'}],113 'method': 'DELETE'}],
116 deprecated_rule=deprecated_remove_endpoint_from_project),114 deprecated_rule=deprecated_remove_endpoint_from_project,
115 deprecated_reason=DEPRECATED_REASON,
116 deprecated_since=versionutils.deprecated.TRAIN),
117]117]
118118
119119
diff --git a/keystone/common/policies/protocol.py b/keystone/common/policies/protocol.py
index 887fc70..de2a729 100644
--- a/keystone/common/policies/protocol.py
+++ b/keystone/common/policies/protocol.py
@@ -15,42 +15,31 @@ from oslo_policy import policy
1515
16from keystone.common.policies import base16from keystone.common.policies import base
1717
18DEPRECATED_REASON = (
19 "The federated protocol API is now aware of system scope and default "
20 "roles."
21)
22
23deprecated_get_protocol = policy.DeprecatedRule(18deprecated_get_protocol = policy.DeprecatedRule(
24 name=base.IDENTITY % 'get_protocol',19 name=base.IDENTITY % 'get_protocol',
25 check_str=base.RULE_ADMIN_REQUIRED,20 check_str=base.RULE_ADMIN_REQUIRED
26 deprecated_reason=DEPRECATED_REASON,
27 deprecated_since=versionutils.deprecated.STEIN
28)21)
29deprecated_list_protocols = policy.DeprecatedRule(22deprecated_list_protocols = policy.DeprecatedRule(
30 name=base.IDENTITY % 'list_protocols',23 name=base.IDENTITY % 'list_protocols',
31 check_str=base.RULE_ADMIN_REQUIRED,24 check_str=base.RULE_ADMIN_REQUIRED
32 deprecated_reason=DEPRECATED_REASON,
33 deprecated_since=versionutils.deprecated.STEIN
34)25)
35deprecated_update_protocol = policy.DeprecatedRule(26deprecated_update_protocol = policy.DeprecatedRule(
36 name=base.IDENTITY % 'update_protocol',27 name=base.IDENTITY % 'update_protocol',
37 check_str=base.RULE_ADMIN_REQUIRED,28 check_str=base.RULE_ADMIN_REQUIRED
38 deprecated_reason=DEPRECATED_REASON,
39 deprecated_since=versionutils.deprecated.STEIN
40)29)
41deprecated_create_protocol = policy.DeprecatedRule(30deprecated_create_protocol = policy.DeprecatedRule(
42 name=base.IDENTITY % 'create_protocol',31 name=base.IDENTITY % 'create_protocol',
43 check_str=base.RULE_ADMIN_REQUIRED,32 check_str=base.RULE_ADMIN_REQUIRED
44 deprecated_reason=DEPRECATED_REASON,
45 deprecated_since=versionutils.deprecated.STEIN
46)33)
47deprecated_delete_protocol = policy.DeprecatedRule(34deprecated_delete_protocol = policy.DeprecatedRule(
48 name=base.IDENTITY % 'delete_protocol',35 name=base.IDENTITY % 'delete_protocol',
49 check_str=base.RULE_ADMIN_REQUIRED,36 check_str=base.RULE_ADMIN_REQUIRED
50 deprecated_reason=DEPRECATED_REASON,
51 deprecated_since=versionutils.deprecated.STEIN
52)37)
5338
39DEPRECATED_REASON = (
40 "The federated protocol API is now aware of system scope and default "
41 "roles."
42)
5443
55protocol_policies = [44protocol_policies = [
56 policy.DocumentedRuleDefault(45 policy.DocumentedRuleDefault(
@@ -64,7 +53,9 @@ protocol_policies = [
64 operations=[{'path': ('/v3/OS-FEDERATION/identity_providers/{idp_id}/'53 operations=[{'path': ('/v3/OS-FEDERATION/identity_providers/{idp_id}/'
65 'protocols/{protocol_id}'),54 'protocols/{protocol_id}'),
66 'method': 'PUT'}],55 'method': 'PUT'}],
67 deprecated_rule=deprecated_create_protocol),56 deprecated_rule=deprecated_create_protocol,
57 deprecated_reason=DEPRECATED_REASON,
58 deprecated_since=versionutils.deprecated.STEIN),
68 policy.DocumentedRuleDefault(59 policy.DocumentedRuleDefault(
69 name=base.IDENTITY % 'update_protocol',60 name=base.IDENTITY % 'update_protocol',
70 check_str=base.SYSTEM_ADMIN,61 check_str=base.SYSTEM_ADMIN,
@@ -73,7 +64,9 @@ protocol_policies = [
73 operations=[{'path': ('/v3/OS-FEDERATION/identity_providers/{idp_id}/'64 operations=[{'path': ('/v3/OS-FEDERATION/identity_providers/{idp_id}/'
74 'protocols/{protocol_id}'),65 'protocols/{protocol_id}'),
75 'method': 'PATCH'}],66 'method': 'PATCH'}],
76 deprecated_rule=deprecated_update_protocol),67 deprecated_rule=deprecated_update_protocol,
68 deprecated_reason=DEPRECATED_REASON,
69 deprecated_since=versionutils.deprecated.STEIN),
77 policy.DocumentedRuleDefault(70 policy.DocumentedRuleDefault(
78 name=base.IDENTITY % 'get_protocol',71 name=base.IDENTITY % 'get_protocol',
79 check_str=base.SYSTEM_READER,72 check_str=base.SYSTEM_READER,
@@ -82,7 +75,9 @@ protocol_policies = [
82 operations=[{'path': ('/v3/OS-FEDERATION/identity_providers/{idp_id}/'75 operations=[{'path': ('/v3/OS-FEDERATION/identity_providers/{idp_id}/'
83 'protocols/{protocol_id}'),76 'protocols/{protocol_id}'),
84 'method': 'GET'}],77 'method': 'GET'}],
85 deprecated_rule=deprecated_get_protocol),78 deprecated_rule=deprecated_get_protocol,
79 deprecated_reason=DEPRECATED_REASON,
80 deprecated_since=versionutils.deprecated.STEIN),
86 policy.DocumentedRuleDefault(81 policy.DocumentedRuleDefault(
87 name=base.IDENTITY % 'list_protocols',82 name=base.IDENTITY % 'list_protocols',
88 check_str=base.SYSTEM_READER,83 check_str=base.SYSTEM_READER,
@@ -91,7 +86,9 @@ protocol_policies = [
91 operations=[{'path': ('/v3/OS-FEDERATION/identity_providers/{idp_id}/'86 operations=[{'path': ('/v3/OS-FEDERATION/identity_providers/{idp_id}/'
92 'protocols'),87 'protocols'),
93 'method': 'GET'}],88 'method': 'GET'}],
94 deprecated_rule=deprecated_list_protocols),89 deprecated_rule=deprecated_list_protocols,
90 deprecated_reason=DEPRECATED_REASON,
91 deprecated_since=versionutils.deprecated.STEIN),
95 policy.DocumentedRuleDefault(92 policy.DocumentedRuleDefault(
96 name=base.IDENTITY % 'delete_protocol',93 name=base.IDENTITY % 'delete_protocol',
97 check_str=base.SYSTEM_ADMIN,94 check_str=base.SYSTEM_ADMIN,
@@ -100,7 +97,9 @@ protocol_policies = [
100 operations=[{'path': ('/v3/OS-FEDERATION/identity_providers/{idp_id}/'97 operations=[{'path': ('/v3/OS-FEDERATION/identity_providers/{idp_id}/'
101 'protocols/{protocol_id}'),98 'protocols/{protocol_id}'),
102 'method': 'DELETE'}],99 'method': 'DELETE'}],
103 deprecated_rule=deprecated_delete_protocol)100 deprecated_rule=deprecated_delete_protocol,
101 deprecated_reason=DEPRECATED_REASON,
102 deprecated_since=versionutils.deprecated.STEIN)
104]103]
105104
106105
diff --git a/keystone/common/policies/region.py b/keystone/common/policies/region.py
index f13299d..bf60f8f 100644
--- a/keystone/common/policies/region.py
+++ b/keystone/common/policies/region.py
@@ -15,29 +15,22 @@ from oslo_policy import policy
1515
16from keystone.common.policies import base16from keystone.common.policies import base
1717
18DEPRECATED_REASON = (
19 "The region API is now aware of system scope and default roles."
20)
21
22deprecated_create_region = policy.DeprecatedRule(18deprecated_create_region = policy.DeprecatedRule(
23 name=base.IDENTITY % 'create_region',19 name=base.IDENTITY % 'create_region',
24 check_str=base.RULE_ADMIN_REQUIRED,20 check_str=base.RULE_ADMIN_REQUIRED
25 deprecated_reason=DEPRECATED_REASON,
26 deprecated_since=versionutils.deprecated.STEIN
27)21)
28deprecated_update_region = policy.DeprecatedRule(22deprecated_update_region = policy.DeprecatedRule(
29 name=base.IDENTITY % 'update_region',23 name=base.IDENTITY % 'update_region',
30 check_str=base.RULE_ADMIN_REQUIRED,24 check_str=base.RULE_ADMIN_REQUIRED
31 deprecated_reason=DEPRECATED_REASON,
32 deprecated_since=versionutils.deprecated.STEIN
33)25)
34deprecated_delete_region = policy.DeprecatedRule(26deprecated_delete_region = policy.DeprecatedRule(
35 name=base.IDENTITY % 'delete_region',27 name=base.IDENTITY % 'delete_region',
36 check_str=base.RULE_ADMIN_REQUIRED,28 check_str=base.RULE_ADMIN_REQUIRED
37 deprecated_reason=DEPRECATED_REASON,
38 deprecated_since=versionutils.deprecated.STEIN
39)29)
4030
31DEPRECATED_REASON = (
32 "The region API is now aware of system scope and default roles."
33)
4134
42region_policies = [35region_policies = [
43 policy.DocumentedRuleDefault(36 policy.DocumentedRuleDefault(
@@ -73,7 +66,9 @@ region_policies = [
73 'method': 'POST'},66 'method': 'POST'},
74 {'path': '/v3/regions/{region_id}',67 {'path': '/v3/regions/{region_id}',
75 'method': 'PUT'}],68 'method': 'PUT'}],
76 deprecated_rule=deprecated_create_region),69 deprecated_rule=deprecated_create_region,
70 deprecated_reason=DEPRECATED_REASON,
71 deprecated_since=versionutils.deprecated.STEIN),
77 policy.DocumentedRuleDefault(72 policy.DocumentedRuleDefault(
78 name=base.IDENTITY % 'update_region',73 name=base.IDENTITY % 'update_region',
79 check_str=base.SYSTEM_ADMIN,74 check_str=base.SYSTEM_ADMIN,
@@ -81,7 +76,9 @@ region_policies = [
81 description='Update region.',76 description='Update region.',
82 operations=[{'path': '/v3/regions/{region_id}',77 operations=[{'path': '/v3/regions/{region_id}',
83 'method': 'PATCH'}],78 'method': 'PATCH'}],
84 deprecated_rule=deprecated_update_region),79 deprecated_rule=deprecated_update_region,
80 deprecated_reason=DEPRECATED_REASON,
81 deprecated_since=versionutils.deprecated.STEIN),
85 policy.DocumentedRuleDefault(82 policy.DocumentedRuleDefault(
86 name=base.IDENTITY % 'delete_region',83 name=base.IDENTITY % 'delete_region',
87 check_str=base.SYSTEM_ADMIN,84 check_str=base.SYSTEM_ADMIN,
@@ -89,7 +86,9 @@ region_policies = [
89 description='Delete region.',86 description='Delete region.',
90 operations=[{'path': '/v3/regions/{region_id}',87 operations=[{'path': '/v3/regions/{region_id}',
91 'method': 'DELETE'}],88 'method': 'DELETE'}],
92 deprecated_rule=deprecated_delete_region),89 deprecated_rule=deprecated_delete_region,
90 deprecated_reason=DEPRECATED_REASON,
91 deprecated_since=versionutils.deprecated.STEIN),
93]92]
9493
9594
diff --git a/keystone/common/policies/role.py b/keystone/common/policies/role.py
index b372efb..7d6a38e 100644
--- a/keystone/common/policies/role.py
+++ b/keystone/common/policies/role.py
@@ -15,71 +15,50 @@ from oslo_policy import policy
1515
16from keystone.common.policies import base16from keystone.common.policies import base
1717
18DEPRECATED_REASON = (
19 "The role API is now aware of system scope and default roles."
20)
21
22deprecated_get_role = policy.DeprecatedRule(18deprecated_get_role = policy.DeprecatedRule(
23 name=base.IDENTITY % 'get_role',19 name=base.IDENTITY % 'get_role',
24 check_str=base.RULE_ADMIN_REQUIRED,20 check_str=base.RULE_ADMIN_REQUIRED
25 deprecated_reason=DEPRECATED_REASON,
26 deprecated_since=versionutils.deprecated.STEIN
27)21)
28deprecated_list_role = policy.DeprecatedRule(22deprecated_list_role = policy.DeprecatedRule(
29 name=base.IDENTITY % 'list_roles',23 name=base.IDENTITY % 'list_roles',
30 check_str=base.RULE_ADMIN_REQUIRED,24 check_str=base.RULE_ADMIN_REQUIRED
31 deprecated_reason=DEPRECATED_REASON,
32 deprecated_since=versionutils.deprecated.STEIN
33)25)
34deprecated_update_role = policy.DeprecatedRule(26deprecated_update_role = policy.DeprecatedRule(
35 name=base.IDENTITY % 'update_role',27 name=base.IDENTITY % 'update_role',
36 check_str=base.RULE_ADMIN_REQUIRED,28 check_str=base.RULE_ADMIN_REQUIRED
37 deprecated_reason=DEPRECATED_REASON,
38 deprecated_since=versionutils.deprecated.STEIN
39)29)
40deprecated_create_role = policy.DeprecatedRule(30deprecated_create_role = policy.DeprecatedRule(
41 name=base.IDENTITY % 'create_role',31 name=base.IDENTITY % 'create_role',
42 check_str=base.RULE_ADMIN_REQUIRED,32 check_str=base.RULE_ADMIN_REQUIRED
43 deprecated_reason=DEPRECATED_REASON,
44 deprecated_since=versionutils.deprecated.STEIN
45)33)
46deprecated_delete_role = policy.DeprecatedRule(34deprecated_delete_role = policy.DeprecatedRule(
47 name=base.IDENTITY % 'delete_role',35 name=base.IDENTITY % 'delete_role',
48 check_str=base.RULE_ADMIN_REQUIRED,36 check_str=base.RULE_ADMIN_REQUIRED
49 deprecated_reason=DEPRECATED_REASON,
50 deprecated_since=versionutils.deprecated.STEIN
51)37)
52deprecated_get_domain_role = policy.DeprecatedRule(38deprecated_get_domain_role = policy.DeprecatedRule(
53 name=base.IDENTITY % 'get_domain_role',39 name=base.IDENTITY % 'get_domain_role',
54 check_str=base.RULE_ADMIN_REQUIRED,40 check_str=base.RULE_ADMIN_REQUIRED
55 deprecated_reason=DEPRECATED_REASON,
56 deprecated_since=versionutils.deprecated.TRAIN
57)41)
58deprecated_list_domain_roles = policy.DeprecatedRule(42deprecated_list_domain_roles = policy.DeprecatedRule(
59 name=base.IDENTITY % 'list_domain_roles',43 name=base.IDENTITY % 'list_domain_roles',
60 check_str=base.RULE_ADMIN_REQUIRED,44 check_str=base.RULE_ADMIN_REQUIRED
61 deprecated_reason=DEPRECATED_REASON,
62 deprecated_since=versionutils.deprecated.TRAIN
63)45)
64deprecated_update_domain_role = policy.DeprecatedRule(46deprecated_update_domain_role = policy.DeprecatedRule(
65 name=base.IDENTITY % 'update_domain_role',47 name=base.IDENTITY % 'update_domain_role',
66 check_str=base.RULE_ADMIN_REQUIRED,48 check_str=base.RULE_ADMIN_REQUIRED
67 deprecated_reason=DEPRECATED_REASON,
68 deprecated_since=versionutils.deprecated.TRAIN
69)49)
70deprecated_create_domain_role = policy.DeprecatedRule(50deprecated_create_domain_role = policy.DeprecatedRule(
71 name=base.IDENTITY % 'create_domain_role',51 name=base.IDENTITY % 'create_domain_role',
72 check_str=base.RULE_ADMIN_REQUIRED,52 check_str=base.RULE_ADMIN_REQUIRED
73 deprecated_reason=DEPRECATED_REASON,
74 deprecated_since=versionutils.deprecated.TRAIN
75)53)
76deprecated_delete_domain_role = policy.DeprecatedRule(54deprecated_delete_domain_role = policy.DeprecatedRule(
77 name=base.IDENTITY % 'delete_domain_role',55 name=base.IDENTITY % 'delete_domain_role',
78 check_str=base.RULE_ADMIN_REQUIRED,56 check_str=base.RULE_ADMIN_REQUIRED
79 deprecated_reason=DEPRECATED_REASON,
80 deprecated_since=versionutils.deprecated.TRAIN
81)57)
8258
59DEPRECATED_REASON = (
60 "The role API is now aware of system scope and default roles."
61)
8362
84role_policies = [63role_policies = [
85 policy.DocumentedRuleDefault(64 policy.DocumentedRuleDefault(
@@ -96,7 +75,9 @@ role_policies = [
96 'method': 'GET'},75 'method': 'GET'},
97 {'path': '/v3/roles/{role_id}',76 {'path': '/v3/roles/{role_id}',
98 'method': 'HEAD'}],77 'method': 'HEAD'}],
99 deprecated_rule=deprecated_get_role),78 deprecated_rule=deprecated_get_role,
79 deprecated_reason=DEPRECATED_REASON,
80 deprecated_since=versionutils.deprecated.STEIN),
100 policy.DocumentedRuleDefault(81 policy.DocumentedRuleDefault(
101 name=base.IDENTITY % 'list_roles',82 name=base.IDENTITY % 'list_roles',
102 check_str=base.SYSTEM_READER,83 check_str=base.SYSTEM_READER,
@@ -106,7 +87,9 @@ role_policies = [
106 'method': 'GET'},87 'method': 'GET'},
107 {'path': '/v3/roles',88 {'path': '/v3/roles',
108 'method': 'HEAD'}],89 'method': 'HEAD'}],
109 deprecated_rule=deprecated_list_role),90 deprecated_rule=deprecated_list_role,
91 deprecated_reason=DEPRECATED_REASON,
92 deprecated_since=versionutils.deprecated.STEIN),
110 policy.DocumentedRuleDefault(93 policy.DocumentedRuleDefault(
111 name=base.IDENTITY % 'create_role',94 name=base.IDENTITY % 'create_role',
112 check_str=base.SYSTEM_ADMIN,95 check_str=base.SYSTEM_ADMIN,
@@ -114,7 +97,9 @@ role_policies = [
114 description='Create role.',97 description='Create role.',
115 operations=[{'path': '/v3/roles',98 operations=[{'path': '/v3/roles',
116 'method': 'POST'}],99 'method': 'POST'}],
117 deprecated_rule=deprecated_create_role),100 deprecated_rule=deprecated_create_role,
101 deprecated_reason=DEPRECATED_REASON,
102 deprecated_since=versionutils.deprecated.STEIN),
118 policy.DocumentedRuleDefault(103 policy.DocumentedRuleDefault(
119 name=base.IDENTITY % 'update_role',104 name=base.IDENTITY % 'update_role',
120 check_str=base.SYSTEM_ADMIN,105 check_str=base.SYSTEM_ADMIN,
@@ -122,7 +107,9 @@ role_policies = [
122 description='Update role.',107 description='Update role.',
123 operations=[{'path': '/v3/roles/{role_id}',108 operations=[{'path': '/v3/roles/{role_id}',
124 'method': 'PATCH'}],109 'method': 'PATCH'}],
125 deprecated_rule=deprecated_update_role),110 deprecated_rule=deprecated_update_role,
111 deprecated_reason=DEPRECATED_REASON,
112 deprecated_since=versionutils.deprecated.STEIN),
126 policy.DocumentedRuleDefault(113 policy.DocumentedRuleDefault(
127 name=base.IDENTITY % 'delete_role',114 name=base.IDENTITY % 'delete_role',
128 check_str=base.SYSTEM_ADMIN,115 check_str=base.SYSTEM_ADMIN,
@@ -130,7 +117,9 @@ role_policies = [
130 description='Delete role.',117 description='Delete role.',
131 operations=[{'path': '/v3/roles/{role_id}',118 operations=[{'path': '/v3/roles/{role_id}',
132 'method': 'DELETE'}],119 'method': 'DELETE'}],
133 deprecated_rule=deprecated_delete_role),120 deprecated_rule=deprecated_delete_role,
121 deprecated_reason=DEPRECATED_REASON,
122 deprecated_since=versionutils.deprecated.STEIN),
134 policy.DocumentedRuleDefault(123 policy.DocumentedRuleDefault(
135 name=base.IDENTITY % 'get_domain_role',124 name=base.IDENTITY % 'get_domain_role',
136 check_str=base.SYSTEM_READER,125 check_str=base.SYSTEM_READER,
@@ -145,7 +134,9 @@ role_policies = [
145 'method': 'GET'},134 'method': 'GET'},
146 {'path': '/v3/roles/{role_id}',135 {'path': '/v3/roles/{role_id}',
147 'method': 'HEAD'}],136 'method': 'HEAD'}],
148 deprecated_rule=deprecated_get_domain_role),137 deprecated_rule=deprecated_get_domain_role,
138 deprecated_reason=DEPRECATED_REASON,
139 deprecated_since=versionutils.deprecated.TRAIN),
149 policy.DocumentedRuleDefault(140 policy.DocumentedRuleDefault(
150 name=base.IDENTITY % 'list_domain_roles',141 name=base.IDENTITY % 'list_domain_roles',
151 check_str=base.SYSTEM_READER,142 check_str=base.SYSTEM_READER,
@@ -155,7 +146,9 @@ role_policies = [
155 'method': 'GET'},146 'method': 'GET'},
156 {'path': '/v3/roles?domain_id={domain_id}',147 {'path': '/v3/roles?domain_id={domain_id}',
157 'method': 'HEAD'}],148 'method': 'HEAD'}],
158 deprecated_rule=deprecated_list_domain_roles),149 deprecated_rule=deprecated_list_domain_roles,
150 deprecated_reason=DEPRECATED_REASON,
151 deprecated_since=versionutils.deprecated.TRAIN),
159 policy.DocumentedRuleDefault(152 policy.DocumentedRuleDefault(
160 name=base.IDENTITY % 'create_domain_role',153 name=base.IDENTITY % 'create_domain_role',
161 check_str=base.SYSTEM_ADMIN,154 check_str=base.SYSTEM_ADMIN,
@@ -163,7 +156,9 @@ role_policies = [
163 scope_types=['system'],156 scope_types=['system'],
164 operations=[{'path': '/v3/roles',157 operations=[{'path': '/v3/roles',
165 'method': 'POST'}],158 'method': 'POST'}],
166 deprecated_rule=deprecated_create_domain_role),159 deprecated_rule=deprecated_create_domain_role,
160 deprecated_reason=DEPRECATED_REASON,
161 deprecated_since=versionutils.deprecated.TRAIN),
167 policy.DocumentedRuleDefault(162 policy.DocumentedRuleDefault(
168 name=base.IDENTITY % 'update_domain_role',163 name=base.IDENTITY % 'update_domain_role',
169 check_str=base.SYSTEM_ADMIN,164 check_str=base.SYSTEM_ADMIN,
@@ -171,7 +166,9 @@ role_policies = [
171 scope_types=['system'],166 scope_types=['system'],
172 operations=[{'path': '/v3/roles/{role_id}',167 operations=[{'path': '/v3/roles/{role_id}',
173 'method': 'PATCH'}],168 'method': 'PATCH'}],
174 deprecated_rule=deprecated_update_domain_role),169 deprecated_rule=deprecated_update_domain_role,
170 deprecated_reason=DEPRECATED_REASON,
171 deprecated_since=versionutils.deprecated.TRAIN),
175 policy.DocumentedRuleDefault(172 policy.DocumentedRuleDefault(
176 name=base.IDENTITY % 'delete_domain_role',173 name=base.IDENTITY % 'delete_domain_role',
177 check_str=base.SYSTEM_ADMIN,174 check_str=base.SYSTEM_ADMIN,
@@ -179,7 +176,9 @@ role_policies = [
179 scope_types=['system'],176 scope_types=['system'],
180 operations=[{'path': '/v3/roles/{role_id}',177 operations=[{'path': '/v3/roles/{role_id}',
181 'method': 'DELETE'}],178 'method': 'DELETE'}],
182 deprecated_rule=deprecated_delete_domain_role)179 deprecated_rule=deprecated_delete_domain_role,
180 deprecated_reason=DEPRECATED_REASON,
181 deprecated_since=versionutils.deprecated.TRAIN)
183]182]
184183
185184
diff --git a/keystone/common/policies/role_assignment.py b/keystone/common/policies/role_assignment.py
index 5dea3dc..c70f292 100644
--- a/keystone/common/policies/role_assignment.py
+++ b/keystone/common/policies/role_assignment.py
@@ -25,23 +25,18 @@ SYSTEM_READER_OR_PROJECT_DOMAIN_READER_OR_PROJECT_ADMIN = (
25 '(role:admin and project_id:%(target.project.id)s)'25 '(role:admin and project_id:%(target.project.id)s)'
26)26)
2727
28DEPRECATED_REASON = (
29 "The assignment API is now aware of system scope and default roles."
30)
31
32deprecated_list_role_assignments = policy.DeprecatedRule(28deprecated_list_role_assignments = policy.DeprecatedRule(
33 name=base.IDENTITY % 'list_role_assignments',29 name=base.IDENTITY % 'list_role_assignments',
34 check_str=base.RULE_ADMIN_REQUIRED,30 check_str=base.RULE_ADMIN_REQUIRED
35 deprecated_reason=DEPRECATED_REASON,
36 deprecated_since=versionutils.deprecated.STEIN
37)31)
38deprecated_list_role_assignments_for_tree = policy.DeprecatedRule(32deprecated_list_role_assignments_for_tree = policy.DeprecatedRule(
39 name=base.IDENTITY % 'list_role_assignments_for_tree',33 name=base.IDENTITY % 'list_role_assignments_for_tree',
40 check_str=base.RULE_ADMIN_REQUIRED,34 check_str=base.RULE_ADMIN_REQUIRED
41 deprecated_reason=DEPRECATED_REASON,
42 deprecated_since=versionutils.deprecated.TRAIN
43)35)
4436
37DEPRECATED_REASON = (
38 "The assignment API is now aware of system scope and default roles."
39)
4540
46role_assignment_policies = [41role_assignment_policies = [
47 policy.DocumentedRuleDefault(42 policy.DocumentedRuleDefault(
@@ -53,7 +48,9 @@ role_assignment_policies = [
53 'method': 'GET'},48 'method': 'GET'},
54 {'path': '/v3/role_assignments',49 {'path': '/v3/role_assignments',
55 'method': 'HEAD'}],50 'method': 'HEAD'}],
56 deprecated_rule=deprecated_list_role_assignments),51 deprecated_rule=deprecated_list_role_assignments,
52 deprecated_reason=DEPRECATED_REASON,
53 deprecated_since=versionutils.deprecated.STEIN),
57 policy.DocumentedRuleDefault(54 policy.DocumentedRuleDefault(
58 name=base.IDENTITY % 'list_role_assignments_for_tree',55 name=base.IDENTITY % 'list_role_assignments_for_tree',
59 check_str=SYSTEM_READER_OR_PROJECT_DOMAIN_READER_OR_PROJECT_ADMIN,56 check_str=SYSTEM_READER_OR_PROJECT_DOMAIN_READER_OR_PROJECT_ADMIN,
@@ -64,7 +61,9 @@ role_assignment_policies = [
64 'method': 'GET'},61 'method': 'GET'},
65 {'path': '/v3/role_assignments?include_subtree',62 {'path': '/v3/role_assignments?include_subtree',
66 'method': 'HEAD'}],63 'method': 'HEAD'}],
67 deprecated_rule=deprecated_list_role_assignments_for_tree),64 deprecated_rule=deprecated_list_role_assignments_for_tree,
65 deprecated_reason=DEPRECATED_REASON,
66 deprecated_since=versionutils.deprecated.TRAIN),
6867
69]68]
7069
diff --git a/keystone/common/policies/service.py b/keystone/common/policies/service.py
index 0287076..66d3aaa 100644
--- a/keystone/common/policies/service.py
+++ b/keystone/common/policies/service.py
@@ -15,41 +15,30 @@ from oslo_policy import policy
1515
16from keystone.common.policies import base16from keystone.common.policies import base
1717
18DEPRECATED_REASON = (
19 "The service API is now aware of system scope and default roles."
20)
21
22deprecated_get_service = policy.DeprecatedRule(18deprecated_get_service = policy.DeprecatedRule(
23 name=base.IDENTITY % 'get_service',19 name=base.IDENTITY % 'get_service',
24 check_str=base.RULE_ADMIN_REQUIRED,20 check_str=base.RULE_ADMIN_REQUIRED
25 deprecated_reason=DEPRECATED_REASON,
26 deprecated_since=versionutils.deprecated.STEIN
27)21)
28deprecated_list_service = policy.DeprecatedRule(22deprecated_list_service = policy.DeprecatedRule(
29 name=base.IDENTITY % 'list_services',23 name=base.IDENTITY % 'list_services',
30 check_str=base.RULE_ADMIN_REQUIRED,24 check_str=base.RULE_ADMIN_REQUIRED
31 deprecated_reason=DEPRECATED_REASON,
32 deprecated_since=versionutils.deprecated.STEIN
33)25)
34deprecated_update_service = policy.DeprecatedRule(26deprecated_update_service = policy.DeprecatedRule(
35 name=base.IDENTITY % 'update_service',27 name=base.IDENTITY % 'update_service',
36 check_str=base.RULE_ADMIN_REQUIRED,28 check_str=base.RULE_ADMIN_REQUIRED
37 deprecated_reason=DEPRECATED_REASON,
38 deprecated_since=versionutils.deprecated.STEIN
39)29)
40deprecated_create_service = policy.DeprecatedRule(30deprecated_create_service = policy.DeprecatedRule(
41 name=base.IDENTITY % 'create_service',31 name=base.IDENTITY % 'create_service',
42 check_str=base.RULE_ADMIN_REQUIRED,32 check_str=base.RULE_ADMIN_REQUIRED
43 deprecated_reason=DEPRECATED_REASON,
44 deprecated_since=versionutils.deprecated.STEIN
45)33)
46deprecated_delete_service = policy.DeprecatedRule(34deprecated_delete_service = policy.DeprecatedRule(
47 name=base.IDENTITY % 'delete_service',35 name=base.IDENTITY % 'delete_service',
48 check_str=base.RULE_ADMIN_REQUIRED,36 check_str=base.RULE_ADMIN_REQUIRED
49 deprecated_reason=DEPRECATED_REASON,
50 deprecated_since=versionutils.deprecated.STEIN
51)37)
5238
39DEPRECATED_REASON = (
40 "The service API is now aware of system scope and default roles."
41)
5342
54service_policies = [43service_policies = [
55 policy.DocumentedRuleDefault(44 policy.DocumentedRuleDefault(
@@ -59,7 +48,9 @@ service_policies = [
59 description='Show service details.',48 description='Show service details.',
60 operations=[{'path': '/v3/services/{service_id}',49 operations=[{'path': '/v3/services/{service_id}',
61 'method': 'GET'}],50 'method': 'GET'}],
62 deprecated_rule=deprecated_get_service),51 deprecated_rule=deprecated_get_service,
52 deprecated_reason=DEPRECATED_REASON,
53 deprecated_since=versionutils.deprecated.STEIN),
63 policy.DocumentedRuleDefault(54 policy.DocumentedRuleDefault(
64 name=base.IDENTITY % 'list_services',55 name=base.IDENTITY % 'list_services',
65 check_str=base.SYSTEM_READER,56 check_str=base.SYSTEM_READER,
@@ -67,7 +58,9 @@ service_policies = [
67 description='List services.',58 description='List services.',
68 operations=[{'path': '/v3/services',59 operations=[{'path': '/v3/services',
69 'method': 'GET'}],60 'method': 'GET'}],
70 deprecated_rule=deprecated_list_service),61 deprecated_rule=deprecated_list_service,
62 deprecated_reason=DEPRECATED_REASON,
63 deprecated_since=versionutils.deprecated.STEIN),
71 policy.DocumentedRuleDefault(64 policy.DocumentedRuleDefault(
72 name=base.IDENTITY % 'create_service',65 name=base.IDENTITY % 'create_service',
73 check_str=base.SYSTEM_ADMIN,66 check_str=base.SYSTEM_ADMIN,
@@ -75,7 +68,9 @@ service_policies = [
75 description='Create service.',68 description='Create service.',
76 operations=[{'path': '/v3/services',69 operations=[{'path': '/v3/services',
77 'method': 'POST'}],70 'method': 'POST'}],
78 deprecated_rule=deprecated_create_service),71 deprecated_rule=deprecated_create_service,
72 deprecated_reason=DEPRECATED_REASON,
73 deprecated_since=versionutils.deprecated.STEIN),
79 policy.DocumentedRuleDefault(74 policy.DocumentedRuleDefault(
80 name=base.IDENTITY % 'update_service',75 name=base.IDENTITY % 'update_service',
81 check_str=base.SYSTEM_ADMIN,76 check_str=base.SYSTEM_ADMIN,
@@ -83,7 +78,9 @@ service_policies = [
83 description='Update service.',78 description='Update service.',
84 operations=[{'path': '/v3/services/{service_id}',79 operations=[{'path': '/v3/services/{service_id}',
85 'method': 'PATCH'}],80 'method': 'PATCH'}],
86 deprecated_rule=deprecated_update_service),81 deprecated_rule=deprecated_update_service,
82 deprecated_reason=DEPRECATED_REASON,
83 deprecated_since=versionutils.deprecated.STEIN),
87 policy.DocumentedRuleDefault(84 policy.DocumentedRuleDefault(
88 name=base.IDENTITY % 'delete_service',85 name=base.IDENTITY % 'delete_service',
89 check_str=base.SYSTEM_ADMIN,86 check_str=base.SYSTEM_ADMIN,
@@ -91,7 +88,9 @@ service_policies = [
91 description='Delete service.',88 description='Delete service.',
92 operations=[{'path': '/v3/services/{service_id}',89 operations=[{'path': '/v3/services/{service_id}',
93 'method': 'DELETE'}],90 'method': 'DELETE'}],
94 deprecated_rule=deprecated_delete_service)91 deprecated_rule=deprecated_delete_service,
92 deprecated_reason=DEPRECATED_REASON,
93 deprecated_since=versionutils.deprecated.STEIN)
95]94]
9695
9796
diff --git a/keystone/common/policies/service_provider.py b/keystone/common/policies/service_provider.py
index 657368a..4d0e3cb 100644
--- a/keystone/common/policies/service_provider.py
+++ b/keystone/common/policies/service_provider.py
@@ -15,41 +15,30 @@ from oslo_policy import policy
1515
16from keystone.common.policies import base16from keystone.common.policies import base
1717
18DEPRECATED_REASON = (
19 "The service provider API is now aware of system scope and default roles."
20)
21
22deprecated_get_sp = policy.DeprecatedRule(18deprecated_get_sp = policy.DeprecatedRule(
23 name=base.IDENTITY % 'get_service_provider',19 name=base.IDENTITY % 'get_service_provider',
24 check_str=base.RULE_ADMIN_REQUIRED,20 check_str=base.RULE_ADMIN_REQUIRED
25 deprecated_reason=DEPRECATED_REASON,
26 deprecated_since=versionutils.deprecated.STEIN
27)21)
28deprecated_list_sp = policy.DeprecatedRule(22deprecated_list_sp = policy.DeprecatedRule(
29 name=base.IDENTITY % 'list_service_providers',23 name=base.IDENTITY % 'list_service_providers',
30 check_str=base.RULE_ADMIN_REQUIRED,24 check_str=base.RULE_ADMIN_REQUIRED
31 deprecated_reason=DEPRECATED_REASON,
32 deprecated_since=versionutils.deprecated.STEIN
33)25)
34deprecated_update_sp = policy.DeprecatedRule(26deprecated_update_sp = policy.DeprecatedRule(
35 name=base.IDENTITY % 'update_service_provider',27 name=base.IDENTITY % 'update_service_provider',
36 check_str=base.RULE_ADMIN_REQUIRED,28 check_str=base.RULE_ADMIN_REQUIRED
37 deprecated_reason=DEPRECATED_REASON,
38 deprecated_since=versionutils.deprecated.STEIN
39)29)
40deprecated_create_sp = policy.DeprecatedRule(30deprecated_create_sp = policy.DeprecatedRule(
41 name=base.IDENTITY % 'create_service_provider',31 name=base.IDENTITY % 'create_service_provider',
42 check_str=base.RULE_ADMIN_REQUIRED,32 check_str=base.RULE_ADMIN_REQUIRED
43 deprecated_reason=DEPRECATED_REASON,
44 deprecated_since=versionutils.deprecated.STEIN
45)33)
46deprecated_delete_sp = policy.DeprecatedRule(34deprecated_delete_sp = policy.DeprecatedRule(
47 name=base.IDENTITY % 'delete_service_provider',35 name=base.IDENTITY % 'delete_service_provider',
48 check_str=base.RULE_ADMIN_REQUIRED,36 check_str=base.RULE_ADMIN_REQUIRED
49 deprecated_reason=DEPRECATED_REASON,
50 deprecated_since=versionutils.deprecated.STEIN
51)37)
5238
39DEPRECATED_REASON = (
40 "The service provider API is now aware of system scope and default roles."
41)
5342
54service_provider_policies = [43service_provider_policies = [
55 policy.DocumentedRuleDefault(44 policy.DocumentedRuleDefault(
@@ -66,7 +55,9 @@ service_provider_policies = [
66 operations=[{'path': ('/v3/OS-FEDERATION/service_providers/'55 operations=[{'path': ('/v3/OS-FEDERATION/service_providers/'
67 '{service_provider_id}'),56 '{service_provider_id}'),
68 'method': 'PUT'}],57 'method': 'PUT'}],
69 deprecated_rule=deprecated_create_sp),58 deprecated_rule=deprecated_create_sp,
59 deprecated_reason=DEPRECATED_REASON,
60 deprecated_since=versionutils.deprecated.STEIN),
70 policy.DocumentedRuleDefault(61 policy.DocumentedRuleDefault(
71 name=base.IDENTITY % 'list_service_providers',62 name=base.IDENTITY % 'list_service_providers',
72 check_str=base.SYSTEM_READER,63 check_str=base.SYSTEM_READER,
@@ -82,7 +73,9 @@ service_provider_policies = [
82 'method': 'HEAD'73 'method': 'HEAD'
83 }74 }
84 ],75 ],
85 deprecated_rule=deprecated_list_sp76 deprecated_rule=deprecated_list_sp,
77 deprecated_reason=DEPRECATED_REASON,
78 deprecated_since=versionutils.deprecated.STEIN
86 ),79 ),
87 policy.DocumentedRuleDefault(80 policy.DocumentedRuleDefault(
88 name=base.IDENTITY % 'get_service_provider',81 name=base.IDENTITY % 'get_service_provider',
@@ -101,7 +94,9 @@ service_provider_policies = [
101 'method': 'HEAD'94 'method': 'HEAD'
102 }95 }
103 ],96 ],
104 deprecated_rule=deprecated_get_sp97 deprecated_rule=deprecated_get_sp,
98 deprecated_reason=DEPRECATED_REASON,
99 deprecated_since=versionutils.deprecated.STEIN
105 ),100 ),
106 policy.DocumentedRuleDefault(101 policy.DocumentedRuleDefault(
107 name=base.IDENTITY % 'update_service_provider',102 name=base.IDENTITY % 'update_service_provider',
@@ -111,7 +106,9 @@ service_provider_policies = [
111 operations=[{'path': ('/v3/OS-FEDERATION/service_providers/'106 operations=[{'path': ('/v3/OS-FEDERATION/service_providers/'
112 '{service_provider_id}'),107 '{service_provider_id}'),
113 'method': 'PATCH'}],108 'method': 'PATCH'}],
114 deprecated_rule=deprecated_update_sp),109 deprecated_rule=deprecated_update_sp,
110 deprecated_reason=DEPRECATED_REASON,
111 deprecated_since=versionutils.deprecated.STEIN),
115 policy.DocumentedRuleDefault(112 policy.DocumentedRuleDefault(
116 name=base.IDENTITY % 'delete_service_provider',113 name=base.IDENTITY % 'delete_service_provider',
117 check_str=base.SYSTEM_ADMIN,114 check_str=base.SYSTEM_ADMIN,
@@ -120,7 +117,9 @@ service_provider_policies = [
120 operations=[{'path': ('/v3/OS-FEDERATION/service_providers/'117 operations=[{'path': ('/v3/OS-FEDERATION/service_providers/'
121 '{service_provider_id}'),118 '{service_provider_id}'),
122 'method': 'DELETE'}],119 'method': 'DELETE'}],
123 deprecated_rule=deprecated_delete_sp)120 deprecated_rule=deprecated_delete_sp,
121 deprecated_reason=DEPRECATED_REASON,
122 deprecated_since=versionutils.deprecated.STEIN)
124]123]
125124
126125
diff --git a/keystone/common/policies/token.py b/keystone/common/policies/token.py
index cb321b0..9fa3c52 100644
--- a/keystone/common/policies/token.py
+++ b/keystone/common/policies/token.py
@@ -21,21 +21,15 @@ DEPRECATED_REASON = (
2121
22deprecated_check_token = policy.DeprecatedRule(22deprecated_check_token = policy.DeprecatedRule(
23 name=base.IDENTITY % 'check_token',23 name=base.IDENTITY % 'check_token',
24 check_str=base.RULE_ADMIN_OR_TOKEN_SUBJECT,24 check_str=base.RULE_ADMIN_OR_TOKEN_SUBJECT
25 deprecated_reason=DEPRECATED_REASON,
26 deprecated_since=versionutils.deprecated.TRAIN
27)25)
28deprecated_validate_token = policy.DeprecatedRule(26deprecated_validate_token = policy.DeprecatedRule(
29 name=base.IDENTITY % 'validate_token',27 name=base.IDENTITY % 'validate_token',
30 check_str=base.RULE_SERVICE_ADMIN_OR_TOKEN_SUBJECT,28 check_str=base.RULE_SERVICE_ADMIN_OR_TOKEN_SUBJECT
31 deprecated_reason=DEPRECATED_REASON,
32 deprecated_since=versionutils.deprecated.TRAIN
33)29)
34deprecated_revoke_token = policy.DeprecatedRule(30deprecated_revoke_token = policy.DeprecatedRule(
35 name=base.IDENTITY % 'revoke_token',31 name=base.IDENTITY % 'revoke_token',
36 check_str=base.RULE_ADMIN_OR_TOKEN_SUBJECT,32 check_str=base.RULE_ADMIN_OR_TOKEN_SUBJECT
37 deprecated_reason=DEPRECATED_REASON,
38 deprecated_since=versionutils.deprecated.TRAIN
39)33)
4034
41SYSTEM_ADMIN_OR_TOKEN_SUBJECT = (35SYSTEM_ADMIN_OR_TOKEN_SUBJECT = (
@@ -58,7 +52,9 @@ token_policies = [
58 description='Check a token.',52 description='Check a token.',
59 operations=[{'path': '/v3/auth/tokens',53 operations=[{'path': '/v3/auth/tokens',
60 'method': 'HEAD'}],54 'method': 'HEAD'}],
61 deprecated_rule=deprecated_check_token),55 deprecated_rule=deprecated_check_token,
56 deprecated_reason=DEPRECATED_REASON,
57 deprecated_since=versionutils.deprecated.TRAIN),
62 policy.DocumentedRuleDefault(58 policy.DocumentedRuleDefault(
63 name=base.IDENTITY % 'validate_token',59 name=base.IDENTITY % 'validate_token',
64 check_str=SYSTEM_USER_OR_SERVICE_OR_TOKEN_SUBJECT,60 check_str=SYSTEM_USER_OR_SERVICE_OR_TOKEN_SUBJECT,
@@ -66,7 +62,9 @@ token_policies = [
66 description='Validate a token.',62 description='Validate a token.',
67 operations=[{'path': '/v3/auth/tokens',63 operations=[{'path': '/v3/auth/tokens',
68 'method': 'GET'}],64 'method': 'GET'}],
69 deprecated_rule=deprecated_validate_token),65 deprecated_rule=deprecated_validate_token,
66 deprecated_reason=DEPRECATED_REASON,
67 deprecated_since=versionutils.deprecated.TRAIN),
70 policy.DocumentedRuleDefault(68 policy.DocumentedRuleDefault(
71 name=base.IDENTITY % 'revoke_token',69 name=base.IDENTITY % 'revoke_token',
72 check_str=SYSTEM_ADMIN_OR_TOKEN_SUBJECT,70 check_str=SYSTEM_ADMIN_OR_TOKEN_SUBJECT,
@@ -74,7 +72,9 @@ token_policies = [
74 description='Revoke a token.',72 description='Revoke a token.',
75 operations=[{'path': '/v3/auth/tokens',73 operations=[{'path': '/v3/auth/tokens',
76 'method': 'DELETE'}],74 'method': 'DELETE'}],
77 deprecated_rule=deprecated_revoke_token)75 deprecated_rule=deprecated_revoke_token,
76 deprecated_reason=DEPRECATED_REASON,
77 deprecated_since=versionutils.deprecated.TRAIN)
78]78]
7979
8080
diff --git a/keystone/common/policies/trust.py b/keystone/common/policies/trust.py
index 7678106..82acb0a 100644
--- a/keystone/common/policies/trust.py
+++ b/keystone/common/policies/trust.py
@@ -24,39 +24,29 @@ SYSTEM_READER_OR_TRUSTOR = base.SYSTEM_READER + ' or ' + RULE_TRUSTOR
24SYSTEM_READER_OR_TRUSTEE = base.SYSTEM_READER + ' or ' + RULE_TRUSTEE24SYSTEM_READER_OR_TRUSTEE = base.SYSTEM_READER + ' or ' + RULE_TRUSTEE
25SYSTEM_ADMIN_OR_TRUSTOR = base.SYSTEM_ADMIN + ' or ' + RULE_TRUSTOR25SYSTEM_ADMIN_OR_TRUSTOR = base.SYSTEM_ADMIN + ' or ' + RULE_TRUSTOR
2626
27DEPRECATED_REASON = (
28 "The trust API is now aware of system scope and default roles."
29)
30
31deprecated_list_trusts = policy.DeprecatedRule(27deprecated_list_trusts = policy.DeprecatedRule(
32 name=base.IDENTITY % 'list_trusts',28 name=base.IDENTITY % 'list_trusts',
33 check_str=base.RULE_ADMIN_REQUIRED,29 check_str=base.RULE_ADMIN_REQUIRED
34 deprecated_reason=DEPRECATED_REASON,
35 deprecated_since=versionutils.deprecated.TRAIN
36)30)
37deprecated_list_roles_for_trust = policy.DeprecatedRule(31deprecated_list_roles_for_trust = policy.DeprecatedRule(
38 name=base.IDENTITY % 'list_roles_for_trust',32 name=base.IDENTITY % 'list_roles_for_trust',
39 check_str=RULE_TRUSTOR + ' or ' + RULE_TRUSTEE,33 check_str=RULE_TRUSTOR + ' or ' + RULE_TRUSTEE
40 deprecated_reason=DEPRECATED_REASON,
41 deprecated_since=versionutils.deprecated.TRAIN
42)34)
43deprecated_get_role_for_trust = policy.DeprecatedRule(35deprecated_get_role_for_trust = policy.DeprecatedRule(
44 name=base.IDENTITY % 'get_role_for_trust',36 name=base.IDENTITY % 'get_role_for_trust',
45 check_str=RULE_TRUSTOR + ' or ' + RULE_TRUSTEE,37 check_str=RULE_TRUSTOR + ' or ' + RULE_TRUSTEE
46 deprecated_reason=DEPRECATED_REASON,
47 deprecated_since=versionutils.deprecated.TRAIN
48)38)
49deprecated_delete_trust = policy.DeprecatedRule(39deprecated_delete_trust = policy.DeprecatedRule(
50 name=base.IDENTITY % 'delete_trust',40 name=base.IDENTITY % 'delete_trust',
51 check_str=RULE_TRUSTOR,41 check_str=RULE_TRUSTOR
52 deprecated_reason=DEPRECATED_REASON,
53 deprecated_since=versionutils.deprecated.TRAIN
54)42)
55deprecated_get_trust = policy.DeprecatedRule(43deprecated_get_trust = policy.DeprecatedRule(
56 name=base.IDENTITY % 'get_trust',44 name=base.IDENTITY % 'get_trust',
57 check_str=RULE_TRUSTOR + ' or ' + RULE_TRUSTEE,45 check_str=RULE_TRUSTOR + ' or ' + RULE_TRUSTEE
58 deprecated_reason=DEPRECATED_REASON,46)
59 deprecated_since=versionutils.deprecated.TRAIN47
48DEPRECATED_REASON = (
49 "The trust API is now aware of system scope and default roles."
60)50)
6151
62trust_policies = [52trust_policies = [
@@ -79,7 +69,9 @@ trust_policies = [
79 'method': 'GET'},69 'method': 'GET'},
80 {'path': '/v3/OS-TRUST/trusts',70 {'path': '/v3/OS-TRUST/trusts',
81 'method': 'HEAD'}],71 'method': 'HEAD'}],
82 deprecated_rule=deprecated_list_trusts),72 deprecated_rule=deprecated_list_trusts,
73 deprecated_reason=DEPRECATED_REASON,
74 deprecated_since=versionutils.deprecated.TRAIN),
83 policy.DocumentedRuleDefault(75 policy.DocumentedRuleDefault(
84 name=base.IDENTITY % 'list_trusts_for_trustor',76 name=base.IDENTITY % 'list_trusts_for_trustor',
85 check_str=SYSTEM_READER_OR_TRUSTOR,77 check_str=SYSTEM_READER_OR_TRUSTOR,
@@ -111,7 +103,9 @@ trust_policies = [
111 'method': 'GET'},103 'method': 'GET'},
112 {'path': '/v3/OS-TRUST/trusts/{trust_id}/roles',104 {'path': '/v3/OS-TRUST/trusts/{trust_id}/roles',
113 'method': 'HEAD'}],105 'method': 'HEAD'}],
114 deprecated_rule=deprecated_list_roles_for_trust),106 deprecated_rule=deprecated_list_roles_for_trust,
107 deprecated_reason=DEPRECATED_REASON,
108 deprecated_since=versionutils.deprecated.TRAIN),
115 policy.DocumentedRuleDefault(109 policy.DocumentedRuleDefault(
116 name=base.IDENTITY % 'get_role_for_trust',110 name=base.IDENTITY % 'get_role_for_trust',
117 check_str=SYSTEM_READER_OR_TRUSTOR_OR_TRUSTEE,111 check_str=SYSTEM_READER_OR_TRUSTOR_OR_TRUSTEE,
@@ -121,7 +115,9 @@ trust_policies = [
121 'method': 'GET'},115 'method': 'GET'},
122 {'path': '/v3/OS-TRUST/trusts/{trust_id}/roles/{role_id}',116 {'path': '/v3/OS-TRUST/trusts/{trust_id}/roles/{role_id}',
123 'method': 'HEAD'}],117 'method': 'HEAD'}],
124 deprecated_rule=deprecated_get_role_for_trust),118 deprecated_rule=deprecated_get_role_for_trust,
119 deprecated_reason=DEPRECATED_REASON,
120 deprecated_since=versionutils.deprecated.TRAIN),
125 policy.DocumentedRuleDefault(121 policy.DocumentedRuleDefault(
126 name=base.IDENTITY % 'delete_trust',122 name=base.IDENTITY % 'delete_trust',
127 check_str=SYSTEM_ADMIN_OR_TRUSTOR,123 check_str=SYSTEM_ADMIN_OR_TRUSTOR,
@@ -129,7 +125,9 @@ trust_policies = [
129 description='Revoke trust.',125 description='Revoke trust.',
130 operations=[{'path': '/v3/OS-TRUST/trusts/{trust_id}',126 operations=[{'path': '/v3/OS-TRUST/trusts/{trust_id}',
131 'method': 'DELETE'}],127 'method': 'DELETE'}],
132 deprecated_rule=deprecated_delete_trust),128 deprecated_rule=deprecated_delete_trust,
129 deprecated_reason=DEPRECATED_REASON,
130 deprecated_since=versionutils.deprecated.TRAIN),
133 policy.DocumentedRuleDefault(131 policy.DocumentedRuleDefault(
134 name=base.IDENTITY % 'get_trust',132 name=base.IDENTITY % 'get_trust',
135 check_str=SYSTEM_READER_OR_TRUSTOR_OR_TRUSTEE,133 check_str=SYSTEM_READER_OR_TRUSTOR_OR_TRUSTEE,
@@ -139,7 +137,9 @@ trust_policies = [
139 'method': 'GET'},137 'method': 'GET'},
140 {'path': '/v3/OS-TRUST/trusts/{trust_id}',138 {'path': '/v3/OS-TRUST/trusts/{trust_id}',
141 'method': 'HEAD'}],139 'method': 'HEAD'}],
142 deprecated_rule=deprecated_get_trust)140 deprecated_rule=deprecated_get_trust,
141 deprecated_reason=DEPRECATED_REASON,
142 deprecated_since=versionutils.deprecated.TRAIN)
143]143]
144144
145145
diff --git a/keystone/common/policies/user.py b/keystone/common/policies/user.py
index 0534f70..75a0062 100644
--- a/keystone/common/policies/user.py
+++ b/keystone/common/policies/user.py
@@ -36,33 +36,23 @@ DEPRECATED_REASON = (
3636
37deprecated_get_user = policy.DeprecatedRule(37deprecated_get_user = policy.DeprecatedRule(
38 name=base.IDENTITY % 'get_user',38 name=base.IDENTITY % 'get_user',
39 check_str=base.RULE_ADMIN_OR_OWNER,39 check_str=base.RULE_ADMIN_OR_OWNER
40 deprecated_reason=DEPRECATED_REASON,
41 deprecated_since=versionutils.deprecated.STEIN
42)40)
43deprecated_list_users = policy.DeprecatedRule(41deprecated_list_users = policy.DeprecatedRule(
44 name=base.IDENTITY % 'list_users',42 name=base.IDENTITY % 'list_users',
45 check_str=base.RULE_ADMIN_REQUIRED,43 check_str=base.RULE_ADMIN_REQUIRED
46 deprecated_reason=DEPRECATED_REASON,
47 deprecated_since=versionutils.deprecated.STEIN
48)44)
49deprecated_create_user = policy.DeprecatedRule(45deprecated_create_user = policy.DeprecatedRule(
50 name=base.IDENTITY % 'create_user',46 name=base.IDENTITY % 'create_user',
51 check_str=base.RULE_ADMIN_REQUIRED,47 check_str=base.RULE_ADMIN_REQUIRED
52 deprecated_reason=DEPRECATED_REASON,
53 deprecated_since=versionutils.deprecated.STEIN
54)48)
55deprecated_update_user = policy.DeprecatedRule(49deprecated_update_user = policy.DeprecatedRule(
56 name=base.IDENTITY % 'update_user',50 name=base.IDENTITY % 'update_user',
57 check_str=base.RULE_ADMIN_REQUIRED,51 check_str=base.RULE_ADMIN_REQUIRED
58 deprecated_reason=DEPRECATED_REASON,
59 deprecated_since=versionutils.deprecated.STEIN
60)52)
61deprecated_delete_user = policy.DeprecatedRule(53deprecated_delete_user = policy.DeprecatedRule(
62 name=base.IDENTITY % 'delete_user',54 name=base.IDENTITY % 'delete_user',
63 check_str=base.RULE_ADMIN_REQUIRED,55 check_str=base.RULE_ADMIN_REQUIRED
64 deprecated_reason=DEPRECATED_REASON,
65 deprecated_since=versionutils.deprecated.STEIN
66)56)
6757
68user_policies = [58user_policies = [
@@ -75,7 +65,9 @@ user_policies = [
75 'method': 'GET'},65 'method': 'GET'},
76 {'path': '/v3/users/{user_id}',66 {'path': '/v3/users/{user_id}',
77 'method': 'HEAD'}],67 'method': 'HEAD'}],
78 deprecated_rule=deprecated_get_user),68 deprecated_rule=deprecated_get_user,
69 deprecated_reason=DEPRECATED_REASON,
70 deprecated_since=versionutils.deprecated.STEIN),
79 policy.DocumentedRuleDefault(71 policy.DocumentedRuleDefault(
80 name=base.IDENTITY % 'list_users',72 name=base.IDENTITY % 'list_users',
81 check_str=SYSTEM_READER_OR_DOMAIN_READER,73 check_str=SYSTEM_READER_OR_DOMAIN_READER,
@@ -85,7 +77,9 @@ user_policies = [
85 'method': 'GET'},77 'method': 'GET'},
86 {'path': '/v3/users',78 {'path': '/v3/users',
87 'method': 'HEAD'}],79 'method': 'HEAD'}],
88 deprecated_rule=deprecated_list_users),80 deprecated_rule=deprecated_list_users,
81 deprecated_reason=DEPRECATED_REASON,
82 deprecated_since=versionutils.deprecated.STEIN),
89 policy.DocumentedRuleDefault(83 policy.DocumentedRuleDefault(
90 name=base.IDENTITY % 'list_projects_for_user',84 name=base.IDENTITY % 'list_projects_for_user',
91 check_str='',85 check_str='',
@@ -117,7 +111,9 @@ user_policies = [
117 description='Create a user.',111 description='Create a user.',
118 operations=[{'path': '/v3/users',112 operations=[{'path': '/v3/users',
119 'method': 'POST'}],113 'method': 'POST'}],
120 deprecated_rule=deprecated_create_user),114 deprecated_rule=deprecated_create_user,
115 deprecated_reason=DEPRECATED_REASON,
116 deprecated_since=versionutils.deprecated.STEIN),
121 policy.DocumentedRuleDefault(117 policy.DocumentedRuleDefault(
122 name=base.IDENTITY % 'update_user',118 name=base.IDENTITY % 'update_user',
123 check_str=SYSTEM_ADMIN_OR_DOMAIN_ADMIN,119 check_str=SYSTEM_ADMIN_OR_DOMAIN_ADMIN,
@@ -125,7 +121,9 @@ user_policies = [
125 description='Update a user, including administrative password resets.',121 description='Update a user, including administrative password resets.',
126 operations=[{'path': '/v3/users/{user_id}',122 operations=[{'path': '/v3/users/{user_id}',
127 'method': 'PATCH'}],123 'method': 'PATCH'}],
128 deprecated_rule=deprecated_update_user),124 deprecated_rule=deprecated_update_user,
125 deprecated_reason=DEPRECATED_REASON,
126 deprecated_since=versionutils.deprecated.STEIN),
129 policy.DocumentedRuleDefault(127 policy.DocumentedRuleDefault(
130 name=base.IDENTITY % 'delete_user',128 name=base.IDENTITY % 'delete_user',
131 check_str=SYSTEM_ADMIN_OR_DOMAIN_ADMIN,129 check_str=SYSTEM_ADMIN_OR_DOMAIN_ADMIN,
@@ -133,7 +131,9 @@ user_policies = [
133 description='Delete a user.',131 description='Delete a user.',
134 operations=[{'path': '/v3/users/{user_id}',132 operations=[{'path': '/v3/users/{user_id}',
135 'method': 'DELETE'}],133 'method': 'DELETE'}],
136 deprecated_rule=deprecated_delete_user)134 deprecated_rule=deprecated_delete_user,
135 deprecated_reason=DEPRECATED_REASON,
136 deprecated_since=versionutils.deprecated.STEIN)
137]137]
138138
139139
diff --git a/keystone/common/rbac_enforcer/enforcer.py b/keystone/common/rbac_enforcer/enforcer.py
index 7add048..ca6a8e7 100644
--- a/keystone/common/rbac_enforcer/enforcer.py
+++ b/keystone/common/rbac_enforcer/enforcer.py
@@ -14,7 +14,6 @@ import functools
1414
15import flask15import flask
16from oslo_log import log16from oslo_log import log
17from oslo_policy import opts
18from oslo_policy import policy as common_policy17from oslo_policy import policy as common_policy
19from oslo_utils import strutils18from oslo_utils import strutils
2019
@@ -40,13 +39,6 @@ _POSSIBLE_TARGET_ACTIONS = frozenset([
40_ENFORCEMENT_CHECK_ATTR = 'keystone:RBAC:enforcement_called'39_ENFORCEMENT_CHECK_ATTR = 'keystone:RBAC:enforcement_called'
4140
4241
43# TODO(gmann): Remove setting the default value of config policy_file
44# once oslo_policy change the default value to 'policy.yaml'.
45# https://github.com/openstack/oslo.policy/blob/a626ad12fe5a3abd49d70e3e5b95589d279ab578/oslo_policy/opts.py#L49
46DEFAULT_POLICY_FILE = 'policy.yaml'
47opts.set_defaults(CONF, DEFAULT_POLICY_FILE)
48
49
50class RBACEnforcer(object):42class RBACEnforcer(object):
51 """Enforce RBAC on API calls."""43 """Enforce RBAC on API calls."""
5244
diff --git a/keystone/common/sql/contract_repo/versions/079_contract_update_local_id_limit.py b/keystone/common/sql/contract_repo/versions/079_contract_update_local_id_limit.py
53deleted file mode 10064445deleted file mode 100644
index 2b09cbc..0000000
--- a/keystone/common/sql/contract_repo/versions/079_contract_update_local_id_limit.py
+++ /dev/null
@@ -1,18 +0,0 @@
1# Licensed under the Apache License, Version 2.0 (the "License"); you may
2# not use this file except in compliance with the License. You may obtain
3# a copy of the License at
4#
5# http://www.apache.org/licenses/LICENSE-2.0
6#
7# Unless required by applicable law or agreed to in writing, software
8# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10# License for the specific language governing permissions and limitations
11# under the License.
12
13# This is a placeholder for Ussuri backports. Do not use this number for new
14# Victoria work. New Victoria work starts after all the placeholders.
15
16
17def upgrade(migrate_engine):
18 pass
diff --git a/keystone/common/sql/core.py b/keystone/common/sql/core.py
index 7670c47..ed84e58 100644
--- a/keystone/common/sql/core.py
+++ b/keystone/common/sql/core.py
@@ -119,11 +119,6 @@ ModelBase.__init__ = initialize_decorator(ModelBase.__init__)
119class JsonBlob(sql_types.TypeDecorator):119class JsonBlob(sql_types.TypeDecorator):
120120
121 impl = sql.Text121 impl = sql.Text
122 # NOTE(ralonsoh): set to True as any other TypeDecorator in SQLAlchemy
123 # https://docs.sqlalchemy.org/en/14/core/custom_types.html# \
124 # sqlalchemy.types.TypeDecorator.cache_ok
125 cache_ok = True
126 """This type is safe to cache."""
127122
128 def process_bind_param(self, value, dialect):123 def process_bind_param(self, value, dialect):
129 return jsonutils.dumps(value)124 return jsonutils.dumps(value)
@@ -149,11 +144,6 @@ class DateTimeInt(sql_types.TypeDecorator):
149144
150 impl = sql.BigInteger145 impl = sql.BigInteger
151 epoch = datetime.datetime.fromtimestamp(0, tz=pytz.UTC)146 epoch = datetime.datetime.fromtimestamp(0, tz=pytz.UTC)
152 # NOTE(ralonsoh): set to True as any other TypeDecorator in SQLAlchemy
153 # https://docs.sqlalchemy.org/en/14/core/custom_types.html# \
154 # sqlalchemy.types.TypeDecorator.cache_ok
155 cache_ok = True
156 """This type is safe to cache."""
157147
158 def process_bind_param(self, value, dialect):148 def process_bind_param(self, value, dialect):
159 if value is None:149 if value is None:
diff --git a/keystone/common/sql/data_migration_repo/versions/079_migrate_update_local_id_limit.py b/keystone/common/sql/data_migration_repo/versions/079_migrate_update_local_id_limit.py
160deleted file mode 100644150deleted file mode 100644
index 2b09cbc..0000000
--- a/keystone/common/sql/data_migration_repo/versions/079_migrate_update_local_id_limit.py
+++ /dev/null
@@ -1,18 +0,0 @@
1# Licensed under the Apache License, Version 2.0 (the "License"); you may
2# not use this file except in compliance with the License. You may obtain
3# a copy of the License at
4#
5# http://www.apache.org/licenses/LICENSE-2.0
6#
7# Unless required by applicable law or agreed to in writing, software
8# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10# License for the specific language governing permissions and limitations
11# under the License.
12
13# This is a placeholder for Ussuri backports. Do not use this number for new
14# Victoria work. New Victoria work starts after all the placeholders.
15
16
17def upgrade(migrate_engine):
18 pass
diff --git a/keystone/common/sql/expand_repo/versions/079_expand_update_local_id_limit.py b/keystone/common/sql/expand_repo/versions/079_expand_update_local_id_limit.py
19deleted file mode 1006440deleted file mode 100644
index 20db838..0000000
--- a/keystone/common/sql/expand_repo/versions/079_expand_update_local_id_limit.py
+++ /dev/null
@@ -1,24 +0,0 @@
1# Licensed under the Apache License, Version 2.0 (the "License"); you may
2# not use this file except in compliance with the License. You may obtain
3# a copy of the License at
4#
5# http://www.apache.org/licenses/LICENSE-2.0
6#
7# Unless required by applicable law or agreed to in writing, software
8# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10# License for the specific language governing permissions and limitations
11# under the License.
12
13import sqlalchemy as sql
14
15
16def upgrade(migrate_engine):
17
18 meta = sql.MetaData()
19 meta.bind = migrate_engine
20
21 id_mapping_table = sql.Table(
22 'id_mapping', meta, autoload=True
23 )
24 id_mapping_table.c.local_id.alter(type=sql.String(255))
diff --git a/keystone/common/utils.py b/keystone/common/utils.py
index 7c3e7ae..1314085 100644
--- a/keystone/common/utils.py
+++ b/keystone/common/utils.py
@@ -16,7 +16,7 @@
16# License for the specific language governing permissions and limitations16# License for the specific language governing permissions and limitations
17# under the License.17# under the License.
1818
19import collections.abc19import collections
20import grp20import grp
21import hashlib21import hashlib
22import itertools22import itertools
@@ -81,7 +81,7 @@ def flatten_dict(d, parent_key=''):
81 items = []81 items = []
82 for k, v in d.items():82 for k, v in d.items():
83 new_key = parent_key + '.' + k if parent_key else k83 new_key = parent_key + '.' + k if parent_key else k
84 if isinstance(v, collections.abc.MutableMapping):84 if isinstance(v, collections.MutableMapping):
85 items.extend(list(flatten_dict(v, new_key).items()))85 items.extend(list(flatten_dict(v, new_key).items()))
86 else:86 else:
87 items.append((new_key, v))87 items.append((new_key, v))
diff --git a/keystone/conf/__init__.py b/keystone/conf/__init__.py
index 5de0ec1..77c26a1 100644
--- a/keystone/conf/__init__.py
+++ b/keystone/conf/__init__.py
@@ -18,7 +18,6 @@ from oslo_log import log
18from oslo_log import versionutils18from oslo_log import versionutils
19import oslo_messaging19import oslo_messaging
20from oslo_middleware import cors20from oslo_middleware import cors
21from oslo_policy import opts as policy_opts
22from osprofiler import opts as profiler21from osprofiler import opts as profiler
2322
24from keystone.conf import application_credential23from keystone.conf import application_credential
@@ -186,12 +185,6 @@ def set_external_opts_defaults():
186 # configure OSprofiler options185 # configure OSprofiler options
187 profiler.set_defaults(CONF, enabled=False, trace_sqlalchemy=False)186 profiler.set_defaults(CONF, enabled=False, trace_sqlalchemy=False)
188187
189 # TODO(gmann): Remove setting the default value of config policy_file
190 # once oslo_policy change the default value to 'policy.yaml'.
191 # https://github.com/openstack/oslo.policy/blob/a626ad12fe5a3abd49d70e3e5b95589d279ab578/oslo_policy/opts.py#L49
192 DEFAULT_POLICY_FILE = 'policy.yaml'
193 policy_opts.set_defaults(cfg.CONF, DEFAULT_POLICY_FILE)
194
195 # Oslo.cache is always enabled by default for request-local caching188 # Oslo.cache is always enabled by default for request-local caching
196 # TODO(morganfainberg): Fix this to not use internal interface when189 # TODO(morganfainberg): Fix this to not use internal interface when
197 # oslo.cache has proper interface to set defaults added. This is190 # oslo.cache has proper interface to set defaults added. This is
diff --git a/keystone/conf/memcache.py b/keystone/conf/memcache.py
index b4b8c8b..97dc2c9 100644
--- a/keystone/conf/memcache.py
+++ b/keystone/conf/memcache.py
@@ -19,12 +19,6 @@ from keystone.conf import utils
19dead_retry = cfg.IntOpt(19dead_retry = cfg.IntOpt(
20 'dead_retry',20 'dead_retry',
21 default=5 * 60,21 default=5 * 60,
22 deprecated_for_removal=True,
23 deprecated_reason='This option has no effect. '
24 'Configure ``keystone.conf [cache] '
25 'memcache_dead_retry`` option to set the '
26 'dead_retry of memcached instead. ',
27 deprecated_since='Y',
28 help=utils.fmt("""22 help=utils.fmt("""
29Number of seconds memcached server is considered dead before it is tried again.23Number of seconds memcached server is considered dead before it is tried again.
30This is used by the key value store system.24This is used by the key value store system.
@@ -34,7 +28,7 @@ socket_timeout = cfg.IntOpt(
34 'socket_timeout',28 'socket_timeout',
35 default=3,29 default=3,
36 deprecated_for_removal=True,30 deprecated_for_removal=True,
37 deprecated_reason='This option has no effect. '31 deprecated_reason='This option is duplicated with oslo.cache. '
38 'Configure ``keystone.conf [cache] '32 'Configure ``keystone.conf [cache] '
39 'memcache_socket_timeout`` option to set the '33 'memcache_socket_timeout`` option to set the '
40 'socket_timeout of memcached instead. ',34 'socket_timeout of memcached instead. ',
@@ -47,12 +41,6 @@ store system.
47pool_maxsize = cfg.IntOpt(41pool_maxsize = cfg.IntOpt(
48 'pool_maxsize',42 'pool_maxsize',
49 default=10,43 default=10,
50 deprecated_for_removal=True,
51 deprecated_reason='This option has no effect. '
52 'Configure ``keystone.conf [cache] '
53 'memcache_pool_maxsize`` option to set the '
54 'pool_maxsize of memcached instead. ',
55 deprecated_since='Y',
56 help=utils.fmt("""44 help=utils.fmt("""
57Max total number of open connections to every memcached server. This is used by45Max total number of open connections to every memcached server. This is used by
58the key value store system.46the key value store system.
@@ -61,12 +49,6 @@ the key value store system.
61pool_unused_timeout = cfg.IntOpt(49pool_unused_timeout = cfg.IntOpt(
62 'pool_unused_timeout',50 'pool_unused_timeout',
63 default=60,51 default=60,
64 deprecated_for_removal=True,
65 deprecated_reason='This option has no effect. '
66 'Configure ``keystone.conf [cache] '
67 'memcache_pool_unused_timeout`` option to set the '
68 'pool_unused_timeout of memcached instead. ',
69 deprecated_since='Y',
70 help=utils.fmt("""52 help=utils.fmt("""
71Number of seconds a connection to memcached is held unused in the pool before53Number of seconds a connection to memcached is held unused in the pool before
72it is closed. This is used by the key value store system.54it is closed. This is used by the key value store system.
@@ -75,12 +57,6 @@ it is closed. This is used by the key value store system.
75pool_connection_get_timeout = cfg.IntOpt(57pool_connection_get_timeout = cfg.IntOpt(
76 'pool_connection_get_timeout',58 'pool_connection_get_timeout',
77 default=10,59 default=10,
78 deprecated_for_removal=True,
79 deprecated_reason='This option has no effect. '
80 'Configure ``keystone.conf [cache] '
81 'memcache_pool_connection_get_timeout`` option to set '
82 'the connection_get_timeout of memcached instead. ',
83 deprecated_since='Y',
84 help=utils.fmt("""60 help=utils.fmt("""
85Number of seconds that an operation will wait to get a memcache client61Number of seconds that an operation will wait to get a memcache client
86connection. This is used by the key value store system.62connection. This is used by the key value store system.
diff --git a/keystone/federation/idp.py b/keystone/federation/idp.py
index 2f1a4fe..fd464f5 100644
--- a/keystone/federation/idp.py
+++ b/keystone/federation/idp.py
@@ -366,11 +366,7 @@ class SAMLGenerator(object):
366366
367 """367 """
368 canonicalization_method = xmldsig.CanonicalizationMethod()368 canonicalization_method = xmldsig.CanonicalizationMethod()
369 # TODO(stephenfin): Drop when we remove support for pysaml < 7.1.0369 canonicalization_method.algorithm = xmldsig.ALG_EXC_C14N
370 if hasattr(xmldsig, 'TRANSFORM_C14N'): # >= 7.1.0
371 canonicalization_method.algorithm = xmldsig.TRANSFORM_C14N
372 else: # < 7.1.0
373 canonicalization_method.algorithm = xmldsig.ALG_EXC_C14N
374 signature_method = xmldsig.SignatureMethod(370 signature_method = xmldsig.SignatureMethod(
375 algorithm=xmldsig.SIG_RSA_SHA1)371 algorithm=xmldsig.SIG_RSA_SHA1)
376372
@@ -378,11 +374,7 @@ class SAMLGenerator(object):
378 envelope_transform = xmldsig.Transform(374 envelope_transform = xmldsig.Transform(
379 algorithm=xmldsig.TRANSFORM_ENVELOPED)375 algorithm=xmldsig.TRANSFORM_ENVELOPED)
380376
381 # TODO(stephenfin): Drop when we remove support for pysaml < 7.1.0377 c14_transform = xmldsig.Transform(algorithm=xmldsig.ALG_EXC_C14N)
382 if hasattr(xmldsig, 'TRANSFORM_C14N'): # >= 7.1.0
383 c14_transform = xmldsig.Transform(algorithm=xmldsig.TRANSFORM_C14N)
384 else: # < 7.1.0
385 c14_transform = xmldsig.Transform(algorithm=xmldsig.ALG_EXC_C14N)
386 transforms.transform = [envelope_transform, c14_transform]378 transforms.transform = [envelope_transform, c14_transform]
387379
388 digest_method = xmldsig.DigestMethod(algorithm=xmldsig.DIGEST_SHA1)380 digest_method = xmldsig.DigestMethod(algorithm=xmldsig.DIGEST_SHA1)
diff --git a/keystone/identity/mapping_backends/sql.py b/keystone/identity/mapping_backends/sql.py
index 6fadd6a..676d144 100644
--- a/keystone/identity/mapping_backends/sql.py
+++ b/keystone/identity/mapping_backends/sql.py
@@ -21,7 +21,7 @@ class IDMapping(sql.ModelBase, sql.ModelDictMixin):
21 __tablename__ = 'id_mapping'21 __tablename__ = 'id_mapping'
22 public_id = sql.Column(sql.String(64), primary_key=True)22 public_id = sql.Column(sql.String(64), primary_key=True)
23 domain_id = sql.Column(sql.String(64), nullable=False)23 domain_id = sql.Column(sql.String(64), nullable=False)
24 local_id = sql.Column(sql.String(255), nullable=False)24 local_id = sql.Column(sql.String(64), nullable=False)
25 # NOTE(henry-nash): Postgres requires a name to be defined for an Enum25 # NOTE(henry-nash): Postgres requires a name to be defined for an Enum
26 entity_type = sql.Column(26 entity_type = sql.Column(
27 sql.Enum(identity_mapping.EntityType.USER,27 sql.Enum(identity_mapping.EntityType.USER,
diff --git a/keystone/identity/shadow_backends/sql.py b/keystone/identity/shadow_backends/sql.py
index 3e04b33..1d817c0 100644
--- a/keystone/identity/shadow_backends/sql.py
+++ b/keystone/identity/shadow_backends/sql.py
@@ -98,8 +98,7 @@ class ShadowUsers(base.ShadowUsersDriverBase):
98 x for x in hints.filters if x['name'] not in ('idp_id',98 x for x in hints.filters if x['name'] not in ('idp_id',
99 'protocol_id',99 'protocol_id',
100 'unique_id')]100 'unique_id')]
101 if statements:101 query = query.filter(sqlalchemy.and_(*statements))
102 query = query.filter(sqlalchemy.and_(*statements))
103 return query102 return query
104103
105 def get_federated_users(self, hints):104 def get_federated_users(self, hints):
diff --git a/keystone/locale/en_GB/LC_MESSAGES/keystone.po b/keystone/locale/en_GB/LC_MESSAGES/keystone.po
index 191ed55..5e6cdf8 100644
--- a/keystone/locale/en_GB/LC_MESSAGES/keystone.po
+++ b/keystone/locale/en_GB/LC_MESSAGES/keystone.po
@@ -12,11 +12,11 @@ msgid ""
12msgstr ""12msgstr ""
13"Project-Id-Version: keystone VERSION\n"13"Project-Id-Version: keystone VERSION\n"
14"Report-Msgid-Bugs-To: https://bugs.launchpad.net/openstack-i18n/\n"14"Report-Msgid-Bugs-To: https://bugs.launchpad.net/openstack-i18n/\n"
15"POT-Creation-Date: 2021-01-08 19:57+0000\n"15"POT-Creation-Date: 2020-06-18 11:23+0000\n"
16"MIME-Version: 1.0\n"16"MIME-Version: 1.0\n"
17"Content-Type: text/plain; charset=UTF-8\n"17"Content-Type: text/plain; charset=UTF-8\n"
18"Content-Transfer-Encoding: 8bit\n"18"Content-Transfer-Encoding: 8bit\n"
19"PO-Revision-Date: 2020-10-28 02:12+0000\n"19"PO-Revision-Date: 2020-06-15 05:35+0000\n"
20"Last-Translator: Andi Chandler <andi@gowling.com>\n"20"Last-Translator: Andi Chandler <andi@gowling.com>\n"
21"Language: en_GB\n"21"Language: en_GB\n"
22"Plural-Forms: nplurals=2; plural=(n != 1);\n"22"Plural-Forms: nplurals=2; plural=(n != 1);\n"
@@ -1384,14 +1384,6 @@ msgstr ""
13841384
1385#, python-format1385#, python-format
1386msgid ""1386msgid ""
1387"Unable to create additional credentials, maximum of %(limit)d already "
1388"exceeded for user."
1389msgstr ""
1390"Unable to create additional credentials, maximum of %(limit)d already "
1391"exceeded for user."
1392
1393#, python-format
1394msgid ""
1395"Unable to delete immutable %(type)s resource: `%(resource_id)s. Set resource "1387"Unable to delete immutable %(type)s resource: `%(resource_id)s. Set resource "
1396"option \"immutable\" to false first."1388"option \"immutable\" to false first."
1397msgstr ""1389msgstr ""
@@ -1500,10 +1492,6 @@ msgstr ""
1500"%(group_id)s, Project: %(project_id)s, Domain: %(domain_id)s."1492"%(group_id)s, Project: %(project_id)s, Domain: %(domain_id)s."
15011493
1502#, python-format1494#, python-format
1503msgid "Unexpected evaluation type \"%(eval_type)s\""
1504msgstr "Unexpected evaluation type \"%(eval_type)s\""
1505
1506#, python-format
1507msgid "Unexpected status requested for JSON Home response, %s"1495msgid "Unexpected status requested for JSON Home response, %s"
1508msgstr "Unexpected status requested for JSON Home response, %s"1496msgstr "Unexpected status requested for JSON Home response, %s"
15091497
diff --git a/keystone/models/revoke_model.py b/keystone/models/revoke_model.py
index 63425f1..6841559 100644
--- a/keystone/models/revoke_model.py
+++ b/keystone/models/revoke_model.py
@@ -170,7 +170,7 @@ def matches(event, token_values):
170 # rest of the logic.170 # rest of the logic.
171171
172 # The token has two attributes that can match the domain_id.172 # The token has two attributes that can match the domain_id.
173 if event.domain_id is not None and event.domain_id not in (173 if event.domain_id is not None and event.domain_id not in(
174 token_values['identity_domain_id'],174 token_values['identity_domain_id'],
175 token_values['assignment_domain_id'],):175 token_values['assignment_domain_id'],):
176 return False176 return False
diff --git a/keystone/tests/unit/assignment/test_backends.py b/keystone/tests/unit/assignment/test_backends.py
index 4add564..cdf8966 100644
--- a/keystone/tests/unit/assignment/test_backends.py
+++ b/keystone/tests/unit/assignment/test_backends.py
@@ -3694,9 +3694,9 @@ class ImpliedRoleTests(AssignmentTestHelperMixin):
3694 expected_implied_role_ref = {3694 expected_implied_role_ref = {
3695 'prior_role_id': prior_role_ref['id'],3695 'prior_role_id': prior_role_ref['id'],
3696 'implied_role_id': implied_role_ref['id']}3696 'implied_role_id': implied_role_ref['id']}
3697 self.assertLessEqual(3697 self.assertDictContainsSubset(
3698 expected_implied_role_ref.items(),3698 expected_implied_role_ref,
3699 implied_role.items())3699 implied_role)
37003700
3701 PROVIDERS.role_api.delete_implied_role(3701 PROVIDERS.role_api.delete_implied_role(
3702 prior_role_ref['id'],3702 prior_role_ref['id'],
diff --git a/keystone/tests/unit/catalog/test_backends.py b/keystone/tests/unit/catalog/test_backends.py
index 513e5c3..b2989de 100644
--- a/keystone/tests/unit/catalog/test_backends.py
+++ b/keystone/tests/unit/catalog/test_backends.py
@@ -111,23 +111,20 @@ class CatalogTests(object):
111 PROVIDERS.catalog_api.get_region(region_id)111 PROVIDERS.catalog_api.get_region(region_id)
112 # update the region bypassing catalog_api112 # update the region bypassing catalog_api
113 PROVIDERS.catalog_api.driver.update_region(region_id, updated_region)113 PROVIDERS.catalog_api.driver.update_region(region_id, updated_region)
114 self.assertLessEqual(114 self.assertDictContainsSubset(
115 new_region.items(),115 new_region, PROVIDERS.catalog_api.get_region(region_id)
116 PROVIDERS.catalog_api.get_region(region_id).items()
117 )116 )
118 PROVIDERS.catalog_api.get_region.invalidate(117 PROVIDERS.catalog_api.get_region.invalidate(
119 PROVIDERS.catalog_api, region_id118 PROVIDERS.catalog_api, region_id
120 )119 )
121 self.assertLessEqual(120 self.assertDictContainsSubset(
122 updated_region.items(),121 updated_region, PROVIDERS.catalog_api.get_region(region_id)
123 PROVIDERS.catalog_api.get_region(region_id).items()
124 )122 )
125 # delete the region123 # delete the region
126 PROVIDERS.catalog_api.driver.delete_region(region_id)124 PROVIDERS.catalog_api.driver.delete_region(region_id)
127 # still get the old region125 # still get the old region
128 self.assertLessEqual(126 self.assertDictContainsSubset(
129 updated_region.items(),127 updated_region, PROVIDERS.catalog_api.get_region(region_id)
130 PROVIDERS.catalog_api.get_region(region_id).items()
131 )128 )
132 PROVIDERS.catalog_api.get_region.invalidate(129 PROVIDERS.catalog_api.get_region.invalidate(
133 PROVIDERS.catalog_api, region_id130 PROVIDERS.catalog_api, region_id
@@ -345,23 +342,20 @@ class CatalogTests(object):
345 PROVIDERS.catalog_api.driver.update_service(342 PROVIDERS.catalog_api.driver.update_service(
346 service_id, updated_service343 service_id, updated_service
347 )344 )
348 self.assertLessEqual(345 self.assertDictContainsSubset(
349 new_service.items(),346 new_service, PROVIDERS.catalog_api.get_service(service_id)
350 PROVIDERS.catalog_api.get_service(service_id).items()
351 )347 )
352 PROVIDERS.catalog_api.get_service.invalidate(348 PROVIDERS.catalog_api.get_service.invalidate(
353 PROVIDERS.catalog_api, service_id349 PROVIDERS.catalog_api, service_id
354 )350 )
355 self.assertLessEqual(351 self.assertDictContainsSubset(
356 updated_service.items(),352 updated_service, PROVIDERS.catalog_api.get_service(service_id)
357 PROVIDERS.catalog_api.get_service(service_id).items()
358 )353 )
359354
360 # delete bypassing catalog api355 # delete bypassing catalog api
361 PROVIDERS.catalog_api.driver.delete_service(service_id)356 PROVIDERS.catalog_api.driver.delete_service(service_id)
362 self.assertLessEqual(357 self.assertDictContainsSubset(
363 updated_service.items(),358 updated_service, PROVIDERS.catalog_api.get_service(service_id)
364 PROVIDERS.catalog_api.get_service(service_id).items()
365 )359 )
366 PROVIDERS.catalog_api.get_service.invalidate(360 PROVIDERS.catalog_api.get_service.invalidate(
367 PROVIDERS.catalog_api, service_id361 PROVIDERS.catalog_api, service_id
@@ -422,12 +416,12 @@ class CatalogTests(object):
422 PROVIDERS.catalog_api.get_endpoint(endpoint['id'])416 PROVIDERS.catalog_api.get_endpoint(endpoint['id'])
423 # delete the service bypassing catalog api417 # delete the service bypassing catalog api
424 PROVIDERS.catalog_api.driver.delete_service(service['id'])418 PROVIDERS.catalog_api.driver.delete_service(service['id'])
425 self.assertLessEqual(419 self.assertDictContainsSubset(endpoint,
426 endpoint.items(),420 PROVIDERS.catalog_api.
427 PROVIDERS.catalog_api.get_endpoint(endpoint['id']).items())421 get_endpoint(endpoint['id']))
428 self.assertLessEqual(422 self.assertDictContainsSubset(service,
429 service.items(),423 PROVIDERS.catalog_api.
430 PROVIDERS.catalog_api.get_service(service['id']).items())424 get_service(service['id']))
431 PROVIDERS.catalog_api.get_endpoint.invalidate(425 PROVIDERS.catalog_api.get_endpoint.invalidate(
432 PROVIDERS.catalog_api, endpoint['id']426 PROVIDERS.catalog_api, endpoint['id']
433 )427 )
diff --git a/keystone/tests/unit/common/test_notifications.py b/keystone/tests/unit/common/test_notifications.py
index 2fa9f26..308cc01 100644
--- a/keystone/tests/unit/common/test_notifications.py
+++ b/keystone/tests/unit/common/test_notifications.py
@@ -1045,7 +1045,7 @@ class TestEventCallbacks(test_v3.RestfulTestCase):
1045 Foo()1045 Foo()
1046 project_ref = unit.new_project_ref(domain_id=self.domain_id)1046 project_ref = unit.new_project_ref(domain_id=self.domain_id)
1047 PROVIDERS.resource_api.create_project(project_ref['id'], project_ref)1047 PROVIDERS.resource_api.create_project(project_ref['id'], project_ref)
1048 self.assertCountEqual(['cb1', 'cb0'], callback_called)1048 self.assertItemsEqual(['cb1', 'cb0'], callback_called)
10491049
1050 def test_invalid_event_callbacks(self):1050 def test_invalid_event_callbacks(self):
1051 @notifications.listener1051 @notifications.listener
diff --git a/keystone/tests/unit/config_files/backend_ldap_sql.conf b/keystone/tests/unit/config_files/backend_ldap_sql.conf
index c50d8dd..96a0ffa 100644
--- a/keystone/tests/unit/config_files/backend_ldap_sql.conf
+++ b/keystone/tests/unit/config_files/backend_ldap_sql.conf
@@ -5,7 +5,7 @@
5#connection = mysql+pymysql://keystone:keystone@localhost/keystone?charset=utf85#connection = mysql+pymysql://keystone:keystone@localhost/keystone?charset=utf8
6#To Test PostgreSQL:6#To Test PostgreSQL:
7#connection = postgresql://keystone:keystone@localhost/keystone?client_encoding=utf87#connection = postgresql://keystone:keystone@localhost/keystone?client_encoding=utf8
8connection_recycle_time = 2008idle_timeout = 200
99
10[ldap]10[ldap]
11url = fake://memory11url = fake://memory
diff --git a/keystone/tests/unit/config_files/backend_multi_ldap_sql.conf b/keystone/tests/unit/config_files/backend_multi_ldap_sql.conf
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches