summaryrefslogtreecommitdiff
path: root/addons/auth_totp
AgeCommit message (Collapse)Author
2021-05-30[I18N] Update translation terms from TransifexOdoo Translation Bot
2021-05-17[FIX] *: update documentation links Following the recent reorganisation of ↵Victor Feyens
the documentation in 12.0+, the majority of the documents have been moved and their old links are no longer valid. Some redirection rules will soon be deployed, but those rules might be dropped in some years and we want the links to still work, which is why we still replace the links to the new ones. FW-Port of odoo/odoo#70675 (13.0) closes odoo/odoo#70728 X-original-commit: 85c24961ab9ff5c1c79eb7415c97c46d9a77cca3 Related: odoo/enterprise#18283 Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2021-05-16[I18N] Update translation terms from TransifexOdoo Translation Bot
2021-05-02[I18N] Update translation terms from TransifexOdoo Translation Bot
2021-04-25[I18N] Update translation terms from TransifexOdoo Translation Bot
2021-04-18[I18N] Update translation terms from TransifexOdoo Translation Bot
2021-04-04[I18N] Update translation terms from TransifexOdoo Translation Bot
2021-03-28[I18N] Update translation terms from TransifexOdoo Translation Bot
2021-03-07[I18N] Update translation terms from TransifexOdoo Translation Bot
2021-02-28[I18N] Update translation terms from TransifexOdoo Translation Bot
2021-02-21[I18N] Update translation terms from TransifexOdoo Translation Bot
2021-02-14[I18N] Update translation terms from TransifexOdoo Translation Bot
2021-02-07[I18N] Update translation terms from TransifexOdoo Translation Bot
2021-01-31[I18N] Update translation terms from TransifexOdoo Translation Bot
2021-01-24[I18N] Update translation terms from TransifexOdoo Translation Bot
2021-01-17[I18N] Update translation terms from TransifexOdoo Translation Bot
2021-01-10[I18N] Update translation terms from TransifexOdoo Translation Bot
2021-01-03[I18N] Update translation terms from TransifexOdoo Translation Bot
2020-12-27[I18N] Update translation terms from TransifexOdoo Translation Bot
2020-12-20[I18N] Update translation terms from TransifexOdoo Translation Bot
2020-12-06[I18N] Update translation terms from TransifexOdoo Translation Bot
2020-11-29[I18N] Update translation terms from TransifexOdoo Translation Bot
2020-11-22[I18N] Update translation terms from TransifexOdoo Translation Bot
2020-11-15[I18N] Update translation terms from TransifexOdoo Translation Bot
2020-11-08[I18N] Update translation terms from TransifexOdoo Translation Bot
2020-10-27[I18N] *: Update translation terms from TransifexMartin Trigaux
Except Spanish, waiting for cleanup closes odoo/odoo#60848 Related: odoo/enterprise#14421 Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-10-21[REV] *: revert fb7407c for spanish translationsOlivier Dony
There was a problem in the Transifex translations for Spanish and all translations were overwritten by mistake with english defaults. This commit reverts all modified es.po files to their previous version while we work to restore the translations on Transifex.
2020-10-18[I18N] Update translation terms from TransifexOdoo Translation Bot
2020-10-11[I18N] Update translation terms from TransifexOdoo Translation Bot
2020-10-05[I18N] Update translation terms from TransifexOdoo Translation Bot
2020-09-29[I18N] *: export 14.0 source termsMartin Trigaux
Including demo data this time closes odoo/odoo#58821 Related: odoo/enterprise#13682 Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-09-27[I18N] Update translation terms from TransifexOdoo Translation Bot
2020-09-25[IMP] base, totp: simplify form layout and improve responsivenessOlivier Dony
Some of the TOTP-related forms contained an attempt at making a centered modal pop-up, using a bootstrap `card` that would also serve to emphasize that the interaction was sensitive and security-related. Some of the "footer buttons" were moved inside the form to make it more obvious that they were part of the interaction flow. However some of this caused breakages of responsiveness and did not yield a really satisfactory result anyway. This commit switches back to using regular non-centered forms. It looks quite ugly because the content is better suited for a narrow modal, but it means less surprises in terms of layout and less responsiveness issues. closes odoo/odoo#58541 Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
2020-09-21[FIX] auth_totp: tour not working on a base installXavier Morel
This is a followup to #57826: turns out discuss isn't necessarily installed (who knew?), so the tour would break if mail was not explicitly installed alongside base, which is not great. So instead of opening discuss to try and fix the profile race condition, reload the *entire web client* by navigating to `/web`. Further discovery: async run functions don't actually do anything in tours, not sure where I got that, maybe used one for the convenience of `await` then the next time around having decided to wipe any knowledge of tours I had, I figured it wasn't possible that tours were so stupid as to not support promises. So yeah, can't just return a "pending" promise in order to force the tour manager to wait until the page has reloaded to carry on, that doesn't work. Instead use marker classes. Also remove the `async run` I had in the rest of the file to avoid being misleading, use a marker class for the one step where it probably matters. closes odoo/odoo#58119 Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2020-09-16[IMP] auth_totp: reliability of tourXavier Morel
On runbot the tour shows transient failures related to race conditions. The issue here is that when a user updates their own TOTP status, if hr is not installed this will close the Preferences dialog requiring reopening the dialog in order to check that everything worked. However if hr is installed there is no dialog ("My Profile" opens as a full action, which will not disappear on TOTP updates). We still reopen the My Profile action, but if the server is a bit too slow the tour may see the "old" version of "My Profile" which has not been unloaded, click the tab to go to the next step, but because it's already there the action has no effect, the next step is triggered when "My Profile" finally (re)loads at which point we're back on the first tab while the tour believes it should be on the second, and the tour breaks. Fix this by forcing a full reload of the action: between updating TOTP status and checking for the status change, navigate to the Discuss application then back to the preferences / profile screen. closes odoo/odoo#57826 Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2020-09-10[IMP] auth_totp: totp screen layout when website is installedXavier Morel
Apparently website's login layout removes the "card" around the login form, and only the inner login form remains and is centered. Put the card-title inside the login form, it doesn't seem to affect the web layout in noticeable ways, just fixes the layout when website is installed. closes odoo/odoo#57424 Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2020-09-10[IMP] auth_totp: notify user on activation and deactivation of OTPXavier Morel
Was not super visible, especially without HR as the dialog immediately closes (limitation of the web client), or when an administrator user massively disables totp. Show a toast notification indicating the success of the action. Also fix the logging of `totp_disable` so it correctly handles being called on more than one record, and change the logging data to <browse_record> (<logins>) across the board. Also add a way to provide an action to execute after a notification: by default nothing happens, which leads to dialogs not closing and forms not reloading, and there is no good way to show a notification and/then do some other thing, which is inconvenient.
2020-09-10[WIP] base, auth_totp: add doc links for 2FA & API keysXavier Morel
2020-09-10[IMP] auth_totp: label of totp_enabled field & show status in formXavier Morel
Use same look in form as in preferences dialog, just without the buttons to enable / disable it (technically could have the button to disable with the correct group I guess?)
2020-09-10[IMP] auth_totp: better issuer labelXavier Morel
The "issuer" being the user's company is not necessarily helpful as e.g. the company might have multiple services which all use 2FA. Use the domain name instead (fallback on the company if for some reason we're in a situation where this is computed without a request).
2020-09-10[IMP] auth_totp: allow spaces in totp code inputXavier Morel
TOTP programs generally group the code into two groups of 3 digits, but we'd only allow a single group of 6 digits. Allow spaces in the value for a bit of flexibility, and fix placeholders to look like codes (also turns out @placeholder on a field doesn't do anything, not sure where I got this idea). Also improve the label slightly in the login flow: * add information to the label itself * properly link the label & input via an `id`
2020-09-10[FIX] auth_totp: session update after enabling or disabling totpXavier Morel
bfcc7dee8f40afb5f7dec4e2cf5a669c0682e2ed tried to fix the session disconnection issue, but the fix only worked in single-process (either threaded or workers=1): because the cache was cleared but the update not flushed, since `_compute_session_token` uses SQL directly it would recompute the old session_token which it would cache, and thus the process would carry-on with the old token just re-set in the session and cache. Meanwhile in multi-process, odds are good that the next request will be on a different worker which *will* see the change, and will immediately complain & destroy the session. Add the missing flush calls right before recomputing the session token so the SQL "sees" the correct state.
2020-09-09[IMP] auth_totp: import qrcode lazilyXavier Morel
fp request closes odoo/odoo#57363 Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2020-09-01[I18N] export saas-13.5 source termsMartin Trigaux
Without demo data closes odoo/odoo#56839 Related: odoo/enterprise#12821 Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-08-17[FIX] auto_totp: tour & check RPC w/ tokenXavier Morel
* Not sure how the tour passed during merge as it would not be looking for the button in the right tab, it would fail locally, fix this issue by properly switching to the Account Security tab * add the missing test of RPC (which should not work on an account with totp enabled) * also reorder ops & fix comments: turns out `totp_login_enabled` checks that totp is enabled *then disables it* closes odoo/odoo#55979 Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2020-08-17[IMP] core: clarify making fields inaccessibleXavier Morel
* add a constant to `fields` for that purpose * add a test to ensure that it works as expected * fix the formatter so it handles the pattern correctly
2020-08-17[FIX] auth_totp: add totp secret to session-relevant fieldsOlivier Dony
Setting the totp secret is a significant change to the user's auth-ability, and as such should be taken in account for the session's validity. For convenience, update the user's session in-place to avoid logging them out.
2020-08-14[ADD] auth_totpXavier Morel
New module for supporting two-factor authentication via time-base one-time-password (TOTP). Users (including portal users) can choose to enable two-factor auth in their user account settings, by scanning a QR code and adding it to an authenticator app, such as Google Auth, 1Password, etc. When two-factor is enabled, password-based non-interactive RPC is only possible by using API keys. Co-authored-by: Olivier Dony <odo@odoo.com>