Autenticação de dois fatores

Two-factor authentication (2FA) is a security measure that helps prevent unauthorized access to user accounts.

Practically, 2FA means storing a secret in an authenticator, usually on a mobile phone, and exchanging a code from the authenticator when logging in.

This means an unauthorized user would need to guess the account password and have access to the authenticator, which is a more difficult proposition.

Nota

Some governments, such as the Australian government, require 2FA. For these fiscal localizations, it is not possible to deactivate 2FA.

Pré-requisitos

Importante

Essas listas são apenas exemplos, não são recomendações de nenhum software específico.

Os autenticadores de celular são os mais fáceis e mais utilizados. Os exemplos incluem:

Administradores de senhas são outra opção. Exemplos comuns incluem:

Nota

O resto deste documento utiliza o Google Authenticator como exemplo, uma vez que é um dos mais utilizados. Isto não é um endosso do produto.

Configuração da autenticação de dois fatores

After selecting an authenticator, log in to Odoo, then click the profile avatar in the upper-right corner, and select My Preferences from the resulting drop-down menu.

Click the Security tab, then click Enable 2FA.

The account secuirty tab in a user profile.

This generates an Access Control pop-up window that requires password confirmation to continue. Enter the Odoo account password, then click Confirm Password. Next, a Two-Factor Authentication Activation pop-up window appears, with a QR code.

The 2fa authentication QR code in Odoo.

Using the desired authenticator application, scan the QR code code.

Dica

If scanning the screen is not possible (e.g., the setup is being completed on the same device as the authenticator application), click the provided Cannot scan it? link, or copying the code to set up the authenticator manually, is an alternative.

A 2fa secret code on an authentication popup.

Em seguida, o autenticador apresentará um código de verificação.

A view of the Google authenticator app with the six digit code for 2fa.

Enter the code into the Verification code field, then click Enable Two-Factor Authentication.

The success message that appears in a user profile when 2fa is successfully enabled.

Fazer login

Para confirmar que a configuração do 2FA está concluída, saia do Odoo.

Na página de início de sessão, insira o nome de usuário e a senha e, em seguida, clique em Entrar. Na página Autenticação de dois fatores, insira o código fornecido pelo autenticador escolhido no campo Código de autenticação e, em seguida, clique em Entrar.

A página de início de sessão com o 2fa ativado.

Perigo

Se o usuário perder o acesso ao seu autenticador, um administrador deve desativar a 2FA na conta antes de o usuário conseguir iniciar sessão.

Impor autenticação de dois fatores

To enforce 2FA for every user in the database, navigate to the Settings app. In the Permissions section, tick the checkbox labeled Enforce two-factor authentication. Then, use the radio buttons to choose whether to apply this setting to Employees only or All users.

Nota

Selecting All users applies the setting to portal users in addition to employees.

Clique em Salvar para confirmar alterações não salvas.

A definição de imposição de dois fatores no app Definições.

Nota

If users are frequently required to log in again and complete two-factor authentication, it may be due to session or inactivity timeout policies configured for one or more of their user groups.

Administrators can configure these policies using the Timeouts settings available on user groups when the auth_timeout module is installed. See Session and inactivity timeouts for more information.