[Oracle Cloud] IAMアカウントでのログインにMFA(多要素認証)を設定する

本記事の目的

Oracle Cloudで利用するIAMアカウントでのログインにMFA(多要素認証)を設定したメモです。

IAMアカウントに対してMFAを有効化すると、通常のログインパスワードに加えて、自分が指定した携帯端末に表示されるワンタイムパスワードでログインする仕組みとなります。

 

 

MFA有効化の手順

マニュアル「Managing Multi-Factor Authentication」より抜粋。

  1. In the upper-right corner of the Console, open the Profile menu (User menu icon) and then select User Settings. Your user details are displayed.
  2. Click Enable Multi-Factor Authentication.
  3. Scan the QR code displayed in the dialog with your mobile device’s authenticator app.Note: If you close the browser, or if the browser crashes before you can enter the verification code, you must generate a new QR code and scan it again with your app. To generate a new QR code, click the Enable Multi-Factor Authentication button again.
  4. In the Verification Code field, enter the code displayed on your authenticator app.
  5. Click Enable.

とっても簡単。自分自身で設定できます。

 

ワンタイムパスワード出力用のauthenticator appとしては、マニュアルに記載されている以下の2つのアプリに対応してます。

  • Oracle Mobile Authenticator
  • Google Authenticator

 

せっかくなので、「Oracle Mobile Authenticator」を選択。App Storeでダウンロードするだけです。

 

上記手順通りに実施すれば、次回以降のログインでは多要素認証が必須となります。

 

 

MFA有効化/無効化は誰ができるのか?

前述のマニュアルより抜粋↓

Required IAM Policy
Only the user can enable multi-factor authentication (MFA) for their own account. Users can also disable MFA for their own accounts. Members of the Administrators group can disable MFA for other users, but they cannot enable MFA for another user.

ということで、自分のアカウントであれば、有効化と無効化を実施可能(デフォルトは無効化)。

さらに管理者(Administrators groupのユーザ)は他のユーザアカウントのMFA無効化が可能。
(利用者の端末紛失などに対応するための機能と思われる)。

 

 

MFA有効化を強制できるのか?

ユーザ自身で無効化できるのは、万全ではないのでは?MFA有効化を強制できないの?

と思ったら、ちゃんと機能が用意されてました。

 

以下のようなポリシー条件を設定することで、MFAでのログインのみを許可することが可能となっています。

allow group GroupA to manage instance-family in tenancy where request.user.mfaTotpVerified='true'

詳しくはマニュアルの「Restricting Access to Only MFA-Verified Users」セクションを参照。

 

 

MFAの設定状況を確認できるか?

以下のようなcliコマンドにて確認可能。

$ oci iam user list -c <rootのコンパートメントID> --query 'data[*].[name,"is-mfa-activated"]' --output table
+--------------------------------------------------------------+---------+
| Column1 | Column2 |
+--------------------------------------------------------------+---------+
| aaaaaaaaaaaaaa | False |
| bbbbbbbbbbbbbb | False |
| cccccccccccccc | True |★有効化済みユーザ
+--------------------------------------------------------------+---------+

⇒例えば、MFA未設定(Falseの行)のユーザがいないかを、定期的にチェックするなどの運用が可能。

 

 

参考情報

・マニュアル「Managing Multi-Factor Authentication」
https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/usingmfa.htm

・OracleCloud MFA(多要素認証)を使用してセキュリティを高める
https://qiita.com/sugimount/items/37369cd138f57630b970

・OCIへのコンソール・ログインをセキュアにする
https://qiita.com/NSO-KC/items/39e5b3da967f97704f9e
⇒IAMのMFA対応に加えて、IDCS側とのフェデレーション設定している場合の考慮まで説明されていて分かりやすい。

 

スポンサードリンク

Be the first to comment

Leave a Reply

Your email address will not be published.


*