Live data from Hacker News

OAuth 2.0 Security Best Current Practice

tools.ietf.org

81–90 of 98 posts

Re: OAuth 2.0 Security Best Current Practice

#81
post #9
post #7

Earlier quoted context omitted.

> Of course that is if the OAuth provider allows it. That's the catch. Last time I checked, at least Google didn't. So how can you write a (F)OSS email application for accessing GMail via OAuth2, without putting the secrets into the code (which Google also forbids)?

Google Mail's OAuth2 instructions discuss this point explicitly.

Have a link?

Re: OAuth 2.0 Security Best Current Practice

#82

This is all good and useful, but I wish OAuth folks would fix the bugs in the spec like, e.g. "The authorization server MAY issue a new refresh token, in which case the client MUST discard the old refresh token and replace it with the new refresh token. The authorization server MAY revoke the old refresh token after issuing a new refresh token to the client." This sounds reasonable on the surface, and technically it…

"… or otherwise invent some other way to ensure the new refresh token is correctly received at the client before revoking the old."

These sorts of details will typically wind up in an implementation report document. It's rare that an IETF protocol specification document will attempt to pre-determine the solution to all such implementation details up front, and IMO, not good when they do.

In some contexts, it may be much better to require the application to re-obtain resource owner authorisation than to allow a replay of a refresh token. In others, it may be much better to avoid requiring resource owner authorisation. What you see as a bug, others would see as a critical feature.

Re: OAuth 2.0 Security Best Current Practice

#83

This is all good and useful, but I wish OAuth folks would fix the bugs in the spec like, e.g. "The authorization server MAY issue a new refresh token, in which case the client MUST discard the old refresh token and replace it with the new refresh token. The authorization server MAY revoke the old refresh token after issuing a new refresh token to the client." This sounds reasonable on the surface, and technically it…

Could not find what you have quoted in article. What are you referencing?

Re: OAuth 2.0 Security Best Current Practice

#84

This is all good and useful, but I wish OAuth folks would fix the bugs in the spec like, e.g. "The authorization server MAY issue a new refresh token, in which case the client MUST discard the old refresh token and replace it with the new refresh token. The authorization server MAY revoke the old refresh token after issuing a new refresh token to the client." This sounds reasonable on the surface, and technically it…

There are many parts to the spec for the full picture. This here specifies that server MAY issue a new refresh token (clarifying whether it is required), and if new refresh token is issued, the client MUST discard the old.

I believe the intention here is not to verify whether it was used once as you state. And transient matters (how the client will detect if not received would be a different scope), for example, if client didn't receive (or lost), then likely here you may need restart auth cycle.

Re: OAuth 2.0 Security Best Current Practice

#85
post #3

To this day I have no idea how one should handle client secrets in (F)OSS applications, and I'm often wondering if I'm the only one. I guess what this text says in 4.13 is "just don't put it somewhere for anyone to see", which means that the only solution is to make the id and secret configurable and let the user register the application with its OAuth provider, which of course most users wouldn't know how to do. As…

You would not embed the client secret to any application unless you are open for public to see and use the secret (most likely not for applications you distribute to public domain).

Re: OAuth 2.0 Security Best Current Practice

#87
post #81
post #9

Earlier quoted context omitted.

Google Mail's OAuth2 instructions discuss this point explicitly.

Have a link?

"The process results in a client ID and, in some cases, a client secret, which you embed in the source code of your application. (In this context, the client secret is obviously not treated as a secret.)"[0]

[0]: https://developers.google.com/identity/protocols/oauth2

Re: OAuth 2.0 Security Best Current Practice

#89
post #65

Earlier quoted context omitted.

This is solvable by use of a web worker as a key vault: https://gitlab.com/jimdigriz/oauth2-worker

That is very cool, thanks for sharing! Edit: This seems pretty new, any timeline for a release?

Thanks. I am not wholly convinced of the benefits of releases for a project of this scale, I suspect most will just reimplement the moving parts in their own code for a variety of (usually NIH) reasons.

Re: OAuth 2.0 Security Best Current Practice

#90

Earlier quoted context omitted.

There's a spec for dynamic registration of clients for Oauth2/OIDC if I recall correctly. There's a reason that you have to register, and it's because you're potentially obtaining information about users, and they need a way to be able to block specific (potentially malicious) clients using their IDP.

When I was looking up the OAUTHBEARER draft, there's a (OPTIONAL) field in the error response to point to the openid-configuration for dynamic registration. At the time I was implementing things for Thunderbird, no one was using this yet, and I would be surprised if this has actually been implemented by any major provider in any sort of usable way for clients.

Did you end up implementing it in Thunderbird? We're looking to do that at my company and I'm currently implementing OAUTHBEARER in cyrus-sasl (which then could be used in cyrus-imapd & postfix)
Post reply on HN