Enforcing allowed features - config#7939
Enforcing allowed features - config#7939DMallare wants to merge 3 commits intodmallare/enforcing-allowed-features-pluginsfrom
Conversation
|
|
@DMallare, please consider creating a changeset entry in |
1a7bdb9 to
8bb665b
Compare
121b1b4 to
329f165
Compare
lrlna
left a comment
There was a problem hiding this comment.
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.
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.
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.
7d9448e to
58ad54b
Compare
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. ↩