Commit Graph

14959 Commits

Author SHA1 Message Date
Douglas Mendizábal 7a6e1a0bdc Enable protection jobs
This patch re-enables the protection gate jobs now that policy changes
and tempest test changes have merged.

Depends-On: https://review.opendev.org/c/openstack/keystone-tempest-plugin/+/914934
Change-Id: I928fcb8943319e5463a246105391a2bafe833a7e
2024-04-15 16:19:26 +00:00
Zuul 8ca73f758b Merge "sql: Fixup for invalid unique constraint on external_id in access_rule table" 2024-04-03 16:52:44 +00:00
Douglas Mendizábal b31007e1b2 Allow admin to access tokens and credentials
This patch modifies a few policies to allow users with the "admin" role
to access /v3/auth/tokens and /v3/credentials.  These policies were
missed when we implemented Phase 1 of Secure RBAC.

Change-Id: Id789c09121f1405f7ba5e4926498dab4ad98e057
2024-04-02 20:58:10 -05:00
Douglas Mendizábal a050129384 Run Secure RBAC tests as project-admin
This patch updates the devstack plugin so that tempest.conf is not
configured to use system-admin.  Currently tempest uses an all-in
approach to configuring admin clients, and forcing system scope in
tempest when SRBAC is turned on results in test failures for services
that don't understand system scope.

With this patch, keystone test will be run with a project-scoped admin,
which should be fine since policies have been previously updated to
accept project-admin tokens as legacy admin for Phase 1. [1]

[1] f2f1a5c388

Change-Id: I39d50b8e6e55b0835670d753c3783f32b19b6c47
2024-04-02 20:56:48 -05:00
Zuul fc10ccbc8c Merge "Replace CRLF by LF" 2024-03-29 17:24:57 +00:00
Zuul 31e7b1f261 Merge "reno: Update master for unmaintained/xena" 2024-03-29 17:24:55 +00:00
Zuul 4f15ee89db Merge "reno: Update master for unmaintained/wallaby" 2024-03-29 17:24:53 +00:00
OpenStack Release Bot 9a11c0c462 reno: Update master for unmaintained/xena
Update the xena release notes configuration to build from
unmaintained/xena.

Change-Id: I85125d02ce8a17f848f23e024f32a5c183f7b67e
2024-03-26 16:44:58 +00:00
OpenStack Release Bot 8762253c53 reno: Update master for unmaintained/wallaby
Update the wallaby release notes configuration to build from
unmaintained/wallaby.

Change-Id: Iba95e22e05c8872ddde42dc88912dcfbf14c96b7
2024-03-26 16:43:57 +00:00
OpenStack Release Bot 7af1d49c28 reno: Update master for unmaintained/victoria
Update the victoria release notes configuration to build from
unmaintained/victoria.

Change-Id: Ibc662537e6eda4a318141d7d5ef4a522efa8d29e
2024-03-26 16:42:49 +00:00
Zuul 4121cf6cb7 Merge "Add ability to create users and projects from keystone-manage" 2024-03-15 17:37:04 +00:00
Zuul 0e78d42aef Merge "Update regex to detect closed branch" 2024-03-14 16:45:15 +00:00
Takashi Kajinami 307296af5e Deprecate templated catalog driver
Keystone provided two in-tree catalog drivers, sql and templated.
However the templated driver hasn't been properly maintained.
The default template had not been updated for 8 years until it was
recently updated by [1].

This deprecates the driver assuming it's not widely used and sql driver
meets usual requirements.

This also restores the image service endpoints which were wrongly
removed by [1].

[1] c32bedb654

Related-Bug: #2013473
Change-Id: Iadb7bd5d7c4cf82aea2a7dbc1d8c4dbe53b9f763
2024-03-13 22:09:30 +09:00
Takashi Kajinami 29fc86390c Update regex to detect closed branch
... based on the change made in reno recently[1].

[1] https://review.opendev.org/c/openstack/reno/+/910547

Change-Id: Ie38448c4df404514fc9c65b5a5b48be929b13cc5
2024-03-13 19:27:16 +09:00
Zuul b08e5b5f63 Merge "Drop remaining references to eventlet options" 2024-03-12 17:22:44 +00:00
Zuul c616be2fd7 Merge "Fix old arm64 job template" 2024-03-12 17:22:40 +00:00
Zuul ac65d1416d Merge "api-ref: Fix indentation" 2024-03-12 17:22:38 +00:00
Zuul 0ba7fdbd15 Merge "Fix operation order in role deletion" 2024-03-12 17:22:35 +00:00
Zuul f3a3f8948a Merge "Fix federation mapping role jsonschema" 2024-03-12 17:07:39 +00:00
Zuul c5133e5ab8 Merge "Pass initiator to delete user" 2024-03-12 17:07:37 +00:00
Zuul 9c73837d82 Merge "Remove unused old job templates and experimental jobs" 2024-03-12 16:59:59 +00:00
Dave Wilde a8366c4827 Add ability to create users and projects from keystone-manage
This adds the ability to create users and projects directly from
keystone-manage.  We also add the ability to specify specific UUIDs
for both users and projects via the creation functions.

