Commit Graph

233 Commits

Author SHA1 Message Date
Rafael Weingärtner 14ac08431f Keystone to honor the "domain" attribute mapping rules.
We propose to extend Keystone identity provider (IdP) attribute mapping
schema to make Keystone honor the `domain` configuration that we have
on it.

Currently, that configuration is only used to define a default domain
for groups (and then each group there, could override it). It is
interesting to expand this configuration (as long as it is in the root
of the attribute mapping) to be also applied for users and projects.

Moreover, to facilitate the development and extension concerning
attribute mappings for IdPs, we changed the way the attribute mapping
schema is handled. We introduce a new configuration
`federation_attribute_mapping_schema_version`, which defaults to "1.0".
This attribute mapping schema version will then be used to control the
validation of attribute mapping, and also the rule processors used to
process the attributes that come from the IdP. So far, with this PR,
we introduce the attribute mapping schema "2.0", which enables
operators to also define a domain for the projects they want to assign
users. If no domain is defined either in the project or in the global
domain definition for the attribute mapping, we take the IdP domain
as the default.

Change-Id: Ia9583a254336fad7b302430a38b538c84338d13d
Implements: https://bugs.launchpad.net/keystone/+bug/1887515
Closes-Bug: #1887515
2024-01-16 08:54:56 -03:00
Zuul 7ee35794e9 Merge "Fix presentation of OAuth2.0 user guides" 2023-10-06 17:10:29 +00:00
Zuul 02bbc665c4 Merge "Add an option to randomize LDAP urls list" 2023-08-25 16:28:33 +00:00
Zuul 677ac86bca Merge "Fix typo in openid federation diagram" 2023-08-10 16:13:31 +00:00
Zuul 56c1beee76 Merge "docs: Clarify lack of LDAP assignment back end" 2023-08-04 16:31:30 +00:00
Zuul 1ac30ab59f Merge "Add default service role support to boostrap command" 2023-08-04 08:07:44 +00:00
Mark Goddard dabaef7c33 docs: Clarify lack of LDAP assignment back end
The LDAP assignment backend was removed in Mitaka(!) [1] and should no
longer be referenced.

Change-Id: I14a4d7fdbaee81792a1ccf9b3bcf5f2d8e237da5
2023-07-04 13:38:40 +01:00
Zuul 8304eefb97 Merge "Add doc of OAuth2.0 Client Credentials Grant Flow" 2023-06-27 16:23:30 +00:00
Hiromu Asahina f6ab28218e Fix presentation of OAuth2.0 user guides
Applied remining comments to the first OAuth2.0 documentation patch [1].

[1] https://review.opendev.org/c/openstack/keystone/+/838108

Change-Id: I95aac0b4ac4e887b79ef5b15ac5cb3d356c26735
2023-06-27 23:55:18 +09:00
Arvid Requate 1195c38b8b Fix typo in openid federation diagram
Section "OpenID Connect with keystone and horizon"
should use openid endpoint instead of saml2.

Change-Id: I147f3888c42e2d8d25a0ddd20f4e3974c8a38632
Signed-off-by: Arvid Requate <requate@univention.de>
2023-05-09 13:08:11 +02:00
Yusuke Niimi b438bf1efe Add doc of OAuth2.0 Client Credentials Grant Flow
This patch provides Keystone documents for OAuth2.0 client
authorization. The specification about new API is added to API
Reference. Also OAuth2.0 client credentials grant flow is added to
admin guide.

Implement: blueprint oauth2-client-credentials-ext
Change-Id: I6ac5835fb64a4e81f34f7b8631d255b2bb7f66da
2023-04-17 08:04:36 +00:00
Abhishek Kekane d0eacc4729 Add default service role support to boostrap command
Added service role support to bootstrap command.

Closes-Bug: #1951632
Change-Id: I9cb25a111c84ecb3a09158cbe44b0954df89096c
2023-03-28 17:51:17 +00:00
Grzegorz Grasza 36d57d2a83 Add an option to randomize LDAP urls list
Since LDAP is now readonly, the current behavior might be
unexpected. By randomizing the list, we assure a more gradual
failure scenario if the first server on the list (as specified
by the user) fails.

