13237 Commits

Author SHA1 Message Date
Gage Hugo
fbd46e3ce7 Organize project tag api-ref by route
This change moves the various api ref entries for project
tags to be consistent with other api-ref entries, organized
by route.

Change-Id: I6ccd9a2878224cfb7357e8ad1ae1aca77de368ef
2018-09-30 20:40:05 -05:00
Zuul
9c91aa74da Merge "Add build_target arguement to enforcer" 2018-09-30 22:18:20 +00:00
Zuul
aeae630123 Merge "Enable Foreign keys for sql backend unit test" 2018-09-29 07:54:29 +00:00
Zuul
4628e41107 Merge "Update the documentation bug tag" 2018-09-28 22:41:47 +00:00
Zuul
fdb3d18a42 Merge "Adding test case for MappingEngineTester" 2018-09-28 22:41:45 +00:00
Gage Hugo
8697da7da6 Add build_target arguement to enforcer
This change adds in a new arguement "build_target" which takes
in a passed function to build the enforement target after
the authentication check. This is to avoid leaking existance
data when determining scope.

Change-Id: I9aab71dd0032d40aa2f2e088b529af08b112671f
Partial-Bug: #1776504
2018-09-28 15:50:44 -05:00
Zuul
30bd48c205 Merge "Add python3 functional test job" 2018-09-28 04:24:24 +00:00
Vishakha Agarwal
94e6b28411 Adding test case for MappingEngineTester
Mapping Engine Tester is untested. Looking
at a coverage report for the Keystone CLI
shows missing test cases for MappingEngine
Tester. This patch adds the test cases and
also fixes the compatibility issues of
MappingEngine with python3.

Change-Id: Id0844ba1f4e2979d91414d3bc821ab25650c6935
Closes-Bug: #1782197
2018-09-27 16:22:30 +05:30
Zuul
17b03e0a38 Merge "Convert legacy functional jobs to Zuul-v3-native" 2018-09-27 10:15:40 +00:00
Zuul
c837d95ed5 Merge "Comment out un-runnable tests" 2018-09-27 04:52:47 +00:00
Jim Rollenhagen
a8e26936a9 Fix command to verify role removal in docs
The command here doesn't work; update it to a command that does.

Change-Id: I7c34d67f1dd326fb7bb9772c7a56ef9934587608
2018-09-26 15:02:57 -04:00
Colleen Murphy
826f037ebb Add python3 functional test job
As part of the python3-first goal, this patch ensures we have a voting
functional job that uses python3. The choice to call it py3 rather than
py35 is conscious, as the underlying python3 version is controlled by
the choice of test node which the job inherits from its ancestor jobs.

Change-Id: I97ced2047964055966fd6c2e8acfec29b48bdfe3
2018-09-26 20:10:19 +02:00
Colleen Murphy
1a5bbb5677 Convert legacy functional jobs to Zuul-v3-native
Follow the guidelines from the Infra[1] and QA[2] teams to properly set
up our functional tests. This patch leaves the experimental grenade jobs
alone for now since there does not yet seem to be an existing
Zuul-v3-native grenade job to use as a parent.

[1] https://docs.openstack.org/infra/manual/zuulv3.html#reworking-legacy-jobs-to-be-v3-native
[2] https://docs.openstack.org/devstack/latest/zuul_ci_jobs_migration.html

Change-Id: Iabf40c723f2611c7eeb0a289b7ff594766a3452e
2018-09-26 20:09:49 +02:00
wangxiyuan
46a28313fc Enable Foreign keys for sql backend unit test
Enable the sqlite foreign keys function for unit test.

This patch is the first part to solve sql backend test issues.

Change-Id: I5d29d05e64b76ff6530c9af5ee39a2df1b26aa03
Partial-Bug: #1744195
2018-09-26 17:36:01 +00:00
Zuul
50b2d6aa0e Merge "Implement Trust Flush via keystone-manage." 2018-09-24 17:06:32 +00:00
Gage Hugo
4c09affde1 Add releasenote for bug fix 1789450
This adds a releasenote for the related bug fix for
mapped groups.

