-
Notifications
You must be signed in to change notification settings - Fork 51
feat: JWT verification builtins (#94) #498
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
@microsoft-github-policy-service agree |
|
Hey @wetpeanuts, Thank you for the contribution!
|
|
Hey @anakrish Thank you for the feedback
|
|
Hey @wetpeanuts, Given MSFTs constraints on FIPS certification etc, we will likely want OpenSSL 3.x as the default. But having a rust only option is also good for other consumers of the crate. Another approach to consider is whether a registration mechinasm can be provided to install an instance of the trait for use as the crypto implementation. |
- Implemented builtins: io.jwt.[decode|decode_verify|verify_xxxxx] (except verify_eddsa) - Fully passed OPA tests: jwtbuiltins, jwtverifyhs[256|384|512], jwtverifyrsa - Partially passed OPA tests: jwtdecodeverify (the ones that leverage io.jwt.verify_eddsa and io.jwt.encode_sign still do not pass) - In order to enable customization of the crypto libraries behind JWT verification algorithms, this implementation introduces JWT Backend trait that describes common interface for JWT verification. The trait can be implemented using variable libraries, depending on user needs. The exact trait implementation is selected based on a feature provided to compiler. Currently only 1 inplementation of the JWT Backend is available (leverages OpenSSL as underlying crypto lib). Signed-off-by: Mikhail Komarov <komarov.ma@phystech.edu>
|
Hello @anakrish, |
|
Hey @wetpeanuts, Gald to have you back. The data field could be used to specify the JWT objects.
|
|
Also note that we are hardening regorus via strict clippy warnings. Do take a look at this: #513 (comment) |
353010b to
51f4276
Compare
|
@anakrish Thank you for the hint. The data field you are talking is about regorus test coverage if I understand it correctly, is it correct? The problem for me lies in the original OPA tests from original OPA repo, that are fetched and being fed to the regorus engine in the opa test. With this limitation they do not pass. Since I assume changing the original test coverage is not an option I'm trying to find a way to overcome this on regorus side. |
|
@wetpeanuts Ah. In that case, we could add capability (available only when |
Implemented:
To be implemented in the follow up PRs:
Note that I've also modified the implementation for opa tests in order to be able to run each test separately, not sure if it really belongs here.
Looking forward for a feedback