-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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] Create a fleet_enroll user and role during fleet setup #60562
Conversation
Pinging @elastic/ingest-management (Feature:EPM) |
method: 'PUT', | ||
path: `/_security/role/${FLEET_ADMIN_ROLE}`, | ||
body: { | ||
cluster: ['monitor', 'manage_api_key'], |
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.
@ph We should validate these permissions.
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.
Tested it locally and works as expected. Left a few comments but this can happen in a follow up PR.
|
||
// save fleet admin user | ||
await outputService.updateOutput(soClient, await outputService.getDefaultOutputId(soClient), { | ||
admin_username: FLEET_ADMIN_USERNAME, |
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.
admin_username: FLEET_ADMIN_USERNAME, | |
fleet_enroll_username: FLEET_ENROLL_USERNAME, |
// save fleet admin user | ||
await outputService.updateOutput(soClient, await outputService.getDefaultOutputId(soClient), { | ||
admin_username: FLEET_ADMIN_USERNAME, | ||
admin_password: password, |
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.
admin_password: password, | |
fleet_enroll_password: password, |
I think it is important to also change the naming in the code to not have confusion.
path: `/_security/user/${FLEET_ADMIN_USERNAME}`, | ||
body: { | ||
password, | ||
roles: [FLEET_ADMIN_ROLE], |
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.
See naming comment below.
a43ffcc
to
8754694
Compare
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
Summary
Resolves #56339
Change fleet setup to create a user and a role in the background instead of asking the user to provide a user.
Done in this pr
API change
Remove body parameters
admin_username
andadmin_password
! Now the API is also doing the setup of ingest manager (default config, ...) if it's not already done.
UI Change