Class SessionServiceConfig


  • @Singleton
    public class SessionServiceConfig
    extends Object
    Responsible for collating System Properties and amSession.xml configuration state relating to the Session Service.
    Since:
    13.0.0
    • Method Detail

      • isDenyLoginIfDBIsDown

        public boolean isDenyLoginIfDBIsDown()
        Returns true if amSession.xml property "iplanet-am-session-deny-login-if-db-is-down" is "YES" (case insensitive). Defaults to false.
      • isSessionConstraintEnabled

        public boolean isSessionConstraintEnabled()
        Returns true if amSession.xml property "iplanet-am-session-enable-session-constraint" is "ON" (case insensitive). Defaults to false.
      • getHttpSessionPropertyName

        public String getHttpSessionPropertyName()
      • getHttpSessionOwnerListPropertyName

        public String getHttpSessionOwnerListPropertyName()
      • getSecurityCookieName

        public String getSecurityCookieName()
      • getMaxSessionCacheSize

        public int getMaxSessionCacheSize()
        The maximum number of sessions to cache in the internal session cache.
        Returns:
        SystemProperty "org.forgerock.openam.session.service.access.persistence.caching.maxsize". Default 64000.
      • getMaxSessionCacheTime

        public long getMaxSessionCacheTime()
        The maximum time of cache for internal session in the internal session cache.
        Returns:
        SystemProperty "org.openidentityplatform.openam.session.service.access.persistence.caching.maxtime". Default 60.
      • isLoggingEnabled

        public boolean isLoggingEnabled()
        Returns true if SystemProperty "com.iplanet.am.logstatus" is "ACTIVE" (case insensitive). Defaults to false.
      • getHttpSessionTrackingCookieName

        public String getHttpSessionTrackingCookieName()
        Returns the name of the cookie/URL parameter used by J2EE container for session tracking (currently hardcoded to "JSESSIONID")
      • isCookieEncodingEnabled

        public boolean isCookieEncodingEnabled()
        Returns true if SystemProperty "com.iplanet.am.cookie.encode" is true. Defaults to false.
      • getNotificationThreadPoolSize

        public int getNotificationThreadPoolSize()
        Returns value of SystemProperty "com.iplanet.am.notification.threadpool.size". Defaults to 10 if not specified.
      • getNotificationThreadPoolThreshold

        public int getNotificationThreadPoolThreshold()
        Returns value of SystemProperty "com.iplanet.am.notification.threadpool.threshold". Defaults to 100 if not specified.
      • isReturnAppSessionEnabled

        public boolean isReturnAppSessionEnabled()
        Returns value of SystemProperty "com.sun.identity.session.returnAppSession". Defaults to false.
      • getTimeoutHandlers

        public Set<String> getTimeoutHandlers()
        Returns values of amSession.xml property "openam-session-timeout-handler-list". Each value should be the fully qualified name of a class implementing SessionTimeoutHandler.
        See Also:
        SessionTimeoutHandler
      • getApplicationMaxCachingTime

        public long getApplicationMaxCachingTime()
        Returns value of SystemProperty "com.sun.identity.session.application.maxCacheTime" (minutes). Defaults to Long.MAX_VALUE / 60 (i.e. essentially forever).
      • getSessionRetrievalTimeout

        public long getSessionRetrievalTimeout()
        Returns value of amSession.xml property "iplanet-am-session-session-list-retrieval-timeout" (seconds). Defaults to 5.
      • getMaxSessionListSize

        public int getMaxSessionListSize()
        Returns value of amSession.xml property "iplanet-am-session-max-session-list-size". Defaults to 200.
      • isSendPropertyNotification

        public boolean isSendPropertyNotification​(String key)
        Returns true if property change notifications are enabled for the specified property. Property change notifications are activated by setting the amSession.xml property "iplanet-am-session-property-change-notification" to "ON" (case-insensitive); defaults to false. Properties for which notifications should be sent are then specified vis the amSession.xml property "iplanet-am-session-notification-property-list"; no properties are selected by default.
        Parameters:
        key - Name of the property to check
      • getJwtSessionMapper

        public JwtSessionMapper getJwtSessionMapper()
        Returns:
        JwtSessionMapper configured according to hot-swappable SMS settings.
      • getSessionFailoverClusterStateCheckTimeout

        public int getSessionFailoverClusterStateCheckTimeout()
        Returns value of amSession.xml property "com.iplanet.am.session.failover.cluster.stateCheck.timeout" (milliseconds). Defaults to 1000.
      • getSessionFailoverClusterStateCheckPeriod

        public long getSessionFailoverClusterStateCheckPeriod()
        Returns value of amSession.xml property "com.iplanet.am.session.failover.cluster.stateCheck.period" (milliseconds). Defaults to 1000.
      • isSessionBlacklistingEnabled

        public boolean isSessionBlacklistingEnabled()
        Whether session blacklisting is enabled for stateless session logout. Defaults to false.
      • getSessionBlacklistCacheSize

        public int getSessionBlacklistCacheSize()
        Maximum number of blacklisted sessions to cache in memory on each server. Beyond this number, sessions will be evicted from memory (but kept in the CTS) in a least-recently used (LRU) strategy. Defaults to 10000.
      • getSessionBlacklistPollInterval

        public long getSessionBlacklistPollInterval​(TimeUnit unit)
        The interval at which to poll for changes to the session blacklist. May be 0 to indicate polling is disabled.
        Parameters:
        unit - the desired time unit for the poll interval.
      • getSessionBlacklistPurgeDelay

        public long getSessionBlacklistPurgeDelay​(TimeUnit unit)
        Amount of time to keep sessions in the blacklist beyond their expiry time to account for clock skew.
        Parameters:
        unit - the desired time unit for the purge delay.