36 Commits

Author SHA1 Message Date
7a78b8e172 fix: change module name corresponding to version 2025-09-25 19:15:20 +02:00
983000d94e feat(ee): saml idp initiated sso 2025-02-13 12:44:36 +01:00
c40897ac09 feat: always persist sessions server-side, config adjustments (#1997)
* feat: always persist sessions server-side, config adjustments
2024-12-20 09:52:52 +01:00
d510fa5116 fix: check server side session for REST API endpoints (#1988)
Check server side sessions in session middleware for REST API endpoints.
Without it a server side session could be deleted, but can still be used at the REST API endpoints.
2024-12-05 10:08:45 +01:00
c264108f87 Admin api changes (#1974)
* feat: return mfa only flag

* feat: add webauthn admin handler

* feat: add webauthn credential handler to router

* feat: add password mgmt admin endpoints

* feat: add sessions admin handler

* feat: add otp admin handler

* feat: add otp to admin user dto

* test: add admin password handler test

* test: add admin webauthn handler test

* test: add admin session handler test

* test: add admin otp handler test

* chore: merge both loadDto functions

* tests: fix test name typos
2024-12-03 11:22:52 +01:00
f32f48e85b feat: trusted devices and 'remember me' (#1982) 2024-11-29 11:06:47 +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
38a11deffa fix: only use transaction connection in a transaction (#1598)
* fix: only use transaction connection in a transaction

* test: fix webhook tests
2024-08-28 11:56:09 +02:00
0835215654 chore: add webhooks to flow-api (#1574) 2024-08-13 16:00:52 +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
def7ad37a0 [FEAT] disable email delivery (#1419)
* feat: add config to disable email delivery

* chore: update config schema

* docs: add new config parameter

* test: fix test

* fix: rename email webhook event

* docs: Update backend/docs/Config.md

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

---------

Co-authored-by: Lennart Fleischmann <67686424+lfleischmann@users.noreply.github.com>
2024-04-18 15:15:02 +02:00
8d745cc742 feat(webhooks): add webhooks trigger to thirdparty auth
* add user.create event trigger to thirdparty signup
* add user.update when an email is added to an identity
* add email.create when email is created

Closes: #1361
2024-02-27 11:17:32 +01:00
0b6c5bef76 Merge branch 'main' into feat/692-webhooks 2024-02-12 10:04:28 +01:00
a35725c69c Merge branch 'main' into fix/1027-improve-passkey-naming 2024-01-31 14:00:58 +01:00
38209aa1bd Merge branch 'main' into feat/692-webhooks 2024-01-30 11:36:44 +01:00
97ba5cff99 1030 - Refactor SMTP settings to be outside of passcode config (#1121)
* 1030 - Refactor SMTP settings to be outside of passcode config

* Backwards compatibility of SMTP settings

* Do not error if root smtp and passcode smtp are defined. Log warning instead

* Update warning message
2024-01-30 09:34:10 +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
c9994bdc3a fix(review): fix review findings
* admin api: make email primary when user has no emails
* utils: move get updated user and webhook trigger to utils to reduce duplicated code
* events: remove unused user and email event - Check is replaced with string variant
* remove unused dtos
* fix tests after changes
* webhook tests: switch to test.Suite instead of TestPersister -> added deprecation annotation to test.NewPersister
* Email Verification: Fix trigger of webhook when email verification is enabled and a email is created but not validated

Closes: #692, #1051
2024-01-25 13:20:56 +01:00
3cafb66754 feat(webhooks): add tests and fix review issues
* add tests for webhooks
* improve error handling when context does not contain webhook manager
* add logging to worker and fix nesting error overwrite
* remove enable and disable methods in favor for update method
* move data in jwt from subject claim to custom `data` claim
* add event in jwt to custom `evt` claim
* change webhook trigger to only fire once per hook (was once per subscribed event in hook before)

Closes #692
2024-01-17 14:19:10 +01:00
45cbd74314 feat(webhooks): add webhooks
* add webhooks settings to config
* add webhooks entity for database
* add endpoints for webhooks
* add worker for asynchronously executing webhooks
* add trigger for events to user change/create/delete users/emails

Closes #692
2024-01-12 16:04:31 +01:00
724013e56d feat(saml): implement enterprise saml feature
Co-authored-by: Stefan Jacobi <stefan.jacobi@adesso.de>
2023-10-18 10:50:58 +02:00
dd4fa7c80b fix: public router adhere to LogHealthAndMetrics option
In contrast to the admin routes, the public router does not disable logging on the health endpoints.
This change alters the behaviour of the public router to be in line with the admin router.
2023-09-12 13:41:59 +02:00
1ba2ab1d89 feat: add status page 2023-08-14 10:17:23 +02:00
f944abcd63 feat(backend): let cookie name be configurable through config 2023-07-03 15:14:57 +02:00
78c8067299 feat: switch deprecated prometheus middleware with new echoprometheus middleware 2023-06-12 08:16:38 +02:00
44248c3145 Merge pull request #780 from teamhanko/feat-add-iss-claim
Feat add iss and aud claims
2023-05-31 13:32:50 +02:00
404c736f77 Improve custom events and update example apps (#768) 2023-05-30 13:37:30 +02:00
df520f646c fix: build 2023-05-26 11:56:41 +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
fb67693a88 feat(thirdparty): sign in with apple 2023-04-28 13:31:12 +02:00
3a8f171596 Merge remote-tracking branch 'origin/main' into feat-simplify-config 2023-04-12 17:50:37 +02:00
cb272a829a Merge branch 'main' into test-improve-integration-tests
# Conflicts:
#	backend/handler/public_router.go
2023-04-12 16:13:07 +02:00
62c0595858 test: change user handler tests to use router 2023-03-31 12:09:06 +02:00
afdfa4ad7d test: start integration improvement 2023-03-31 09:00:16 +02:00