-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[RAC] Disable RAC multi-tenancy #108506
[RAC] Disable RAC multi-tenancy #108506
Conversation
Yeah, I think this is absolutely acceptable and let's prioritize other work over figuring that out. Thanks! |
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.
This LGTM, thanks for walking me through the functionality!
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.
LGTM 👍
@@ -13,8 +13,14 @@ export const config = { | |||
write: schema.object({ | |||
enabled: schema.boolean({ defaultValue: false }), |
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.
Shall we change xpack.ruleRegistry.write.enabled
to true
by default now?
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.
It'll happen as part of #105237 and the "final wrap up" 👍
if (!hasEnabledWrite) return false; | ||
|
||
// Not using legacy multi-tenancy | ||
if (!hasSetCustomKibanaIndex) { | ||
return hasEnabledWrite; | ||
} else { | ||
return hasSetUnsafeAccess; | ||
} |
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.
Nit: maybe this could be easier to grasp (totally subjective)
if (hasEnabledWrite) {
return hasSetCustomKibanaIndex ? hasSetUnsafeAccess : true;
}
return false;
💚 Build SucceededMetrics [docs]Unknown metric groupsAPI count
API count missing comments
History
To update your PR or re-run it, just comment with: cc @Kerry350 |
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.
LGTM
* Disable RAC multi-tenancy
💚 Backport successful
This backport PR will be merged automatically after passing CI. |
* Disable RAC multi-tenancy Co-authored-by: Kerry Gallagher <[email protected]>
Summary
Implements #108393.
Customisation of the index used by the rule registry is no longer allowed. User's with
kibana.index
set will, by default, have no rule data written. They can however opt into an unsafe experience usingxpack.ruleRegistry.unsafe.legacyMultiTenancy.enabled
.(Please see the ticket for more details).
Testing
Make sure you have a user with the ability to create indices for the later steps, when you set a custom kibana.index
The expectation is still that
xpack.ruleRegistry.write.enabled
has been set totrue
Flows
Flow: User without a custom
kibana.index
Expectation: Data is written and viewable as normal
Flow: User has a custom
kibana.index
setExpectation: Data isn't written
Flow: User has a custom
kibana.index
set andxpack.ruleRegistry.unsafe.legacyMultiTenancy.enabled
set totrue
Expectation: Data is written and viewable
UI disabling
Right now the
alerts
UI and table isn't disabled (this won't break anything as there will be no data to query). We don't have access tokibana.index
easily on the client side as we do on the server side. So we need to share information from the server side of the rule registry plugin, with the client side of the observability plugin. As it's server -> client we can't do a simple contract access. We could setup an API route. (Maybe I've missed an option 🤔). Jason and I discussed this, and it might be okay that the table displays, but just doesn't contain any data.