GithubHelp home page GithubHelp logo

Comments (9)

toupeira avatar toupeira commented on July 18, 2024

Hi there @gigr! Yes this change would be very welcome and your plan sounds about right, though I haven't yet looked into the exact requirements for the other algorithms. But we use json-jwt which supports most of them, so it really should just be a matter of figuring out how to configure the necessary keys/secrets.

We also need to make sure DiscoveryController#keys_response includes the required parameters for the JWKS, see RFC 7517.

Actually I just realized we're not using jws_public_key, since the public key can be extracted from the private one. So maybe it would be possible to replace the jws_* settings with a signing_key setting which would be responsible for returning an object that can be passed to JSON::JWK.new:

Doorkeeper::OpenidConnect.configure do
  signing_key do
    OpenSSL::PKey.read(File.read(ENV['JWS_PRIVATE_KEY'])
  end
end

And then maybe we can deduce the signing_algorithm value from the class and attributes? If not we could just add it as an explicit setting, as you suggest.

from doorkeeper-openid_connect.

gigr avatar gigr commented on July 18, 2024

Awesome! The idea of adding a signing_key makes sense as well. I'll explore that as an option in the PR. I'll be cognizant of the fact that adding a new configuration option for configuring the same thing could break backwards compatibility as well.

I could see this being a few PRs as opposed to one larger one. Do you want me to break it up or would you rather a single, feature-complete PR?

from doorkeeper-openid_connect.

toupeira avatar toupeira commented on July 18, 2024

I think we should be fine if we keep jws_private_key, log a deprecation warning there, and delegate to the new signing_key. I deprecated jws_public_key now in 8494eed.

Feel free to submit smaller PRs if you want, but a single one is perfectly fine as well. I don't plan on making a lot of changes in the near future, so you should be safe from merge conflicts ;-)

from doorkeeper-openid_connect.

gigr avatar gigr commented on July 18, 2024

Okay! I'll ping you when I have something to show. Thanks so much!

from doorkeeper-openid_connect.

travisofthenorth avatar travisofthenorth commented on July 18, 2024

@gigr is this still on your radar? I would also love to get support for additional algorithms.

from doorkeeper-openid_connect.

gigr avatar gigr commented on July 18, 2024

Not as much. We've found that using the public/private keypair is actually a better solution for our needs. RSA256 is fine as well.

from doorkeeper-openid_connect.

travisofthenorth avatar travisofthenorth commented on July 18, 2024

@toupeira is this PR sufficient? #34

from doorkeeper-openid_connect.

travisofthenorth avatar travisofthenorth commented on July 18, 2024

@toupeira any idea when you might publish a new version of the gem?

from doorkeeper-openid_connect.

toupeira avatar toupeira commented on July 18, 2024

@travisofthenorth very soon, waiting for #36 to get in as well.

from doorkeeper-openid_connect.

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.