@ddd-ts-kit/openfga 0.113.2 → 0.114.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.fr.md CHANGED
@@ -1,5 +1,5 @@
1
1
  [English](README.md) · **Français**
2
- <!-- translation-of: README.md sha256:7389dc2d40830bbe -->
2
+ <!-- translation-of: README.md sha256:aa05c4bd223ba67c -->
3
3
 
4
4
  # @ddd-ts-kit/openfga
5
5
 
@@ -17,7 +17,7 @@ npm install @ddd-ts-kit/openfga @openfga/sdk
17
17
  seul point d'entrée `/sdk`. Le point d'entrée principal accepte tout client conforme à
18
18
  `OpenFgaApi`, le sous-ensemble du client officiel qu'appellent les adaptateurs.
19
19
 
20
- ![Les trois fonctions du package dans une application : les cas d'usage interrogent le port Authorizer, que OpenFgaAuthorizer implémente avec Check et ListObjects ; un adaptateur du contexte écrit les tuples après la validation par le port RelationTupleStore, que OpenFgaRelationTupleStore implémente avec Write et Read ; le schéma de relations est la seule source du modèle, qu'authorizationModelOf génère et que ensureAuthorizationModel ou modelDrift écrivent ou comparent sur le serveur](https://raw.githubusercontent.com/gbourgeat/ddd-ts-kit/main/docs/assets/diagrams/openfga-place-in-an-application.fr.svg)
20
+ ![Les trois fonctions du package dans une application : les cas d'usage interrogent le port Authorizer, que OpenFgaAuthorizer implémente avec Check et ListObjects ; un adaptateur du contexte écrit les tuples après la validation par le port RelationTupleStore, que OpenFgaRelationTupleStore implémente avec Write et Read ; le schéma de relations est la seule source du modèle, qu'authorizationModelOf génère et que ensureAuthorizationModel ou modelDrift écrivent ou comparent sur le serveur](https://raw.githubusercontent.com/ddd-ts-kit/ddd-ts-kit/main/docs/assets/diagrams/openfga-place-in-an-application.fr.svg)
21
21
 
22
22
  Le *package* remplit trois fonctions, chacun auprès d'un magasin d'un serveur OpenFGA : il décide
23
23
  (`OpenFgaAuthorizer`), il tient les tuples (`OpenFgaRelationTupleStore`) et il garde le modèle du
@@ -192,7 +192,7 @@ export const authorizer = new OpenFgaAuthorizer({ client, schema: relationshipSc
192
192
  `NO_RELATION`) : `Check` décide, `ListObjects` donne le périmètre d'une recherche
193
193
  (`{ kind: 'ids' }`). Un projet passe de l'un à l'autre par la liaison, rien d'autre ne change.
194
194
 
195
- ![À gauche, check : un acteur anonyme est refusé avec ANONYMOUS, une vérification sans ressource avec RESOURCE_REQUIRED, une permission sans relation associée avec UNMAPPED_PERMISSION, tous avant le moindre appel ; sinon Check sur le serveur renvoie allowed ou NO_RELATION. À droite, listAccessible : un acteur anonyme ou une permission sans relation associée donne le périmètre none ; sinon ListObjects, refusé avec ReverseExpansionLimitError quand la réponse atteint listObjectsLimit, et sinon le périmètre ids](https://raw.githubusercontent.com/gbourgeat/ddd-ts-kit/main/docs/assets/diagrams/openfga-authorizer-decisions.fr.svg)
195
+ ![À gauche, check : un acteur anonyme est refusé avec ANONYMOUS, une vérification sans ressource avec RESOURCE_REQUIRED, une permission sans relation associée avec UNMAPPED_PERMISSION, tous avant le moindre appel ; sinon Check sur le serveur renvoie allowed ou NO_RELATION. À droite, listAccessible : un acteur anonyme ou une permission sans relation associée donne le périmètre none ; sinon ListObjects, refusé avec ReverseExpansionLimitError quand la réponse atteint listObjectsLimit, et sinon le périmètre ids](https://raw.githubusercontent.com/ddd-ts-kit/ddd-ts-kit/main/docs/assets/diagrams/openfga-authorizer-decisions.fr.svg)
196
196
 
197
197
  Ce que reçoivent le *middleware* d'autorisation et un gestionnaire de recherche, avec les tuples
198
198
  de l'exemple (`ada` assiste l'agenda du Dr Grace, qui contient le rendez-vous 42) :
package/README.md CHANGED
@@ -16,7 +16,7 @@ npm install @ddd-ts-kit/openfga @openfga/sdk
16
16
  only. The main entry takes any client that fits `OpenFgaApi`, the subset of the official
17
17
  client the adapters call.
18
18
 
19
- ![The three jobs of the package in an application: the use cases ask the Authorizer port, which OpenFgaAuthorizer implements with Check and ListObjects; a context adapter writes tuples after the commit through the RelationTupleStore port, which OpenFgaRelationTupleStore implements with Write and Read; the relationship schema is the one source of the model, which authorizationModelOf generates and ensureAuthorizationModel or modelDrift write or compare on the server](https://raw.githubusercontent.com/gbourgeat/ddd-ts-kit/main/docs/assets/diagrams/openfga-place-in-an-application.svg)
19
+ ![The three jobs of the package in an application: the use cases ask the Authorizer port, which OpenFgaAuthorizer implements with Check and ListObjects; a context adapter writes tuples after the commit through the RelationTupleStore port, which OpenFgaRelationTupleStore implements with Write and Read; the relationship schema is the one source of the model, which authorizationModelOf generates and ensureAuthorizationModel or modelDrift write or compare on the server](https://raw.githubusercontent.com/ddd-ts-kit/ddd-ts-kit/main/docs/assets/diagrams/openfga-place-in-an-application.svg)
20
20
 
21
21
  The package does three jobs, each against one store of an OpenFGA server: it decides
22
22
  (`OpenFgaAuthorizer`), it holds the tuples (`OpenFgaRelationTupleStore`) and it keeps the model
@@ -190,7 +190,7 @@ export const authorizer = new OpenFgaAuthorizer({ client, schema: relationshipSc
190
190
  `NO_RELATION`): `Check` decides, `ListObjects` gives the scope of a search (`{ kind: 'ids' }`).
191
191
  A project moves between the two by binding, nothing else changes.
192
192
 
193
- ![Left, check: an anonymous actor is denied ANONYMOUS, a check without a resource RESOURCE_REQUIRED, an unmapped permission UNMAPPED_PERMISSION, all before any call; otherwise Check on the server answers allowed or NO_RELATION. Right, listAccessible: anonymous or unmapped gives the scope none; otherwise ListObjects, refused with ReverseExpansionLimitError when the answer reaches listObjectsLimit, else the scope ids](https://raw.githubusercontent.com/gbourgeat/ddd-ts-kit/main/docs/assets/diagrams/openfga-authorizer-decisions.svg)
193
+ ![Left, check: an anonymous actor is denied ANONYMOUS, a check without a resource RESOURCE_REQUIRED, an unmapped permission UNMAPPED_PERMISSION, all before any call; otherwise Check on the server answers allowed or NO_RELATION. Right, listAccessible: anonymous or unmapped gives the scope none; otherwise ListObjects, refused with ReverseExpansionLimitError when the answer reaches listObjectsLimit, else the scope ids](https://raw.githubusercontent.com/ddd-ts-kit/ddd-ts-kit/main/docs/assets/diagrams/openfga-authorizer-decisions.svg)
194
194
 
195
195
  What the authorization middleware and a search handler receive, with the tuples of the
196
196
  example (`ada` assists the calendar of Dr Grace, which holds appointment 42):
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ddd-ts-kit/openfga",
3
- "version": "0.113.2",
3
+ "version": "0.114.1",
4
4
  "description": "The relation tuple store and the authorizer of @ddd-ts-kit/auth on OpenFGA, with the authorization model generated from the relationship schema.",
5
5
  "keywords": [
6
6
  "ddd",
@@ -17,11 +17,11 @@
17
17
  "license": "MIT",
18
18
  "repository": {
19
19
  "type": "git",
20
- "url": "git+https://github.com/gbourgeat/ddd-ts-kit.git",
20
+ "url": "git+https://github.com/ddd-ts-kit/ddd-ts-kit.git",
21
21
  "directory": "packages/openfga"
22
22
  },
23
- "homepage": "https://gbourgeat.github.io/ddd-ts-kit/packages/openfga/",
24
- "bugs": "https://github.com/gbourgeat/ddd-ts-kit/issues",
23
+ "homepage": "https://ddd-ts-kit.github.io/ddd-ts-kit/packages/openfga/",
24
+ "bugs": "https://github.com/ddd-ts-kit/ddd-ts-kit/issues",
25
25
  "publishConfig": {
26
26
  "access": "public",
27
27
  "provenance": true
@@ -45,8 +45,8 @@
45
45
  "dist"
46
46
  ],
47
47
  "dependencies": {
48
- "@ddd-ts-kit/auth": "0.113.2",
49
- "@ddd-ts-kit/kernel": "0.113.2"
48
+ "@ddd-ts-kit/auth": "0.114.1",
49
+ "@ddd-ts-kit/kernel": "0.114.1"
50
50
  },
51
51
  "peerDependencies": {
52
52
  "@openfga/sdk": "^0.9.7"
@@ -57,7 +57,7 @@
57
57
  }
58
58
  },
59
59
  "devDependencies": {
60
- "@ddd-ts-kit/testing": "0.113.2",
60
+ "@ddd-ts-kit/testing": "0.114.1",
61
61
  "@openfga/sdk": "0.9.7"
62
62
  }
63
63
  }