Skip to content

feat: grant roles on services to groups #105

Closed

Description

@uniqueg

Why?

Owners can grant roles on their services to individual users only (#62), by LS Login sub or, after #101, by invitation link. Some ELIXIR nodes maintain groups for their teams in Perun / LS Login (released in eduperson_entitlement). If such a group could own a service, team changes would be handled centrally in Perun instead of per service in the registry. Whether a node uses this is up to the node.

How?

Requires FOCA support for resource roles of groups (elixir-cloud-aai/foca#316, FOCA v0.15.0).

  1. Endpoints (additions spec): PUT and DELETE /services/{serviceId}/permissions/groups/{entitlement} with {"role": "owner" | "maintainer"}, next to the user endpoints; GET /services/{serviceId}/permissions lists user and group roles, with their type. The entitlement is URL-encoded in the path.
  2. Who may grant to which group: owners (and admins) may grant roles only to groups they are a member of (i.e., whose entitlement is in their own eduperson_entitlement); admins may grant to any group. Otherwise, any owner could hand a service to an arbitrary group.
  3. Config: enable FOCA's option to keep group claim values without a mapping as subjects (feat: grant resource roles to groups foca#316), so that group roles also apply while the admin group is mapped (group_mapping).
  4. Last owner rule (Cloud Registry backend: public read access, service ownership, ECP_CLN:ADMIN admin role #62): a group counts as an owner, so a service may be left with a group as its only owner; document that it then depends on the group's membership in Perun.
  5. GET /me (Cloud Registry backend: public read access, service ownership, ECP_CLN:ADMIN admin role #62) lists roles the caller has through groups, too.
  6. Tests: grant/revoke/list group roles; a member of the group can update the service, a non-member cannot; granting to a group the owner is not a member of is refused (403); admins can grant to any group. Docs.

Acceptance criteria

  • An owner who is a member of a group can make it owner or maintainer of their service; all members of the group then have that role.
  • Owners cannot grant roles to groups they are not a member of.
  • User and group roles are listed together and distinguishable.

Dependencies: elixir-cloud-aai/foca#316 (FOCA v0.15.0), #62. Related: #101 (invitations by link). The UI part will be tracked in cloud-registry-ui.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions