Code Monkey home page Code Monkey logo

Comments (4)

pauldijou avatar pauldijou commented on June 27, 2024

That's a good idea. Would you consider doing a PR for that? I'm not doing much Scala lately and don't really have time for this project.

from jwt-scala.

brakthehack avatar brakthehack commented on June 27, 2024

Can't we just remove the need to rely on BouncyCastle and have the library rely on what is already installed? That way, the library leaves the decision of which provider to use completely up to the user's app.

If this is an acceptable solution, I don't mind submitting a PR for this issue.

from jwt-scala.

pauldijou avatar pauldijou commented on June 27, 2024

How would you do that? Not sure how you can just import something you're not even sure is present. Also, ensure the API is the correct one.

I'm also concerned about the migration path for existing users.

from jwt-scala.

brakthehack avatar brakthehack commented on June 27, 2024

See: #126 for an initial pass. I've already tested it for my use case and it works well.

Essentially, we place the onus on the user to give a provider that meets their use case. If the user does not provide a sufficient provider for the algorithm they choose, then it will fail as expected. Otherwise, they can provide BouncyCastle or some other provider on their own if needed.

Edit: I should add, for most algorithms in the library (except two), the stock JCE provider worked perfectly fine.

In my case, I needed a FIPS-complaint provider which I provided at application boot time via config. However, this library decided to ignore the recommendation of my application, inserting its own provider and thereby weakening the security of the entire app.

I agree there is essentially a contract change which will require a user decision, but IMO the tradeoff is worth it in the long term. Would love to hear your thoughts.

from jwt-scala.

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.