Implement Webauthn PRF to encrypt/decrypt auth credentials using an external device #2482
Replies: 7 comments 1 reply
-
Apparently there is currently no way to get a key when using passkey: https://developer.apple.com/forums/thread/731512 This guy found a way. I will probably test it, and if it works I'm going to write a plugin to sfdx. Is there a way to write "auth middleware plugins to sfdx" ? (if not, maybe this could be a feature! Companies can setup their own auth middlewares) https://blog.millerti.me/2023/01/22/encrypting-data-in-the-browser-using-webauthn/ I asked the blog's author if it is possible to encrypt a local db using his approach with prf |
Beta Was this translation helpful? Give feedback.
-
https://groups.google.com/a/fidoalliance.org/g/fido-dev/c/kMe6Kb4GCpU?pli=1 |
Beta Was this translation helpful? Give feedback.
-
Extension that adds PRF to passkeys |
Beta Was this translation helpful? Give feedback.
-
Currently only supported by Chrome |
Beta Was this translation helpful? Give feedback.
-
More recent discussions about the implementation of PRF extension https://groups.google.com/a/chromium.org/g/blink-dev/c/iTNOgLwD2bI |
Beta Was this translation helpful? Give feedback.
-
@MasterKale @emlun this is the use case I'm thinking about MasterKale/SimpleWebAuthn#454 This cli from Salesforce stores encrypted credentials on the host and they are accessible by the current logged in user. If someone access my machine and is able to login with my user or is granted root access, this person can access all my Connected Environments. So, encrypting those credentials with PRF could protect attackers from accessing my environments through the CLI because they would not have access to my phone. My idea is to only decrypt local stored auth credentials if the passkey mobile auth flow succeeds. Could you help me to understand what is currently limiting PRFs usage on phones? |
Beta Was this translation helpful? Give feedback.
-
@mshanemc
Webauthn with an external device would be useful to ensure the identity of the person accessing secrets from local keychains/keystorage/vaults.
I think implementing passkey via bluetooth device could make sfdx "secure", or more secure. If a unauthorized person access my computer he/she won't be able to access the org because he/she won't have access to the device which is used for authentication.
I think this could be useful to further protect "production/full-copy" orgs. What do you think? Like I said in the beginning, this is just a hypothesis. I don't have the knowledge to say if it actually increases or not security.
Webauthn demo: https://webauthn.io/
Passkeys: https://www.passkeys.com/guides
PRF: https://github.com/w3c/webauthn/wiki/Explainer:-PRF-extension
Another demo to check if PRF is supported:
https://levischuck.com/blog/2023-02-prf-webauthn
--passkey
go through the passkey multi-device flow. Users have to auth using their mobile devices before interacting with orgs in their computers.--passkey
are the only ones that go through a passkey middleware to decrypt auth info.sfdx command -> local passkey middleware -> salesforce
Local Passkey Middleware would do the following:
When registering an Org:
When interacting with an Org:
In both cases, if the auth credentials can't be decrypted, requests fail.
Beta Was this translation helpful? Give feedback.
All reactions