-
Notifications
You must be signed in to change notification settings - Fork 305
Enforcing allowed features - config #7939
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dmallare/enforcing-allowed-features-plugins
Are you sure you want to change the base?
Enforcing allowed features - config #7939
Conversation
|
@DMallare, please consider creating a changeset entry in |
1a7bdb9
to
8bb665b
Compare
121b1b4
to
329f165
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to figure out the data structure / state for allowed_features
. It's state change is not super clear. I left a comment on it in the license_enforcement.rs file. That's probably the only thing to nail down across these two PRs. And again, this will need a bunch of tests, especially integration tests. Otherwise, the direction seems good to me.
// If the license has no allowed_features claim, we're using a pricing plan | ||
// that should have the plugin enabled regardless |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A more philosophical question - if the pricing plan should have all plugins enabled, shouldn't their allowed features just have all the features? It's a bit of strange state as it reads for me right now:
- None - all features are allowed and all plugins should be enabled
- Some(vec![]) - (empty vec) no features are allowed (?)
- Some(vec![AllowedFeature::PersistedQueries]) - only persisted queries are allowed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, your understanding is correct and I see why it looks strange. The reasoning behind what we have currently has to do with the fact that we are only adding the allowed_features
claim to developer/standard licenses for now. In the future, I see us adding this to all types of licenses and then an Enterprise license, for example, would have all allowed features in their claim or maybe even something like ENABLE_ALL
- we can discuss once a design for that comes up.
With the current work that is being done without adding the allowed_features
claim to Enterprise licenses, having None
mean no features enabled would disable everything for Enterprise licenses.
Checklist
Complete the checklist (and note appropriate exceptions) before the PR is marked ready-for-review.
Exceptions
Note any exceptions here
Notes
Footnotes
It may be appropriate to bring upcoming changes to the attention of other (impacted) groups. Please endeavour to do this before seeking PR approval. The mechanism for doing this will vary considerably, so use your judgement as to how and when to do this. ↩
Configuration is an important part of many changes. Where applicable please try to document configuration examples. ↩
A lot of (if not most) features benefit from built-in observability and
debug
-level logs. Please read this guidance on metrics best-practices. ↩Tick whichever testing boxes are applicable. If you are adding Manual Tests, please document the manual testing (extensively) in the Exceptions. ↩