Commit graph

15288 commits

Author SHA1 Message Date
Zuul
a903b50542 Merge "Improve federated mapping documentation clarity" 2025-12-16 15:12:48 +00:00
Zuul
e2d3c6fbf3 Merge "Cap hacking" 2025-12-16 15:12:44 +00:00
Zuul
39ac6e70d7 Merge "Drop flake8-docstrings" 2025-12-16 15:12:39 +00:00
Zuul
19e1b3fc91 Merge "Drop unused tempest from test requirements" 2025-12-16 14:22:14 +00:00
Zuul
c3bfa0924d Merge "Drop workaround for sphinx-feature-classification < 0.4.2" 2025-12-16 14:22:05 +00:00
Zuul
44e058fe9f Merge "api-ref: Add description field in Endpoint" 2025-12-16 08:22:12 +00:00
Arnaud Morin
bd178ee91f Fix small typo about ec2tokens in documentation
Signed-off-by: Arnaud Morin <arnaud.morin@ovhcloud.com>
Change-Id: Ic67d2af8290f2b9feed9b17142f2c910600e863b
2025-12-10 17:36:04 +01:00
Winicius Silva
4a0299e03c api-ref: Add description field in Endpoint
The Keystone defines a 'description' field on its schema which can be
returned if the user have set it on resource creation/update, but the
docs doesn't mention this field, which can be confusing.

Change-Id: Id64792411d2704fee581cf86806eb430f0319256
Signed-off-by: Winicius Silva <winiciusab12@gmail.com>
2025-12-10 10:35:52 -03:00
Zuul
5b5c573c2f Merge "Ignore codegenerator working directory" 2025-12-10 10:25:41 +00:00
Zuul
fb730b7402 Merge "api-ref: Add (deprecated) endpoint name docs" 2025-12-10 08:34:03 +00:00
Takashi Kajinami
7635208c7f Cap hacking
hacking is not capped by global upper constraints. We should be careful
about its version because no cap can cause problems in stable branches.

Change-Id: I75c4a1c712c8b313d89f1712daba2d0e6b9d2561
Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
2025-12-09 12:16:23 +00:00
Takashi Kajinami
9dd188a19d Drop flake8-docstrings
It depends on pydocstyle which was deprecated and archived. See [1]
where it was indicated that the plugin is also being dead.

[1] https://github.com/PyCQA/flake8-docstrings/issues/68

Change-Id: I5f017a9cf0ae74fef998b1658fc3b8be8cde8b51
Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
2025-12-09 12:12:21 +00:00
Zuul
a71b056a5b Merge "Use native hook of bashate" 2025-12-09 11:58:22 +00:00
Zuul
56ec69d0fc Merge "Remove unused bandit target" 2025-12-09 11:58:18 +00:00
Zuul
64a06477d1 Merge "Fix role assignment cache for federated users" 2025-12-09 11:54:49 +00:00
Zuul
8da7387aa0 Merge "Import LOG where it is used" 2025-12-09 04:19:52 +00:00
Artem Goncharov
03500a0260 Import LOG where it is used
For some reason a bug went unnoticed where in the schema validation we
log the message from the decorators, but logging itself in not imported.

Change-Id: I6ddb69d21d22eafbfcde5c8952a63e39750e6328
Signed-off-by: Artem Goncharov <artem.goncharov@gmail.com>
2025-12-08 18:07:44 +00:00
Doug Goldstein
50f0f023bd
Improve federated mapping documentation clarity
Rewrote the federated mapping documentation because it had issues with
missing information, incorrect information or examples that did not make
sense. The layout of it resulted in some important pieces of information
coming at the very end which could cause users to do the wrong thing if
they did not read past sections that didn't pertain to them. Added more
detailed examples of how each of the different mapping engine operations
work. Documented up front how the different pieces of data are mapped
and what must exist and what is created for you. Added a section about
troubleshooting to help users determine what went wrong based on
questions recently seen in the IRC channel. Removed confusing wording
and used a consistent term throughout (e.g. assertion vs context
variables). Added relative links to make the doc flow smoother.

Change-Id: I7382998d02f11e19886c6b83e69c6a7d095a957a
Assisted-by: Claude Sonnet 4.5
Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
2025-12-08 12:02:48 -06:00
Stephen Finucane
a640babcb8 Ignore codegenerator working directory
Change-Id: I25833dae5422d5137d108b615f5a2736755a8a08
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-12-08 17:43:14 +00:00
Stephen Finucane
e12cef8d45 api-ref: Add (deprecated) endpoint name docs
In change I61429b39086d15aed7d2315d7c3971727a9fa419 we
removed documentation for the name attribute since it is not
recommended. However, the api still accepts and (optionally)
returns this field, which can be confusing.

Rather than pretend it does not exist from a docs perspective,
instead indicate that it does exist but should not be used.

