-
Notifications
You must be signed in to change notification settings - Fork 6k
OAuth 2.0 Resource Server XML Support #7775
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jzheaux Please see my comments below. In addition to those:
- Ensure Copyright is 2020 - there are some out-of-date
- Make sure you have all the tests covered as in
OAuth2ResourceServerConfigurerTests
- there seems to be a lot more in Java config vs. XML config - Update
namespace.adoc
andspring-security-5.3.rnc
OAuth2ResourceServerConfigurer
exposesaccessDeniedHandler()
andauthenticationEntryPoint()
, however, I don't seeaccess-denied-handler-ref
orauthentication-entry-point-ref
in the xsd. Was this missed or intentional?
.../java/org/springframework/security/config/http/OAuth2ResourceServerBeanDefinitionParser.java
Outdated
Show resolved
Hide resolved
.../src/test/java/org/springframework/security/config/http/OAuth2ResourceServerConfigTests.java
Outdated
Show resolved
Hide resolved
.../java/org/springframework/security/config/http/OAuth2ResourceServerBeanDefinitionParser.java
Show resolved
Hide resolved
.../java/org/springframework/security/config/http/OAuth2ResourceServerBeanDefinitionParser.java
Show resolved
Hide resolved
@jgrandja This is ready for another look. I added Yes, it was intentional to leave out The reason for leaving it out, for now, is that the request matching in the XML config support isn't as mature as in the DSL. I did bring some of it that support over, but the request matchers that are used on the DSL side are more sophisticated, and I wasn't sure about bringing that into parity in this PR. For example, the way to determine whether or not the request is HTTP basic is quite involved. Let me know if you think we should take a look at that in this PR. Personally, I think it's okay for the XML to be a subset, so long as the same feature is still possible, which it is in this case without adding equivalent support. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the updates @jzheaux.
In addition to the one comment I left, please update the copyright year in all test *.xml files.
@@ -572,6 +572,48 @@ provider.attlist &= | |||
## The URI used to discover the configuration information for an OAuth 2.0 or OpenID Connect 1.0 Provider. | |||
attribute issuer-uri {xsd:token}? | |||
|
|||
oauth2-resource-server = | |||
## Configures authentication support as an OAuth 2.0 Resource Server. | |||
element oauth2-resource-server {oauth2-resource-server.attlist} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm confused how <jwt>
and <opaque-token>
are <xs:choice>
's in the xsd
, however, both elements are not defined as choices in the rnc
file? It looks like both those elements do not have <oauth2-resource-server>
as their parent. Maybe I'm missing something?
It should be similar to websocket-message-broker
:
websocket-message-broker =
element websocket-message-broker { websocket-message-broker.attrlist, (intercept-message* & expression-handler?) }
(intercept-message* & expression-handler?)
are choices
Fixes: gh-5185