Hi Nick,

Thanks for the feedback and taking the time to review the draft.

> 1a. Why not leverage the `email` scope from OIDC instead of introducing a new 
> token response `username` parameter?

Three reasons:
 1. The profile doesn't require OpenID Connect (and shouldn't). Many mail, 
calendar and contacts deployments run plain OAuth servers. Making OIDC 
mandatory would mean every server has to issue signed JWT ID tokens and publish 
keys (JWKS). Every client would then have to validate them: signature, iss, 
aud, exp and nonce. That's a lot of work just to learn one string.
 2. A username is not necessarily an email address. The OIDC email claim is the 
user's contact address, which is not the same thing. preferred_username also 
doesn't work: OIDC Core says relying parties must not depend on it being unique 
or stable.
 3. With the authorization-code flow, email isn't guaranteed to be in the ID 
token. They are guaranteed by the spec in the ID token only when no access 
token is issued, so the client now has to fetch it from the UserInfo endpoint, 
which now has to be advertised in resource indicators, is an extra round trip 
etc.

> 1b. The draft says "the value MUST be the same in every token response issued 
> under the same authorization." What is the expected behavior if the user 
> changes their username?

The current spec-compliant behaviour would be to terminate the authorization. 
This is a rare edge case, but I agree this restriction probably isn't necessary 
— the authorization ensures it's the same account still, so actually this could 
change and it would be nice if the client just detected this and updated its 
account label. Thanks — I'll update the spec.

> 2. refresh_key looks complicated for clients and the AS to get right, with 
> all the concurrency checks and required extra storage

I would disagree this is that complicated to get right. The concurrency checks 
and locking are already needed to ensure you don't issue or process 
simultaneous requests to refresh, as this would revoke the authorization 
immediately without the refresh key. The client just has to generate one random 
string that it stores with the refresh token and sends with the request.

> It also requires the AS to store literal RT strings for an unbounded amount 
> of time

It does not require this. The only thing it requires is the ability to store 
one extra string per authorization. I agree we should mandate a maximum length 
in the spec — I'll add that. Other than that, if you implement your RT with a 
generation counter and MAC you can trivially detect old refresh tokens while 
having a fixed size storage for the authorization.

> I'm unclear why anything new here is needed and the profile can't require or 
> at least strongly recommend DPoP for theft protection, rather than rotation.

This profile is for use with non-HTTP profiles so we can't mandate DPoP 
throughout as it doesn't work there. The profile does describe a slightly 
obscure way an AS and client can support DPoP for just the refresh token, 
however mandating this would significantly raise the bar for adoption — it's a 
lot of added complexity, and we really want to encourage email clients to stop 
using username/password, so we would prefer not to add obstacles to this path.

Also, on platforms without a non-extractable key store, DPoP mostly protects 
the network path, not stored credentials. Anyone who copies the device's 
storage gets the key along with the refresh token. If the server then stops 
rotating because it's protected via DPoP, that attacker has access indefinitely 
and nothing ever detects it. Rotation at least detects reuse eventually. DPoP 
instead of rotation is only an upgrade where the key is held in hardware.

Thanks again for the feedback.

Cheers,
Neil.
_______________________________________________
OAuth mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to