Fleet CTL: Surface password requirements to console for FleetCTL use, update API only password example (#14171)

This commit is contained in:
RachelElysia 2023-09-28 14:21:25 -04:00 committed by GitHub
parent 0f4e24a40a
commit 86daf97425
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -202,7 +202,7 @@ An API-only user does not have access to the Fleet UI. Instead, it's only purpos
To create your new API-only user, run `fleetctl user create` and pass values for `--name`, `--email`, and `--password`, and include the `--api-only` flag:
```sh
fleetctl user create --name "API User" --email api@example.com --password temp!pass --api-only
fleetctl user create --name "API User" --email api@example.com --password temp@pass123 --api-only
```
### Creating an API-only user

View File

@ -353,7 +353,7 @@ func ValidatePasswordRequirements(password string) error {
return nil
}
return errors.New("Password does not meet required criteria")
return errors.New("Password does not meet required criteria: Must include 12 characters, at least 1 number (e.g. 0 - 9), and at least 1 symbol (e.g. &*#).")
}
// ValidateEmail checks that the provided email address is valid, this function

View File

@ -863,7 +863,7 @@ func (svc *Service) PerformRequiredPasswordReset(ctx context.Context, password s
}
if err := fleet.ValidatePasswordRequirements(password); err != nil {
return nil, fleet.NewInvalidArgumentError("new_password", "Password does not meet required criteria")
return nil, fleet.NewInvalidArgumentError("new_password", "Password does not meet required criteria: Must include 12 characters, at least 1 number (e.g. 0 - 9), and at least 1 symbol (e.g. &*#).")
}
user.AdminForcedPasswordReset = false