-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Allow placeholder in headers disabled properties #6547
Comments
yes, the property is hard coded in boolean disabled = element != null
&& "true".equals(element.getAttribute("disabled")); it is easy to support, but now we should wait for the confirmation |
Great idea, @rptmat57, would you be interested in submitting a PR? |
I would like to work on this if @rptmat57 didn’t want to |
@jzheaux should the <security:headers disabled="${security.headers.disabled}" defaults-disabled="${security.headers.defaultDisabled}"/> |
@clevertension yes, that sounds reasonable - I've updated the title accordingly |
this all sounds great! |
@rhamedy good luck and fighting 👍 |
@jzheaux a quick update If I understand correctly, for this issue we need to
Note: Currently none of the I have updated managed to update the
After running the necessary gradle command, the In order to write a test, I would also need to
Does this make sense? |
You are on the right path, though I would make just a few tweaks:
If you wouldn't mind, please also update the Regarding your IDE, I think you may need to configure it to be aware of where on the file system the xsd is. I'm not certain that Eclipse XML validation knows about the I'll also note here, in passing, that there is a difference between |
@jzheaux thanks a lot for your reply. I have covered all the points but, what I was missing was the following piece
The |
@jzheaux I have mentioned a few points in the PR that might or might not need to be considered during code review. Thanks for the help 👍 |
Added the functionality to allow the disabled and defaults-disabled attribute of <header> tag to accept a placeholder and resolve it during parsing. - Updated the spring-security .rnc files starting from 4.2 up to 5.2 with xsd:token type instead of boolean - Added unit tests for headers.disabled and headers.defaults-disabled attributes with placeholder - Modified the HeadersBeanDefinitionParser to support resolving placeholders - Updated spring.schemas to point to latest spring-security-5.2.xsd Fixes spring-projectsgh-6547
Added the functionality to allow the disabled and defaults-disabled attribute of <header> tag to accept a placeholder and resolve it during parsing. - Updated the spring-security .rnc files starting from 4.2 up to 5.2 with xsd:token type instead of boolean - Added unit tests for headers.disabled and headers.defaults-disabled attributes with placeholder - Modified the HeadersBeanDefinitionParser to support resolving placeholders - Updated spring.schemas to point to latest spring-security-5.2.xsd Fixes gh-6547
Summary
In the xml configuration for Spring Security, the xsd fail to validate attribute disabled of the headers element when using a placeholder
Actual Behavior
error thrown: cvc-datatype-valid.1.2.1: '${security.headers.disabled}' is not a valid value for 'boolean'
Expected Behavior
it should work and resolve the property
Configuration
<security:headers disabled="${security.headers.disabled}"/>
Version
5.1.3
The text was updated successfully, but these errors were encountered: