|
86 | 86 | <security:custom-filter ref="clientCredentialsEndpointFilter" after="BASIC_AUTH_FILTER" />
|
87 | 87 | <security:custom-filter ref="corsFilter" after="SECURITY_CONTEXT_FILTER" />
|
88 | 88 | <security:access-denied-handler ref="oauthAccessDeniedHandler" />
|
| 89 | +<security:csrf disabled="true"/> |
89 | 90 | </security:http>
|
90 | 91 |
|
91 | 92 | <!-- Allow open access to discovery endpoints -->
|
92 | 93 | <security:http pattern="/#{T(org.mitre.openid.connect.web.JWKSetPublishingEndpoint).URL}**" use-expressions="true" entry-point-ref="http403EntryPoint" create-session="stateless">
|
93 | 94 | <security:intercept-url pattern="/#{T(org.mitre.openid.connect.web.JWKSetPublishingEndpoint).URL}**" access="permitAll"/>
|
94 | 95 | <security:custom-filter ref="corsFilter" after="SECURITY_CONTEXT_FILTER" />
|
| 96 | +<security:csrf disabled="true"/> |
95 | 97 | </security:http>
|
96 | 98 | <security:http pattern="/#{T(org.mitre.discovery.web.DiscoveryEndpoint).WELL_KNOWN_URL}/**" use-expressions="true" entry-point-ref="http403EntryPoint" create-session="stateless">
|
97 | 99 | <security:intercept-url pattern="/#{T(org.mitre.discovery.web.DiscoveryEndpoint).WELL_KNOWN_URL}/**" access="permitAll"/>
|
98 | 100 | <security:custom-filter ref="corsFilter" after="SECURITY_CONTEXT_FILTER" />
|
| 101 | +<security:csrf disabled="true"/> |
99 | 102 | </security:http>
|
100 | 103 |
|
101 | 104 | <!-- Allow open access to all static resources -->
|
102 | 105 | <security:http pattern="/resources/**" use-expressions="true" entry-point-ref="http403EntryPoint" create-session="stateless">
|
103 | 106 | <security:intercept-url pattern="/resources/**" access="permitAll"/>
|
104 | 107 | <security:custom-filter ref="corsFilter" after="SECURITY_CONTEXT_FILTER" />
|
| 108 | +<security:csrf disabled="true"/> |
105 | 109 | </security:http>
|
106 | 110 |
|
107 | 111 | <!-- OAuth-protect API and other endpoints -->
|
108 | 112 | <security:http pattern="/#{T(org.mitre.openid.connect.web.DynamicClientRegistrationEndpoint).URL}/**" use-expressions="true" entry-point-ref="oauthAuthenticationEntryPoint" create-session="stateless">
|
109 |
| -<security:custom-filter ref="resourceServerFilter" before="PRE_AUTH_FILTER" /> |
| 113 | +<security:custom-filter ref="resourceServerFilter" after="CHANNEL_FILTER" /> |
110 | 114 | <security:custom-filter ref="corsFilter" after="SECURITY_CONTEXT_FILTER" />
|
111 | 115 | <security:expression-handler ref="oauthWebExpressionHandler" />
|
112 | 116 | <security:intercept-url pattern="/register/**" access="permitAll"/>
|
| 117 | +<security:csrf disabled="true"/> |
113 | 118 | </security:http>
|
114 | 119 |
|
115 | 120 | <security:http pattern="/#{T(org.mitre.openid.connect.web.ProtectedResourceRegistrationEndpoint).URL}/**" use-expressions="true" entry-point-ref="oauthAuthenticationEntryPoint" create-session="stateless">
|
116 |
| -<security:custom-filter ref="resourceServerFilter" before="PRE_AUTH_FILTER" /> |
| 121 | +<security:custom-filter ref="resourceServerFilter" after="CHANNEL_FILTER" /> |
117 | 122 | <security:custom-filter ref="corsFilter" after="SECURITY_CONTEXT_FILTER" />
|
118 | 123 | <security:expression-handler ref="oauthWebExpressionHandler" />
|
119 | 124 | <security:intercept-url pattern="/resource/**" access="permitAll"/>
|
| 125 | +<security:csrf disabled="true"/> |
120 | 126 | </security:http>
|
121 | 127 |
|
122 | 128 | <security:http pattern="/#{T(org.mitre.openid.connect.web.UserInfoEndpoint).URL}**" use-expressions="true" entry-point-ref="oauthAuthenticationEntryPoint" create-session="stateless">
|
123 |
| -<security:custom-filter ref="resourceServerFilter" before="PRE_AUTH_FILTER" /> |
| 129 | +<security:custom-filter ref="resourceServerFilter" after="CHANNEL_FILTER" /> |
124 | 130 | <security:custom-filter ref="corsFilter" after="SECURITY_CONTEXT_FILTER" />
|
125 | 131 | <security:expression-handler ref="oauthWebExpressionHandler" />
|
| 132 | +<security:csrf disabled="true"/> |
126 | 133 | </security:http>
|
127 | 134 |
|
128 | 135 | <security:http pattern="/#{T(org.mitre.openid.connect.web.RootController).API_URL}/**" use-expressions="true" entry-point-ref="oauthAuthenticationEntryPoint" create-session="never">
|
129 |
| -<security:custom-filter ref="resourceServerFilter" before="PRE_AUTH_FILTER" /> |
| 136 | +<security:custom-filter ref="resourceServerFilter" after="CHANNEL_FILTER" /> |
130 | 137 | <security:expression-handler ref="oauthWebExpressionHandler" />
|
| 138 | +<security:csrf disabled="true"/> |
131 | 139 | </security:http>
|
132 | 140 |
|
133 | 141 | <security:http pattern="/#{T(org.mitre.oauth2.web.IntrospectionEndpoint).URL}**"
|
|
136 | 144 | create-session="stateless"
|
137 | 145 | authentication-manager-ref="clientAuthenticationManager">
|
138 | 146 | <security:http-basic entry-point-ref="oauthAuthenticationEntryPoint" />
|
139 |
| -<!-- <security:custom-filter ref="resourceServerFilter" before="PRE_AUTH_FILTER" /> --> |
| 147 | +<!-- <security:custom-filter ref="resourceServerFilter" after="CHANNEL_FILTER" /> --> |
140 | 148 | <security:custom-filter ref="clientAssertionEndpointFilter" after="PRE_AUTH_FILTER" /> <!-- this one has to go first -->
|
141 | 149 | <security:custom-filter ref="corsFilter" after="SECURITY_CONTEXT_FILTER" />
|
142 | 150 | <security:custom-filter ref="clientCredentialsEndpointFilter" after="BASIC_AUTH_FILTER" />
|
| 151 | +<security:csrf disabled="true"/> |
143 | 152 | </security:http>
|
144 | 153 |
|
145 | 154 | <security:http pattern="/#{T(org.mitre.oauth2.web.RevocationEndpoint).URL}**"
|
|
148 | 157 | create-session="stateless"
|
149 | 158 | authentication-manager-ref="clientAuthenticationManager">
|
150 | 159 | <security:http-basic entry-point-ref="oauthAuthenticationEntryPoint" />
|
151 |
| -<!-- <security:custom-filter ref="resourceServerFilter" before="PRE_AUTH_FILTER" /> --> |
| 160 | +<!-- <security:custom-filter ref="resourceServerFilter" after="CHANNEL_FILTER" /> --> |
152 | 161 | <security:custom-filter ref="clientAssertionEndpointFilter" after="PRE_AUTH_FILTER" /> <!-- this one has to go first -->
|
153 | 162 | <security:custom-filter ref="corsFilter" after="SECURITY_CONTEXT_FILTER" />
|
154 | 163 | <security:custom-filter ref="clientCredentialsEndpointFilter" after="BASIC_AUTH_FILTER" />
|
| 164 | +<security:csrf disabled="true"/> |
155 | 165 | </security:http>
|
156 | 166 |
|
157 | 167 | <bean id="oauthAuthenticationEntryPoint" class="org.springframework.security.oauth2.provider.error.OAuth2AuthenticationEntryPoint">
|
|
0 commit comments