45 Commits

Author SHA1 Message Date
7a78b8e172 fix: change module name corresponding to version 2025-09-25 19:15:20 +02:00
efeca4a76f feat: custom jwt claims 2025-04-16 15:17:48 +02:00
bc9eece531 feat: allow uuids of any version as user ids 2025-04-16 15:01:43 +02:00
c9684d1fe9 fix: create session in DB for old endpoints (#2052)
* fix: create session in DB for old endpoints

The old endpoints do not store the session in the DB, this leads to an unauthorized error in old hanko elements versions prior 1.0.0 when any endpoint is called that requires a session because they check if the session is stored in the DB.

* test: fix test
2025-02-14 21:00:38 +01:00
bc04b729dd feat: introduce mfa (#1645)
* feat: create otp_secrets table

* feat: create otp secret model

* feat: add mfa_only column to webauthn_credentials table

* feat: add mfa only field to webauthn credential model

* feat: add mfa config (#1607)

* feat: add otp secret persister (#1613)

* feat: MFA usage sub flow (#1614)

* feat: add mfa-usage sub-flow

---------

Co-authored-by: Lennart Fleischmann <67686424+lfleischmann@users.noreply.github.com>

* feat: include platform authenticator availybility in the preflight flow (#1615)

* feat: add mfa creation subflow

* feat: adjust registration flow

* feat: integrate mfa usage sub-flow

* feat: add pages for mfa (#1622)

* feat: profile flow adjustments for mfa support

* fix: suspension logic for mfa deletion actions

* feat: use dedicated action for security key creation options

* fix: mfa method stash entry can be stale on profile flow

The mfa_creation subflow sets an mfa_method stash value so that
when creating and persisting the credential the mfa_only flag can
be set correctly in the hook responsible for that. But the profile flow
never "ends" and and returns to the initial state so I can also
register a passkey afterwards. The mfa_method stash key remains on the
stash but is used in the hook nonetheless, so the passkey is incorrectly
recognized as a security key.

The mfa_method key is now deleted after successfully persisting the
credential/security_key. This should not have an effect on the login
flow because the mfa_creation subflow is the last subflow to be
executed. It also should not affect the registration flow, because the
hook is not applied in the registration flow (persistence of data is
all handled in the create_user hook).

* feat: add new icons and english translations (#1626)

* fix: credential id encoding corrected (#1628)

* feat: add audit logs for mfa creation

* feat: add a skip link to the mfa method chooser (#1630)

* feat: save the security key during login (#1629)

* feat: show security keys in profile

* feat: add authenticator app management to profile (#1633)

* feat: add authenticator app management to profile
* feat: passkey counts as second factor

* feat: prohibit security key first factor usage

* feat: add all WA creds to exclude list on registration

* refactor: mfa stash entries and webauthn credential persistence

Renames MFA stash entry for indicating usage (login) method to make its
meaning more explicit. Also removes code persisting a webauthn credential
from the attestation verification action in the onboarding flow because
this is already done by a shared hook.

* refactor: simplify WA creation call

Co-authored-by: bjoern-m <56024829+bjoern-m@users.noreply.github.com>

* chore: adjust mfa flow

* fix: mfa onboarding always shown during login

* fix: mfa onboarding not shown after password or email creation during login

* fix: mfa onboarding not shown without user detail onboarding

* fix: correct skip/back behaviour

* feat: reuse generated otp secret when the code is invalid

* chore: skip mfa prompt if the user only has a passkey

* chore: adjust login flow 

* chore: skip mfa prompt if the user only has a passkey

* chore: refactor and improve mfa onboarding

* fix: no mfa onboarding when passwords and passkeys are disabled

* fix: only show mfa onbooarding once

* feat: add a function to the flowpilot to check whether a state has been visited

* chore: adjust recovery flow (#1655)

* feat: disable password, passcode endpoints when mfa enabled

* Feat: remember last used login method (#1674)

* chore: remove omitempty from boolean (#1676)

* chore: improved error handling (#1679)

* chore: improved error handling

* feat: add missing translations (#1681)

* feat: update aaguid list (#1678)

* fix: do not suspend webauthn action for MFA (#1778)

Do not suspend the `webauthn_verify_attestation_response` action when passkeys are disabled, but security keys and MFA are enabled.

* fix: change texts (#1785)

Change texts regarding security creation to be more consistent across the flows and to be more precise.

* Fix: UI issues (#1846)

* fix: loading spinner alignment corrected

* fix: auth app deletion link is shown while deletion is not allowed

* Chore: remove test persister (#1876)

* chore: remove deprecated test persister

* chore: replace test persister calls

* chore: add saml state fixtures

* Update backend/flow_api/services/webauthn.go

Co-authored-by: Frederic Jahn <frederic.jahn@hanko.io>

* Update backend/dto/profile.go

Co-authored-by: Frederic Jahn <frederic.jahn@hanko.io>

* fix: otp validation uses the rate limiter key for passwords

* chore: add otp-limits to the default config

* chore: add explanation for 'UserVerification' setting on security keys

---------

Co-authored-by: Lennart Fleischmann <lennart.fleischmann@hanko.io>
Co-authored-by: Lennart Fleischmann <67686424+lfleischmann@users.noreply.github.com>
Co-authored-by: Frederic Jahn <frederic.jahn@hanko.io>
2024-11-01 19:38:30 +01:00
9dbc62524a feat: Server side sessions (#1673)
* feat: add server side sessions

* feat: add lastUsed & admin endpoint

* feat: add session list to elements

* fix: fix public session endpoint

* chore: only store session info when enabled

* build: update go mod

* feat: add translations

* test: fix tests

* feat: change path

* feat: return userID on session validation endpoint

* feat: move all session endpoints to public router

* fix: add missing translation

* fix: add missing structs

* chore: align session persister with other persisters

* fix: use correct translation label

* chore: add db validator to session model

* feat: create server side session from cmd

* fix: fix review findings
2024-10-15 11:36:32 +02:00
601ffaae92 Introduce Flowpilot - integration (#1532)
This pull request introduces the new Flowpilot system along with several new features and various improvements. The key enhancements include configurable authorization, registration, and profile flows, as well as the ability to enable and disable user identifiers (e.g., email addresses and usernames) and login methods.

---------

Co-authored-by: Frederic Jahn <frederic.jahn@hanko.io>
Co-authored-by: Lennart Fleischmann <lennart.fleischmann@hanko.io>
Co-authored-by: lfleischmann <67686424+lfleischmann@users.noreply.github.com>
Co-authored-by: merlindru <hello@merlindru.com>
2024-08-06 16:07:29 +02:00
4bea1e3361 fix: don't override error before return (#1447) 2024-04-29 11:44:46 +02:00
01fa397672 feat(webauthn): change default attestation mode
Changes the default attestation conveyance preference from 'none' to 'direct' for better AAGUID handling on Windows.

Co-authored-by: Stefan Jacobi <stefan.jacobi@adesso.de>
2024-04-10 15:31:11 +02:00
8ab246dc12 feat(jwt): add email claim to session JWT (#1404)
* add email claim which contains email address, is_verified and is_primary values
* cleanup some unused stuff

Closes: #1388

Co-authored-by: Stefan Jacobi <stefan.jacobi@adesso.de>
2024-03-25 15:25:02 +01:00
097569ad8b chore(passkeys): change naming of aaguid map to authenticator metadata
Closes: #1027
2024-01-29 09:43:21 +01:00
ce7a6f1971 improve(passkeys): improve passkey naming
* add cmd flag for loading aaguid-map file
* add aaguid mapper for better passkey naming
* bundle aaguid file in docker container
* refactor file loading to reuse in multiple occasions

Closes: #1027
2024-01-29 09:43:21 +01:00
d81c8f9a74 feat: check webauthn session data expiry 2023-08-04 09:30:48 +02:00
7ae10a4c4d fix: don't set cookie when jwt is set in header 2023-07-26 11:45:11 +02:00
e7dc097baf feat: make user verification configurable, preferred as default 2023-07-20 17:53:24 +02:00
00a5de727b Merge branch 'main' into fix-audit-logger-improvements
# Conflicts:
#	backend/handler/webauthn.go
2023-07-05 14:28:49 +02:00
bfd073013a fix: create audit logs with transaction where useful 2023-07-04 10:48:59 +02:00
f762393cc3 fix: return shadowed error 2023-07-03 09:16:08 +02:00
b59709d369 refactor: use echo.HTTPError instead of redundant own type. This way the prometheus mw shoul register the correct error codes. 2023-06-19 14:48:45 +02:00
fdf665eabb Session events (#725)
* feat(frontend-sdk): introduce events
* feat(elements): change hanko-elements register function
2023-04-28 14:14:47 +02:00
500cc4e064 fix: remove manual settings of allowed headers 2023-03-09 12:00:13 +01:00
a820ccd3bb try: comment out Acces-Control-Expose-Header 2023-03-09 11:53:46 +01:00
55fafdb988 fix: Remove Deprecated Origin Field. Use Origins instead. BREAKING CHANGE 2023-03-08 11:58:19 +01:00
b97f051009 Feat: display last used time of WebAuthn credentials (#600)
* display last used time of the webauthn credentials
2023-02-27 10:52:52 +01:00
02fa21f007 fix: fix memory aliasing in for loop 2023-02-07 09:22:01 +01:00
d4aa9c86b9 feat: store webauthn credential backup info 2023-02-06 14:00:47 +01:00
ca62cf421f feat: introduce hanko profile element and related api changes (#495)
* feat: introduce hanko profile element and related api changes
2023-01-25 10:55:23 +01:00
60fe35692c feat: add config option to add multiple webauthn rp origins 2022-12-14 10:38:43 +01:00
1f6edcf6de feat: remove platform attachment requirement on registration 2022-11-23 14:57:36 +01:00
6dfbd68896 Merge branch 'main' into add-audit-logs
# Conflicts:
#	backend/go.mod
#	backend/go.sum
2022-10-13 08:49:20 +02:00
b20582ecbe fix(hanko-frontend-sdk): access X-Auth-Token header during cross-doma… (#251)
* fix(hanko-frontend-sdk): access X-Auth-Token header during cross-domain operations only
2022-10-12 18:07:29 +02:00
b73067b07e chore: rename audit log client 2022-09-27 09:51:13 +02:00
d71c0aa42a chore: rename some audit log types 2022-09-12 11:46:52 +02:00
f02bccb685 feat: add audit logs 2022-08-18 16:53:34 +02:00
77cfcc7f8c fix: remove transports at webauthn login 2022-08-04 12:22:42 +02:00
53c708a163 Merge pull request #153 from teamhanko/fix-android-webauthn-login
fix: fix webauthn login when userHandle is empty
2022-08-01 09:54:23 +02:00
067ca8d755 feat: handle auth-token header and create cross domain cookies (#135)
feat: handle auth-token header and create cross domain cookies
2022-07-28 14:35:44 +02:00
9e2c5e3c27 chore: remove comments
Co-authored-by: lfleischmann <67686424+lfleischmann@users.noreply.github.com>
2022-07-28 08:44:37 +02:00
1a73549448 fix: fix webauthn login when userHandle is empty 2022-07-26 15:25:07 +02:00
e0b51e4df5 Feat: android support (#145)
* chore(backend): use 'ResidentKeyRequirementPreferred' during credential registration
* chore(hanko-js): hide passkey button on android
2022-07-21 09:58:57 +02:00
de2ad1a7fd Feat handle allowed credentials and transports (#131)
* feat(backend): handle allowed credentials and transports 
* feat(hanko-js): conditionally trigger webauthn on email login
2022-07-19 11:51:17 +02:00
4fde8ca2e3 fix(backend): change /webauthn/finalize status codes 2022-06-27 17:21:18 +02:00
4de446475f fix: fix module path 2022-06-21 12:36:11 +02:00
3e46664406 feat: improve error logging 2022-06-15 17:24:54 +02:00
80048acd8f refactor: move backend files to its own directory 2022-06-09 14:36:00 +02:00