Change-Id: I23f31bd85443784013a6aa158d80c7aeeb343993
Closes-Bug: #1953622
Resolves: rhbz#2024602
2022-10-07 17:56:02 +02:00
Stephen Finucane d88439c6a9 docs: Update docs to reflect migration to Alembic
Change-Id: Iabc8cd0746871ea6ab81af9d3f0149644a489f3d
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2022-06-20 13:29:58 +01:00
Zuul 01e1a083d5 Merge "Update TOTP example code for python 3" 2022-04-22 16:30:04 +00:00
Jake Yip afec310e3f Update TOTP example code for python 3
Change-Id: I8e16fe1a002295753ab03cb8da74c0d43785f6d7
2022-03-18 16:01:52 +11:00
Eunyoung Kim c141e6164e trivial: Fix typo
Change-Id: I36f5eb44faf4c0e2ea7d68e8736e8fd34fdd5504
2022-03-16 01:23:33 +00:00
Zuul 3cbd374947 Merge "Fix API path in document" 2022-02-11 18:15:12 +00:00
Eunyoung Kim e833bd8478 Fix API path in document
GET /limits-model => GET /limits/model

Change-Id: Ib832a8a9257ecdc7bffcc81ee003d1f5a37588e0
2022-02-11 09:44:13 +00:00
Zuul 2961208028 Merge "Add details to bootstrap docs for system role assignments" 2022-02-04 18:49:30 +00:00
Grzegorz Grasza ce6031ca12 Update local_id limit to 255 characters
This avoids the "String length exceeded." error, when using LDAP
domain specific backend in case the user uses a user id
attribute, which can exceed the previous constraint of 64 chars.

Change-Id: I923a2a2a5e79c8f265ff436e96258288dddb867b
Closes-Bug: #1929066
Resolves: rhbz#1959345
2021-08-09 20:40:52 +02:00
Zuul 0acd650d08 Merge "trivial: Update minor wording nit in RBAC persona documentation" 2021-02-27 05:23:24 +00:00
Zuul 4c1c2793f2 Merge "Clarify top-level personas in RBAC documentation" 2021-02-27 05:23:08 +00:00
Zuul f7c5a38881 Merge "Clarify ``reader`` role implementation in persona admin guide" 2021-02-27 05:23:02 +00:00
Lance Bragstad 9707673b34 trivial: Update minor wording nit in RBAC persona documentation
After reading through the documentation, I thought this sentence sounded
funny using 'within' and 'in' so close to each other. I updated it so
that it isn't quite so jarring.

Change-Id: I2619108216035a37823e53efb5a3f9fe6cfe5cbb
2021-02-05 15:00:02 +00:00
Lance Bragstad a0ae615ab9 Clarify top-level personas in RBAC documentation
This commit updates the documentation for service api protection to
better describe the overall personas for system, domain, and project
users. It also adds some examples that show operators how to list users
with all role assignments on a particular target, which include a
superset of the existing examples.

Change-Id: I40dd33fc0afa0240c6b1cd48322fd988fc5524af
2021-02-05 14:54:32 +00:00
Lance Bragstad 4df1130e12 Clarify ``reader`` role implementation in persona admin guide
The secure RBAC work propogating throughout the community has led to
some interesting discussions about how to implement support for
``reader``. Specifically, should ``reader`` be used for auditing
deployments?

Some compliance targets, verified by third-party auditors, require
access to sensitive information (e.g., thinking about license keys in
glance images or volume type encryption metadata in cinder). The concern
raised among developers updating their default policies to use
``reader`` roles is if they should be using that role to protect
sensitive information, especially if it's the least-authoritative role
in the hierarchy between reader, member, and admin.

This documentation is supposed to assist deployers in understanding the
various personas that developers are implementing by default, but it
doesn't call out the complicated relationship we have with ``reader``
and auditing.

