Skip to main content

OpenStack Keystone role assignment plugin using OpenFGA

Project description

This project implements a backend plugin for Keystone to manage role assignments not in the Keystone database, but in the OpenFGA.

It is expected that every role assignment in Keystone context is represented by a relation in the OpenFGA (ReBAC) between user/group and project/domain.

model
  schema 1.1

type domain

type user
  relations
    define owner: [domain]

type group
  relations
    define member: [user, group#member]
    define owner: [domain]

type project
  relations
    define admin: [user, group#member]
    define manager: [user, group#member] or admin
    define member: [user, group#member] or admin or manager
    define owner: [domain]
    define reader: [user, group#member] or member or admin
    define service: [system]

type system
  relations
    define admin: [user, group#member]
    define member: [user, group#member] or admin
    define reader: [user, group#member] or member or admin
    define system: [user, group#member]

Delegating role assignments to the OpenFGA allows to improve integration of OpenStack with the external IdP and authorization system to centrally manage user authorizations for different service providers (improves service provider role of OpenStack).

Installation

For the moment the project is not being published to the PyPi so you can install it from git repository.

Install the project into the virtual environment with the Keystone using pip install .

Configuration

In order to enable the integration it is necessary to make few changes in the keystone.conf

[fga]
api_url = <OPEN_FGA_URL>
store_id = <OPENFGA_STORE_ID>
model_id = <OPENFGA_MODEL_ID>

...

[assignment]
driver = openfga

Additional considerations

  1. OpenFGA must be highly available. In this deployment style OpenStack will query OpenFGA for at least every authentication request.

  2. Having many roles requires expanding OpenFGA authorization model to define every role as a relation. This is not very scalable but at the same time unavoidable due to the nature of role assignments in OpenStack being a triplets (actor-role-object).

  3. Keystone and OpenFGA both have methods of inheriting/inferring roles through role inferrence, group membership, domain to project delegation and so on. Currently Keystone does not support delegating such decisions to the backend and instead reimplements it internally. This has an effect that when certain role is granted between assignee and the object it is not possible to learn how is this achieved (as a direct assignment of through inheritance). It is strongly advised to keep role inferrence and user/group relations in sync between Keystone and OpenFGA to reduce confusion.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

keystone_role_assignment_openfga-0.1.0.tar.gz (108.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file keystone_role_assignment_openfga-0.1.0.tar.gz.

File metadata

File hashes

Hashes for keystone_role_assignment_openfga-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f42afac0baa9c80bcabbf29c8144f53b33e67b2a0abef8b33ad6ff0bb2fdeb8a
MD5 fb9769cec72bfcd028cfd0987d89a633
BLAKE2b-256 3a508dac24d806fc2724b5a04ea9bddf036e7d2256c1cf2d7f5a951fdde4fb6a

See more details on using hashes here.

Provenance

The following attestation bundles were made for keystone_role_assignment_openfga-0.1.0.tar.gz:

Publisher: release.yml on gtema/keystone-role-assignment-openfga

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file keystone_role_assignment_openfga-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for keystone_role_assignment_openfga-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 360ed18b9e3d1f823b43a10edc40854bf8180f78a07ad494a822030f8bff9c5f
MD5 27774997aa48eae0b8037ce31ddf7f40
BLAKE2b-256 df9535e7a92eb7d4acf57a4fa6af8302768f9a5fea9e8f735cbc28b92881e06f

See more details on using hashes here.

Provenance

The following attestation bundles were made for keystone_role_assignment_openfga-0.1.0-py3-none-any.whl:

Publisher: release.yml on gtema/keystone-role-assignment-openfga

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page