Skip to content

Add RSA Key Converters #6494

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

Closed
jzheaux opened this issue Jan 31, 2019 · 0 comments · Fixed by #6505
Closed

Add RSA Key Converters #6494

jzheaux opened this issue Jan 31, 2019 · 0 comments · Fixed by #6505
Assignees
Labels
in: crypto An issue in spring-security-crypto type: enhancement A general enhancement
Milestone

Comments

@jzheaux
Copy link
Contributor

jzheaux commented Jan 31, 2019

Spring Security supports supplying an RSA public key in its OAuth 2.0 APIs.

Local keys, though, are often distributed in files or as a PEM-encoded configuration property. It would be nice to have some support for converting an encoded RSA key into the appropriate JCA instance, e.g. RSAPublicKey.

One way to do this would be by using the Converter interface:

public class RSAPublicKeyConverter implements Converter<String, RSAPublicKey> {
    public RSAPublicKey converter(String value) {
        // ...
    }
}

Which then users could use directly or could be registered with a ConversionService.

@jzheaux jzheaux added in: crypto An issue in spring-security-crypto New Feature labels Jan 31, 2019
@jzheaux jzheaux modified the milestone: 5.2.0.M2 Jan 31, 2019
@jzheaux jzheaux changed the title Add support for supplying an RSAPublicKey as a configuration property Add RSA Key Converters Feb 4, 2019
@jzheaux jzheaux self-assigned this Feb 8, 2019
jzheaux added a commit to jzheaux/spring-security that referenced this issue Mar 29, 2019
jzheaux added a commit to jzheaux/spring-security that referenced this issue Mar 29, 2019
jzheaux added a commit that referenced this issue Apr 14, 2019
jzheaux added a commit that referenced this issue Apr 14, 2019
@rwinch rwinch added the type: enhancement A general enhancement label May 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: crypto An issue in spring-security-crypto type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants