Jump to content

Extension:OATHAuth

From mediawiki.org
This page is a translated version of the page Extension:OATHAuth and the translation is 59% complete.
Şununla karıştırılmamalıdır: Extension:OAuth.
MediaWiki manüel uzantıları
OATHAuth
Sürüm durumu: kararlı
Uygulama Kullanıcı hakları , Özel sayfa , Sayfa işlemi
Açıklama Oturum açmak için iki faktörlü kimlik doğrulama sağlar
Yazar(lar) Ryan Lane
En son sürüm Güncellemeler devam etmekte
Uyumluluk politikası MediaWiki ile birlikte anlık görüntüler yayımlanır. Master geriye dönük olarak uyumlu değil.
Veritabanı değişiklikleri Evet
Tablolar oathauth_types
oathauth_devices
oathauth_users
Lisans GPL-2.0-or-later AND GPL-3.0-or-later
İndir
  • $wgOATHRequiredForGroups
  • $wgOATHRolloutPercent
  • $wgOATHAllowMultipleModules
  • $wgOATHExclusiveRights
  • $wgOATHSecretKey
  • $wgOATHAuthWindowRadius
  • $wgOATHAuthNewUI
  • $wgOATHAuthAccountPrefix
  • $wgOATHPrioritizedModules

  • oathauth-enable
  • oathauth-api-all
  • oathauth-disable-for-user
  • oathauth-view-log
  • oathauth-verify-user
Translatewiki.net adresinde mevcutsa, OATHAuth uzantısını çevirin
Sorunlar Açık görevler · Hata bildir

The OATHAuth[1] extension provides two-factor authentication support. By default, this includes a time-based one-time password (TOTP) implementation that allows users to generate 2FA codes from their phone or desktop app. İstemci desteği çoğu özellikli telefon, akıllı telefon ve masaüstü bilgisayar için mevcuttur.

Bu uzantının, tamamen farklı bir protokol olan OAuth ile hiçbir ilgisi yoktur.

Kullanım

İki faktörlü kimlik doğrulamadaki yardım sayfası, son kullanıcılara bu uzantının nasıl kullanılacağı hakkında bilgi sağlar.

Some policies explained on Two-factor authentication only apply to Wikimedia projects. However, the basic instructions for using 2FA are the same for any wiki that uses Extension:OATHAuth.

The Special:AccountSecurity page guides users through adding and managing their two-factor authentication methods and recovery codes.

Kurulum

This extension comes with MediaWiki 1.31 and later, so you do not need to download it. The remaining configuration instructions must still be followed.
Uyarı Uyarı: There is a bug with this extension where it does not update properly from the web (mw-config) updater and must instead use the update.php command line update script (phab:T371849)
  • Dosyaları indirin ve extensions/ klasörünüzdeki OATHAuth adlı dizine yerleştirin.
    Developers and code contributors should install the extension from Git instead, using:
    cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/OATHAuth
    
  • Yalnızca git dizininden yüklerken, PHP bağımlılıklarını uzantı dizinine composer install --no-dev vererek yüklemek için Composer komutunu çalıştırın. (Potansiyel komplikasyonlar için T173141 sayfasına bakınız.)
  • LocalSettings.php dosyanızın altına aşağıdaki kodu ekleyin:
    wfLoadExtension( 'OATHAuth' );
    
  • Bu uzantının ihtiyaç duyduğu gerekli veritabanı tablolarını otomatik olarak oluşturacak betik güncelleme komutunu çalıştırın.
  • Gerektiği gibi yapılandırın.
  • It is strongly recommended to setup caching when using OATHAuth. This will improve performance, but also the security of your wiki if you're using 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 .
  • Yes Yapıldı – Uzantının başarıyla yüklendiğini doğrulamak için vikinizde Special:Version seçeneğine gidin.

Yapılandırma

Parametreler

Yapılandırma İşareti Varsayılan Değer Açıklama
$wgOATHAuthWindowRadius 4 Her yöndeki geçerli olması gereken anahtar pencerelerinin sayısı.

Bu, OATH'a anahtarları etkin bir şekilde ((1 + 2 * $wgOATHAuthWindowRadius) * 30) saniye aralığında kabul etmesini söyler. Bu geçerli pencere aralığı, geçerli zamana göre ortalanır. Bu yapılandırma değişkeninin amacı, kullanıcının saati ile sunucunun saati arasındaki farklılıkları hesaba katmaktır. Ancak mümkün olduğunca düşük tutulması tavsiye edilir.

$wgOATHAuthDatabase false (kaldırıldı) Veritabanı alanı. Yalnızca çoklu veritabanı ortamında kullanılır. After MediaWiki 1.42, you should use $wgVirtualDomainsMapping['virtual-oathauth'] instead of this option.
$wgOATHAuthAccountPrefix false OATHAuth kullanıcı hesabı adı ve hesap için kullanılan veren oluşturma için kullanılan önek.

false ise, $wgSitename değeri kullanır.

$wgOATHExclusiveRights [] İki faktörlü kimlik doğrulama kullanarak oturum açmayan kullanıcılardan iptal edilen izinler kümesi.
$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 (kaldırıldı) 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 (kaldırıldı) Temporary (in the MW 1.45 development cycle) feature flag for the redesigned UI. (T401774)
$wgOATHSecretKey false
(1.45 sürümünde tanıtıldı) 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 maintenance/UpdateTOTPSecretsToEncryptedFormat.php after setting this value to encrypt existing database rows.

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 ayrıca, kimlik doğrulama girişimleri için hız sınırlarını tanımlamak için $wgRateLimits dizisine bir anahtar ekler:

		'badoath' => [
			'&can-bypass' => false,
			'user' => [ 10, 60 ],
			'user-global' => [ 10, 60 ],
		]

user-global anahtarının yalnızca 1.35'ten beri kullanılabildiğini unutmayın. Daha önceki sürüm user ve belki de ip-all dayanmak zorunda. Ayrıntılar için $wgRateLimits belgelerine bakın.


Kullanıcı izni

OATHAuth'u etkinleştirmek için erişim izni verilmesi

Kullanıcılara oathauth-enable kullanıcı hakkına erişim izni verilmelidir, böylece Special:AccountSecurity üzerinden etkinleştirebilirler (Special:Preferences altında görünen bir bağlantı).

$wgGroupPermissions['user']['oathauth-enable'] = true;

Yukarıdakiler, tüm kayıtlı kullanıcılara OATHAuth'u etkinleştirmek için erişim izni verecektir.

Yönetim

Kullanıcı anahtarını sıfırlama

Bir kullanıcı hem anahtar üretecini hem de kurtarma anahtarlarını kaybederse, disableOATHAuthForUser bakım betiğini çalıştırarak iki faktörlü kimlik doğrulaması kullanıcıdan kaldırılabilir:

MediaWiki sürümü:
1.40
$ ./maintenance/run OATHAuth:disableOATHAuthForUser <user>
MediaWiki sürümü:
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';


Ayrıca bakınız


References

  1. OATH is an acronym for open authentication.