Skip to content
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

Support for Base64 encoded p12 keystore using the ssl bundle configuration #35890

Closed
wants to merge 1 commit into from

Conversation

erwinc1
Copy link

@erwinc1 erwinc1 commented Jun 14, 2023

I've added support for Base64 encoded p12 formatted keystores. This is my backing StackOverflow question

@pivotal-cla
Copy link

@erwinc1 Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jun 14, 2023
@pivotal-cla
Copy link

@erwinc1 Thank you for signing the Contributor License Agreement!

URL url = ResourceUtils.getURL(location);
try (InputStream stream = url.openStream()) {
store.load(stream, password);
if (isBase64(location.getBytes())) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe instead of doing the decode twice, where you test first if you can decode it, you could do the else part in the catch block?

@scottfrederick scottfrederick added type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged labels Jun 15, 2023
@scottfrederick scottfrederick added this to the 3.1.x milestone Jun 15, 2023
@scottfrederick scottfrederick self-assigned this Jun 15, 2023
@philwebb philwebb added for: team-meeting An issue we'd like to discuss as a team to make progress status: on-hold We can't start working on this issue yet and removed for: team-meeting An issue we'd like to discuss as a team to make progress labels Jun 15, 2023
@philwebb philwebb modified the milestones: 3.1.x, 3.2.x Jun 22, 2023
@philwebb philwebb added type: enhancement A general enhancement and removed type: bug A general bug labels Jun 22, 2023
@scottfrederick
Copy link
Contributor

@erwinc1 Thanks very much for the suggestion. We agree this is something that we'd like Spring Boot to support. However, we'd like to take a different approach to the problem that would allow us to apply the same pattern to other places where file resources are currently supported in configuration properties instead of just making your suggested change to SSL bundle JKS keystores. I've opened #36033 to capture this.

@scottfrederick scottfrederick added status: superseded An issue that has been superseded by another and removed type: enhancement A general enhancement status: on-hold We can't start working on this issue yet labels Jun 22, 2023
@scottfrederick scottfrederick removed their assignment Jun 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: superseded An issue that has been superseded by another
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants