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
From a security perspective, I want to make the automatic generation of queries for readmodels configurable.
Given a readmodel ConsumerProfile Booster exposes by default GraphQL queries ConsumerProfileReadModelConsumerProfileReadModelsListConsumerProfileReadModels.
Awesome! In my case, I only require the ConsumerProfileReadModel and I don't want to expose the other queries. Now I prevented access to those, by adding a role that no user has.
Note that this way of expressing what to generate needs more iteration. First draft...
Altered the ReadModel decorator, so that we can express the queries or subscriptions to generate. When the Booster Config value is enableAutomaticGraphQLQueryGenerationFromReadModels = false than developers have to explicitly define what to generate, when it is false, it can be omitted and all queries will be generated.
Instead of looping over all the readmodels to generate the respective GraphQL queries, we filter out based on the above config what queries to generate for a given ReadModel.
From my companies perspective we really require this feature, in order to be inline with our security policies/beliefs. It's my first time contributing to open source and to Booster, so please be critical and supportive :)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hey
The suggestion
From a security perspective, I want to make the automatic generation of queries for readmodels configurable.
Given a readmodel
ConsumerProfile
Booster exposes by default GraphQL queriesConsumerProfileReadModel
ConsumerProfileReadModels
ListConsumerProfileReadModels
.Awesome! In my case, I only require the
ConsumerProfileReadModel
and I don't want to expose the other queries. Now I prevented access to those, by adding a role that no user has.The improvement
public enableAutomaticGraphQLQueryGenerationFromReadModels = true
This will make the feature backwards-compatible.
Altered the ReadModel decorator, so that we can express the queries or subscriptions to generate. When the Booster Config value is
enableAutomaticGraphQLQueryGenerationFromReadModels = false
than developers have to explicitly define what to generate, when it is false, it can be omitted and all queries will be generated.Instead of looping over all the readmodels to generate the respective GraphQL queries, we filter out based on the above config what queries to generate for a given ReadModel.
From my companies perspective we really require this feature, in order to be inline with our security policies/beliefs. It's my first time contributing to open source and to Booster, so please be critical and supportive :)
Here is the fork with branch: https://github.com/msnm/booster/tree/feature/make-graphql-queries-based-on-readmodels-configurable
Beta Was this translation helpful? Give feedback.
All reactions