This repository has been archived by the owner on Jan 21, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 53
/
varz-servlet.xml
76 lines (60 loc) · 3.95 KB
/
varz-servlet.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<?xml version="1.0" encoding="UTF-8"?>
<!-- Cloud Foundry 2012.02.03 Beta Copyright (c) [2009-2012] VMware, Inc. All Rights Reserved. This product is licensed to
you under the Apache License, Version 2.0 (the "License"). You may not use this product except in compliance with the License.
This product includes a number of subcomponents with separate copyright notices and license terms. Your use of these subcomponents
is subject to the terms and conditions of the subcomponent's license, as noted in the LICENSE file. -->
<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.springframework.org/schema/beans"
xmlns:security="http://www.springframework.org/schema/security" xmlns:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.1.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd">
<!-- The data source has to be defined first -->
<import resource="env-context.xml" />
<context:property-placeholder properties-ref="applicationProperties"/>
<context:mbean-server id="mbeanServer" />
<http pattern="/healthz/**" create-session="stateless" entry-point-ref="authenticationEntryPoint"
security-context-repository-ref="securityContextRepository" xmlns="http://www.springframework.org/schema/security">
<intercept-url pattern="/**" access="IS_AUTHENTICATED_ANONYMOUSLY" />
<anonymous enabled="true" />
</http>
<http pattern="/varz/**" create-session="stateless" entry-point-ref="authenticationEntryPoint"
security-context-repository-ref="securityContextRepository" xmlns="http://www.springframework.org/schema/security">
<intercept-url pattern="/**" access="IS_AUTHENTICATED_FULLY" />
<anonymous enabled="false" />
<http-basic authentication-details-source-ref="authenticationDetailsSource" entry-point-ref="authenticationEntryPoint" />
<access-denied-handler ref="accessDeniedHandler" />
</http>
<alias alias="varzSecurityFilterChain" name="springSecurityFilterChain" />
<bean id="securityContextRepository" class="org.springframework.security.web.context.NullSecurityContextRepository"/>
<authentication-manager xmlns="http://www.springframework.org/schema/security">
<authentication-provider>
<user-service>
<user name="${varz.username:varz}" authorities="uaa.varz" password="${varz.password:varzclientsecret}" />
</user-service>
</authentication-provider>
</authentication-manager>
<bean id="authenticationDetailsSource" class="org.cloudfoundry.identity.uaa.authentication.UaaAuthenticationDetailsSource" />
<bean id="accessDeniedHandler" class="org.cloudfoundry.identity.uaa.error.JsonAwareAccessDeniedHandler" />
<bean id="authenticationEntryPoint" class="org.cloudfoundry.identity.uaa.error.JsonAwareAuthenticationEntryPoint">
<property name="realmName" value="LOGIN/varz" />
</bean>
<mvc:annotation-driven />
<!-- Override the default mapping so that domain names with periods can be used -->
<bean class="org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping">
<property name="useSuffixPatternMatch" value="false"/>
<property name="alwaysUseFullPath" value="true"/>
<property name="order" value="-1"/>
</bean>
<bean id="healthzEndpoint" class="org.cloudfoundry.identity.uaa.varz.HealthzEndpoint"/>
<bean id="varzEndpoint" class="org.cloudfoundry.identity.uaa.varz.VarzEndpoint">
<property name="server" ref="mbeanServer" />
<property name="staticValues">
<map>
<entry key="type" value="LOGIN" />
</map>
</property>
<property name="environmentProperties" ref="applicationProperties"/>
</bean>
</beans>