Skip to content
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

[Fleet] Remove unsupported privileges from Fleet in serverless #181909

Open
kpollich opened this issue Apr 26, 2024 · 1 comment
Open

[Fleet] Remove unsupported privileges from Fleet in serverless #181909

kpollich opened this issue Apr 26, 2024 · 1 comment
Assignees
Labels
Team:Fleet Team label for Observability Data Collection Fleet team

Comments

@kpollich
Copy link
Member

Fleet is currently referencing two cluster privileges that aren't supported in serverless. Soon, these privileges will be removed entirely and will result in validation errors in API requests. We should remove these privileges when Kibana is running in serverless mode.

  • manage_service_account - We don't support enrolling self-hosted Fleet Servers on serverless, and users will always use the hosted Fleet Server provided by Fleet Service. So, this can be removed.
  • read_cross_cluster - Right now, this privilege is specified in Fleet's data stream permissions. Cross cluster search is not supported in serverless, so this should be moved.

export const DATA_STREAM_ALLOWED_INDEX_PRIVILEGES = new Set([
'auto_configure',
'create_doc',
'maintenance',
'monitor',
'read',
'read_cross_cluster',
]);

// check the manage_service_account cluster privilege
else if (request.query.fleetServerSetup) {
const esClient = (await context.core).elasticsearch.client.asCurrentUser;
const { has_all_requested: hasAllPrivileges } = await esClient.security.hasPrivileges({
body: { cluster: ['manage_service_account'] },
});

We should be able to add a conditional check to determine whether Kibana is running in serverless mode before referencing these specific privileges.

@kpollich kpollich added the Team:Fleet Team label for Observability Data Collection Fleet team label Apr 26, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Fleet Team label for Observability Data Collection Fleet team
Projects
None yet
Development

No branches or pull requests

3 participants