Skip to content

Commit

Permalink
[Fleet] Add missing permissions for connector package (#193573)
Browse files Browse the repository at this point in the history
## Summary

Defines custom permissions for connector package.
- adds `view_index_metadata` permission
- adds permission to `logs-elastic_agent*` index in order to allow to
collect component logs
- see
#192081 (comment)

### Checklist


[Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
tested e2e with local ES, fleet server and connectors package

---------

Co-authored-by: kibanamachine <[email protected]>
Co-authored-by: Elastic Machine <[email protected]>
  • Loading branch information
3 people authored Sep 23, 2024
1 parent 46dbf51 commit c179451
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
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*'],
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

0 comments on commit c179451

Please sign in to comment.