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

Add preload support to Strict-Transport-Security #6321

Merged
merged 1 commit into from
Jan 16, 2019

Conversation

ankurpathak
Copy link
Contributor

  1. Preload support in Servlet Security
  2. Preload support in Reactive Security
  3. Test for preload support in Servlet Security
  4. Test for preload support in Reactive Security

Fixes: gh-6312

@ankurpathak
Copy link
Contributor Author

Pull request for github issue:
#6312

@OArtyomov
Copy link

@ankurpathak
Will it be possible to configure preload flag, when user use xml type of defining security ?

@ankurpathak
Copy link
Contributor Author

@OArtyomov Nope. I provided support for Java Config.

@ankurpathak
Copy link
Contributor Author

ankurpathak commented Dec 22, 2018

@OArtyomov Nope. I provided support for Java Config.

@OArtyomov I added xml support for it as well.

@ankurpathak ankurpathak force-pushed the gh-6312-fix branch 4 times, most recently from 2c97d48 to 975726c Compare December 22, 2018 13:39
@@ -142,7 +142,7 @@ public void sizeWhenReadingFilesystemThenIsCorrectNumberOfSchemaFiles()

String[] schemas = resource.getFile().getParentFile().list((dir, name) -> name.endsWith(".xsd"));

assertThat(schemas.length).isEqualTo(13)
assertThat(schemas.length).isEqualTo(14)
.withFailMessage("the count is equal to 12, if not then schemaDocument needs updating");
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure if the fail message needs updating?

Copy link
Contributor Author

@ankurpathak ankurpathak Dec 25, 2018

Choose a reason for hiding this comment

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

@rmartinus I think it must be updated to 14. As its reading 14 files and I have added xsd for Spring Security 5.2. I am waitnig for review from @rwinch.

Copy link
Contributor

Choose a reason for hiding this comment

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

@ankurpathak yeah, 14 makes sense to me.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@rmartinus Thanks. Fail message changed to reflect 14.

Copy link
Member

@rwinch rwinch left a comment

Choose a reason for hiding this comment

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

Thanks for the PR @ankurpathak! Overall the code looks good. Can you please add documentation? I'd also like a link to how user's are able to add their site to be preloaded and the recommended process for adding the preload flag. The site https://hstspreload.org is a good start for external links.

@ankurpathak
Copy link
Contributor Author

I have already provided documentation for methods. Also added link to hstspreoad.org for additional details.

@ankurpathak ankurpathak force-pushed the gh-6312-fix branch 2 times, most recently from 6b8be5f to ff4a58d Compare January 8, 2019 02:52
@rwinch
Copy link
Member

rwinch commented Jan 8, 2019

1. Preload support in Servlet Security(XML & Java)
2. Preload support in Reactive Security
3. Test for preload support in Servlet Security
4. Test for preload support in Reactive Security

Fixes: spring-projectsgh-6312
@ankurpathak
Copy link
Contributor Author

ankurpathak commented Jan 9, 2019

Documention done for both servlet and reactive part both in headers.adoc file.

@rwinch rwinch added this to the 5.2.0.M2 milestone Jan 16, 2019
@rwinch rwinch merged commit b7ed919 into spring-projects:master Jan 16, 2019
@rwinch
Copy link
Member

rwinch commented Jan 16, 2019

Thanks @ankurpathak! This is now merged into master

@rwinch rwinch added status: duplicate A duplicate of another issue in: web An issue in web modules (web, webmvc) labels Jan 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web An issue in web modules (web, webmvc) status: duplicate A duplicate of another issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants