-
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
[Security Solution][Endpoint] Add RBAC to Endpoint Policy List and Policy Details pages #146480
[Security Solution][Endpoint] Add RBAC to Endpoint Policy List and Policy Details pages #146480
Conversation
…adEndpointList` authz
…olicyManagement`
… (should be policy list, not endpoint list by default)
Pinging @elastic/security-onboarding-and-lifecycle-mgt (Team:Onboarding and Lifecycle Mgt) |
…policy-list-and-details
f67c59e
to
395616c
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.
looks and works great! 👏
@@ -16,10 +16,11 @@ import { getEndpointListPath, getPoliciesPath } from '../../../../common/routing | |||
import { APP_UI_ID } from '../../../../../../common/constants'; | |||
|
|||
/** | |||
* Returns a link component that navigates to the endpoint list page filtered by a specific policy |
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.
nice! 🔥
@@ -95,106 +111,101 @@ describe('links', () => { | |||
}); | |||
|
|||
describe('Host Isolation Exception', () => { |
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.
awesome! thanks a lot for updating these tests!
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 just finished merging in your PR and how I did not loose any of your changes (I had merge conflicts 🤞 )
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.
Looks great! Just left a question on a FF usage.
Also, I saw in the description gif that Host Isolation Exceptions
tab appears in Policy Details page after saving it, is it expected?
@@ -61,12 +64,23 @@ export const PolicyFormLayout = React.memo(() => { | |||
const [showConfirm, setShowConfirm] = useState<boolean>(false); | |||
const [routeState, setRouteState] = useState<PolicyDetailsRouteState>(); | |||
const policyName = policyItem?.name ?? ''; | |||
const hostListRouterPath = getEndpointListPath({ name: 'endpointList' }); | |||
const isPolicyListEnabled = useIsExperimentalFeatureEnabled('policyListEnabled'); |
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.
Why do we need to check this?
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.
Unfortunately this feature flag is still there, so we need it to determine where the user will be redirected to when they click the cancel
button. If this feature is on
then the default should be policy list page. Else, it should be the Endpoint list (that is what it was before).
I'm hoping that we can clean up several FF in this 8.7 release
…policy-list-and-details # Conflicts: # x-pack/plugins/security_solution/public/management/links.test.ts # x-pack/plugins/security_solution/public/management/links.ts
Thanks @dasansol92 .
I'm not sure. Probably not, but I did not touch that because there is an issue to track updating those tabs. My guess is that the |
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Async chunks
Page load bundle
Unknown metric groupsasync chunk count
ESLint disabled in files
ESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: |
Summary
read
permissionsread
orwrite
permissions, the link to the Policy list is remove from the Security Solution management pageread
, then the Policy Details save button is removed and all form controls (ex. switches, checkboxes, etc) are disabledread
permissions to the Endpoint list page, then the policy listEndpoints
column is displayed as plain text (no link)Cancel
button on the Policy Details, which was redirecting the user by default to the Endpoint List - correct behavior is to redirect to the policy list by default