Change-Id: I381de2daf422f3328c75b79ed8c8b543290abe23
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-12-08 17:40:34 +00:00
Zuul
1b62ceb5bc Merge "Fix the protection tests for creds and ec2 creds" 2025-12-06 01:23:33 +00:00
Zuul
a0ab9897d0 Merge "reno: Update master for unmaintained/2024.1" 2025-12-05 18:11:23 +00:00
Zuul
33b96c853c Merge "Add a new index on revocation_event table" 2025-12-05 18:11:18 +00:00
Zuul
6b96c3cef4 Merge "Invalidate token of user disabled in readonly backend" 2025-12-05 18:11:02 +00:00
Zuul
dfd5abcb04 Merge "Rename the migration folder" 2025-12-05 17:44:30 +00:00
Zuul
d555fe1a41 Merge "Apply sql db expand from 2025.02" 2025-12-05 11:58:40 +00:00
Olivier Chaze
2b7e19b171 Add a new index on revocation_event table
When validating a token, under load, a full table scan could happen
because of missing indexes.
This new index drastically help the database to get through the
revocation events.

Closes-Bug: #2081082
Change-Id: Ic44c945f3cb65b48ff72052fd2b4f6d45e118b2e
Signed-off-by: Quentin GROLLEAU <quentin.grolleau@corp.ovh.com>
Signed-off-by: Arnaud Morin <arnaud.morin@ovhcloud.com>
2025-12-04 23:19:12 +01:00
Moutaz Chaara
ad87d8212a
Fix role assignment cache for federated users
When federated users' group membership changes in the IdP and they
reauthenticate, their role assignments should reflect the change
immediately, respecting the IdP's TTL configuration rather than
waiting for the role assignment cache to expire.

This change ensures that federated authentication triggers
appropriate cache invalidation for role assignments when group
membership has changed.

Closes-Bug: #2119031
Change-Id: I79505f3d9e7d9ba46ed6ff40ee0071bdf92b95a0
Signed-off-by: Moutaz Chaara <moutaz.chaara@sap.com>
2025-12-04 14:42:18 +01:00
Artem Goncharov
7c4c8f01ec Drop declaring dependency on scrypt
When passlib was dropped scrypt support was implemented using the
cryptography library. Keep requirements declaration match the reality.

Change-Id: Ic36ab00c43ac9f74777d0ebda55f109cc24a74ff
Signed-off-by: Artem Goncharov <artem.goncharov@gmail.com>
2025-11-26 12:05:51 +01:00
Arnaud Morin
11079bffc0 Rename the migration folder
We should use the correct naming convention for alembic migration
folder.

Signed-off-by: Arnaud Morin <arnaud.morin@ovhcloud.com>
Change-Id: I33933e51c05d0c6ae884d7ae429d542621804e79
2025-11-25 19:59:59 +01:00
Arnaud Morin
93bb6b5ef8 Apply sql db expand from 2025.02
We were applying the migration up to 2024.01.
Since we added a new expand in 2025.02, let's apply it.
We forgot to do that in a previous change
I51e6c32f17df9473f9a055013eed1fe0a90c8afa

Signed-off-by: Arnaud Morin <arnaud.morin@ovhcloud.com>
Change-Id: I90460353510d77f6d9094902c7925a47a58a3156
2025-11-25 19:59:59 +01:00
Zuul
1994734990 Merge "Bytes-vs-str mismatch causes repeated ID mapping creates on list" 2025-11-14 23:49:44 +00:00
Zuul
70d34239e2 Merge "Disable response body validation by default" 2025-11-14 18:17:41 +00:00
Artem Goncharov
c63efe1df1 Invalidate token of user disabled in readonly backend
We support custom identity plugins. They (and also LDAP backend) may be
considered as a read-only (not supporting user data modification through
Keystone API). When a user of such backend is disabled in the remote
system Keystone will never learn about that and as such tokens for those
users will remain active. They cannot be renewed, but still they stay
valid.
In order to address this situation we need to do additional steps in the
token validation and identify the current state of the user in the
backend. Due to the use of the token caching it is not possible to reuse
normal token validation functionality (it will never gets invalidated as
such). In order to keep performance impact as low as possible modify the
token validation as following:
- regular checks
- revocation check
- if token is still active and revoke check passed fetch current user
  data. When user is disabled - log a warning (explaining the situation)
  and raise `UserDisabled` exception.

Since Keystone also does not receive a message when user is reactivated
(i.e. it was accidentally disabled) we cannot use the same approach as
for regular user disabling and generate a token revocation event. This
would cause the user to be locked out until the revocation event
expires.

Closes-bug: #2122615
Change-Id: If5b83feabc670ced54ef12fe7826267af7e3419d
Signed-off-by: Artem Goncharov <artem.goncharov@gmail.com>
2025-11-14 09:13:49 +01:00
Tobias Urdin
7c78b226bd Fix the protection tests for creds and ec2 creds
This fixes the protection tests for creds and ec2
creds that is executed by the protection tox
env.

