SEC-2195: Update Groovy, Geb, Spock, httpcomponents, and Jetty

This commit is contained in:
Rob Winch 2013-07-12 17:11:46 -05:00
parent 1705c5d796
commit 07c3fdf8a7
5 changed files with 24 additions and 20 deletions

View File

@ -38,12 +38,12 @@ dependencies {
"org.springframework:spring-jdbc:$springVersion", "org.springframework:spring-jdbc:$springVersion",
"org.springframework:spring-orm:$springVersion", "org.springframework:spring-orm:$springVersion",
"org.springframework:spring-tx:$springVersion", "org.springframework:spring-tx:$springVersion",
'org.spockframework:spock-core:0.6-groovy-1.8', "org.spockframework:spock-core:$spockVersion",
"org.slf4j:jcl-over-slf4j:$slf4jVersion", "org.slf4j:jcl-over-slf4j:$slf4jVersion",
"org.hibernate.javax.persistence:hibernate-jpa-2.0-api:1.0.1.Final", "org.hibernate.javax.persistence:hibernate-jpa-2.0-api:1.0.1.Final",
"org.hibernate:hibernate-entitymanager:4.1.0.Final", "org.hibernate:hibernate-entitymanager:4.1.0.Final",
powerMockDependencies, "org.codehaus.groovy:groovy-all:$groovyVersion",
'org.codehaus.groovy:groovy:1.8.7' powerMockDependencies
testCompile('org.openid4java:openid4java-nodeps:0.9.6') { testCompile('org.openid4java:openid4java-nodeps:0.9.6') {
exclude group: 'com.google.code.guice', module: 'guice' exclude group: 'com.google.code.guice', module: 'guice'
} }

View File

@ -17,6 +17,10 @@ ext.logbackVersion = '0.9.29'
ext.cglibVersion = '2.2' ext.cglibVersion = '2.2'
ext.powerMockVersion = '1.4.12' ext.powerMockVersion = '1.4.12'
ext.servletApiVersion = '7.0.33' ext.servletApiVersion = '7.0.33'
ext.seleniumVersion = '2.33.0'
ext.groovyVersion = '2.0.5'
ext.spockVersion = '0.7-groovy-2.0'
ext.gebVersion = '0.9.0'
ext.powerMockDependencies = [ ext.powerMockDependencies = [
"org.powermock:powermock-core:$powerMockVersion", "org.powermock:powermock-core:$powerMockVersion",

View File

@ -18,5 +18,5 @@ dependencies {
provided "org.apache.tomcat:tomcat-servlet-api:$servletApiVersion" provided "org.apache.tomcat:tomcat-servlet-api:$servletApiVersion"
runtime 'org.apache.httpcomponents:httpclient:4.1.1' runtime 'org.apache.httpcomponents:httpclient:4.2.3'
} }

View File

@ -5,7 +5,7 @@ apply plugin: 'jetty'
apply plugin: 'groovy' apply plugin: 'groovy'
def excludeModules = ['spring-security-acl', 'jsr250-api', 'spring-jdbc', 'spring-tx'] def excludeModules = ['spring-security-acl', 'jsr250-api', 'spring-jdbc', 'spring-tx']
def jettyVersion = '7.1.6.v20100715' def jettyVersion = '8.1.9.v20130131'
def keystore = "$rootDir/samples/certificates/server.jks" def keystore = "$rootDir/samples/certificates/server.jks"
def password = 'password' def password = 'password'
@ -16,8 +16,6 @@ configurations {
} }
runtime.exclude group: 'org.aspectj' runtime.exclude group: 'org.aspectj'
integrationTestCompile.extendsFrom groovy
} }
sourceSets { sourceSets {
@ -28,8 +26,6 @@ sourceSets {
eclipse.classpath.plusConfigurations += configurations.integrationTestRuntime eclipse.classpath.plusConfigurations += configurations.integrationTestRuntime
dependencies { dependencies {
groovy 'org.codehaus.groovy:groovy:1.8.7'
providedCompile "org.apache.tomcat:tomcat-servlet-api:$servletApiVersion" providedCompile "org.apache.tomcat:tomcat-servlet-api:$servletApiVersion"
compile project(':spring-security-core'), compile project(':spring-security-core'),
@ -42,12 +38,13 @@ dependencies {
"ch.qos.logback:logback-classic:$logbackVersion" "ch.qos.logback:logback-classic:$logbackVersion"
integrationTestCompile project(':spring-security-cas'), integrationTestCompile project(':spring-security-cas'),
'org.seleniumhq.selenium:selenium-htmlunit-driver:2.25.0', "org.seleniumhq.selenium:selenium-htmlunit-driver:$seleniumVersion",
'org.spockframework:spock-core:0.6-groovy-1.8', "org.spockframework:spock-core:$spockVersion",
'org.codehaus.geb:geb-spock:0.7.2', "org.gebish:geb-spock:$gebVersion",
'commons-httpclient:commons-httpclient:3.1', 'commons-httpclient:commons-httpclient:3.1',
"org.eclipse.jetty:jetty-server:$jettyVersion", "org.eclipse.jetty:jetty-server:$jettyVersion",
"org.eclipse.jetty:jetty-servlet:$jettyVersion" "org.eclipse.jetty:jetty-servlet:$jettyVersion",
"org.codehaus.groovy:groovy:$groovyVersion"
} }
[jettyRun, jettyRunWar]*.configure { [jettyRun, jettyRunWar]*.configure {

View File

@ -17,8 +17,11 @@ package org.springframework.security.samples.cas
import geb.spock.* import geb.spock.*
import org.apache.http.impl.conn.DefaultClientConnectionOperator;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.spockframework.runtime.Sputnik; import org.spockframework.runtime.Sputnik;
import org.springframework.security.authentication.DefaultAuthenticationEventPublisher;
import org.springframework.security.core.context.ThreadLocalSecurityContextHolderStrategy;
import org.springframework.security.samples.cas.pages.* import org.springframework.security.samples.cas.pages.*
import spock.lang.Shared; import spock.lang.Shared;
@ -42,7 +45,7 @@ class CasSampleTests extends AbstractCasTests {
def 'access extremely secure page with unauthenitcated user requires login'() { def 'access extremely secure page with unauthenitcated user requires login'() {
when: 'Unauthenticated user accesses the extremely secure page' when: 'Unauthenticated user accesses the extremely secure page'
to ExtremelySecurePage via ExtremelySecurePage
then: 'The login page is displayed' then: 'The login page is displayed'
at LoginPage at LoginPage
} }
@ -56,7 +59,7 @@ class CasSampleTests extends AbstractCasTests {
def 'access secure page with unauthenticated user requires login'() { def 'access secure page with unauthenticated user requires login'() {
when: 'Unauthenticated user accesses the secure page' when: 'Unauthenticated user accesses the secure page'
to SecurePage via SecurePage
then: 'The login page is displayed' then: 'The login page is displayed'
at LoginPage at LoginPage
} }
@ -77,7 +80,7 @@ class CasSampleTests extends AbstractCasTests {
def 'access extremely secure page with ROLE_USER is denied'() { def 'access extremely secure page with ROLE_USER is denied'() {
when: 'User with ROLE_USER accesses extremely secure page' when: 'User with ROLE_USER accesses extremely secure page'
to ExtremelySecurePage via ExtremelySecurePage
then: 'the access denied page is displayed' then: 'the access denied page is displayed'
at AccessDeniedPage at AccessDeniedPage
} }
@ -94,7 +97,7 @@ class CasSampleTests extends AbstractCasTests {
def 'clicking cas server logout link successfully performs logout'() { def 'clicking cas server logout link successfully performs logout'() {
when: 'the cas server logout link is clicked and the secure page is requested' when: 'the cas server logout link is clicked and the secure page is requested'
casServerLogout.click() casServerLogout.click()
to SecurePage via SecurePage
then: 'the login page is displayed' then: 'the login page is displayed'
at LoginPage at LoginPage
} }
@ -112,20 +115,20 @@ class CasSampleTests extends AbstractCasTests {
when: 'logout and request extremely secure page' when: 'logout and request extremely secure page'
navModule.logout.click() navModule.logout.click()
casServerLogout.click() casServerLogout.click()
to ExtremelySecurePage via ExtremelySecurePage
then: 'login page is displayed' then: 'login page is displayed'
at LoginPage at LoginPage
} }
def 'logging out of the cas server successfully logs out of the cas sample application'() { def 'logging out of the cas server successfully logs out of the cas sample application'() {
setup: 'login with ROLE_USER' setup: 'login with ROLE_USER'
to SecurePage via SecurePage
at LoginPage at LoginPage
login 'rod' login 'rod'
at SecurePage at SecurePage
when: 'logout of the CAS Server' when: 'logout of the CAS Server'
go casServerLogoutUrl go casServerLogoutUrl
to SecurePage via SecurePage
then: 'user is logged out of the CAS Service' then: 'user is logged out of the CAS Service'
at LoginPage at LoginPage
} }