Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

permission-graph

A graph based authorization library

Overview

The permissions graph consists of Vertices and Edges.

Vertices

  • Resource: a resource with predefined actions requiring authorization
  • Actor: an identity that will take actions on resources
  • Group: a named collection of Actors
  • Action: an action on a resource

Edges

  • MemberOf: indicates membership in a collection
    • Actor -> MemberOf -> Group
    • Action -> MemberOf -> Resource
  • Allow: indicates positive permission to act on a resource
    • Actor -> Allow -> Action
    • Group -> Allow -> Action
    • Action -> Allow -> Action
  • Deny: indicates negative permission to act on a resource
    • Actor -> Deny -> Action
    • Group -> Deny -> Action
    • Action -> Deny -> Action
flowchart
    Actor -->|MemberOf|Group -->|Deny| Action -->|MemberOf| Resource
    Actor -->|Allow| Action -->|Allow| Action2 -->|MemberOf| Resource2

Authorizing Access

Authorization to act on a resource is decided by finding the shortest path between a actor and the action to be performed. If that shortest path is an ALLOW rule, the actor is authorized. If that shortest path is a DENY rule, or if there is no path between the actor and the action, the actor is not authorized.

In the event there is a tie for shortest path, the access will be denied only if all shortest paths are DENY rules. This behavior can be controlled when initializing the permission graph via the tie_breaker_policy parameter.

Metadata

Release files for permission-graph 0.1.0a1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for permission-graph 0.1.0a1
File Size Uploaded Provenance Actions
permission_graph-0.1.0a1.tar.gz 6.4 kB Without provenance Details for permission_graph-0.1.0a1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for permission-graph 0.1.0a1
File Interpreter ABI Platform Actions
permission_graph-0.1.0a1-py3-none-any.whl Python 3 none any Details for permission_graph-0.1.0a1-py3-none-any.whl

Total release size: 12.6 kB

Release files / permission_graph-0.1.0a1.tar.gz

Download URL permission_graph-0.1.0a1.tar.gz
Size 6.4 kB
Tags Source
SHA-256 checksum
How to use checksums
c40506378d99c4cbed605e890c90c06290b0a4809e1d6f61a946e05b41ca3bf2
BLAKE2b-256 checksum
How to use checksums
a2ed511d25a7fd699bb480c56bf776e80ebfa43a509c825327aa4842cb42b847
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release files / permission_graph-0.1.0a1-py3-none-any.whl

Download URL permission_graph-0.1.0a1-py3-none-any.whl
Size 6.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
81905e7c2bea7ab9a97d386dcb1b8b5d0e1a90c01b224e1d1159eb0b10a6bda2
BLAKE2b-256 checksum
How to use checksums
7ca71bad1c0576305ad99974210f26dcf7e81500b98089364e549907e0e9ef72
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Security for permission-graph 0.1.0a1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page