Change-Id: Ic93ca4ecd80be9dbcb1759de39060eb194e9e1f0
Signed-off-by: Tobias Urdin <tobias.urdin@binero.com>
2025-11-11 11:26:36 +01:00
Zuul
abd911d230 Merge "Temporary disable openapi api-ref" 2025-11-10 08:11:03 +00:00
Grzegorz Grasza
5a8e4443d8 Add service user authentication to ec2 and s3 endpoints
Add a policy to enforce authentication with a user in the service
group. This maintains AWS compatibility with the added security
layer.

Closes-Bug: 2119646
Change-Id: Ic84b84247e05f29874e2c5636a033aaedd4de83c
Signed-off-by: Grzegorz Grasza <xek@redhat.com>
Signed-off-by: Jeremy Stanley <fungi@yuggoth.org>
Signed-off-by: Artem Goncharov <artem.goncharov@gmail.com>
2025-11-04 15:04:25 +01:00
Artem Goncharov
05cef32fba Temporary disable openapi api-ref
The world (and requriements) broke us again, not a surprise, but it is
not really sustainable anymore. requirements updated markdown-it-py
which is not supported by myst_parser (which got in limbo) which is
necessary by os-openapi to build sphinx extension. There seems to be no
fast workaround possible for that so temporary (hopefully) disable the
part of building openapi docs.

Change-Id: Idbf4901604522c2b2bafd976a6914963212def83
Signed-off-by: Artem Goncharov <artem.goncharov@gmail.com>
2025-11-03 15:56:00 +01:00
Artem Goncharov
f7ebcd8a5a Minor fixes in trust schema
Some multiline strings (descriptions) that are in brackets have a comma
at the end which result in it being treated as a list rather than a
string.

Change-Id: Ib39e2196d1781a24afb152ba1e61c999ab474712
Signed-off-by: Artem Goncharov <artem.goncharov@gmail.com>
2025-11-03 09:45:42 +01:00
OpenStack Release Bot
9a1f11d283 reno: Update master for unmaintained/2024.1
Update the 2024.1 release notes configuration to build from
unmaintained/2024.1.

Change-Id: I4ba03f4930494b9466bbb23feab69677319229b4
Signed-off-by: OpenStack Release Bot <infra-root@openstack.org>
Generated-By: openstack/project-config:roles/copy-release-tools-scripts/files/release-tools/change_reno_branch_to_unmaintained.sh
2025-10-31 12:14:41 +00:00
Stephen Finucane
fff71c4470 Disable response body validation by default
This should not be used in production for the reasons given inline.

Change-Id: Ie40f41f57e316888c2b33f2952edcbac702c1c79
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Depends-on: https://review.opendev.org/c/openstack/devstack/+/962852
Closes-bug: #2126676
2025-10-21 11:23:39 +02:00
Zuul
c0a2c6b0ba Merge "fix ldap 'enabled' setting not interpreted as boolean" 2025-10-17 21:42:30 +00:00
Grzegorz Grasza
bc3e790f58 Bytes-vs-str mismatch causes repeated ID mapping creates on list
LDAP drivers can yield refs with values encoded as bytestrings,
which inclues bytes local IDs, while the ID mapping layer
stores/returns strings.

During list post-processing, this mismatch prevents lookups from hitting
the seeded mapping and triggers create_id_mapping again on each pass,
causing unnecessary churn and latency during token issuance.

This change adds unit test for both cases:
 - bytes IDs: the original behavior was that the cumulative
   create_id_mapping count increased with each iteration.
 - string IDs: seeded mapping is reused; no creates across iterations.
The helper always seeds with a string local_id, normalizing the mapping
list local_id to string. After the fix, the results are the same for
string and bytestring.

Signed-off-by: Grzegorz Grasza <xek@redhat.com>
Change-Id: I89235b2721380544304221a2da67a30971c62bf9
2025-10-14 14:30:18 +02:00
Takashi Kajinami
330ea8b438 Use native hook of bashate
... to run all pep8 checks by pre-commit .

Change-Id: Icadac8a5566816fa17257b36c6885a578e888e6e
Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
2025-10-03 22:07:15 +00:00
Takashi Kajinami
78b393e38d Remove unused bandit target
This has been unused since bandit was moved to PyCQA organization.

Also maintain bandit options in pyproject.toml so that these can be
used by different tools more easily.

Change-Id: I7d16d6e58666a943677a18fcc19f66c7bb7a2c8c
Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
2025-10-04 07:06:39 +09:00
Zuul
98b5b4c485 Merge "Fix federation mapping jsonschema" 2025-10-03 16:05:13 +00:00
Stephen Finucane
41b31668b9 Migrate setup configuration to pyproject.toml
Change-Id: I14a628f9100341ee532776cf6f7e348a0304cf3a
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-09-22 11:49:15 +01:00
Zuul
4275c6801e Merge "Fix trusts jsonschema to support additional properties" 2025-09-19 16:33:41 +00:00
Zuul
5ef0015772 Merge "credentials: Don't try to decrypt already-decrypted credentials" 2025-09-19 16:33:36 +00:00
Zuul
4486ab58df Merge "Update master for stable/2025.2" 2025-09-19 16:33:31 +00:00