이 콘텐츠는 선택한 언어로 제공되지 않습니다.
Chapter 4. Configuring authentication
Application users need credentials to access Data Grid clusters. You can use default, generated credentials or add your own.
4.1. Default credentials 링크 복사링크가 클립보드에 복사되었습니다!
Data Grid Operator generates base64-encoded default credentials stored in an authentication secrets named
Username | Secret name | Description |
---|---|---|
|
| Credentials for the default application user. |
|
| Credentials that Data Grid Operator uses to interact with Data Grid resources. |
4.2. Retrieving credentials 링크 복사링크가 클립보드에 복사되었습니다!
Get credentials from authentication secrets to access Data Grid clusters.
Procedure
Retrieve credentials from authentication secrets.
oc get secret example-infinispan-generated-secret
$ oc get secret example-infinispan-generated-secret
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Base64-decode credentials.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
4.3. Adding custom user credentials 링크 복사링크가 클립보드에 복사되었습니다!
Configure access to Data Grid cluster endpoints with custom credentials.
Modifying spec.security.endpointSecretName
triggers a cluster restart.
Procedure
Create an
identities.yaml
file with the credentials that you want to add.credentials: - username: myfirstusername password: changeme-one - username: mysecondusername password: changeme-two
credentials: - username: myfirstusername password: changeme-one - username: mysecondusername password: changeme-two
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Create an authentication secret from
identities.yaml
.oc create secret generic --from-file=identities.yaml connect-secret
$ oc create secret generic --from-file=identities.yaml connect-secret
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Specify the authentication secret with
spec.security.endpointSecretName
in yourInfinispan
CR and then apply the changes.spec: security: endpointSecretName: connect-secret
spec: security: endpointSecretName: connect-secret
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
4.4. Changing the operator password 링크 복사링크가 클립보드에 복사되었습니다!
You can change the password for the operator
user if you do not want to use the automatically generated password.
Procedure
Update the
password
key in theexample-infinispan-generated-operator-secret
secret as follows:oc patch secret example-infinispan-generated-operator-secret -p='{"stringData":{"password": "supersecretoperatorpassword"}}'
oc patch secret example-infinispan-generated-operator-secret -p='{"stringData":{"password": "supersecretoperatorpassword"}}'
Copy to Clipboard Copied! Toggle word wrap Toggle overflow NoteYou should update only the
password
key in thegenerated-operator-secret
secret. When you update the password, Data Grid Operator automatically refreshes other keys in that secret.
4.5. Disabling user authentication 링크 복사링크가 클립보드에 복사되었습니다!
Allow users to access Data Grid clusters and manipulate data without providing credentials.
Do not disable authentication if endpoints are accessible from outside the OpenShift cluster via spec.expose.type
. You should disable authentication for development environments only.
Procedure
Set
false
as the value for thespec.security.endpointAuthentication
field in yourInfinispan
CR.spec: security: endpointAuthentication: false
spec: security: endpointAuthentication: false
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Apply the changes.