quarkiverse / quarkus-openfga-client

Quarkus extension for OpenFGA support
https://openfga.dev
Apache License 2.0
10 stars 7 forks source link

Authorization-Model-Id is required when using default-model #138

Open TalkingSiren opened 5 months ago

TalkingSiren commented 5 months ago

Hello together,

I want to have a check if all the types are available in the schema, before starting the service (Liveness/readiness check).

When I Inject the AuthorizationModelClient, it does not work. Every time, it throws the error message below. If I use the Inject in request-scope later on, the logic works fine.

If I create tests and use the dev-service, it works fine! It's just not working, whether build and deployed or using the official openfga docker container!

Given:

%dev.quarkus.openfga.url=http://localhost:8081 %dev.quarkus.openfga.store=test

Caused by: io.quarkiverse.openfga.client.model.FGAValidationException: invalid ReadAuthorizationModelRequest.Id: value does not match regex pattern "^[ABCDEFGHJKMNPQRSTVWXYZ0-9]{26}$"

JavaClasses: fga.zip

corentin59 commented 1 month ago

Same problem