第5章 Multicloud Object Gateway のセキュリティー保護
5.1. Multicloud Object Gateway のセキュリティーを強化するために、デフォルトのアカウント資格情報を変更する リンクのコピーリンクがクリップボードにコピーされました!
コマンドラインインターフェイスを使用して Multicloud Object Gateway (MCG) アカウントの資格情報を変更およびローテーションし、アプリケーションの問題を防ぎ、アカウントのセキュリティーを強化します。
5.1.1. noobaa アカウントパスワードのリセット リンクのコピーリンクがクリップボードにコピーされました!
前提条件
- 実行中の OpenShift Data Foundation クラスター。
カスタマーポータル から Multicloud Object Gateway (MCG) コマンドラインインターフェイスバイナリーをダウンロードし、実行可能にする。
注記アーキテクチャーに応じて適切な製品バリアントを選択してください。利用可能なプラットフォームは、Linux (x86_64)、Windows、Mac OS です。
手順
noobaa アカウントのパスワードをリセットするには、次のコマンドを実行します。
$ noobaa account passwd <noobaa_account_name> [options]$ 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).以下に例を示します。
$ noobaa account passwd 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コマンドを実行します。-------------------- - Mgmt Credentials - -------------------- email : admin@noobaa.io password : ***
5.1.2. アカウントの S3 資格情報の再生成 リンクのコピーリンクがクリップボードにコピーされました!
前提条件
- 実行中の OpenShift Data Foundation クラスター。
カスタマーポータル から Multicloud Object Gateway (MCG) コマンドラインインターフェイスバイナリーをダウンロードし、実行可能にする。
注記アーキテクチャーに応じて適切な製品バリアントを選択してください。利用可能なプラットフォームは、Linux (x86_64)、Windows、Mac OS です。
手順
アカウント名を取得します。
アカウントを一覧表示するには、次のコマンドを実行します。
$ noobaa account list出力例:
NAME ALLOWED_BUCKETS DEFAULT_RESOURCE PHASE AGE account-test [*] noobaa-default-backing-store Ready 14m17s test2 [first.bucket] noobaa-default-backing-store Ready 3m12sまたは、ターミナルから
oc get noobaaaccountコマンドを実行します。$ oc get noobaaaccount出力例:
NAME PHASE AGE account-test Ready 15m test2 Ready 3m59snoobaa アカウントの S3 資格情報を再生成するには、次のコマンドを実行します。
$ noobaa account regenerate <noobaa_account_name> [options]$ noobaa account regenerate FATA[0000] ❌ Missing expected arguments: <noobaa-account-name> Usage: noobaa account regenerate <noobaa-account-name> [flags] [options] Use "noobaa options" for a list of global command-line options (applies to all commands).noobaa account regenerateコマンドを実行すると、"This will invalidate all connections between S3 clients and NooBaa which are connected using the current credentials." という警告がプロンプトされ、確認が求めます。以下に例を示します。
$ noobaa account regenerate account-test出力例:
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[0015] ✅ Exists: Secret "noobaa-account-account-test" Connection info: AWS_ACCESS_KEY_ID : *** AWS_SECRET_ACCESS_KEY : ***
5.1.3. OBC の S3 資格情報の再生成 リンクのコピーリンクがクリップボードにコピーされました!
前提条件
- 実行中の OpenShift Data Foundation クラスター。
カスタマーポータル から Multicloud Object Gateway (MCG) コマンドラインインターフェイスバイナリーをダウンロードし、実行可能にする。
注記アーキテクチャーに応じて適切な製品バリアントを選択してください。利用可能なプラットフォームは、Linux (x86_64)、Windows、Mac OS です。
手順
OBC 名を取得するには、次のコマンドを実行します。
$ noobaa obc list出力例:
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または、ターミナルから
oc get obcコマンドを実行します。$ oc get obc出力例:
NAME STORAGE-CLASS PHASE AGE obc-test default.noobaa.io Bound 38snoobaa OBC S3 資格情報を再生成するには、次のコマンドを実行します。
$ noobaa obc regenerate <bucket_claim_name> [options]$ noobaa obc regenerate FATA[0000] ❌ Missing expected arguments: <bucket-claim-name> Usage: noobaa obc regenerate <bucket-claim-name> [flags] [options] Use "noobaa options" for a list of global command-line options (applies to all commands).noobaa obc regenerateコマンドを実行すると、"This will invalidate all connections between the S3 clients and noobaa which are connected using the current credentials." (これにより、現在の認証情報を使用して接続されている S3 クライアントと noobaa の接続はすべて無効になります) という警告がプロンプトされ、確認が求めます。以下に例を示します。
$ noobaa obc regenerate obc-test出力例:
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[0022] ✅ RPC: bucket.read_bucket() Response OK: took 95.4ms ObjectBucketClaim info: Phase : Bound ObjectBucketClaim : kubectl get -n default objectbucketclaim obc-test ConfigMap : kubectl get -n default configmap obc-test Secret : kubectl get -n default secret obc-test ObjectBucket : kubectl get objectbucket obc-default-obc-test StorageClass : kubectl get storageclass default.noobaa.io BucketClass : kubectl get -n default bucketclass noobaa-default-bucket-class Connection info: BUCKET_HOST : s3.default.svc BUCKET_NAME : obc-test-35800e50-8978-461f-b7e0-7793080e26ba BUCKET_PORT : 443 AWS_ACCESS_KEY_ID : *** AWS_SECRET_ACCESS_KEY : *** Shell commands: AWS S3 Alias : alias s3='AWS_ACCESS_KEY_ID=*** AWS_SECRET_ACCESS_KEY=*** aws s3 --no-verify-ssl --endpoint-url ***' Bucket status: Name : obc-test-35800e50-8978-461f-b7e0-7793080e26ba Type : REGULAR Mode : OPTIMAL ResiliencyStatus : OPTIMAL QuotaStatus : QUOTA_NOT_SET Num Objects : 0 Data Size : 0.000 B Data Size Reduced : 0.000 B Data Space Avail : 13.261 GB Num Objects Avail : 9007199254740991