-
Notifications
You must be signed in to change notification settings - Fork 282
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
Configuration of JWK for JWT Creation for extensions requests #2680
Comments
[Triaging] This issue is part of the ongoing work to support extensions. |
I am going to move this into the Extensions Backlog but mark it as P1 and explain what that means. |
Hi, I'm thinking about changing configuration for RSA, to allow user to just put in his key in pem format instead of configuring all of the parameters (https://www.rfc-editor.org/rfc/rfc7518#section-6.3.2). What do you think about it @cwperks , @scrawfor99?
|
Hi @MaciejMierzwa, I have not checked with @cwperks and am not as familiar with the context around what you have been working on as he may be. That being said, I think that would be a good option but would suggest we have the ability to do both over one or the other. I checked out the documentation you linked and I can see that there are quite a few parameters to be added. My concern about only having a direct key input is that we would likely then run into people who either wanted to automate the process and could not or did not know how to make the correct key. Because we need the private key and the public key to be related, we would need to have the user provide both or the private key and the info to create the associated public key. If we are able to allow for both options I think that would work since then people who wanted to skip some of the configuration could do so. |
I added option to sign JWT using RSA/EC private keys. |
@MaciejMierzwa I am in favor of this suggestion, the security plugin configuration is about configuring OpenSearch's security, it isn't as useful to have the idiosyncratic aspects. As far as the tradeoff between the different algorithms, I'd recommend starting with sensible defaults (+easier to get right when setting up and + more secure), and we can always expand the options over time. |
This issue is P1--Do only if last task available
For the initial implementation, the JWT will be signed with an HMAC 512 secret signing key known to the security plugin. User's should have the ability to customize the JWK (JSON Web Key) that is used to sign the token passed to an extension.
Below is an example configuration for an Elliptic Curve based signature. RFC for JSON Web Key:
A PR was introduced in the feature/extensions branch that allows for the creation of JWTs. Currently this only works for HMAC 512 as mentioned. To make the existing code configurable, a configuration field will need to be added to the security configuration file and then parsed into the settings.
After adding that ability, you will want to add various different configuration options based on some of the most common types of signature algorithms. Then you can test that the configuration file is being parsed correctly for these types.
Next, you will want to go into the
JWTVendor
class added into the branch and make it compatible with the new configuration options. Tests for this part will look like the existing JWTVendor tests but use the difference configuration options.Completion of this issue will look like a PR (or two) which introduces the above features and associated tests.
The text was updated successfully, but these errors were encountered: