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.1.dev1.tar.gz (108.4 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.1.dev1.tar.gz.

File metadata

File hashes

Hashes for keystone_role_assignment_openfga-0.1.1.dev1.tar.gz
Algorithm Hash digest
SHA256 44f95123afbedcd29638a7d3eed9a562d726335d2a840a8f9d46aeb24ddcff8b
MD5 6dd6405fc7ee07e0c2e92c574feed7d6
BLAKE2b-256 fedb1a04edc3967231b3c90b00025c98d05c7cddb02fbe5c806eeb21c5032e4d

See more details on using hashes here.

Provenance

The following attestation bundles were made for keystone_role_assignment_openfga-0.1.1.dev1.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.1.dev1-py3-none-any.whl.

File metadata

File hashes

Hashes for keystone_role_assignment_openfga-0.1.1.dev1-py3-none-any.whl
Algorithm Hash digest
SHA256 6b32dcdee2d495298ade23d9ce4735bd18c3fbc3231ded36886cf5976bcdb8ed
MD5 1adad8bb2be04e4c23c0eb45dbcb711a
BLAKE2b-256 778a9480199b1e30e16a72389a7477c6855ec312c8a159a8c6dfde6498a533ee

See more details on using hashes here.

Provenance

The following attestation bundles were made for keystone_role_assignment_openfga-0.1.1.dev1-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