Extension:OATHAuth
リリースの状態: 安定 |
|
|---|---|
| 実装 | 利用者権限, 特別ページ, ページの操作 |
| 説明 | ログイン時における二要素認証を実現します。 |
| 作者 | Ryan Lane |
| 最新バージョン | Continuous updates |
| 互換性の方針 | MediaWiki とともにリリースされるスナップショット。 master には後方互換性がありません。 |
| データベースの変更 | はい |
| テーブル | oathauth_types oathauth_devices oathauth_users |
| ライセンス | GPL-2.0-or-later AND GPL-3.0-or-later |
| ダウンロード | |
|
|
|
|
|
| translatewiki.net で翻訳を利用できる場合は、OATHAuth 拡張機能の翻訳にご協力ください | |
| 問題点 | 未解決のタスク · バグを報告 |
OATHAuth[1]拡張機能により、二要素認証を実現します。 既定ではTime-based One-Time Password (TOTP) の実装が含まれており、利用者は携帯電話やデスクトップアプリケーションから多要素認証トークンを生成できるようになっています。 ほとんどのフィーチャーフォン・スマートフォン・デスクトップパソコンが、クライアント端末として利用可能です。
使用法
Two-factor authentication上のヘルプページは、利用者向けにこの拡張機能の使い方に関する情報を提供します。 ただし、特別ページでも利用者向けに案内しています。
インストール
- ダウンロードして、ファイルを
extensions/フォルダー内のOATHAuthという名前のディレクトリ内に配置します。
開発者とコード寄稿者は、上記の代わりに以下を使用してGitからインストールします:cd extensions/ git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/OATHAuth
- Gitでのインストールの場合のみ、PHPの依存関係をインストールするためComposerを実行します。 (合併症の可能性についてはT173141を参照。)
- 以下のコードを LocalSettings.php ファイルの末尾に追加します:
wfLoadExtension( 'OATHAuth' );
- 更新スクリプトを実行します。このスクリプトは、この拡張機能が必要とするデータベーステーブルを自動的に作成します。
- 必要に応じて設定します。
- OATHAuthを運用する場合、cachingも併せてセットアップすることが強く推奨されます。 パフォーマンスが改善するだけでなく、OATHAuthを利用している場合はセキュリティも向上します。 If you are only running one application/web server and have php-apcu installed, and no specific cache configured, MediaWiki will likely fallback to using APCu. If you are using multiple application/web server it is advised to set up local cluster caching that all hosts can use. Examples include Memcached.
完了 – ウィキの「Special:Version」に移動して、拡張機能が正しくインストールされたことを確認します。
設定の構成
パラメーター
| 構成フラグ | 既定値 | 説明 |
|---|---|---|
$wgOATHAuthWindowRadius
|
4
|
有効であるべき各方向のトークン・ウィンドウの数。
実質的に |
$wgOATHAuthDatabase
|
false
|
(廃止予定) データベースのドメイン。 複数のデータベースでのみ使用されます。 After MediaWiki 1.42, you should use $wgVirtualDomainsMapping['virtual-oathauth'] instead of this option. |
$wgOATHAuthAccountPrefix
|
false
|
OATHAuthのアカウント名に使用される接頭辞と、アカウントに適用される発行者。
|
$wgOATHExclusiveRights
|
[]
|
Set of permissions that are revoked from users who did not login using two-factor authentication. |
$wgOATHRequiredForGroups
|
[]
|
Sets a list of user groups that are required to have two-factor authentication enabled. Use 'user' if you want all logged-in users required to enable two-factor authentication. |
$wgOATHRolloutPercent
|
0
|
Percentage of users to add to two-factor authentication rollout. |
$wgOATHAllowMultipleModules
|
false
|
(廃止予定) Temporary (in the MW 1.45 development cycle) feature flag to allow users to have multiple two-factor authentication modules active at the same time. |
$wgOATHAuthNewUI
|
false
|
(廃止予定) Temporary (in the MW 1.45 development cycle) feature flag for the redesigned UI. (T401774) |
$wgOATHSecretKey
|
false
|
(1.45 で導入) Update to 1.45 (or later) and run the update script before enabling this feature and running its own maintenance script! A secret key value for encrypting OATH-related data which should be SODIUM_CRYPTO_SECRETBOX_KEYBYTES hexadecimal bytes (64 chars) in length. This variable is currently considered immutable. Do not publicly set this value. There are a few ways to create a cryptographically-secure, random key value, such as the unix command: $ hexdump -vn32 -e'8/8 "%08X" "\n"' /dev/urandom.
Run Note that it is not currently possible to change this value once it is set, and be able to update existing encrypted codes. See T403180 for more information. |
OATHAuth also adds a key to the $wgRateLimits array to define rate limits for authentication attempts:
'badoath' => [
'&can-bypass' => false,
'user' => [ 10, 60 ],
'user-global' => [ 10, 60 ],
]
user-globalキーはバージョン1.35からでしか使えないことに注意してください。
Earlier version have to rely on user and perhaps ip-all.
完全な一覧は、$wgRateLimits の説明文書を参照してください。
利用者権限
- OATHAuthへのアクセス権限
Users should be given access to the oathauth-enable user right so that they can enable it at Special:OATHAuth (a link to which appears at Special:Preferences).
$wgGroupPermissions['user']['oathauth-enable'] = true;
上記から、全登録利用者にOATHAuthを有効にするためのアクセス権限が付与されます。
管理
利用者トークンのリセット
If a user loses both their token generator and the recovery tokens, two-factor authentication may be removed from the user by running the disableOATHAuthForUser maintenance script:
| MediaWiki バージョン: | 1.40 |
$ ./maintenance/run OATHAuth:disableOATHAuthForUser <user>
| MediaWiki バージョン: | ≦ 1.39 |
$ php ./extensions/OATHAuth/maintenance/disableOATHAuthForUser.php <user>
Where <user> is the name of the user to have 2FA disabled.
Shared database tables
Some Wikis may want to share the 2FA data amongst multiple Wikis. Shared database tables, the previous method for doing so is deprecated in MediaWiki 1.42 and later. For new wiki-farm installations where you want users to share their 2FA token amongst multiple wikis, please use $wgVirtualDomainsMapping and the extensions will automatically make its tables use the specified database name.
$wgVirtualDomainsMapping['virtual-oathauth'] = [ 'db' => 'sharedbname' ]
When using shared database tables, i.e., the same set of users for different wikis, add oathauth_devices and oathauth_types to $wgSharedTables.
$wgSharedTables[] = 'oathauth_devices';
$wgSharedTables[] = 'oathauth_types';
関連項目
- 製品安全と整合性/アカウントのセキュリティ
- Two-factor authentication (TFA)
- Extension:WebAuthn - module for the OATHAuth extension that provides support for U2F devices (such as YubiKey) and password managers.
- Initiative for Open Authentication (OATH)
脚注
- ↑ OATH は open authentication の頭字語です。
| この拡張機能は 1 つ以上のウィキメディアのプロジェクトで使用されています。 これはおそらく、この拡張機能が安定していて高いトラフィックのウェブサイトでも十分に動作することを意味します。 この拡張機能がインストールされている場所を確認するには、ウィキメディアの設定ファイル CommonSettings.php および InitialiseSettings.php 内で、この拡張機能の名前を探してください。 特定のウィキにインストールされている拡張機能の完全な一覧は、そのウィキの Special:Version ページにあります。 |
| この拡張機能は以下のウィキ ファーム/ウィキ ホスト/パッケージに含まれています: これは正式な一覧ではありません。 一部のウィキ ファーム/ウィキ ホスト/パッケージは、ここに記載されていなくてもこの拡張機能を含んでいる場合があります。 必ずご利用のウィキ ファーム、ウィキ ホスト、バンドルで確認してください。 |
- Stable extensions/ja
- User rights extensions/ja
- Special page extensions/ja
- Page action extensions/ja
- Extensions with unknown license/ja
- Extensions in Wikimedia version control/ja
- Extensions which add rights/ja
- AuthChangeFormFields extensions/ja
- GetPreferences extensions/ja
- LoadExtensionSchemaUpdates extensions/ja
- UnitTestsAfterDatabaseSetup extensions/ja
- UnitTestsBeforeDatabaseTeardown extensions/ja
- UserEffectiveGroups extensions/ja
- UserGetRights extensions/ja
- GetUserPermissionsErrors extensions/ja
- All extensions/ja
- Extensions bundled with MediaWiki 1.31/ja
- Extensions requiring Composer with git/ja
- Extensions used on Wikimedia/ja
- Extensions included in BlueSpice/ja
- Extensions included in Canasta/ja
- Extensions available as Debian packages/ja
- Extensions included in Miraheze/ja
- Extensions included in MyWikis/ja
- Extensions included in ProWiki/ja
- Extensions included in semantic::core/ja
- Extensions included in wiki.gg/ja
- Extensions included in WikiForge/ja
- Login extensions/ja
