Complete spec except for references and security considerations.
Changes since last document are grammatical, and the examples were updated to reflect spec changes.
Documents have been uploaded to Google WRAP Group.
-Dick
I'll see your PDF and raise you... another PDF.
Cheers,
Brian
Here's how the flow would look:
Initial request:
client_id=xyz&username=bob&password=secret
Initial response:
captcha_url=http://www.example.com/captcha12345
Next request:
client_id=xyz&username=bob&password=secret&answer=teapot
The problem is that the server processing that last request doesn't
necessarily know which captcha challenge the client received.
Simplest way to fix it I can see is to have the last request look like
this:
client_id=xyz&username=bob&password=secret&answer=teapot&captcha_url=http://www.example.com/captcha12345
Cheers,
Brian
WRAP 0.9.6.0 commentsSection 1.1"Since the Access Token provides the Client authorization to the Protected Resource forthe life of the Access Token, the Authorization Server should issue Access Tokens thatexpire within an appropriate time."I think this will be true in the general case, but it's not actually required by the protocol.(As I mentioned earlier, the fact that ATs have baked in expiration makes it much easierto implement revocation.) Also, I think delegation tokens are a big enough deal thatthey merit a mention in this section. Lastly, it's a bit weird (though I can see why youdid it this way) to talk about protected resource access prior to permission granting.Maybe we could add a section between 1 and 1.1? Something like this?Initial AuthorizationWRAP protocol flows typically begin with a client obtaining permission to access aresource. Different credentials and profiles can be used to obtain this permission, butonce authorized a client is provided a Delegation Token and Access Tokens.
Delegation Tokens represent long-lived permission to access a resource. These tokensare extremely sensitive, and are only sent to the Authorization Server over HTTPS.
Section 1.2Maybe instead of "Two Legged Flow", call this "Autonomous Client Flow"Section 1.3Maybe instead of "Three Legged Flow", call this "User Delegation Flow".
Maybe change "User delegating to a Client to act on behalf of a User" to read "Userdelegating to a client to act on behalf of that User." I dunno. The existing text readfunny, but I'm having trouble rephrasing it so it sounds better.Rich App Profile"the Authorization presents the Verification Code to the User" doesn't quite parse.Should be "The Authorization Server presents the Verification Code to the User."the list of methods to obtain the verification code might be easier to read as bulletpoints.
I think the Rich App Profile needs a bit of a shakedown, I'll put that in my comments on5.5.Definitions"Client" should be listed before "Client Identifier"Section
4.1 "Access Token"Way too many implementation constraints here. How about this instead?The exact format of the Access Token is opaque to Clients and is out of scope of thisspecification. However, Protected Resources MUST be able to verify that the AccessToken was issued by a trusted Authorization Server and is still valid. Access TokensSHOULD periodically expire. The expiry time of Access Tokens is determined as anappropriate balance between excessive resource utilization if too short and unauthorizedaccess if too long.
Section 4.4 "Client Calls Protected Resource Using Post Parameter"This whole section is a bad idea. It's really difficult (err, impossible?) to implement fornon-form-encoded post bodies, and it just causes confusion and bad code when peopletry to implement it. OAuth allowed this, and no one ever actually deployed it, andthat's a good thing.
Can we replace section 4.4 with something like this?Accessing Protected Resources Using Other MechanismsThe Protected Resource MAY allow the Client to present the Access Token using anyscheme agreed on by the Client and Protected Resource. Use of the Authorizationheader is RECOMMENDED, since HTTP implementations are aware that Authorizationheaders have special security properties and may require special treatment in cachesand logs.Protected Resources SHOULD take precautions to insure that Access Tokens are notinadvertently logged or captured.
General comment on error handlingI think we are misusing the HTTP 400 error code. In particular, I've seen servers returnHTTP 400 for non-authorization related problems. It would be bad if a malformed URLwas misinterpreted as an authorization problem; it can make debugging really hard.(why is this app asking me to login again? I know that password was right!)How about this as a general strategy for error handling?1) Authorization Server errors are returned in the body of a 401 HTTP response.I think we need to define an encoding mechanism for the body. The spec says thingslike "response body has parameters X and Y", but doesn't mention how they areencoded. I assume we want form-encoding?2) Protected Resource returns 401 HTTP Response with error detail in WWWAuthenticateheader.Again, we need an encoding mechanism. name="url-encoded-value" is probablygood. (Multiple name-value pairs separated by whitespace.)3) For both of those cases, we define the following (optional) error parameterswrap_error_reason: machine readable error codeswrap_error_explanation: developer readable error explanations
General comment on POSTS to the authorization serverWe should specify that these are form-encoded. (Oh, never mind. Found it in section6.5. Maybe a pointer?)
Section 5.4.5 Client Requests Delegation TokenNo mentioned here of server validating the verification code/callback. I think thevalidation rules from section 5.4.7 should be moved here instead. How aboutThe Authorization Server verifies that the Delegation Token request is valid as follows:- the client secret MUST match the client id- the client id MUST match the client id from the authorization redirect- the client verification code MUST match the client id from the authorization redirect- the callback MUST match the callback URL from the authorization redirect- the verification code MUST not have expiredThe Authorization Server MAY also require that a verification code is not reused.
General Comment: the phrase "Authorization Servers are RECOMMENDED to" is a littleawkward, should probably say "Authorization Servers SHOULD" everywhere.
Section 5.5 Rich App ProfileWe need wrap_client_state here (iphone apps with callback URLs are just as vulnerablesession fixation as web apps).At which point this profile is identical to the web app profile, except with no client secret,and callback URL optional. I think that's good.Section 5.5.3We should (eventually) move some common language about the structure of theverification code to security considerations I think.Section 5.5.3.*I think we can bundle all of these sections together in a way that would make themeasier to follow. Maybe something like this?
Section 5.5.6There is a random occurrence of "HTTP 400 Bad Request" in the text. =)
Section 5.5.7 Access Token RefreshWe MUST require client id and client secret when refreshing delegation tokens.Otherwise there is no way to recover from compromised delegation tokens besidesrevoking all of them.(If we require client id and client secret, we can just rotate the client secret.)
Section 6.6Where did the 2083 byte limit come from?
Section 6.7rather than saying JWT and SWT are recommended, we should say "MAY".
<WRAP_0_9_6_0_comments.pdf>