0 Replies Latest reply on Nov 16, 2011 6:21 AM by kanetrj

    JBoss 6: can't set defaultCacheTimeout on JNDIBasedSecurityManagement in security.xml

    kanetrj

      JBoss version: 6.1.0 final.

       

      I'm trying to set a value for default cache timeout in conf/bootstrap/security.xml, so that jboss doesn't remember login details for too long. According to:

       

      http://docs.jboss.org/jbosssecurity/docs/6.0/security_guide/html_single/index.html#The_JaasSecurityManagerService_MBean-The_JNDIBasedSecurityManagement_Bean

       

      you can add a property to the JNDIBasedSecurityManagement declaration in security.xml:

       

      <bean name="JNDIBasedSecurityManagement" class="org.jboss.security.integration.JNDIBasedSecurityManagement">

        <property name="defaultCacheTimeout">1800</property>

      </bean>

       

      However, when I start up JBoss I get:

       

      10:57:00,062 ERROR [AbstractKernelController] Error installing to Configured: name=JNDIBasedSecurityManagement state=Instantiated: java.lang.RuntimeException: Error configuring property: defaultCacheTimeout for JNDIBasedSecurityManagement

      ...

      Caused by: java.lang.IllegalArgumentException: No such property defaultCacheTimeout for bean org.jboss.security.integration.JNDIBasedSecurityManagement available [baseContext, identityTrustMgrClass, callBackHandler, enableAudit, enableIdentity, mappingMgrClass, authenticationMgrClass, class, auditMgrClass, authorizationMgrClass, cachePolicy]

       

      I've inspected JNDIBasedSecurityManagement; it has a static setter:

       

      public static void setDefaultCacheTimeout(int defaultCacheTimeout)

       

      Does anyone know where I'm going wrong?