mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-05-31 09:12:14 +00:00
Various mods to heavyduty app
This commit is contained in:
parent
e1fcacbca5
commit
b99a5dec29
54
sandbox/heavyduty/jetty-jmx.xml
Normal file
54
sandbox/heavyduty/jetty-jmx.xml
Normal file
@ -0,0 +1,54 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">
|
||||
|
||||
|
||||
<!-- =============================================================== -->
|
||||
<!-- Configure the JVM JMX Server -->
|
||||
<!-- this configuration file should be used in combination with -->
|
||||
<!-- other configuration files. e.g. -->
|
||||
<!-- java -jar start.jar etc/jetty-jmx.xml etc/jetty.xml -->
|
||||
<!-- See jetty-jmx-mx4j.xml for a non JVM server solution -->
|
||||
<!-- =============================================================== -->
|
||||
<Configure id="Server" class="org.mortbay.jetty.Server">
|
||||
|
||||
<!-- =========================================================== -->
|
||||
<!-- Initialize platform mbean server -->
|
||||
<!-- =========================================================== -->
|
||||
<!-- Create an MBeanServer or use the jdk 1.5 platformMBeanServer -->
|
||||
<Call id="MBeanServer" class="java.lang.management.ManagementFactory" name="getPlatformMBeanServer"/>
|
||||
|
||||
<!-- =========================================================== -->
|
||||
<!-- Initialize mx4j mbean server -->
|
||||
<!-- =========================================================== -->
|
||||
<!-- replace platform config with
|
||||
<Call id="MBeanServer" class="javax.management.MBeanServerFactory" name="createMBeanServer"/>
|
||||
-->
|
||||
|
||||
<!-- initialize the Jetty MBean container -->
|
||||
<Get id="Container" name="container">
|
||||
<Call name="addEventListener">
|
||||
<Arg>
|
||||
<New class="org.mortbay.management.MBeanContainer">
|
||||
<Arg><Ref id="MBeanServer"/></Arg>
|
||||
<!-- Set name="managementPort">8082</Set -->
|
||||
<Call name="start" />
|
||||
</New>
|
||||
</Arg>
|
||||
</Call>
|
||||
</Get>
|
||||
|
||||
<!-- optionally add a remote JMX connector
|
||||
<Call id="jmxConnector" class="javax.management.remote.JMXConnectorServerFactory" name="newJMXConnectorServer">
|
||||
<Arg>
|
||||
<New class="javax.management.remote.JMXServiceURL">
|
||||
<Arg>service:jmx:rmi:///jndi/rmi:///jettymbeanserver</Arg>
|
||||
</New>
|
||||
</Arg>
|
||||
<Arg/>
|
||||
<Arg><Ref id="MBeanServer"/></Arg>
|
||||
<Call name="start"/>
|
||||
</Call>
|
||||
-->
|
||||
|
||||
</Configure>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<artifactId>spring-security-heavyduty</artifactId>
|
||||
<name>Spring Security - Heavy Duty Sample</name>
|
||||
<packaging>war</packaging>
|
||||
<version>2.0.3-SNAPSHOT</version>
|
||||
<version>2.0.4-SNAPSHOT</version>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.security</groupId>
|
||||
@ -111,6 +111,29 @@
|
||||
<scope>runtime</scope>
|
||||
<version>1.1.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.directory.server</groupId>
|
||||
<artifactId>apacheds-core</artifactId>
|
||||
<version>1.0.2</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.directory.server</groupId>
|
||||
<artifactId>apacheds-server-jndi</artifactId>
|
||||
<version>1.0.2</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-log4j12</artifactId>
|
||||
<version>1.4.3</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.ldap</groupId>
|
||||
<artifactId>spring-ldap</artifactId>
|
||||
<version>1.2.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
@ -144,6 +167,7 @@
|
||||
<version>6.1.7</version>
|
||||
<configuration>
|
||||
<contextPath>/heavyduty</contextPath>
|
||||
<!--jettyConfig>jetty-jmx.xml</jettyConfig-->
|
||||
<connectors>
|
||||
<connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
|
||||
<port>8080</port>
|
||||
@ -165,8 +189,8 @@
|
||||
</plugins>
|
||||
</build>
|
||||
<properties>
|
||||
<spring.version>2.5.4</spring.version>
|
||||
<spring.security.version>2.0.3-SNAPSHOT</spring.security.version>
|
||||
<spring.version>2.5.5</spring.version>
|
||||
<spring.security.version>2.0.4-SNAPSHOT</spring.security.version>
|
||||
</properties>
|
||||
|
||||
</project>
|
||||
|
@ -12,7 +12,7 @@
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
|
||||
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-2.0.2.xsd">
|
||||
|
||||
<b:import resource="appContext-misc.xml"/>
|
||||
<!--b:import resource="appContext-misc.xml"/-->
|
||||
|
||||
<!-- global-method-security secured-annotations="enabled" access-decision-manager-ref="methodAccessMgr"/ -->
|
||||
|
||||
@ -24,7 +24,6 @@
|
||||
</b:property>
|
||||
</b:bean>
|
||||
|
||||
<!-- http entry-point-ref='customEntryPoint'-->
|
||||
<http>
|
||||
<intercept-url pattern="/secure/extreme/**" access="ROLE_SUPERVISOR"/>
|
||||
<intercept-url pattern="/secure/**" access="IS_AUTHENTICATED_REMEMBERED" />
|
||||
@ -38,11 +37,12 @@
|
||||
Uncomment to enable X509 client authentication support
|
||||
<x509 user-service-ref="daoUserService"/>
|
||||
-->
|
||||
<!-- form-login default-target-url="/secure/index.jsp" login-page="/login.jsp" authentication-failure-url="/login.jsp?login-error=1" always-use-default-target="false"/-->
|
||||
<form-login default-target-url="/secure/index.jsp" login-page="/login.jsp" authentication-failure-url="/login.jsp?login-error=1" always-use-default-target="false"/>
|
||||
<anonymous />
|
||||
<http-basic />
|
||||
<!-- http-basic / -->
|
||||
<logout />
|
||||
<remember-me key='doesntmatter' token-repository-ref='tokenRepo' user-service-ref='daoUserService'/>
|
||||
|
||||
<!-- <remember-me user-service-ref="daoUserService"/> -->
|
||||
|
||||
<!-- Uncomment to limit the number of sessions a user can have -->
|
||||
@ -72,23 +72,17 @@
|
||||
<b:property name="defaultTargetUrl" value="/"/>
|
||||
<b:property name="authenticationManager" ref="authenticationManager"/>
|
||||
</b:bean>
|
||||
-->
|
||||
|
||||
<b:bean id="customEntryPoint" class="heavyduty.security.ui.HeavyDutyEntryPoint">
|
||||
<b:property name="loginFormUrl" value="/login.jsp"/>
|
||||
</b:bean>
|
||||
-->
|
||||
<!--
|
||||
<b:bean id="loginPageGenerator" class="org.springframework.security.ui.webapp.DefaultLoginPageGeneratingFilter">
|
||||
<custom-filter after="AUTHENTICATION_PROCESSING_FILTER"/>
|
||||
<b:constructor-arg ref="customAuthFilter"/>
|
||||
</b:bean>
|
||||
-->
|
||||
<!--
|
||||
Usernames/Passwords are
|
||||
rod/koala
|
||||
dianne/emu
|
||||
scott/wombat
|
||||
peter/opal
|
||||
-->
|
||||
|
||||
<authentication-provider user-service-ref="daoUserService">
|
||||
<password-encoder hash="md5" />
|
||||
@ -104,4 +98,23 @@
|
||||
</user-service>
|
||||
</authentication-provider>
|
||||
|
||||
<ldap-server id="ldapServer"/>
|
||||
|
||||
<!-- b:bean id="mbeanServer" class="org.springframework.jmx.support.MBeanServerFactoryBean"/ -->
|
||||
|
||||
<b:bean id="exporter" class="org.springframework.jmx.export.MBeanExporter">
|
||||
<b:property name="beans">
|
||||
<b:map>
|
||||
<b:entry key="bean:name=ldapContextSource" value-ref="ldapServer"/>
|
||||
</b:map>
|
||||
</b:property>
|
||||
<b:property name="assembler">
|
||||
<b:bean class="org.springframework.jmx.export.assembler.MethodNameBasedMBeanInfoAssembler">
|
||||
<b:property name="managedMethods" value="setPassword,setUserDn,getUrls,setUrl,setUrls,setPooled,isPooled,setBase,getBaseLdapPathAsString"/>
|
||||
</b:bean>
|
||||
</b:property>
|
||||
<!-- b:property name="server" ref="mbeanServer"/-->
|
||||
</b:bean>
|
||||
|
||||
|
||||
</b:beans>
|
@ -3,6 +3,6 @@ jpa.generateDdl=true
|
||||
jpa.showSql=true
|
||||
|
||||
jdbc.driver=org.hsqldb.jdbcDriver
|
||||
jdbc.url=jdbc:hsqldb:mem:.
|
||||
jdbc.url=jdbc:hsqldb:res:/database/heavyduty
|
||||
jdbc.username=sa
|
||||
jdbc.password=
|
@ -2,6 +2,7 @@
|
||||
log4j.rootLogger=DEBUG, stdout
|
||||
|
||||
log4j.logger.org.springframework.security=DEBUG, stdout
|
||||
log4j.logger.org.apache.directory=INFO, stdout
|
||||
|
||||
# Console output...
|
||||
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
|
||||
|
Loading…
x
Reference in New Issue
Block a user