Skip to content

Commit 1fc3520

Browse files
naemonorhr323
authored andcommitted
Add documentation for managing ECK file-based password length. (elastic#3339)
The following elastic/cloud-on-k8s#8817 is planned to be released with the ECK 3.2/Stack 9.2 release. (replaces elastic#3322 as it was based of the wrong branch) --------- Signed-off-by: Michael Montgomery <[email protected]>
1 parent 9906275 commit 1fc3520

File tree

2 files changed

+21
-3
lines changed

2 files changed

+21
-3
lines changed

deploy-manage/deploy/cloud-on-k8s/configure-eck.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ data:
9797
enable-leader-election: true
9898
elasticsearch-observation-interval: 10s
9999
ubi-only: false
100+
password-length: 24
100101
```
101102
102103
Alternatively, you can edit the `elastic-operator` StatefulSet and add flags to the `args` section of the operator container — which will trigger an automatic restart of the operator pod by the StatefulSet controller.

deploy-manage/users-roles/cluster-or-deployment-auth/managed-credentials-eck.md

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,11 @@ spec:
5050
count: 1
5151
```
5252
53-
## Rotate auto-generated credentials [k8s-rotate-credentials]
53+
## ECK auto-generated credentials
54+
55+
{{eck}} auto-generates credentials for [the `elastic` user](#k8s-default-elastic-user) and other file-based users. These credentials are stored in Kubernetes Secrets and are labeled with `eck.k8s.elastic.co/credentials=true`.
56+
57+
### Rotate auto-generated credentials [k8s-rotate-credentials]
5458

5559
You can force the auto-generated credentials to be regenerated with new values by deleting the appropriate Secret. For example, to change the password for the `elastic` user from the [quickstart example](/deploy-manage/deploy/cloud-on-k8s/elasticsearch-deployment-quickstart.md), use the following command:
5660

@@ -62,7 +66,6 @@ kubectl delete secret quickstart-es-elastic-user
6266
If you are using the `elastic` user credentials in your own applications, they will fail to connect to {{es}} and {{kib}} after you run this command. It is not recommended to use `elastic` user credentials for production use cases. Always [create your own users with restricted roles](../../../deploy-manage/users-roles/cluster-or-deployment-auth/native.md) to access {{es}}.
6367
::::
6468

65-
6669
To regenerate all auto-generated credentials in a namespace, run the following command:
6770

6871
```sh
@@ -73,6 +76,20 @@ kubectl delete secret -l eck.k8s.elastic.co/credentials=true
7376
This command regenerates auto-generated credentials of **all** {{stack}} applications in the namespace.
7477
::::
7578

79+
### Control the length of auto-generated passwords
80+
81+
```{applies_to}
82+
eck: ga 3.2
83+
```
84+
85+
:::{note}
86+
The ability to control the length of passwords generated by {{eck}} requires an Enterprise license.
87+
:::
88+
89+
You can control the length of auto-generated passwords in {{eck}} installations by setting either `config.policies.passwords.length` in your Helm chart values or `password-length` in the `elastic-operator` `ConfigMap` when installing with YAML manifests. Refer to the [operator configuration documentation](../../deploy/cloud-on-k8s/configure-eck.md) for details on managing these settings.
90+
91+
Changing these values does not update existing passwords. To rotate current credentials, refer to the [Rotate auto-generated credentials](#k8s-rotate-credentials)
92+
7693
## Creating custom users
7794

7895
{{eck}} provides functionality to facilitate custom user creation through various authentication realms. You can create users using the native realm, file realm, or external authentication methods.
@@ -99,4 +116,4 @@ For more information, refer to [External authentication](/deploy-manage/users-ro
99116

100117
ECK facilitates file-based role management through Kubernetes secrets containing the roles specification. Alternatively, you can use the Role management API or the Role management UI in {{kib}}.
101118

102-
Refer to [Managing custom roles](/deploy-manage/users-roles/cluster-or-deployment-auth/defining-roles.md#managing-custom-roles) for details and ECK based examples.
119+
Refer to [Managing custom roles](/deploy-manage/users-roles/cluster-or-deployment-auth/defining-roles.md#managing-custom-roles) for details and ECK based examples.

0 commit comments

Comments
 (0)