Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
feat(webauthn): add support for ES256 algorithm and simplify authenticator availability check
Victor Hugo dos Santos7812bc4d2156
diff --git a/backend/src/services/webauthn/webauthn-service.ts b/backend/src/services/webauthn/webauthn-service.tsindex f5ddac0cb7..73ff22487c 100644--- a/backend/src/services/webauthn/webauthn-service.ts+++ b/backend/src/services/webauthn/webauthn-service.ts@@ -86,6 +86,13 @@ export const webAuthnServiceFactory = ({userName: user.email || "",userDisplayName: user.email || "",attestationType: "none",+ // ES256/RS256 only. The library default also offers EdDSA (-8) first, which+ // Ed25519-capable authenticators (e.g. modern YubiKeys) will pick, but Ed25519+ // cannot be verified under FIPS mode (OpenSSL FIPS provider rejects the key+ // import with "Invalid keyData"), so the credential enrolls and then always+ // fails MFA. ES256 is mandatory for FIDO2 authenticators, so nothing is+ // excluded in practice;+ supportedAlgorithmIDs: [-7, -257],excludeCredentials: existingCredentials.map((cred) => ({id: cred.credentialId,transports: cred.transports as AuthenticatorTransportFuture[]diff --git a/frontend/src/hooks/api/webauthn/useRegisterPasskey.tsx b/frontend/src/hooks/api/webauthn/useRegisterPasskey.tsxindex 0497ebf659..8f8c8e0f10 100644--- a/frontend/src/hooks/api/webauthn/useRegisterPasskey.tsx+++ b/frontend/src/hooks/api/webauthn/useRegisterPasskey.tsx@@ -21,24 +21,11 @@ export const useRegisterPasskey = () => {const [isRegistering, setIsRegistering] = useState(false);const registerPasskey = async (name?: string, verify?: VerifyAttestation): Promise<boolean> => {- if (- !window.PublicKeyCredential ||- !window.PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable- ) {+ if (!window.PublicKeyCredential) {createNotification({ text: "WebAuthn is not supported on this browser", type: "error" });return false;}- const isAuthenticatorAvailable =- await window.PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable();- if (!isAuthenticatorAvailable) {- createNotification({- text: "No passkey-compatible authenticator found on this device",- type: "error"- });- return false;- }-setIsRegistering(true);try {const options = await generateOptions();