[0] https://review.openstack.org/#/c/597992/

Change-Id: Ied9cc012e0728276bcd083089658c9c1020d9521
2018-09-21 21:34:58 +00:00
Zuul
498528963e Merge "Mapped Groups don't exist breaks WebSSO" 2018-09-21 20:32:01 +00:00
morgan fainberg
d6d3bf9110 Comment out un-runnable tests
These tests have not been run in > 2 years. They are commented out
with an updated FIXME to rework once the flask port is done (auth).
It is out of scope of Flask to re-enable long disabled tests.
We do not want to lose the context of the coverage the tests provide
thus we are commenting them out instead of outright deletion.

Change-Id: I0760746dc62b65607ac0e88ee6d03395c9226fe7
2018-09-21 19:06:56 +00:00
Vishakha Agarwal
ee46f73535 Mapped Groups don't exist breaks WebSSO
The issue occurs if a user has a group that
does not map to a project in OpenStack. At
which point an exception is raised and the
websso login blows up with a 500 message.
This is because of the exception being raised
when the group name not matches thus replacing
that with a log.

Change-Id: Ia7321705db118af28f3dc6e01d5b18e8650aa633
Closes-Bug: #1789450
2018-09-21 08:27:17 +05:30
Zuul
ba459352d8 Merge "Remove unused revoke_by_user_and_project" 2018-09-19 20:39:50 +00:00
Zuul
203129f7e4 Merge "Use templates for cover and lower-constraints" 2018-09-19 16:44:19 +00:00
Vishakha Agarwal
8232dabcf9 Implement Trust Flush via keystone-manage.
Creates a cli entry 'trust_flush' which removes
all expired trusts.

Change-Id: I1c85b67d24e05db86c85e722fbd773a411c24ac4
Closes-Bug: #1473292
2018-09-18 13:51:11 +05:30
morgan fainberg
c96c7fd03b Properly normalize domain ids in flask
Previously domain_id normalization was done (in webob) resulting
in possibly one of four results (ref['domain_id'] is changed):

  * Domain ID present in ref -> no change to ref

  * Domain ID not present, domain scoped token ->
    ref['domain_id'] = scope domain id

  * Domain ID not present, "admin" token -> raise ValidationError

  * Domain ID not present, project scoped token -> default domain
    [Deprecated functionality]

In flask, only the first case worked. This change corrects the behavior
and adds a test to ensure proper data is extracted from oslo.context.

Change-Id: Iacb502a2aa3fe633f74c7e19e13c46f4f85e55db
Closes-Bug: #1793027
2018-09-17 15:10:59 -07:00
Andreas Jaeger
ca5e38e8c7 Use templates for cover and lower-constraints
Use openstack-tox-cover template, this runs the cover job as
non-voting in the check queue only.

Use openstack-lower-constraints-jobs template

Remove jobs that are part of the templates.

Change-Id: Ifc97a5a59ae9ffc184a30110d1f49fd2fbb0a160
2018-09-17 19:32:31 +02:00
Zuul
4532b97b03 Merge "Rename v3-only functional zuul job" 2018-09-15 20:47:31 +00:00
Zuul
90cbb7be79 Merge "Make OSA rolling upgrade test experimental" 2018-09-15 20:36:06 +00:00
Zuul
ac95f26e7f Merge "Move use of constraints out of install_cmd" 2018-09-15 00:25:41 +00:00
Zuul
27f226554a Merge "Convert domains api to flask" 2018-09-15 00:15:36 +00:00
Zuul
c8a7c41713 Merge "Ensure view args is in policy dict" 2018-09-15 00:15:34 +00:00
Zuul
95f11874dd Merge "Convert OS-INHERIT API to flask native dispatching" 2018-09-15 00:15:32 +00:00
Jesse Pretorius
3c493437b4 Make OSA rolling upgrade test experimental
Unfortunately this test has been failing consistently for some
time due to some ways the test is implemented. While we regroup
to implement something more reliable, it's best to just remove
it from the check pipeline and have it be experimental for now.

