Skip to main content

OpenFGA relationship authorization provider plugin for Spakky Auth

Project description

spakky-openfga

spakky-openfga는 Spakky Auth의 relation 기반 인가를 OpenFGA check로 수행하는 provider 플러그인입니다. @require_relation metadata를 OpenFGA tuple model과 store/client 설정에 연결합니다.

Auth Provider Capability

플러그인은 다음 capability를 구현하는 OpenFgaAuthProvider를 등록합니다.

  • AuthCapability.RELATION_CHECK
  • AuthCapability.POLICY_EVALUATION

RelationCheckRequest.relationAuthorizationRequest.action은 OpenFGA relation으로 매핑됩니다. AuthContext.subject.id는 OpenFGA user로 매핑되고, resource/tenant canonical ref는 OpenFGA object 문자열로 매핑됩니다.

설정

OpenFgaConfig는 settings Pod로 등록되며 SPAKKY_OPENFGA_* 환경변수를 읽습니다. OpenFGA API URL, store id, optional authorization model id, principal type, tenant/object 매핑 설정을 담습니다. 기본적으로 type prefix가 없는 subject id는 user:<subject>로 매핑되고, tenant ref는 <tenant>/<resource> 형태로 object ref 앞에 붙습니다.

주요 설정:

  • SPAKKY_OPENFGA_API_URL
  • SPAKKY_OPENFGA_STORE_ID
  • SPAKKY_OPENFGA_AUTHORIZATION_MODEL_ID
  • SPAKKY_OPENFGA_PRINCIPAL_TYPE
  • SPAKKY_OPENFGA_INCLUDE_TENANT_IN_OBJECT

범위 밖

이 패키지는 tuple write, authorization model migration, admin CLI/API, list resources, data/query filtering, tuple/model management surface를 제공하지 않습니다.

Provider를 사용할 수 없는 상태는 AuthorizationReasonCode.VERIFICATION_PROVIDER_UNAVAILABLE reason code를 가진 ERROR authorization decision으로 매핑됩니다.

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

spakky_openfga-6.9.1.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

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

spakky_openfga-6.9.1-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

Details for the file spakky_openfga-6.9.1.tar.gz.

File metadata

  • Download URL: spakky_openfga-6.9.1.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for spakky_openfga-6.9.1.tar.gz
Algorithm Hash digest
SHA256 59271cee49dd7ba713042f3cde2fb2a226176213a0a4c7d011ded6c42875a32c
MD5 a8130de79595924818293f6044f097d2
BLAKE2b-256 efcac1bfe73d639bbba5f2a509e98131e57c88bfc05de2bb94005ab42ceb4c1e

See more details on using hashes here.

Provenance

The following attestation bundles were made for spakky_openfga-6.9.1.tar.gz:

Publisher: release.yml on E5presso/spakky-framework

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

File details

Details for the file spakky_openfga-6.9.1-py3-none-any.whl.

File metadata

  • Download URL: spakky_openfga-6.9.1-py3-none-any.whl
  • Upload date:
  • Size: 9.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for spakky_openfga-6.9.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d14c7d10d6920fbc6d2bcc55a3e9d8d12dc43bbca80a5e1b03ad0416cc1a9c2d
MD5 01b9e0a756bf501f6d670924dd82be4b
BLAKE2b-256 2871bee8cb444d31a07a93fd5957c9bef9a0e2dbb2c79a24d30902002523ef95

See more details on using hashes here.

Provenance

The following attestation bundles were made for spakky_openfga-6.9.1-py3-none-any.whl:

Publisher: release.yml on E5presso/spakky-framework

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