Change-Id: Icd193eff25556d21ec26bb29908b8ad6548fdc91
2024-03-12 08:06:35 -05:00
Zuul d0ba0d3360 Merge "Drop unused pymongodb from requirements" 2024-03-08 17:05:48 +00:00
Zuul 98ac508cf8 Merge "Drop keystone-dsvm-functional-federation-opensuse15 jobs" 2024-03-08 17:05:45 +00:00
Zuul 8c2d5769a1 Merge "Dont enforce when HTTP GET on s3tokens and ec2tokens" 2024-03-08 17:05:42 +00:00
Zuul 57833a2e96 Merge "Allow assignment of domain specific role to federated users" 2024-03-08 16:43:09 +00:00
Takashi Kajinami 609ec29ac9 Remove unused old job templates and experimental jobs
Ubuntu Xenial, CentOS7 and OpenSUSE 15 are all too old.

Change-Id: I0a87cc5a35e6033d670bab56d5cdc8b8312819d8
2024-03-08 15:30:01 +00:00
Zuul 2ac039b717 Merge "Add domain scoping to list_domains" 2024-03-01 18:12:37 +00:00
Stephen Finucane 802cc846aa api-ref: Fix indentation
Additional paragraphs of a bullet list should be indented by two spaces
to align with the first paragraph, e.g.

  - A bullet list item

    Additional detail

Rather than:

  - A bullet list item

     Additional detail

The latter results in the additional paragraphs being rendered as block
quotes.

Change-Id: I18cd39e65fd8d43691c940a6e849765755c46c2e
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2024-02-27 13:13:01 +00:00
Christian Rohmann 90dcff07c0 sql: Fixup for invalid unique constraint on external_id in access_rule table
There was a big drop of invalid constraints with [1]. One of them was on
`external_id` in the access_rule table.

While the change made it into a Alembic revision with [2], it still exists in
the schema causing an a new Alembic autogeneration to actually add it again as
a revision.

[1] https://review.opendev.org/c/openstack/keystone/+/851845
[2] 7d169870fe (diff-26484e3f6683ce7557e17b67220003784ff84fbe)

Closes-Bug: #1988297
Change-Id: I66626ba8771ef2aa8b3580fd3f5d15fd4b58ab48
2024-02-23 08:26:20 +00:00
Clark Boylan da1c884b90 Drop keystone-dsvm-functional-federation-opensuse15 jobs
The OpenDev team is planning to remove OpenSUSE LEAP 15 images as our
node builds and mirrors are for 15.2 which is ancient and no one is
currently working to modernize these test environments. On top of that
LEAP is apparently going away in the future and will be replaced with
another distro.

Change-Id: Ia94b4e7151410515a3ecf99185042dae82bf1b7d
2024-02-21 09:08:58 -08:00
Boris Bobrov 63556be0e3 Fix operation order in role deletion
Deletion of a role leads to deletion of role assignments and entries in
the application credentials. However, deletion of the entries in
application credentials depends on the existence of the assignment, so
the order of deletion is important.

Delete the entries from application credentials first and then clean up
role assignment.

Closes-Bug: 2053137
Change-Id: Ibba9063c729961cd4155f8b55dbabd4789d7a438
2024-02-15 23:28:24 +01:00
Takashi Kajinami ae765c33ee Fix old arm64 job template
Change-Id: I5a93d0cc179468cfded5c939f2ba97b0def445ad
2024-02-13 02:48:30 +09:00
Tobias Urdin 6096457d74 Dont enforce when HTTP GET on s3tokens and ec2tokens
When calling the s3tokens or ec2tokens API with a
HTTP GET we should get a 405 Method Not Allowed but
we get a 500 Internal Server Error because we enforce
that method.

Closes-Bug: #2052916
Change-Id: I5f60d10dc25551175cc73ca8f3f28b0b95ec9f99
Signed-off-by: Tobias Urdin <tobias.urdin@binero.se>
2024-02-12 08:41:39 +00:00
Douglas Mendizábal 7dc175a41f Normalize policy checks for domain-scoped tokens
This patch fixes an inconsistency in the policies for role_assignment
where the target object used for policy enforcement was being created
with different properties depending on the request query string.

This required policies to be written in two differnt ways to validate
domain IDs for domain-scoped requests.  e.g. checking for domain reader
was using both:

    role:reader and domain_id:%(target.domain_id)s

and

    role:reader and domain_id:%(target.project.domain_id)s

