Extensão:OATHAuth
OATHAuth Estado de lançamento: estável |
|
---|---|
![]() |
|
Implementação | Direitos do utilizador , Página espacial , Ação de página |
Descrição | Fornece a autenticação de dois fatores para iniciar a sessão |
Autor(es) | Ryan Lane |
Última versão | Atualizações contínuas |
Política de compatibilidade | Master maintains backwards compatibility. |
MediaWiki | 1.29+ |
Alterações à base de dados | Sim |
Tabelas | oathauth_users |
Licença | GPL-2.0-or-later AND GPL-3.0-or-later |
Transferência | |
|
|
|
|
Traduza a extensão OATHAuth se ela estiver disponível em translatewiki.net | |
Problemas | Tarefas em aberto · Reportar um erro |
The OATHAuth extension is a time-based one-time password (TOTP) implementation. It provides two-factor authentication via something you have (your phone or desktop client) and something you know (your user name/password). Client support is available for most feature phones, smartphones and desktops (see Client implementations).
Utilização
The help page on Two-factor authentication provides information for end users on how to use this extension. However the special page used will also guide users.
Instalação
- Exporte e coloque o ficheiro, ou ficheiros, num diretório chamado
OATHAuth
, na sua pastaextensions/
. - Only when installing from git run Composer to install PHP dependencies, by issuing
composer install --no-dev
in the extension directory. (See task T173141 for potential complications.) - Acrescente o seguinte código ao fundo do ficheiro LocalSettings.php:
wfLoadExtension( 'OATHAuth' );
- Execute o script de atualização que irá criar automaticamente as tabelas da base de dados necessárias para esta extensão.
- Configure conforme necessário.
Pronto – Na página especial Special:Version da sua wiki verifique se a extensão foi instalada.
Configuração
Parâmetros
Configuration Flag | Valor Predefinido | Descrição |
---|---|---|
$wgOATHAuthWindowRadius
|
4
|
The number of token windows in each direction that should be valid.
This tells OATH to accept tokens for a range of effectively |
$wgOATHAuthDatabase
|
false
|
The database domain. Only used in a multi-database environment. |
$wgOATHAuthSecret
|
false
|
The base OATHAuth secret for this wiki from which all encryption keys are derived.
If |
$wgOATHAuthAccountPrefix
|
false
|
The prefix used for the OATHAuth user account name and the issuer used for the account.
If |
$wgOATHExclusiveRights
|
[]
|
Set of permissions that are revoked from users who did not log in using two-factor authentication. |
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 ],
]
Note that the user-global
key is available only since 1.35.
Earlier version have to rely on user
and perhaps ip-all
.
See the documentation of $wgRateLimits
for details.
Permissão do utilizador
- Granting access to enable 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;
The above will grant all registered users access to enable OATHAuth.
Administração
- Resetting a user token
In the event that a user both loses their token generator AND the recovery tokens; two-factor authentication may be removed from the user by deleting their row from the oathauth_users
database table.
Alternatively, a sysadmin with shell access may type on a command line cd /path/to/mediawiki/extensions/OATHAuth/maintenance/
and then execute php disableOATHAuthForUser.php "username"
where "username"
is the user to have 2FA disabled to have it disabled.
Consulte também
- Wikimedia Security Team/Two-factor Authentication for CentralAuth wikis
- Two-factor authentication (TFA)
- Extension:WebAuthn
![]() | Este extensão está a ser utilizado em um ou mais projetos da Wikimedia. Isso provavelmente significa que a extensão é estável e funciona bem o suficiente para ser usada por esses sites de alto tráfego. Procure o nome desta extensão nos arquivos de configuração CommonSettings.php e InitialiseSettings.php da Wikimedia para ver onde está instalado. Uma lista completa das extensões instaladas em um determinado wiki pode ser vista na página Special:Version do wiki. |
- Extensions bundled with MediaWiki 1.31/pt
- Stable extensions/pt
- User rights extensions/pt
- Special page extensions/pt
- Page action extensions/pt
- Extensions with unknown license/pt
- Extensions in Wikimedia version control/pt
- AuthChangeFormFields extensions/pt
- GetPreferences extensions/pt
- LoadExtensionSchemaUpdates extensions/pt
- GetUserPermissionsErrors extensions/pt
- All extensions/pt
- Extensions requiring Composer with git/pt
- Extensions used on Wikimedia/pt
- Login extensions/pt