You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A valid model returns an error error running tests due to rpc error: code = Code(2056) desc = the definition of relation 'can_purchase' in object type 'card' is invalid: no entrypoints defined
The DSL seems to parse correctly (CLI transforms it and VS Code shows no validation errors), but the server still returns an error.
Expectation
Tests run successfully on this model.
Reproduction
Run > fga model test --tests stripe.fga.yaml in console
Store data
stripe.fga.yaml model
model: |
model
schema 1.1
# Stripe Core Module
type user
type account
relations
define owner: [user]
define admin: [user] or owner
define iam_admin: [user] or admin
define developer: [user] or admin
define transfer_analyst: [user] or admin
define view_only: [user] or admin
define transfer_analyst_in_test_mode: transfer_analyst but not transfer_analyst from test_mode # intermediate relations, just used for evaluating other relations
define card: [card] # dual-writes relationships, when you need to traverse relations on two types both ways (starting at card up or account down)
define cardholder: cardholder from card
define cardholder_in_test_mode: cardholder but not cardholder from test_mode
define test_mode: [account]
define can_close_account: owner
define can_change_owner: owner
define can_invite: iam_admin
define can_add_bank_account: admin but not admin from test_mode # exclusion operator
define can_delete_default_bank_account: owner
type bank_account
relations
define account: [account]
define can_delete_bank_account: admin from account
define can_view: admin from account
define can_transfer_balance: transfer_analyst from account but not transfer_analyst_in_test_mode from account
# Stripe Payments Module
type payment
type subscription
type invoice
# Stripe Issuing Module
type card
relations
define account: [account]
define cardholder: [user]
define digital_wallet: [digital_wallet]
define active: [card]
define can_purchase: cardholder from active but not cardholder_in_test_mode from account
define can_view_transactions: cardholder or admin from account
define spending_limit_policy: [card#cardholder with spending_limit]
type transaction
relations
define card: [card]
define can_view: can_view_transactions from card
OpenFGA version
just testing model
How are you running OpenFGA?
In Docker
What datastore are you using?
In-Memory
OpenFGA Flags
n/a
Logs
No response
The text was updated successfully, but these errors were encountered:
tylernix
changed the title
Authorization Model returning "invalid: no entrypoints defined" error
Authorization model returning "invalid: no entrypoints defined" error
Mar 20, 2024
Checklist
Description
A valid model returns an error
error running tests due to rpc error: code = Code(2056) desc = the definition of relation 'can_purchase' in object type 'card' is invalid: no entrypoints defined
The DSL seems to parse correctly (CLI transforms it and VS Code shows no validation errors), but the server still returns an error.
Expectation
Tests run successfully on this model.
Reproduction
Run
> fga model test --tests stripe.fga.yaml
in consoleStore data
stripe.fga.yaml model
OpenFGA version
just testing model
How are you running OpenFGA?
In Docker
What datastore are you using?
In-Memory
OpenFGA Flags
n/a
Logs
No response
The text was updated successfully, but these errors were encountered: