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] Add missing permissions for connector package #193573

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -848,6 +848,10 @@ it('Returns the Elastic Connectors permissions for elastic_connectors package',
names: ['content-*', '.search-acl-filter-*'],
privileges: ELASTIC_CONNECTORS_INDEX_PERMISSIONS,
},
{
names: ['logs-elastic_agent*'],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The original PR had also had metrics-* and traces-*. Do we need those in order to power other fleet/agent features? b5c1ce1

Copy link
Member Author

@jedrazb jedrazb Sep 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I don't think so, the system component (added by default in agent unless you opt out) is able to send system metrics, the only bit we were missing were component logs. I was able to see agent metrics (mem,cpu, etc) without other privileges

privileges: ['auto_configure', 'create_doc'],
},
],
},
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export const ELASTIC_CONNECTORS_INDEX_PERMISSIONS = [
'create_index',
'auto_configure',
'maintenance',
'view_index_metadata',
];

export function storedPackagePoliciesToAgentPermissions(
Expand Down Expand Up @@ -276,6 +277,10 @@ function connectorServicePermissions(packagePolicyId: string): [string, Security
names: ['content-*', '.search-acl-filter-*'],
privileges: ELASTIC_CONNECTORS_INDEX_PERMISSIONS,
},
{
names: ['logs-elastic_agent*'],
privileges: ['auto_configure', 'create_doc'],
},
],
},
];
Expand Down
Loading