OpenShift Container Storage is now OpenShift Data Foundation starting with version 4.9.
第5章 マルチクラウドオブジェクトゲートウェイのセキュリティーを強化するために、デフォルトのアカウント資格情報を変更する
コマンドラインインターフェイスを使用して Multicloud Object Gateway (MCG) アカウントの資格情報を変更およびローテーションし、アプリケーションの問題を防ぎ、アカウントのセキュリティーを強化します。
前提条件
- 実行中の OpenShift Data Foundation Platform。
管理を容易にするマルチクラウドオブジェクトゲートウェイ (MCG) コマンドラインインターフェイスをダウンロードします。
Copy to Clipboard Copied! Toggle word wrap Toggle overflow subscription-manager repos --enable=rh-odf-4-for-rhel-8-x86_64-rpms
# subscription-manager repos --enable=rh-odf-4-for-rhel-8-x86_64-rpms
Copy to Clipboard Copied! Toggle word wrap Toggle overflow yum install mcg
# yum install mcg
重要サブスクリプションマネージャーを使用してリポジトリーを有効にするための適切なアーキテクチャーを指定します。
IBM Power の場合は、次のコマンドを使用します。
Copy to Clipboard Copied! Toggle word wrap Toggle overflow subscription-manager repos --enable=rh-odf-4-for-rhel-8-ppc64le-rpms
# subscription-manager repos --enable=rh-odf-4-for-rhel-8-ppc64le-rpms
IBM Z インフラストラクチャーの場合は、以下のコマンドを使用します。
Copy to Clipboard Copied! Toggle word wrap Toggle overflow subscription-manager repos --enable=rh-odf-4-for-rhel-8-s390x-rpms
# subscription-manager repos --enable=rh-odf-4-for-rhel-8-s390x-rpms
または、MCG パッケージを、Download RedHat OpenShift Data Foundation ページにある OpenShift Data Foundation RPM からインストールできます。
重要お使いのアーキテクチャーに応じて、正しい製品バリアントを選択します。
5.1. noobaa アカウントパスワードのリセット
手順
noobaa アカウントのパスワードをリセットするには、次のコマンドを実行します。
Copy to Clipboard Copied! Toggle word wrap Toggle overflow noobaa account passwd <noobaa_account_name> [options]
$ noobaa account passwd <noobaa_account_name> [options]
Copy to Clipboard Copied! Toggle word wrap Toggle overflow noobaa account passwd
$ noobaa account passwd FATA[0000] ❌ Missing expected arguments: <noobaa_account_name> Options: --new-password='': New Password for authentication - the best practice is to omit this flag, in that case the CLI will prompt to prompt and read it securely from the terminal to avoid leaking secrets in t he shell history --old-password='': Old Password for authentication - the best practice is to omit this flag, in that case the CLI will prompt to prompt and read it securely from the terminal to avoid leaking secrets in the shell history --retype-new-password='': Retype new Password for authentication - the best practice is to omit this flag, in that case the CLI will prompt to prompt and read it securely from the terminal to avoid leaking secrets in the shell history Usage: noobaa account passwd <noobaa-account-name> [flags] [options] Use "noobaa options" for a list of global command-line options (applies to all commands).
以下に例を示します。
Copy to Clipboard Copied! Toggle word wrap Toggle overflow noobaa account passwd admin@noobaa.io
$ noobaa account passwd admin@noobaa.io
出力例:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Enter old-password: [got 24 characters] Enter new-password: [got 7 characters] Enter retype-new-password: [got 7 characters] INFO[0017] ✅ Exists: Secret "noobaa-admin" INFO[0017] ✅ Exists: NooBaa "noobaa" INFO[0017] ✅ Exists: Service "noobaa-mgmt" INFO[0017] ✅ Exists: Secret "noobaa-operator" INFO[0017] ✅ Exists: Secret "noobaa-admin" INFO[0017] ✈️ RPC: account.reset_password() Request: {Email:admin@noobaa.io VerificationPassword:* Password:*} WARN[0017] RPC: GetConnection creating connection to wss://localhost:58460/rpc/ 0xc000402ae0 INFO[0017] RPC: Connecting websocket (0xc000402ae0) &{RPC:0xc000501a40 Address:wss://localhost:58460/rpc/ State:init WS:<nil> PendingRequests:map[] NextRequestID:0 Lock:{state:1 sema:0} ReconnectDelay:0s cancelPings:<nil>} INFO[0017] RPC: Connected websocket (0xc000402ae0) &{RPC:0xc000501a40 Address:wss://localhost:58460/rpc/ State:init WS:<nil> PendingRequests:map[] NextRequestID:0 Lock:{state:1 sema:0} ReconnectDelay:0s cancelPings:<nil>} INFO[0020] ✅ RPC: account.reset_password() Response OK: took 2907.1ms INFO[0020] ✅ Updated: "noobaa-admin" INFO[0020] ✅ Successfully reset the password for the account "admin@noobaa.io"
Enter old-password: [got 24 characters] Enter new-password: [got 7 characters] Enter retype-new-password: [got 7 characters] INFO[0017] ✅ Exists: Secret "noobaa-admin" INFO[0017] ✅ Exists: NooBaa "noobaa" INFO[0017] ✅ Exists: Service "noobaa-mgmt" INFO[0017] ✅ Exists: Secret "noobaa-operator" INFO[0017] ✅ Exists: Secret "noobaa-admin" INFO[0017] ✈️ RPC: account.reset_password() Request: {Email:admin@noobaa.io VerificationPassword:* Password:*} WARN[0017] RPC: GetConnection creating connection to wss://localhost:58460/rpc/ 0xc000402ae0 INFO[0017] RPC: Connecting websocket (0xc000402ae0) &{RPC:0xc000501a40 Address:wss://localhost:58460/rpc/ State:init WS:<nil> PendingRequests:map[] NextRequestID:0 Lock:{state:1 sema:0} ReconnectDelay:0s cancelPings:<nil>} INFO[0017] RPC: Connected websocket (0xc000402ae0) &{RPC:0xc000501a40 Address:wss://localhost:58460/rpc/ State:init WS:<nil> PendingRequests:map[] NextRequestID:0 Lock:{state:1 sema:0} ReconnectDelay:0s cancelPings:<nil>} INFO[0020] ✅ RPC: account.reset_password() Response OK: took 2907.1ms INFO[0020] ✅ Updated: "noobaa-admin" INFO[0020] ✅ Successfully reset the password for the account "admin@noobaa.io"
重要管理者アカウントの資格情報にアクセスするには、端末から
noobaa status
コマンドを実行します。Copy to Clipboard Copied! Toggle word wrap Toggle overflow -------------------- - Mgmt Credentials - -------------------- email : admin@noobaa.io password : ***
-------------------- - Mgmt Credentials - -------------------- email : admin@noobaa.io password : ***