Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should this approach extend to native applications? #38

Closed
NickBorgersOnLowSecurityNode opened this issue Apr 8, 2024 · 5 comments
Closed

Comments

@NickBorgersOnLowSecurityNode

This isn't necessarily the scope of the proposal and I don't know if it should be co-mingled, but I wonder what native apps will do. It's perhaps a different failure mode for native client tokens to be stolen because something like a malicious browser extension probably wouldn't be able to accomplish, but is another situation where session token theft can be a problem and device binding would help mitigate.

If considering attacks beyond a browser it really indicates the OS needing to provide an API for creating keys which userspace software can request operations with (sign/encrypt) but not directly access without elevated OS privileges. I'm not well-versed in the nuances of how this has been implemented.

I'm coming at this from the perspective of a Corpsec Engineer who struggles with consistent revocation of long-lived session tokens in SSO-integrated apps. This proposal doesn't address that problem, but I'm acutely aware of just how many forms sessions tokens take. On a mobile OS (iOS/Android) stealing the session tokens from another application likely implies a level of host compromise that only a TPM/Secure Enclave would mitigate, but on a desktop/laptop OS my impression is that userspace privileges could likely be used to harvest session tokens so device-binding would provide some value.

These thoughts came to reading responses to #13

@arnar
Copy link
Collaborator

arnar commented Apr 8, 2024

If your native apps use OAuth, it's well worth considering DPoP at least on the refresh token -> access token exchanges. In fact doing something similar* to that is what led us to DBSC.

(* Similar because it pre-dates DPoP, but in the end it's a simple JWT in the client_assertion on the /token endpoint.)

@NickBorgersOnLowSecurityNode
Copy link
Author

An RFC to read (on DPoP), thank you.

I will subsequently :cry-in-corpsec: because I don't get to write/modify the code of any products I'm responsible for the security of.

@kmonsen
Copy link
Collaborator

kmonsen commented Sep 16, 2024

We have discussed this for a while, and have decided for now DBSC will only be available in Browsers as apps can use similar things themselves. It will most likely be available for apps using webviews for Android, but most likely not for the apps only using the chromium network stack (AKA cronet).

@kmonsen kmonsen closed this as completed Sep 16, 2024
@NickBorgers
Copy link

Not that I needed to, but I agree with leaving native apps out of DBSC's scope.

@arianvp
Copy link

arianvp commented Sep 17, 2024

One interesting piece of feedback that i have w.r.t to this is that Apple has something akin to DSBC https://developer.apple.com/documentation/devicecheck/validating-apps-that-connect-to-your-server for native apps which reuses the WebAuthn format for signstures.

For compatibility reasons it might be interesting to consider WebAuthn instead of jwt for the signatures.

Though honestly not a very strong opinion on this. It's just awkward that a modern website will have to have two slightly different signature schemes implemented in order to implement secure sessions. WebAuthn for log in and DSBC for session continuation.

It might be preferable to collapse this into just WebAuthn so there is less to implement for Relying Parties.

I think Apple made that choice deliberately as people who adopt passkeys in their apps for user auth might as well use the same code for adding device auth on top.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants