summaryrefslogtreecommitdiffstats
path: root/com.gluster.storage.management.server/src/spring/gluster-server-security.xml
diff options
context:
space:
mode:
authorShireesh Anjal <shireesh@gluster.com>2011-03-01 14:55:42 +0530
committerShireesh Anjal <shireesh@gluster.com>2011-03-01 14:55:42 +0530
commit1894fc1762042cd832305d28c7502b62ae014404 (patch)
tree9807c656bda1d1b5bac7e8520450fa5be1b0c645 /com.gluster.storage.management.server/src/spring/gluster-server-security.xml
parentc95d2ea02cc4126ed5cf33dac5fba5971dcf88c6 (diff)
Adding spring and derby libraries, server data initialization
Diffstat (limited to 'com.gluster.storage.management.server/src/spring/gluster-server-security.xml')
-rw-r--r--com.gluster.storage.management.server/src/spring/gluster-server-security.xml46
1 files changed, 46 insertions, 0 deletions
diff --git a/com.gluster.storage.management.server/src/spring/gluster-server-security.xml b/com.gluster.storage.management.server/src/spring/gluster-server-security.xml
new file mode 100644
index 00000000..0de97761
--- /dev/null
+++ b/com.gluster.storage.management.server/src/spring/gluster-server-security.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans:beans xmlns="http://www.springframework.org/schema/security"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"
+ xmlns:jdbc="http://www.springframework.org/schema/jdbc"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-3.0.xsd
+ http://www.springframework.org/schema/security
+ http://www.springframework.org/schema/security/spring-security-3.0.xsd
+ ">
+
+ <http auto-config="true" use-expressions="true">
+ <intercept-url pattern="/resources/*"
+ access="hasRole('ROLE_ADMIN') and fullyAuthenticated" />
+ <intercept-url pattern="/*" access="permitAll" />
+ <!-- SSL Protection -->
+ <!-- <intercept-url pattern="/resources/*" access="hasRole('ROLE_ADMIN')
+ and fullyAuthenticated" requires-channel="https"/> <intercept-url pattern="/*"
+ access="permitAll" requires-channel="any"/> -->
+ <port-mappings>
+ <port-mapping http="8080" https="8443" />
+ </port-mappings>
+
+ <!-- HTTP basic authentication -->
+ <http-basic />
+ </http>
+
+ <beans:bean
+ class="org.springframework.security.authentication.encoding.ShaPasswordEncoder"
+ id="passwordEncoder" />
+
+ <authentication-manager alias="authenticationManager">
+ <authentication-provider user-service-ref="jdbcUserService">
+ <!-- Passwords are SHA encrypted -->
+ <password-encoder hash="sha" />
+ </authentication-provider>
+ </authentication-manager>
+
+ <beans:bean id="jdbcUserService"
+ class="org.springframework.security.provisioning.JdbcUserDetailsManager"
+ lazy-init="false">
+ <beans:property name="dataSource" ref="dataSource" />
+ <beans:property name="authenticationManager" ref="authenticationManager" />
+ </beans:bean>
+</beans:beans> \ No newline at end of file