mirror of
https://github.com/andwati/zitadel.git
synced 2026-12-05 18:38:52 +00:00
feat(session): Passkey Check API with relation tables (#11858)
# Which Problems Are Solved As part of #11035 , this PR implements the Passkey check logic for session validation # How the Problems Are Solved - Refactor webauth FinishLogin to support new domain model - Add webauth config to defaults - Implement passkey check logic and tests - Manual transaction management to avoid stalling the DB while FinishLogin callback is executed - Update passkey Type condition to allow passing a text operation (equal, contains, etc..) # Additional Context This is a cherry-picked PR + minor changes, coming from https://github.com/zitadel/zitadel/pull/11164 - Relates to #11035 --------- Co-authored-by: Fabienne Bühler <[email protected]> Co-authored-by: Gayathri Vijayan <[email protected]>
This commit is contained in:
co-authored by
Fabienne Bühler
Gayathri Vijayan
parent
ec7a6d5526
commit
022bf74060
@@ -5,6 +5,7 @@ import (
|
||||
"github.com/zitadel/zitadel/backend/v3/storage/eventstore"
|
||||
"github.com/zitadel/zitadel/internal/config/systemdefaults"
|
||||
"github.com/zitadel/zitadel/internal/crypto"
|
||||
"github.com/zitadel/zitadel/internal/webauthn"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -16,6 +17,7 @@ var (
|
||||
sessionTokenDecryptor SessionTokenDecryptor
|
||||
mfaEncryptionAlgo crypto.EncryptionAlgorithm
|
||||
otpSMSSecretGeneratorConfig *crypto.GeneratorConfig
|
||||
webauthnConfig *webauthn.Config
|
||||
)
|
||||
|
||||
func SetPool(p database.Pool) {
|
||||
@@ -49,3 +51,7 @@ func SetOTPSMSSecretGeneratorConfig(cfg *crypto.GeneratorConfig) {
|
||||
func SetMFAEncryptionAlgorithm(mfaEncryptionAlg crypto.EncryptionAlgorithm) {
|
||||
mfaEncryptionAlgo = mfaEncryptionAlg
|
||||
}
|
||||
|
||||
func SetWebAuthNConfig(cfg *webauthn.Config) {
|
||||
webauthnConfig = cfg
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user