Commit Graph

25 Commits

Author SHA1 Message Date
Dominik Csapak a8a0132766 ui: LoginView: show webauthn errors in window
instead of silently discarding the error, else the user might be
confused because nothing happened

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-03-03 14:05:05 +01:00
Dominik Csapak b452e2df74 Revert "ui: window/Settings / WebAuthn: add browser setting for userVerificationo"
even if the options *could* be set in the frontend, the backend
actually has to do validation of those settings, thus we should not
make that a browser setting

additionally, having the value 'preferred' does not actually make sense,
since it does not add any security (the backend skips the
userverification check then)

This reverts commit aca4c2b5a9.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-03-03 14:05:05 +01:00
Dominik Csapak aca4c2b5a9 ui: window/Settings / WebAuthn: add browser setting for userVerificationo
some fido2/webauthn keys can have a pin, and the client can request
a mode for the user verification.

'default' (no value set), lets the browser/device decide if the user has to
enter the pin of the device
'discouraged' requests that the user should not need to enter the pin
'preferred' requests that the user should need to enter the pin (if possible)

since we use webauthn only as a 2nd factor, having the user enter
the device pin on login may seem too much hassle for some users, so
give them the option

since this is a client option anyway, do not save it in the backend, but
in the browser local storage

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-02-19 16:53:06 +01:00
Oguz Bektas 54067d8225 ui: loginview: fix typo in view-model variable name
s/availabel/available/g

no semantic change at all

Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-02-08 12:57:33 +01:00
Oguz Bektas b5c6088130 ui: autofocus after rendering text fields for 2fa
Co-Authored-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Tested-by: Oguz Bektas <o.bektas@proxmox.com>
Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
2021-02-05 06:55:56 +01:00
Oguz Bektas a65eb0ec29 ui: wrap regexText in gettext() for translations
also fix a small typo in recovery keys text

Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
2021-02-05 06:55:56 +01:00
Thomas Lamprecht bd768c3320 ui: tfa: adapt low recovery key hint, drop unused other hint
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-02-01 15:39:56 +01:00
Thomas Lamprecht 2dbc1a9a55 ui: tfa: improve button text for webAuthn
So users now what to press for starting off a webauthn challenge.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-02-01 11:48:43 +01:00
Thomas Lamprecht 8b1174f50a ui: tfa: drop useless extjs state save handling
was replaced with our own, not much more code and actually works.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-27 20:20:35 +01:00
Thomas Lamprecht 8c8f7b5a09 ui: tfa: disable confirm during handling of challenge
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-27 20:20:35 +01:00
Thomas Lamprecht 44915932d5 ui: tfa: webautn: move spinning icon down to waiting message
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-27 20:20:35 +01:00
Thomas Lamprecht e90fdf5bed ui: tfa: make webAuthn abortable and restartable
Fix two things:
* do not reject the login promise when we get the abort DOMException
  error
* safely save the original challenge string as we work on a reference
  here and avoid to convert to a UInt8 array twice to avoid an
  exception.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-27 20:20:35 +01:00
Thomas Lamprecht a11c8ab485 ui: tfa: only immediately trigger webAuthn when its the initial tab
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-27 19:38:40 +01:00
Thomas Lamprecht 74a50158ca ui: tfa: drop bogus console.error
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-27 19:38:08 +01:00
Thomas Lamprecht 6ee85d57be ui: tfa: save last used TFA method and prefer it next time
simple heuristic for those people who always prefer a specific TFA
method and have the others only as backup.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-27 18:45:36 +01:00
Thomas Lamprecht f91481eded ui: rework TFA prompt on login
Improve UX by avoiding the need to click some buttons twice, or
calling TOTP and Recovery codes both "OTP" codes and showing multiple
buttons, with all having the same goal "submit a TFA token" at the
same time.

Instead use a tab panel with a single submit button.

WebAuthn can and should be still improved, but that can be OK as
followup.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-27 13:21:25 +01:00
Thomas Lamprecht 867bfc4378 ui: login view: fix missing trailing comma
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-19 19:46:10 +01:00
Wolfgang Bumiller 8ae6d28cd4 gui: enumerate recovery keys and list in 2nd factor window
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-01-18 13:51:23 +01:00
Dominik Csapak da36bbe756 ui: LoginView: remove not used viewModel
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-01-13 16:46:47 +01:00
Wolfgang Bumiller fbeac4ea28 gui: tfa support
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-01-11 10:22:32 +01:00
Thomas Lamprecht 8acd4d9afc ui: some more eslint auto-fixes
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-09-25 18:34:54 +02:00
Dominik Csapak 1d8ef0dcf7 ui: use Logo/RealmComboBox from widget-toolkit
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-05-19 09:34:19 +02:00
Dietmar Maurer 9abcae1b0e gui: improve login view (use realms) 2020-04-09 13:37:14 +02:00
Thomas Lamprecht 3a84100428 ui login: default to root@pam user and focus password field
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-12-17 11:35:39 +01:00
Dietmar Maurer 34f956bc25 api2/access.rs: add ticket api 2019-01-30 15:16:10 +01:00