With the former only being populated for GET /v3/role_assignments and
the latter only being populated for GET
/v3/role_assignments?scope.project.id=SOME_ID

This patch fixes the target object so that only target.domain_id needs
to be checked for domain-scoped tokens.

Change-Id: Iffbe11c57c61bbd1b045a6567a9249c12dff403c
2024-02-09 11:33:51 -06:00
Markus Hentsch dd785ee692 Add domain scoping to list_domains
Introduces domain-scoped filtering of the response list of the
list_domains endpoint when the user is authenticated in domain scope
instead of returning all domains. This aligns the implementation with
other endpoints like list_projects or list_groups and allows for a
domain-scoped reader role.
Changes the default policy rule for identity:list_domains to
incorporate this new behavior for the reader role.

Closes-Bug: 2041611
Change-Id: I8ee50efc3b4850060cce840fc904bae17f1503a9
2024-02-08 13:55:44 +01:00
gtema 480ba29709 Fix federation mapping role jsonschema
additionalProperties attribute must be located on the level of "type"
and not inside "properties"
(https://json-schema.org/understanding-json-schema/reference/object#additional-properties).
Sadly this is not violating schema validation, but is wrong and hurts
any reasonable processing of the schema.

Change-Id: Ib537f1dd33dd3f3dc8909873dffc37980d04b4db
2024-02-07 08:49:45 +01:00
Pavlo Shchelokovskyy 2735a28fc5 Pass initiator to delete user
otherwise the initiator field is missing from the CADF payload,
which misses the point of audit and technically makes these notifications
not valid as CADF events (initiator field is requires by the
CADF spec).

Change-Id: Iae525ee13dec72af6a7d70db2bb59a77c682a177
2024-02-06 19:56:39 +00:00
OpenStack Release Bot db0ff10476 reno: Update master for unmaintained/yoga
Update the yoga release notes configuration to build from
unmaintained/yoga.

Change-Id: If555750682c88a657834ac8f934f23b76a6ff9eb
2024-02-06 15:50:11 +00:00
Takashi Kajinami 5afd51e8cf Drop unused pymongodb from requirements
Keystone no longer depends on mongodb after cache implementation was
split to oslo.cache[1]. Also, bandit is not a runtime dependency but
a test dependency, so should live in test requirements.

[1] 4969f66fca

Change-Id: I85f376d0897dd6b4dba758f86882fae70511fb6a
2024-02-04 15:04:55 +00:00
Douglas Mendizábal 0340121042 Allow users with "admin" role to get projects
This patch modifies the policy for identity:get_project to allow a user
with the "admin" role to retrieve any project by project_id for Secure
RBAC (Phase 1)

Change-Id: I6442557701284572759da1354e6547f57186935f
2024-02-01 15:34:42 -05:00
Juan Pedro Torres 04fc88a56c Allow assignment of domain specific role to federated users
Ater the patch "Keystone to honor the "domain" attribute mapping rules."
It's not possible to assign domain specific roles to federated users
when the user domain is specify on the claim.

This patch aims to fix this, allowing to map non domain specific roles
and domain specific, if the domain is the specify on the claim.

Depends-on: https://review.opendev.org/#/c/739966/
related-Bug: #1887515
Change-Id: Ie3d7585cb9143686a93e4a19843698274475eaf6
Signed-off-by: Juan Pedro Torres Muñoz <juanp.95.torres@gmail.com>
2024-01-30 19:28:05 +01:00
Zuul 5a97b7d847 Merge "Fix policies for groups" 2024-01-29 17:59:54 +00:00
Takashi Kajinami 6c7020c51a Drop remaining references to eventlet options
Because these were removed by [1]. Also update the previous release
note to document the upgrade impact on catalog information (like
endpoint urls) including string interpolations requiring these removed
options.

[1] 2a3c73c49b

Change-Id: If78d0b93665410b86754ea35653ca9d4c15c81c5
2024-01-27 21:02:14 +09:00
Takashi Kajinami a989cd7f0a Replace CRLF by LF
... because LF is now commonly used as newline code.

Change-Id: I1fddfcbdb06179c096b6a271350d52365ff958ca
2024-01-27 12:38:10 +09:00
Zuul 0608537f03 Merge "Check user existence before setting last_active_at" 2024-01-26 19:25:20 +00:00
Zuul 2d48ff27bb Merge "Propagate redirect exceptions to the client" 2024-01-26 17:37:22 +00:00
Zuul 406233f169 Merge "Clean up deprecated options for eventlet server" 2024-01-26 17:37:17 +00:00
Zuul 6c16f975d2 Merge "Improve application credential validation speed" 2024-01-26 17:37:13 +00:00
Zuul 993e589fa1 Merge "Keystone to honor the "domain" attribute mapping rules." 2024-01-26 17:37:09 +00:00