SEC-2966: Fix preauth-xml sample config attributes

This commit is contained in:
Rob Winch 2015-05-07 10:10:20 -05:00
parent 0a118336d4
commit 7b158d0525
4 changed files with 52 additions and 4 deletions

View File

@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-samples-preauth-xml</artifactId>
<version>4.0.1.CI-SNAPSHOT</version>
<version>4.0.2.CI-SNAPSHOT</version>
<packaging>war</packaging>
<name>spring-security-samples-preauth-xml</name>
<description>spring-security-samples-preauth-xml</description>
@ -45,6 +45,12 @@
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.0.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
@ -60,13 +66,13 @@
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-config</artifactId>
<version>4.0.1.CI-SNAPSHOT</version>
<version>4.0.2.CI-SNAPSHOT</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-web</artifactId>
<version>4.0.1.CI-SNAPSHOT</version>
<version>4.0.2.CI-SNAPSHOT</version>
<scope>runtime</scope>
</dependency>
<dependency>

View File

@ -16,11 +16,15 @@ configurations {
}
dependencies {
providedCompile "javax.servlet:javax.servlet-api:3.0.1"
runtime project(':spring-security-web'),
project(':spring-security-config'),
"org.slf4j:jcl-over-slf4j:$slf4jVersion",
"ch.qos.logback:logback-classic:$logbackVersion"
testCompile project(':spring-security-web'),
project(':spring-security-config')
}
jettyRun {

View File

@ -75,7 +75,7 @@
<property name="authenticationManager" ref="authenticationManager"/>
<property name="accessDecisionManager" ref="httpRequestAccessDecisionManager"/>
<property name="securityMetadataSource">
<sec:filter-security-metadata-source>
<sec:filter-security-metadata-source use-expressions="false">
<sec:intercept-url pattern="/secure/extreme/**" access="ROLE_SUPERVISOR"/>
<sec:intercept-url pattern="/secure/**" access="ROLE_USER"/>
<sec:intercept-url pattern="/**" access="ROLE_USER"/>

View File

@ -0,0 +1,38 @@
/*
* Copyright 2002-2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package sample;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.web.FilterChainProxy;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration;
/**
* @author Rob Winch
*/
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("file:src/main/webapp/WEB-INF/applicationContext-security.xml")
@WebAppConfiguration
public class PreAuthXmlTests {
@Autowired
FilterChainProxy filterChainProxy;
@Test
public void configLoads() {}
}