Change-Id: Iaff476524fa95a0d96b72e0905716f812138eb3e
2018-09-14 15:37:06 -06:00
Gage Hugo
cbda685ea8 Rename v3-only functional zuul job
The v3-only functional job was repurposed to run federation. This
change renames the job in order to reflect this.

Change-Id: Ib7c8a2f1cfa19f332aad20ac528f8fa86addd5f9
2018-09-14 15:20:31 -06:00
Zuul
3fdeacdb6a Merge "Fix a translation of log" 2018-09-14 20:15:58 +00:00
Zuul
77e050d509 Merge "Convert groups API to flask native dispatching" 2018-09-14 20:15:56 +00:00
Zuul
1bc5f85868 Merge "Fix RBACEnforcer get_member_from_driver mechanism" 2018-09-14 20:15:54 +00:00
Zuul
a352c3c4cc Merge "Refactor ProviderAPIs object to better design pattern" 2018-09-14 20:15:52 +00:00
Zuul
50698fd128 Merge "Rename py35 v3 only check" 2018-09-14 05:27:21 +00:00
Vishakha Agarwal
4b2c456697 Remove unused revoke_by_user_and_project
This patch removes a method that wasn't being
used anymore anywhere except for a single unit
test. Since keystone now validates Fernet
tokens the same way - by rebuilding the token
context at validation time, we no longer need
to persist certain types of revocation events.

Change-Id: Ic9dcc6a5fd40e504ec04dcefab995d03927362bc
partial-bug: #1671887
2018-09-14 04:08:01 +00:00
Zuul
6d49b556ae Merge "Address issues with flask conversion of os-federation" 2018-09-13 19:02:20 +00:00
Zuul
1a1a63ac4d Merge "Convert OS-FEDERATION to flask native dispatching" 2018-09-13 15:15:27 +00:00
morgan fainberg
8696865b13 Address issues with flask conversion of os-federation
This change addresses the following issues with the flask conversion:

* Filter attributes on get_idp (added to wrap_member)

Change-Id: I028f894845d1d6553c6372cd67b53102b10b8a4c
Partial-Bug: #1776504
2018-09-12 11:41:39 -07:00
Zuul
785ec01833 Merge "Added support for a `description` attribute for Identity Roles" 2018-09-12 17:56:20 +00:00
Gage Hugo
296f20f0a7 Convert domains api to flask
Convert domains api to flask native dispatching.

