Skip to content

Commit

Permalink
[Fleet] Enable subfeature privileges (#179889)
Browse files Browse the repository at this point in the history
## Summary

Resolve [#179546](#179546)

Enable subfeature privileges.

Added a message in the tooltip that feature is in technical preview.

<img width="788" alt="Screenshot 2024-04-03 at 2 28 54 PM"
src="https://github.com/elastic/kibana/assets/1336873/cbc3f963-2b8c-40a7-8450-e5949ce4e19d">


## Release note

Add subfeatures privileges for Fleet, for Agents, Agent policies and
Settings, that feature is in technical preview and may be changed or
removed completely in a future release.

---------

Co-authored-by: Kyle Pollich <[email protected]>
Co-authored-by: Kibana Machine <[email protected]>
Co-authored-by: Julia Bardi <[email protected]>
  • Loading branch information
4 people authored Apr 12, 2024
1 parent f248783 commit c837518
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 4 deletions.
2 changes: 1 addition & 1 deletion x-pack/plugins/fleet/common/experimental_features.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const allowedExperimentalValues = Object.freeze<Record<string, boolean>>(
remoteESOutput: true,
agentless: false,
enableStrictKQLValidation: false,
subfeaturePrivileges: false,
subfeaturePrivileges: true,
enablePackagesStateMachine: true,
advancedPolicySettings: true,
});
Expand Down
3 changes: 2 additions & 1 deletion x-pack/plugins/fleet/server/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,8 @@ export class FleetPlugin
app: [PLUGIN_ID],
catalogue: ['fleet'],
privilegesTooltip: i18n.translate('xpack.fleet.serverPlugin.privilegesTooltip', {
defaultMessage: 'All Spaces is required for Fleet access.',
defaultMessage:
'All Spaces is required for Fleet access. Subfeatures privileges functionality is in technical preview and may be changed or removed completely in a future release.',
}),
reserved: {
description:
Expand Down
13 changes: 12 additions & 1 deletion x-pack/test/api_integration/apis/security/privileges.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,18 @@ export default function ({ getService }: FtrProviderContext) {
],
observabilityAIAssistant: ['all', 'read', 'minimal_all', 'minimal_read'],
slo: ['all', 'read', 'minimal_all', 'minimal_read'],
fleetv2: ['all', 'read', 'minimal_all', 'minimal_read'],
fleetv2: [
'all',
'read',
'minimal_all',
'minimal_read',
'agents_all',
'agents_read',
'agent_policies_all',
'agent_policies_read',
'settings_all',
'settings_read',
],
fleet: ['all', 'read', 'minimal_all', 'minimal_read'],
actions: ['all', 'read', 'minimal_all', 'minimal_read'],
stackAlerts: ['all', 'read', 'minimal_all', 'minimal_read'],
Expand Down
14 changes: 13 additions & 1 deletion x-pack/test/api_integration/apis/security/privileges_basic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,19 @@ export default function ({ getService }: FtrProviderContext) {
],
observabilityAIAssistant: ['all', 'read', 'minimal_all', 'minimal_read'],
slo: ['all', 'read', 'minimal_all', 'minimal_read'],
fleetv2: ['all', 'read', 'minimal_all', 'minimal_read'],
// fleetv2: ['all', 'read', 'minimal_all', 'minimal_read'],
fleetv2: [
'all',
'read',
'minimal_all',
'minimal_read',
'agents_all',
'agents_read',
'agent_policies_all',
'agent_policies_read',
'settings_all',
'settings_read',
],
fleet: ['all', 'read', 'minimal_all', 'minimal_read'],
actions: ['all', 'read', 'minimal_all', 'minimal_read'],
stackAlerts: ['all', 'read', 'minimal_all', 'minimal_read'],
Expand Down

0 comments on commit c837518

Please sign in to comment.