The change here proposes that we explicitly say that ``reader``
shouldn't be used to protect sensitive information, regardless of the
scope, because ``reader`` was designed to be the least-authoritative
role provided by keystone, by default. Instead, service developers
working to implement these personas consistently in other services
should keep sensitive information, if applicable to their API or
resources, at the ``admin`` tier of the hierarchy. This provides better
protection of sensitive information by not exposing is implicitly.

We can consider supporting a formal default role for auditing in the
future, but building it outside the default implied role tree so that
it's not implied to anyone with a role assignment. This will come at
another time and we can use implied roles to re-use all the work we've
done across OpenStack to implement support for ``reader``.

For now, ``reader`` should be viewed from the perspective of the
least-authoritative permissions grant-able to a given scope (e.g.,
system, domain, or project). Even if ``reader`` has limited use in
auditing deployments, it's still incredibly useful for operators
because they have a role they can grant to users with minimal trust, or
minimal permissions in the deployment.

This commit acknowledges the use-case for an elevated auditor role and
that it's something we can implement as a formal role in keystone in the
future.

Change-Id: Iea28faf1b3e63c7ab07e90808d2bc76ee3ee0612
2021-02-05 14:31:51 +00:00
Ghanshyam Mann 256160b849 [goal] Deprecate the JSON formatted policy file
As per the community goal of migrating the policy file
the format from JSON to YAML[1], we need to do two things:

1. Change the default value of '[oslo_policy] policy_file''
config option from 'policy.json' to 'policy.yaml' with
upgrade checks.

2. Deprecate the JSON formatted policy file on the project side
via warning in doc and releasenotes.

Also replace policy.json to policy.yaml ref from doc and tests.

[1]https://governance.openstack.org/tc/goals/selected/wallaby/migrate-policy-format-from-json-to-yaml.html

Change-Id: Ic65d2fd6ce7215b4a47a6fb41b9cbf991f27773b
2021-02-01 17:36:29 +00:00
Lance Bragstad 876ee4b01a Add details to bootstrap docs for system role assignments
In queens we added support for `keystone-manage bootstrap` to
populate a system admin role assignment:

  I6b7196a28867d9a699716c8fef2609d608a5b2a2

The end-user/deployer facing documentation doesn't mention this though
and it should because it ensures deployers have a user for system-level
APIs.

Change-Id: I07616c1470cd89130250cc89635a508f48c2be06
2021-01-13 17:34:00 +00:00
Zuul dc68ee4816 Merge "Support regexes in whitelists/blacklists" 2020-07-16 20:03:47 +00:00
Zuul 5feffb0319 Merge "Add ignore_user_inactivity user option" 2020-07-15 16:15:53 +00:00
Zuul 05e9ac007f Merge "Add an enhanced debug configuration technique to caching guide" 2020-07-07 19:16:38 +00:00
Pavlo Shchelokovskyy c9c655a1e1 Add ignore_user_inactivity user option
this option allows to override the
[security_compliance]disable_user_account_days_inactive setting from
config on per-user basis.

Co-Authored-By: Vishakha Agarwal <agarwalvishakha18@gmail.com>

Change-Id: Ida360e215426184195687bee2a800877af33af04
Closes-Bug: #1827431
2020-07-07 20:40:52 +05:30
Zuul 557e3e44dc Merge "Adding note for create a project without domain info" 2020-07-06 20:50:33 +00:00
Raildo Mascena 12020a0b83 Adding note for create a project without domain info
When we create a project, using a project scoped token,
without add the domain_id or domain information in the
project creation parameters, this project will be
automatically created on the default domain.

Change-Id: Ib7a2d47c2204b0639f029c3079f4fa86ee78e3a9
2020-07-03 11:36:06 -03:00
Lance Bragstad 63e1181294 Add an enhanced debug configuration technique to caching guide
We often have operators ask why cache logging isn't included in their
logs despite setting `keystone.conf [DEFAULT] debug=True`. This is
because cache logging requires additional configuration that isn't
obvious unless your familiar with oslo.cache and dogpile already.

