Repository navigation
Description
Why?
FOCA 0.18 supports several trusted token issuers with settings of their own (elixir-cloud-aai/foca#503, elixir-cloud-aai/foca#510). With two or more issuers, subjects are namespaced by issuer (<issuer>|<sub> by default), so that equal subjects of different issuers are different users. The registry stores subjects in several places and names users in paths, so it needs changes to support several issuers. Deployments with a single issuer are not affected.
What?
-
User paths:
PUT/DELETE /services/{serviceId}/permissions/{userId}: giveuserIdformat: path, because namespaced subjects contain slashes. Match the user with*in the owner rule (owners-change-permissionsinconfig.yaml), as for groups. Update the parameter description. -
Startup checks: make the checks in
app.pyaware ofIssuerConfig. Useissuer_urls, and accept audiences set per issuer. -
Migration: add a script (or a documented
mongoshsnippet) that rewrites the stored subjects of one issuer to the namespaced form:- FOCA policy rules (
user:<sub>, owners and maintainers); created_byof service types (unused-types limit, visibility of pending types);- the
user_namescollection.
The script then calls the adapter's
mark_changed(). - FOCA policy rules (
-
Docs (upgrading, configuration, Helm values):
- Recommend
namespace: ""for the issuer trusted so far, so that its stored subjects stay valid; use the script for anything else. - Document the
IssuerConfigform ofsecurity.auth.issuers. - Add a note that group claim values are not namespaced: issuers must not be able to issue the same groups (e.g., admin groups).
- Recommend
Acceptance criteria
- Equal subjects from two issuers are different users (owners, maintainers, creators of service types).
- Roles can be granted to and revoked from namespaced users via the permissions API.
- An upgrade path for existing deployments that add an issuer is documented and tested.
Requires FOCA 0.18.0. Related: #240 (opt-in admin role).
Activity
fix: refuse groups namespaces, keep pipes