Code Monkey home page Code Monkey logo

Comments (4)

b---c avatar b---c commented on September 15, 2024 1

Thank you @panva! I'll incorporate your suggestions (probably tweaked somewhat) into the draft source.

from draft-dpop.

panva avatar panva commented on September 15, 2024

Disclaimer: I am not a CORS expert. I am unfamiliar with various server framework defaults when it comes to CORS setup so this may not be applicable to every reader/developer. I suggest we add notes to sections 8 and 9 to give implementers a hint that additional scaffolding may be required to support browser based client applications.

I would highly suggest this be reviewed by a subject matter expert first.


In Section 8 Authorization Server-Provided Nonce, given the use_dpop_nonce error is part of the response body.

Note that browser-based client application using CORS1 only have access to CORS-safelisted response HTTP headers by default, in order for the application to obtain the DPoP-Nonce HTTP header value, authorization server CORS configuration may need to be adjusted, e.g. by using the Access-Control-Expose-Headers2 response HTTP header to expose the DPoP-Nonce HTTP Header to the application.


In Section 9 Resource Server-Provided Nonce, given the use_dpop_nonce error is in the WWW-Authenticate HTTP header.

Note that browser-based client application using CORS1 only have access to CORS-safelisted response HTTP headers by default, in order for the application to detect that nonce use is being requested and to obtain the DPoP-Nonce HTTP header value, resource server CORS configuration may need to be adjusted, e.g. by using the Access-Control-Expose-Headers2 response HTTP header to expose the WWW-Authenticate and DPoP-Nonce HTTP Headers to the application.

Footnotes

  1. https://fetch.spec.whatwg.org/#http-cors-protocol 2

  2. https://fetch.spec.whatwg.org/#http-access-control-expose-headers 2

from draft-dpop.

bc-pi avatar bc-pi commented on September 15, 2024

I don't love it but #154 has my attempt at this. It uses somewhat reworded parts of @panva 's suggested text. And I decided to put a note about WWW-Authenticate in Sec 7.1. The DPoP Authentication Scheme rather than repeating the nonce stuff in Section 9. That seems to better follow the existing structure/flow of the document. For better or worse. But Section 9 points back to Section 8 so kinda inherits it's stuff. While the Access-Control-Expose-Headers are relevant to CORS clients in Section 7.1 regardless of nonce usage.

from draft-dpop.

b---c avatar b---c commented on September 15, 2024

merged #154

from draft-dpop.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.