This commit adds a section to the caching guide that shows people how to
update their configuration files when they need to debug caching issues.

Change-Id: I33d37366ea9caf320f3738db637dea7386ff6448
2020-06-29 09:50:42 -05:00
Zuul 04bfafff8b Merge "Update caching-layer.rst" 2020-06-16 15:43:58 +00:00
Vishakha Agarwal 28512ca569 Update caching-layer.rst
This patch updates about the implementation of oslo.cache for
caching in keystone.

Change-Id: I8b5b4d3c8d8b3ae99305cc69657571f5983e1004
2020-06-01 12:29:12 +05:30
Jason Anderson feaf034438
Support regexes in whitelists/blacklists
This adds support for the "regex" flag for both the "whitelist" and
"blacklist" conditional types. Before, only the "any_one_of" and
"not_any_of" conditionals supported this. Similar to the pre-existing
regex logic, the patterns are matched from the beginning of the string,
meaning you may need prefix them with ".*" if you do not care about the
first characters of the match.

Closes-Bug: #1880252
Change-Id: Ia51f47a58712c7230753f2cfa0c87b83a7339bf9
2020-05-26 11:00:21 -05:00
Vishakha Agarwal f8317375ab Update doc id-manage.rst
This patch removes about controller and replaces it with API. It
also add some links to the details mentioned in doc.

Change-Id: I558e6db1e0e920a5a22c1708e35553f1af678476
2020-05-20 14:48:27 +05:30
Zuul b3d3735138 Merge "Add expiring user group memberships on mapped authentication" 2020-04-10 00:18:37 +00:00
Kristi Nikolla 8153a9d592 Add expiring user group memberships on mapped authentication
When a federated user authenticates, they are added to their
mapped groups during shadowing.

Closes-Bug: 1809116

Change-Id: I19dc400b2a7aa46709b242cdeef82beaca975ff3
2020-04-07 19:30:57 -04:00
Zuul c6c214ea43 Merge "Document the "immutable" resource option" 2020-04-02 14:45:50 +00:00
Zuul 9f9040257f Merge "Add openstack_groups to assertion" 2020-03-23 19:24:38 +00:00
Vishakha Agarwal dda426b61a Add openstack_groups to assertion
Currently, a keystone IdP does not provide the
groups to which user belong when generating SAML
assertions.This patch adds an additional attribute
called "openstack_groups" in the assertion.

Change-Id: I205e8bbf9a4579b16177f57e29e363f4205a2b48
Closes-Bug: #1641625
2020-03-19 20:14:41 +05:30
Colleen Murphy 34f6144a47 Document the "immutable" resource option
Roles, projects, and domains can accept "immutable" as a resource
option. This change explains the option in the admin guide and updates
the API reference to mention it.

Change-Id: I95926927472f6418f97a08fea0ebd56da04ce7a5
Related-bug: #1823258
2020-03-17 14:33:29 -07:00
Colleen Murphy 2e97ec5770 Add docs about bootstrapping immutable roles
Add a note to the ``keystone-manage bootstrap`` documentation about the
behavior of immutable roles.

Change-Id: I1cdbdc8668ed4312660ec269c40e1259517b327c
Depends-on: https://review.opendev.org/705859
2020-02-11 10:59:01 -08:00
Zuul ef3b65e7fd Merge "Update OIDC documentation to handle bearer access token flow" 2020-01-29 15:40:37 +00:00
zhufl a4b7a6106e Fix duplicated words issue like "each each user_id"
This is to fix the duplicated words issue like
"one for each each user_id in the provided group_id".

Change-Id: Iacb8e713253288d203834355f1de12482c2c029e
2020-01-06 13:50:35 +08:00
pedro 01a8c1fcab Update OIDC documentation to handle bearer access token flow
Also add a section of multiple Identity Providers configuration.

Change-Id: I398b151904c9c5c9d0c3ab4358074e8adcfd1b6c
2019-12-26 16:44:57 -03:00