spring-projects / spring-projects/spring-security
SecureChannelProcessor and InSecureChannelProcessor alway return false in support method call
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 9.6k
- Forks
- 6.3k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 52
Description
Summary
I used the configuration from the current documentation, slightly modified it:
/sec:filter-security-metadata-source
Actual Behavior
On application start I get an exception: Unsupported configuration attributes: [REQUIRES_SECURE_CHANNEL, REQUIRES_INSECURE_CHANNEL, REQUIRES_SECURE_CHANNEL]
I think it's a bug in the support method of both SecureChannelProcessor and InSecureChannelProcessor:
public boolean supports(ConfigAttribute attribute) {
return (attribute != null) && (attribute.getAttribute() != null)
&& attribute.getAttribute().equals(getSecureKeyword());
}
because (attribute.getAttribute() != null) always returns false
Expected Behavior
Configuration
Version
Sample
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read SecureChannelProcessor and InsecureChannelProcessor, focusing on their supports(ConfigAttribute) methods and the channel configuration shown in the issue. Reproduce the startup failure with the provided REQUIRES_SECURE_CHANNEL and REQUIRES_INSECURE_CHANNEL attributes, then verify that the completed change recognizes the intended attributes without reporting them as unsupported.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- security
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100