<commit_before><?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">

<beans>

  <!-- ========================== FILTER CHAIN ======================== -->
  <bean id="filterChainProxy" class="org.acegisecurity.util.FilterChainProxy">
    <property name="filterInvocationDefinitionSource">
      <value>
        CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON
        PATTERN_TYPE_APACHE_ANT
        /rss.jsp*=httpSessionContextIntegrationFilter,logoutFilter,authenticationProcessingFilter,basicProcessingFilter,securityContextHolderAwareRequestFilter,anonymousProcessingFilter,basicExceptionTranslationFilter,filterInvocationInterceptor
		/rest/**=httpSessionContextIntegrationFilter,logoutFilter,authenticationProcessingFilter,basicProcessingFilter,securityContextHolderAwareRequestFilter,anonymousProcessingFilter,basicExceptionTranslationFilter,filterInvocationInterceptor
        /**=httpSessionContextIntegrationFilter,logoutFilter,authenticationProcessingFilter,basicProcessingFilter,securityContextHolderAwareRequestFilter,anonymousProcessingFilter,exceptionTranslationFilter,filterInvocationInterceptor
      </value>
    </property>
  </bean>

  <bean id="httpSessionContextIntegrationFilter" class="org.acegisecurity.context.HttpSessionContextIntegrationFilter"/>

  <bean id="securityContextHolderAwareRequestFilter" class="org.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter"/>

  <bean id="logoutFilter" class="org.acegisecurity.ui.logout.LogoutFilter">
    <constructor-arg value="/logoff.jsp"/> <!-- URL redirected to after logout -->
    <constructor-arg>
      <list>
        <bean class="org.opennms.web.acegisecurity.SessionNotatingLogoutHandler"/>
        <bean class="org.acegisecurity.ui.logout.SecurityContextLogoutHandler"/>
      </list>
    </constructor-arg>
  </bean>

  <!-- ========================== AUTHENTICATION ======================== -->
  <bean id="authenticationManager" class="org.acegisecurity.providers.ProviderManager">
    <property name="providers">
      <list>
        <ref local="daoAuthenticationProvider"/>
        <!--
             Uncomment the following reference to ldapAuthenticationProvider
             and comment-out the above reference to the
             daoAuthenticationProvider if you want to use LDAP.  You'll also
             need to uncomment the LDAP AUTHENTICATION section below, as well.
          -->
        <!--
        <ref local="ldapAuthenticationProvider"/>
        -->
        <!--<ref local="radiusAuthenticationProvider"/>-->
        <ref local="anonymousAuthenticationProvider"/>
      </list>
    </property>
  </bean>
   
  <!-- ===================== USER DAO AUTHENTICATION ==================== -->
  <bean id="userDao" class="org.opennms.web.acegisecurity.UserDaoImpl">
    <property name="usersConfigurationFile"
              value="${opennms.home}/etc/users.xml"/>
    <property name="magicUsersConfigurationFile"
              value="${opennms.home}/etc/magic-users.properties"/>
  </bean>

  <bean id="openNMSUserDaoImpl"
        class="org.opennms.web.acegisecurity.OpenNMSUserDaoImpl">
    <property name="userDao"><ref bean="userDao"/></property>
  </bean>

  <bean id="upperCaseMd5PasswordEncoder"
        class="org.opennms.web.acegisecurity.UpperCaseMd5PasswordEncoder"/>

  <bean id="daoAuthenticationProvider"
        class="org.acegisecurity.providers.dao.DaoAuthenticationProvider">
    <property name="userDetailsService"><ref bean="openNMSUserDaoImpl"/></property>
    <property name="passwordEncoder"><ref bean="upperCaseMd5PasswordEncoder"/></property>
  </bean>
  
  <!-- ======================= LDAP AUTHENTICATION ====================== -->
  <!-- 
       If you want to use LDAP, uncomment the following section to enable the
       ldapAuthenticationProvider, and in the authenticationManager bean above
       uncomment the reference to the ldapAuthenticationProvider.  Make sure
       that you set the LDAP server hostname below where it says
       "%%%put LDAP server address here%%%" and that you set the attribute
       in the user's entry that you store OpenNMS roles in where it says
       "%%%put role attribute here%%%". :-)
       
        If you want to use groups to grant access use bean groupLdapAuthoritiesPopulator
        and reference it in bean ldapAuthenticationProvider against default userAttributeLdapAuthoritiesPopulator
		you have to set property: userGroups,adminGroups,rtcGroups,readonlyGroups,dashboardGroups
		and list groups that are granted access with role:
		ROLE_USER,ROLE_ADMIN,ROLE_RTC_ROLE_READONLY,ROLE_DASHBOARD
	
       
   -->
  <!-- 
  <bean id="initialDirContextFactory"
        class="org.acegisecurity.ldap.DefaultInitialDirContextFactory">
    <constructor-arg value="ldap://%%%put LDAP server address here%%%:389/"/>
  </bean>

  <bean id="userSearch"
        class="org.acegisecurity.ldap.search.FilterBasedLdapUserSearch">
    <constructor-arg index="0">
      <value></value>
    </constructor-arg>
    <constructor-arg index="1">
      <value>(login={0})</value>
    </constructor-arg>
    <constructor-arg index="2">
      <ref local="initialDirContextFactory" />
    </constructor-arg>
    <property name="searchSubtree">
      <value>true</value>
    </property>
  </bean>
  
  <bean id="userAttributeLdapAuthoritiesPopulator"
        class="org.opennms.web.acegisecurity.UserAttributeLdapAuthoritiesPopulator">
    <constructor-arg><ref local="initialDirContextFactory"/></constructor-arg>
    <constructor-arg><value>%%%put role attribute here%%%</value></constructor-arg>
  </bean>

  <bean id="groupLdapAuthoritiesPopulator"
       class="org.opennms.web.acegisecurity.UserGroupLdapAuthoritiesPopulator">
   <constructor-arg><ref local="initialDirContextFactory"/></constructor-arg>
   <constructor-arg>
     <value>%%% put your search group path here%%%</value>
   </constructor-arg>
   <property name="groupRoleAttribute"><value>cn</value></property>
   <property name="searchSubtree"><value>false</value></property>
   <property name="convertToUpperCase"><value>true</value></property>
   <property name="userGroups">
        <list>
                <value>OPENNMS_USER</value>
                <value>OPENNMS_ADMIN</value>
                <value>any group</value>
        </list>
   </property>
   <property name="adminGroups">
        <list>
                <value>OPENNMS_ADMIN</value>
        </list>
   </property>
  </bean>

  <bean id="ldapAuthenticationProvider"
        class="org.acegisecurity.providers.ldap.LdapAuthenticationProvider">
    <constructor-arg>
      <bean class="org.acegisecurity.providers.ldap.authenticator.BindAuthenticator">
        <constructor-arg><ref local="initialDirContextFactory"/></constructor-arg>
        <property name="userSearch"><ref bean="userSearch"/></property>
      </bean>
    </constructor-arg>
    <constructor-arg>
      <ref bean="userAttributeLdapAuthoritiesPopulator"/>
    </constructor-arg>
  </bean>
   -->

  <!-- ====================== RADIUS AUTHENTICATION ===================== -->
  <!--
       To use Radius Authentication, uncomment the following section to enable
       the radiusAuthenticationProvider, and uncomment the reference to
       radiusAuthenticationProvider in the authenticationManager bean above.

       The first constructor argument to radiusAuthenticationProvider is the
       Radius Server to authenticate against, the second constructor argument
       is the Shared Secret to use during authentication. The port, timeout,
       retries, authTypeClass, and defaultRoles properties are optional and
       default to the values shown.

       If you would like to use a Radius Attribute to assign roles to users,
       set the rolesAttribute property to the name of the attribute. Your
       Radius server should be configured to return a comma-separated string of
       roles (such as "ROLE_USER, ROLE_ADMIN") in this attribute in the
       authentication reply. To specify a locally-defined vendor-specific Radius
       Attribute, use "Unknown-VSAttribute(<Vendor ID>:<Attribute Number>)".
       If the reply from the radius server does not actually contain the
       specified attribute, the user will be assigned the roles specified by
       the defaultRoles property.
  -->
  <!--
  <bean id="radiusAuthenticationProvider" class="org.opennms.web.acegisecurity.RadiusAuthenticationProvider">
    <constructor-arg value="192.168.3.11"/>
    <constructor-arg value="onisecret!"/>
  -->
    <!--<property name="port" value="1812"/>-->
    <!--<property name="timeout" value="5"/>-->
    <!--<property name="retries" value="3"/>-->
    <!--<property name="authTypeClass"><bean class="net.jradius.client.auth.PAPAuthenticator"/></property>-->
    <!--<property name="defaultRoles" value="ROLE_USER"/>-->
    <!--<property name="rolesAttribute" value="Unknown-VSAttribute(%%% Vendor ID %%%:%%% Attribute Number %%%)"/>-->
  <!--
  </bean>
  -->

  <bean id="roleVoter" class="org.acegisecurity.vote.RoleVoter"/>

  <bean id="httpRequestAccessDecisionManager" class="org.acegisecurity.vote.AffirmativeBased">
    <property name="allowIfAllAbstainDecisions"><value>false</value></property>
    <property name="decisionVoters">
      <list>
        <ref bean="roleVoter"/>
      </list>
    </property>
  </bean>

  <bean id="filterInvocationInterceptor" class="org.acegisecurity.intercept.web.FilterSecurityInterceptor">
    <property name="authenticationManager"><ref bean="authenticationManager"/></property>
    <property name="accessDecisionManager"><ref local="httpRequestAccessDecisionManager"/></property>
    <property name="objectDefinitionSource">
      <value>
        CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON
        PATTERN_TYPE_APACHE_ANT
        /=ROLE_ANONYMOUS,ROLE_USER,ROLE_DASHBOARD
        /favicon.ico=ROLE_ANONYMOUS,ROLE_USER,ROLE_DASHBOARD
        /logoff.jsp=ROLE_ANONYMOUS,ROLE_USER,ROLE_DASHBOARD
        /acegilogin.jsp*=ROLE_ANONYMOUS,ROLE_USER,ROLE_DASHBOARD
        /css/styles.css=ROLE_ANONYMOUS,ROLE_USER,ROLE_DASHBOARD
        /css/print.css=ROLE_ANONYMOUS,ROLE_USER,ROLE_DASHBOARD
        /js/pngfix.js=ROLE_ANONYMOUS,ROLE_USER,ROLE_DASHBOARD
        /js/global.js=ROLE_ANONYMOUS,ROLE_USER,ROLE_DASHBOARD
        /images/logo.png=ROLE_ANONYMOUS,ROLE_USER,ROLE_DASHBOARD
        /images/logo-background.gif=ROLE_ANONYMOUS,ROLE_USER,ROLE_DASHBOARD
        /images/headingbg.png=ROLE_ANONYMOUS,ROLE_USER,ROLE_DASHBOARD
        /images/mainbg.png=ROLE_ANONYMOUS,ROLE_USER,ROLE_DASHBOARD
        /images/headerbg.png=ROLE_ANONYMOUS,ROLE_USER,ROLE_DASHBOARD
        /images/footerbg.png=ROLE_ANONYMOUS,ROLE_USER,ROLE_DASHBOARD
        /admin/**=ROLE_ADMIN
        /rtc/post/**=ROLE_RTC
        /webstart/**=ROLE_ANONYMOUS,ROLE_USER,ROLE_DASHBOARD
        /frontpage.htm=ROLE_USER,ROLE_DASHBOARD
        /dashboard.jsp=ROLE_USER,ROLE_DASHBOARD
        /gwt.js=ROLE_USER,ROLE_DASHBOARD
        /surveillanceservice.gwt=ROLE_USER,ROLE_DASHBOARD
        /org.opennms.dashboard.dashboard.nocache.html=ROLE_USER,ROLE_DASHBOARD
        /*.cache.html=ROLE_USER,ROLE_DASHBOARD
        /*.cache.html?*=ROLE_USER,ROLE_DASHBOARD
        /*.cache.xml=ROLE_USER,ROLE_DASHBOARD
        /*.cache.js=ROLE_USER,ROLE_DASHBOARD
        /org.opennms.dashboard.*.nocache.js=ROLE_USER,ROLE_DASHBOARD
        /css/dashboard.css=ROLE_USER,ROLE_DASHBOARD
        /images/bg*.png=ROLE_USER,ROLE_DASHBOARD
        /images/error.png=ROLE_USER,ROLE_DASHBOARD
        /images/progress.gif=ROLE_USER,ROLE_DASHBOARD
        /images/rrd/error.png=ROLE_USER,ROLE_DASHBOARD
        /graph/graph.png=ROLE_USER,ROLE_DASHBOARD
        /**=ROLE_USER
      </value>
    </property>
  </bean>

  <bean id="exceptionTranslationFilter" class="org.acegisecurity.ui.ExceptionTranslationFilter">
    <property name="authenticationEntryPoint"><ref local="authenticationProcessingFilterEntryPoint"/></property>
    <property name="accessDeniedHandler">
      <bean class="org.acegisecurity.ui.AccessDeniedHandlerImpl">
        <property name="errorPage" value="/accessDenied.jsp"/>
      </bean>
    </property>
  </bean>

  <bean id="basicExceptionTranslationFilter" class="org.acegisecurity.ui.ExceptionTranslationFilter">
    <property name="authenticationEntryPoint"><ref local="basicProcessingFilterEntryPoint"/></property>
    <property name="accessDeniedHandler">
      <bean class="org.acegisecurity.ui.AccessDeniedHandlerImpl">
        <property name="errorPage" value="/accessDenied.jsp"/>
      </bean>
    </property>
  </bean>

  <bean id="authenticationProcessingFilter" class="org.acegisecurity.ui.webapp.AuthenticationProcessingFilter">
    <property name="authenticationManager"><ref bean="authenticationManager"/></property>
    <property name="authenticationFailureUrl"><value>/acegilogin.jsp?login_error=1</value></property>
    <property name="defaultTargetUrl"><value>/</value></property>
    <property name="filterProcessesUrl"><value>/j_acegi_security_check</value></property>
  </bean>

  <bean id="authenticationProcessingFilterEntryPoint" class="org.acegisecurity.ui.webapp.AuthenticationProcessingFilterEntryPoint">
    <property name="loginFormUrl"><value>/acegilogin.jsp</value></property>
    <property name="forceHttps"><value>false</value></property>
  </bean>

  <bean id="basicProcessingFilter" class="org.acegisecurity.ui.basicauth.BasicProcessingFilter">
    <property name="authenticationManager"><ref local="authenticationManager"/></property>
    <property name="authenticationEntryPoint"><ref local="basicProcessingFilterEntryPoint"/></property>
  </bean>

  <bean id="basicProcessingFilterEntryPoint" class="org.acegisecurity.ui.basicauth.BasicProcessingFilterEntryPoint">
    <property name="realmName"><value>OpenNMS Realm</value></property>
  </bean>

  <bean id="anonymousProcessingFilter" class="org.acegisecurity.providers.anonymous.AnonymousProcessingFilter">
    <property name="key"><value>foobar</value></property>
    <property name="userAttribute"><value>anonymousUser,ROLE_ANONYMOUS</value></property>
  </bean>

  <bean id="anonymousAuthenticationProvider" class="org.acegisecurity.providers.anonymous.AnonymousAuthenticationProvider">
    <property name="key"><value>foobar</value></property>
  </bean>
  
  <bean class="org.opennms.web.acegisecurity.AcegiAuthenticationEventOnmsEventBuilder">
    <property name="eventProxy" ref="eventProxy"/>
  </bean>
</beans>
<commit_msg>Fix radius comments in applicationContext-acegi-security.xml Bug 2743<commit_after><?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">

<beans>

  <!-- ========================== FILTER CHAIN ======================== -->
  <bean id="filterChainProxy" class="org.acegisecurity.util.FilterChainProxy">
    <property name="filterInvocationDefinitionSource">
      <value>
        CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON
        PATTERN_TYPE_APACHE_ANT
        /rss.jsp*=httpSessionContextIntegrationFilter,logoutFilter,authenticationProcessingFilter,basicProcessingFilter,securityContextHolderAwareRequestFilter,anonymousProcessingFilter,basicExceptionTranslationFilter,filterInvocationInterceptor
		/rest/**=httpSessionContextIntegrationFilter,logoutFilter,authenticationProcessingFilter,basicProcessingFilter,securityContextHolderAwareRequestFilter,anonymousProcessingFilter,basicExceptionTranslationFilter,filterInvocationInterceptor
        /**=httpSessionContextIntegrationFilter,logoutFilter,authenticationProcessingFilter,basicProcessingFilter,securityContextHolderAwareRequestFilter,anonymousProcessingFilter,exceptionTranslationFilter,filterInvocationInterceptor
      </value>
    </property>
  </bean>

  <bean id="httpSessionContextIntegrationFilter" class="org.acegisecurity.context.HttpSessionContextIntegrationFilter"/>

  <bean id="securityContextHolderAwareRequestFilter" class="org.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter"/>

  <bean id="logoutFilter" class="org.acegisecurity.ui.logout.LogoutFilter">
    <constructor-arg value="/logoff.jsp"/> <!-- URL redirected to after logout -->
    <constructor-arg>
      <list>
        <bean class="org.opennms.web.acegisecurity.SessionNotatingLogoutHandler"/>
        <bean class="org.acegisecurity.ui.logout.SecurityContextLogoutHandler"/>
      </list>
    </constructor-arg>
  </bean>

  <!-- ========================== AUTHENTICATION ======================== -->
  <bean id="authenticationManager" class="org.acegisecurity.providers.ProviderManager">
    <property name="providers">
      <list>
        <ref local="daoAuthenticationProvider"/>
        <!--
             Uncomment the following reference to ldapAuthenticationProvider
             and comment-out the above reference to the
             daoAuthenticationProvider if you want to use LDAP.  You'll also
             need to uncomment the LDAP AUTHENTICATION section below, as well.
          -->
        <!--
        <ref local="ldapAuthenticationProvider"/>
        -->
        <!--<ref local="radiusAuthenticationProvider"/>-->
        <ref local="anonymousAuthenticationProvider"/>
      </list>
    </property>
  </bean>
   
  <!-- ===================== USER DAO AUTHENTICATION ==================== -->
  <bean id="userDao" class="org.opennms.web.acegisecurity.UserDaoImpl">
    <property name="usersConfigurationFile"
              value="${opennms.home}/etc/users.xml"/>
    <property name="magicUsersConfigurationFile"
              value="${opennms.home}/etc/magic-users.properties"/>
  </bean>

  <bean id="openNMSUserDaoImpl"
        class="org.opennms.web.acegisecurity.OpenNMSUserDaoImpl">
    <property name="userDao"><ref bean="userDao"/></property>
  </bean>

  <bean id="upperCaseMd5PasswordEncoder"
        class="org.opennms.web.acegisecurity.UpperCaseMd5PasswordEncoder"/>

  <bean id="daoAuthenticationProvider"
        class="org.acegisecurity.providers.dao.DaoAuthenticationProvider">
    <property name="userDetailsService"><ref bean="openNMSUserDaoImpl"/></property>
    <property name="passwordEncoder"><ref bean="upperCaseMd5PasswordEncoder"/></property>
  </bean>
  
  <!-- ======================= LDAP AUTHENTICATION ====================== -->
  <!-- 
       If you want to use LDAP, uncomment the following section to enable the
       ldapAuthenticationProvider, and in the authenticationManager bean above
       uncomment the reference to the ldapAuthenticationProvider.  Make sure
       that you set the LDAP server hostname below where it says
       "%%%put LDAP server address here%%%" and that you set the attribute
       in the user's entry that you store OpenNMS roles in where it says
       "%%%put role attribute here%%%". :-)
       
        If you want to use groups to grant access use bean groupLdapAuthoritiesPopulator
        and reference it in bean ldapAuthenticationProvider against default userAttributeLdapAuthoritiesPopulator
		you have to set property: userGroups,adminGroups,rtcGroups,readonlyGroups,dashboardGroups
		and list groups that are granted access with role:
		ROLE_USER,ROLE_ADMIN,ROLE_RTC_ROLE_READONLY,ROLE_DASHBOARD
	
       
   -->
  <!-- 
  <bean id="initialDirContextFactory"
        class="org.acegisecurity.ldap.DefaultInitialDirContextFactory">
    <constructor-arg value="ldap://%%%put LDAP server address here%%%:389/"/>
  </bean>

  <bean id="userSearch"
        class="org.acegisecurity.ldap.search.FilterBasedLdapUserSearch">
    <constructor-arg index="0">
      <value></value>
    </constructor-arg>
    <constructor-arg index="1">
      <value>(login={0})</value>
    </constructor-arg>
    <constructor-arg index="2">
      <ref local="initialDirContextFactory" />
    </constructor-arg>
    <property name="searchSubtree">
      <value>true</value>
    </property>
  </bean>
  
  <bean id="userAttributeLdapAuthoritiesPopulator"
        class="org.opennms.web.acegisecurity.UserAttributeLdapAuthoritiesPopulator">
    <constructor-arg><ref local="initialDirContextFactory"/></constructor-arg>
    <constructor-arg><value>%%%put role attribute here%%%</value></constructor-arg>
  </bean>

  <bean id="groupLdapAuthoritiesPopulator"
       class="org.opennms.web.acegisecurity.UserGroupLdapAuthoritiesPopulator">
   <constructor-arg><ref local="initialDirContextFactory"/></constructor-arg>
   <constructor-arg>
     <value>%%% put your search group path here%%%</value>
   </constructor-arg>
   <property name="groupRoleAttribute"><value>cn</value></property>
   <property name="searchSubtree"><value>false</value></property>
   <property name="convertToUpperCase"><value>true</value></property>
   <property name="userGroups">
        <list>
                <value>OPENNMS_USER</value>
                <value>OPENNMS_ADMIN</value>
                <value>any group</value>
        </list>
   </property>
   <property name="adminGroups">
        <list>
                <value>OPENNMS_ADMIN</value>
        </list>
   </property>
  </bean>

  <bean id="ldapAuthenticationProvider"
        class="org.acegisecurity.providers.ldap.LdapAuthenticationProvider">
    <constructor-arg>
      <bean class="org.acegisecurity.providers.ldap.authenticator.BindAuthenticator">
        <constructor-arg><ref local="initialDirContextFactory"/></constructor-arg>
        <property name="userSearch"><ref bean="userSearch"/></property>
      </bean>
    </constructor-arg>
    <constructor-arg>
      <ref bean="userAttributeLdapAuthoritiesPopulator"/>
    </constructor-arg>
  </bean>
   -->

  <!-- ====================== RADIUS AUTHENTICATION ===================== -->
  <!--
       To use Radius Authentication, uncomment the following section to enable
       the radiusAuthenticationProvider, and uncomment the reference to
       radiusAuthenticationProvider in the authenticationManager bean above.

       The first constructor argument to radiusAuthenticationProvider is the
       Radius Server to authenticate against, the second constructor argument
       is the Shared Secret to use during authentication. The port, timeout,
       retries, authTypeClass, and defaultRoles properties are optional and
       default to the values shown.

       If you would like to use a Radius Attribute to assign roles to users,
       set the rolesAttribute property to the name of the attribute. Your
       Radius server should be configured to return a comma-separated string of
       roles (such as "ROLE_USER, ROLE_ADMIN") in this attribute in the
       authentication reply. To specify a locally-defined vendor-specific Radius
       Attribute, use "Unknown-VSAttribute(<Vendor ID>:<Attribute Number>)".
       If the reply from the radius server does not actually contain the
       specified attribute, the user will be assigned the roles specified by
       the defaultRoles property.
  -->
  <!--
  <bean id="radiusAuthenticationProvider" class="org.opennms.web.acegisecurity.RadiusAuthenticationProvider">
    <constructor-arg value="%%% Radius Server %%%"/>
    <constructor-arg value="%%% Shared Secret %%%"/>
  -->
    <!--<property name="port" value="1812"/>-->
    <!--<property name="timeout" value="5"/>-->
    <!--<property name="retries" value="3"/>-->
    <!--<property name="authTypeClass"><bean class="net.jradius.client.auth.PAPAuthenticator"/></property>-->
    <!--<property name="defaultRoles" value="ROLE_USER"/>-->
    <!--<property name="rolesAttribute" value="Unknown-VSAttribute(%%% Vendor ID %%%:%%% Attribute Number %%%)"/>-->
  <!--
  </bean>
  -->

  <bean id="roleVoter" class="org.acegisecurity.vote.RoleVoter"/>

  <bean id="httpRequestAccessDecisionManager" class="org.acegisecurity.vote.AffirmativeBased">
    <property name="allowIfAllAbstainDecisions"><value>false</value></property>
    <property name="decisionVoters">
      <list>
        <ref bean="roleVoter"/>
      </list>
    </property>
  </bean>

  <bean id="filterInvocationInterceptor" class="org.acegisecurity.intercept.web.FilterSecurityInterceptor">
    <property name="authenticationManager"><ref bean="authenticationManager"/></property>
    <property name="accessDecisionManager"><ref local="httpRequestAccessDecisionManager"/></property>
    <property name="objectDefinitionSource">
      <value>
        CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON
        PATTERN_TYPE_APACHE_ANT
        /=ROLE_ANONYMOUS,ROLE_USER,ROLE_DASHBOARD
        /favicon.ico=ROLE_ANONYMOUS,ROLE_USER,ROLE_DASHBOARD
        /logoff.jsp=ROLE_ANONYMOUS,ROLE_USER,ROLE_DASHBOARD
        /acegilogin.jsp*=ROLE_ANONYMOUS,ROLE_USER,ROLE_DASHBOARD
        /css/styles.css=ROLE_ANONYMOUS,ROLE_USER,ROLE_DASHBOARD
        /css/print.css=ROLE_ANONYMOUS,ROLE_USER,ROLE_DASHBOARD
        /js/pngfix.js=ROLE_ANONYMOUS,ROLE_USER,ROLE_DASHBOARD
        /js/global.js=ROLE_ANONYMOUS,ROLE_USER,ROLE_DASHBOARD
        /images/logo.png=ROLE_ANONYMOUS,ROLE_USER,ROLE_DASHBOARD
        /images/logo-background.gif=ROLE_ANONYMOUS,ROLE_USER,ROLE_DASHBOARD
        /images/headingbg.png=ROLE_ANONYMOUS,ROLE_USER,ROLE_DASHBOARD
        /images/mainbg.png=ROLE_ANONYMOUS,ROLE_USER,ROLE_DASHBOARD
        /images/headerbg.png=ROLE_ANONYMOUS,ROLE_USER,ROLE_DASHBOARD
        /images/footerbg.png=ROLE_ANONYMOUS,ROLE_USER,ROLE_DASHBOARD
        /admin/**=ROLE_ADMIN
        /rtc/post/**=ROLE_RTC
        /webstart/**=ROLE_ANONYMOUS,ROLE_USER,ROLE_DASHBOARD
        /frontpage.htm=ROLE_USER,ROLE_DASHBOARD
        /dashboard.jsp=ROLE_USER,ROLE_DASHBOARD
        /gwt.js=ROLE_USER,ROLE_DASHBOARD
        /surveillanceservice.gwt=ROLE_USER,ROLE_DASHBOARD
        /org.opennms.dashboard.dashboard.nocache.html=ROLE_USER,ROLE_DASHBOARD
        /*.cache.html=ROLE_USER,ROLE_DASHBOARD
        /*.cache.html?*=ROLE_USER,ROLE_DASHBOARD
        /*.cache.xml=ROLE_USER,ROLE_DASHBOARD
        /*.cache.js=ROLE_USER,ROLE_DASHBOARD
        /org.opennms.dashboard.*.nocache.js=ROLE_USER,ROLE_DASHBOARD
        /css/dashboard.css=ROLE_USER,ROLE_DASHBOARD
        /images/bg*.png=ROLE_USER,ROLE_DASHBOARD
        /images/error.png=ROLE_USER,ROLE_DASHBOARD
        /images/progress.gif=ROLE_USER,ROLE_DASHBOARD
        /images/rrd/error.png=ROLE_USER,ROLE_DASHBOARD
        /graph/graph.png=ROLE_USER,ROLE_DASHBOARD
        /**=ROLE_USER
      </value>
    </property>
  </bean>

  <bean id="exceptionTranslationFilter" class="org.acegisecurity.ui.ExceptionTranslationFilter">
    <property name="authenticationEntryPoint"><ref local="authenticationProcessingFilterEntryPoint"/></property>
    <property name="accessDeniedHandler">
      <bean class="org.acegisecurity.ui.AccessDeniedHandlerImpl">
        <property name="errorPage" value="/accessDenied.jsp"/>
      </bean>
    </property>
  </bean>

  <bean id="basicExceptionTranslationFilter" class="org.acegisecurity.ui.ExceptionTranslationFilter">
    <property name="authenticationEntryPoint"><ref local="basicProcessingFilterEntryPoint"/></property>
    <property name="accessDeniedHandler">
      <bean class="org.acegisecurity.ui.AccessDeniedHandlerImpl">
        <property name="errorPage" value="/accessDenied.jsp"/>
      </bean>
    </property>
  </bean>

  <bean id="authenticationProcessingFilter" class="org.acegisecurity.ui.webapp.AuthenticationProcessingFilter">
    <property name="authenticationManager"><ref bean="authenticationManager"/></property>
    <property name="authenticationFailureUrl"><value>/acegilogin.jsp?login_error=1</value></property>
    <property name="defaultTargetUrl"><value>/</value></property>
    <property name="filterProcessesUrl"><value>/j_acegi_security_check</value></property>
  </bean>

  <bean id="authenticationProcessingFilterEntryPoint" class="org.acegisecurity.ui.webapp.AuthenticationProcessingFilterEntryPoint">
    <property name="loginFormUrl"><value>/acegilogin.jsp</value></property>
    <property name="forceHttps"><value>false</value></property>
  </bean>

  <bean id="basicProcessingFilter" class="org.acegisecurity.ui.basicauth.BasicProcessingFilter">
    <property name="authenticationManager"><ref local="authenticationManager"/></property>
    <property name="authenticationEntryPoint"><ref local="basicProcessingFilterEntryPoint"/></property>
  </bean>

  <bean id="basicProcessingFilterEntryPoint" class="org.acegisecurity.ui.basicauth.BasicProcessingFilterEntryPoint">
    <property name="realmName"><value>OpenNMS Realm</value></property>
  </bean>

  <bean id="anonymousProcessingFilter" class="org.acegisecurity.providers.anonymous.AnonymousProcessingFilter">
    <property name="key"><value>foobar</value></property>
    <property name="userAttribute"><value>anonymousUser,ROLE_ANONYMOUS</value></property>
  </bean>

  <bean id="anonymousAuthenticationProvider" class="org.acegisecurity.providers.anonymous.AnonymousAuthenticationProvider">
    <property name="key"><value>foobar</value></property>
  </bean>
  
  <bean class="org.opennms.web.acegisecurity.AcegiAuthenticationEventOnmsEventBuilder">
    <property name="eventProxy" ref="eventProxy"/>
  </bean>
</beans>

{'fraction_non_alphanumeric': 0.13729338842975206, 'fraction_numerical': 0.001825068870523416, 'mean_word_length': 4.325692279479186, 'pattern_counts': {'":': 0, '<': 539, '<?xml version=': 2, '>': 539, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 7}, 'pii_count': 1, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1375888', 'n_tokens_mistral': 8750, 'n_tokens_neox': 8573, 'n_words': 1358}