此内容没有您所选择的语言版本。
Chapter 7. Configuring Authentication
Application users must authenticate with Data Grid clusters. Data Grid Operator generates default credentials or you can add your own.
7.1. Default Credentials 复制链接链接已复制到粘贴板!
Data Grid Operator generates base64-encoded default credentials stored in an authentication secret named example-rhdatagrid-generated-secret
| Username | Description |
|---|---|
|
| Default application user. |
|
| Internal user that interacts with Data Grid clusters. |
7.2. Retrieving Credentials 复制链接链接已复制到粘贴板!
Get credentials from authentication secrets to access Data Grid clusters.
Procedure
Retrieve credentials from authentication secrets, as in the following example:
oc get secret example-rhdatagrid-generated-secret
$ oc get secret example-rhdatagrid-generated-secretCopy to Clipboard Copied! Toggle word wrap Toggle overflow Base64-decode credentials.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
7.3. Adding Custom Credentials 复制链接链接已复制到粘贴板!
Add custom credentials to an authentication secret.
Procedure
Create an
identities.yamlfile that contains credentials for application users and the operator user for Data Grid Operator, for example:credentials: - username: testuser password: testpassword - username: operator password: supersecretoperatorpassword
credentials: - username: testuser password: testpassword - username: operator password: supersecretoperatorpasswordCopy to Clipboard Copied! Toggle word wrap Toggle overflow Create an authentication secret with
identities.yamlas follows:oc create secret generic --from-file=identities.yaml connect-secret
$ oc create secret generic --from-file=identities.yaml connect-secretCopy to Clipboard Copied! Toggle word wrap Toggle overflow Specify the authentication secret with
spec.security.endpointSecretNamein your Infinispan CR and then apply the changes.spec: ... security: endpointSecretName: connect-secretspec: ... security: endpointSecretName: connect-secret1 Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 1
- specifies the authentication secret.