Este contenido no está disponible en el idioma seleccionado.
Chapter 5. Securing Multicloud Object Gateway
5.1. Changing the default account credentials to ensure better security in the Multicloud Object Gateway Copiar enlaceEnlace copiado en el portapapeles!
Change and rotate your Multicloud Object Gateway (MCG) account credentials using the command-line interface to prevent issues with applications, and to ensure better account security.
5.1.1. Resetting the noobaa account password Copiar enlaceEnlace copiado en el portapapeles!
Prerequisites
- A running OpenShift Data Foundation cluster.
- Download the Multicloud Object Gateway (MCG) command-line interface for easier management. For instructions, see Accessing the Multicloud Object Gateway with your applications.
Procedure
To reset the noobaa account password, run the following command:
noobaa account passwd <noobaa_account_name> [options]
$ noobaa account passwd <noobaa_account_name> [options]
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example:
noobaa account passwd admin@noobaa.io
$ noobaa account passwd admin@noobaa.io
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example output:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow ImportantTo access the admin account credentials run the
noobaa status
command from the terminal:Copy to Clipboard Copied! Toggle word wrap Toggle overflow
5.1.2. Regenerating the S3 credentials for the accounts Copiar enlaceEnlace copiado en el portapapeles!
Prerequisites
- A running OpenShift Data Foundation cluster.
- Download the Multicloud Object Gateway (MCG) command-line interface for easier management. For instructions, see Accessing the Multicloud Object Gateway with your applications.
Procedure
Get the account name.
For listing the accounts, run the following command:
noobaa account list
$ noobaa account list
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example output:
NAME DEFAULT_RESOURCE PHASE AGE account-test noobaa-default-backing-store Ready 14m17s test2 noobaa-default-backing-store Ready 3m12s
NAME DEFAULT_RESOURCE PHASE AGE account-test noobaa-default-backing-store Ready 14m17s test2 noobaa-default-backing-store Ready 3m12s
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Alternatively, run the
oc get noobaaaccount
command from the terminal:oc get noobaaaccount
$ oc get noobaaaccount
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example output:
NAME PHASE AGE account-test Ready 15m test2 Ready 3m59s
NAME PHASE AGE account-test Ready 15m test2 Ready 3m59s
Copy to Clipboard Copied! Toggle word wrap Toggle overflow To regenerate the noobaa account S3 credentials, run the following command:
noobaa account regenerate <noobaa_account_name> [options]
$ noobaa account regenerate <noobaa_account_name> [options]
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Copy to Clipboard Copied! Toggle word wrap Toggle overflow Once you run the
noobaa account regenerate
command it will prompt a warning that says "This will invalidate all connections between S3 clients and NooBaa which are connected using the current credentials.", and ask for confirmation:Example:
noobaa account regenerate account-test
$ noobaa account regenerate account-test
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example output:
INFO[0000] You are about to regenerate an account's security credentials. INFO[0000] This will invalidate all connections between S3 clients and NooBaa which are connected using the current credentials. INFO[0000] are you sure? y/n
INFO[0000] You are about to regenerate an account's security credentials. INFO[0000] This will invalidate all connections between S3 clients and NooBaa which are connected using the current credentials. INFO[0000] are you sure? y/n
Copy to Clipboard Copied! Toggle word wrap Toggle overflow On approving, it will regenerate the credentials and eventually print them:
INFO[0015] ✅ Exists: Secret "noobaa-account-account-test" Connection info: AWS_ACCESS_KEY_ID : *** AWS_SECRET_ACCESS_KEY : ***
INFO[0015] ✅ Exists: Secret "noobaa-account-account-test" Connection info: AWS_ACCESS_KEY_ID : *** AWS_SECRET_ACCESS_KEY : ***
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
5.1.3. Regenerating the S3 credentials for the OBC Copiar enlaceEnlace copiado en el portapapeles!
Prerequisites
- A running OpenShift Data Foundation cluster.
- Download the Multicloud Object Gateway (MCG) command-line interface for easier management. For instructions, see Accessing the Multicloud Object Gateway with your applications.
Procedure
To get the OBC name, run the following command:
noobaa obc list
$ noobaa obc list
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example output:
NAMESPACE NAME BUCKET-NAME STORAGE-CLASS BUCKET-CLASS PHASE default obc-test obc-test-35800e50-8978-461f-b7e0-7793080e26ba default.noobaa.io noobaa-default-bucket-class Bound
NAMESPACE NAME BUCKET-NAME STORAGE-CLASS BUCKET-CLASS PHASE default obc-test obc-test-35800e50-8978-461f-b7e0-7793080e26ba default.noobaa.io noobaa-default-bucket-class Bound
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Alternatively, run the
oc get obc
command from the terminal:oc get obc
$ oc get obc
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example output:
NAME STORAGE-CLASS PHASE AGE obc-test default.noobaa.io Bound 38s
NAME STORAGE-CLASS PHASE AGE obc-test default.noobaa.io Bound 38s
Copy to Clipboard Copied! Toggle word wrap Toggle overflow To regenerate the noobaa OBC S3 credentials, run the following command:
noobaa obc regenerate <bucket_claim_name> [options]
$ noobaa obc regenerate <bucket_claim_name> [options]
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Copy to Clipboard Copied! Toggle word wrap Toggle overflow Once you run the
noobaa obc regenerate
command it will prompt a warning that says "This will invalidate all connections between the S3 clients and noobaa which are connected using the current credentials.", and ask for confirmation:Example:
noobaa obc regenerate obc-test
$ noobaa obc regenerate obc-test
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example output:
INFO[0000] You are about to regenerate an OBC's security credentials. INFO[0000] This will invalidate all connections between S3 clients and NooBaa which are connected using the current credentials. INFO[0000] are you sure? y/n
INFO[0000] You are about to regenerate an OBC's security credentials. INFO[0000] This will invalidate all connections between S3 clients and NooBaa which are connected using the current credentials. INFO[0000] are you sure? y/n
Copy to Clipboard Copied! Toggle word wrap Toggle overflow On approving, it will regenerate the credentials and eventually print them:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
5.2. Enabling secured mode deployment for Multicloud Object Gateway Copiar enlaceEnlace copiado en el portapapeles!
You can specify a range of IP addresses that should be allowed to reach the Multicloud Object Gateway (MCG) load balancer services to enable secure mode deployment. This helps to control the IP addresses that can access the MCG services.
Prerequisites
- A running OpenShift Data Foundation cluster.
-
In case of a bare metal deployment, ensure that the load balancer controller supports setting the
loadBalancerSourceRanges
attribute in the Kubernetes services.
Procedure
Edit the NooBaa custom resource (CR) to specify the range of IP addresses that can access the MCG services after deploying OpenShift Data Foundation.
oc edit noobaa -n openshift-storage noobaa
$ oc edit noobaa -n openshift-storage noobaa
Copy to Clipboard Copied! Toggle word wrap Toggle overflow noobaa
- The NooBaa CR type that controls the NooBaa system deployment.
noobaa
The name of the NooBaa CR.
For example:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow loadBalancerSourceSubnets
A new field that can be added under
spec
in the NooBaa CR to specify the IP addresses that should have access to the NooBaa services.In this example, all the IP addresses that are in the subnet 10.0.0.0/16 or 192.168.10.0/32 will be able to access MCG S3 and security token service (STS) while the other IP addresses are not allowed to access.
Verification steps
To verify if the specified IP addresses are set, in the OpenShift Web Console, run the following command and check if the output matches with the IP addresses provided to MCG:
oc get svc -n openshift-storage <s3 | sts> -o=go-template='{{ .spec.loadBalancerSourceRanges }}'
$ oc get svc -n openshift-storage <s3 | sts> -o=go-template='{{ .spec.loadBalancerSourceRanges }}'
Copy to Clipboard Copied! Toggle word wrap Toggle overflow