Change-Id: I974ab112986e6c242a139f7d7dc14fd54a48ee42
Partial-Bug: #1776504
2018-09-12 15:26:37 +00:00
Tony Breeds
114cdeb7eb Move use of constraints out of install_cmd
If you have a -c in the install_cmd it gets used with all the deps
supplied this means that the lower-constraints job actually install from
upper-constraints :(

You can see what I mean in [1]
Note both lower-constraints.txt and upper-constraints.txt are used ; and
---
Collecting oslo.log===3.39.0 (from -c /home/zuul/src/git.openstack.org/openstack/requirements/upper-constraints.txt (line 247))
---

With this fixed we find a few minimums that needs to be bumped:

 * oslo.policy >= 1.33.0
   keystone uses the scope_types[2] kwarg to RuleDefault which was
   introduced in 52c82ff9ab04dd78ff7045cb30d2f5de535dd7da which is
   contained in 1.32.0  ; also we need the 'policy-in-code' feature
   which is in 1.33.0
 * oslo.log >= 0.38.0
   keystone used the ROCKY[3] constant for deprecations which was
   introduced in d68a895ee8e61b5c9d4ef368e7f04252e84649e9 which is
   contained in 3.38.0
 * msgpack >= 0.5.0
   the 0.4.x versions have been removed from pypi so we have to bump the
   minimum :(
 * SQLAlchemy >= 1.0.13
   identity_provider_id in token payload is byte in python3 which
   triggers a sqlalchemy bug[4]. The bug has been fixed in 1.0.13
 * keystonemiddleware >= 5.1.0
   unified limit feature uses system scope feature which is supported
   in keystonemiddleware after 5.1.0
   

We also add correct some errors in bindep.txt related to use on Fedora

[1] http://logs.openstack.org/47/599447/2/check/openstack-tox-lower-constraints/bbc912b/tox/lower-constraints-1.log
[2] http://git.openstack.org/cgit/openstack/keystone/tree/keystone/common/policies/access_token.py#n24
[3] http://git.openstack.org/cgit/openstack/keystone/tree/keystone/conf/default.py#n50
[4] http://docs.sqlalchemy.org/en/latest/changelog/changelog_10.html#change-a14dd2e73d889d065acc07a77b1ee7cb

Change-Id: Ic0de6799fddd86a70abae2c87c92d565072ebdb9
2018-09-12 03:54:38 +00:00
morgan fainberg
4975b79e81 Ensure view args is in policy dict
The policy_dict (in enforcement) was not populating the view args
in a similar manner to the old style @protected decorator. This
change ensures that we mirror the old behavior (required for
proper use of v3cloud policy).

Change-Id: Ida9009a95a874be9cc60c3152d4e3225726562eb
Partial-Bug: #1776504
Closes-Bug: #1792047
2018-09-11 23:34:11 +00:00
Gage Hugo
aebb568eff Rename py35 v3 only check
This renames the "keystone-dsvm-py35-functional-v3-only" check to
"keystone-dsvm-py35-functional-federation" in order to better
describe what this job does. This also removes the
"ENABLE_IDENTITY_V2=FALSE" setting since v2 has since been removed
from keystone.

Change-Id: If6c4a5844eb1d2f9f75c614634c781c2915c4a11
2018-09-10 17:21:54 -06:00
Morgan Fainberg
8c397fa727 Convert OS-INHERIT API to flask native dispatching
Convert OS-INHERIT API to flask native dispatching.

NOTE: A minor test change was needed, the test was mis-constructing the
URI with multiple slashes. The test now properly constructs the URI
using an lstrip when combining the direct_url bits.

Change-Id: I0907eb00cdfb9849342220f9b528f94175e71545
Partial-Bug: #1776504
2018-09-10 20:37:27 +00:00
Morgan Fainberg
f62d98a085 Fix a translation of log
Do not translate log messages. This fixes a translation of a log.

Change-Id: I030d96c1d3a4a348ea206c901fee7d03209ecc1c
2018-09-10 20:37:13 +00:00
Morgan Fainberg
2a04d78dbf Convert groups API to flask native dispatching
Convert the groups API to flask native dispatching.

Change-Id: I2c15d4eba13309e05258c9ed7ddc452859e5cb70
Partial-Bug: #1776504
2018-09-10 13:34:48 -07:00
Morgan Fainberg
22f5f7303f Fix RBACEnforcer get_member_from_driver mechanism
Correct an issue with the RBACEnforcer requiring 'member_name' instead
of 'member_key' for the inferred lookup. Due to how flask works and that
all views are instantiated on demand (and not accessible outside of
the active method without a lot of extra introspection), the provider
object now supports a "deferred" lookup mechanism. This mechanism
leverages the descriptor construct and does the lookup of the provider
api property and method at runtime. This, in essence, works like a
"@classproperty" would.

Change-Id: I264384dd521ea60ba6ee98652aaeb939f1a75521
Partial-Bug: #1776504
2018-09-10 13:32:14 -07:00