<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Session Timeout in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/session-timeout/m-p/128303#M34796</link>
    <description>&lt;P&gt;Timeouts can be set for tickets and overall container session.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you are looking for increasing/decreasing alfresco alf_ticket timeout then refer following properties:&lt;/P&gt;
&lt;PRE&gt;&lt;STRONG&gt;# Do authentication tickets expire or live for ever?
&lt;/STRONG&gt;&lt;FONT color="#FF0000"&gt;authentication.ticket.ticketsExpire=true
&lt;/FONT&gt;&lt;STRONG&gt;# If ticketsEpire is true then how they should expire?
# Valid values are: AFTER_INACTIVITY, AFTER_FIXED_TIME, DO_NOT_EXPIRE
# The default is AFTER_FIXED_TIME&lt;/STRONG&gt;
&lt;FONT color="#FF0000"&gt;authentication.ticket.expiryMode=AFTER_INACTIVITY
&lt;/FONT&gt;&lt;STRONG&gt;# If authentication.ticket.ticketsExpire is true and
# authentication.ticket.expiryMode is AFTER_FIXED_TIME or AFTER_INACTIVITY,
# this controls the minimum period for which tickets are valid. 
# The default is PT1H for one hour.&lt;/STRONG&gt;
&lt;FONT color="#FF0000"&gt;authentication.ticket.validDuration=PT1H
&lt;/FONT&gt;&lt;/PRE&gt;
&lt;P&gt;These properties can be passed as follows:&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;ervices:
  alfresco:
    image: alfresco/alfresco-content-repository-community:7.2.0
    mem_limit: 2g
    environment:
      JAVA_TOOL_OPTIONS: "
        -Dencryption.keystore.type=JCEKS
        -Dencryption.cipherAlgorithm=DESede/CBC/PKCS5Padding
        -Dencryption.keyAlgorithm=DESede
        -Dencryption.keystore.location=/usr/local/tomcat/shared/classes/alfresco/extension/keystore/keystore
        -Dmetadata-keystore.password=mp6yc0UD9e
        -Dmetadata-keystore.aliases=metadata
        -Dmetadata-keystore.metadata.password=oKIWzVdEdA
        -Dmetadata-keystore.metadata.algorithm=DESede
        "
      JAVA_OPTS: "
        -Ddb.driver=org.postgresql.Driver
        -Ddb.username=alfresco
        -Ddb.password=alfresco
        -Ddb.url=jdbc:postgresql://postgres:5432/alfresco
        -Dsolr.host=solr6
        -Dsolr.port=8983
        -Dsolr.http.connection.timeout=1000
        -Dsolr.secureComms=secret
        -Dsolr.sharedSecret=secret
        -Dsolr.base.url=/solr
        -Dindex.subsystem.name=solr6
        -Dshare.host=127.0.0.1
        -Dshare.port=8080
        -Dalfresco.host=localhost
        -Dalfresco.port=8080
        -Daos.baseUrlOverwrite=http://localhost:8080/alfresco/aos
        -Dmessaging.broker.url=\"failover:(nio://activemq:61616)?timeout=3000&amp;amp;jms.useCompression=true\"
        -Ddeployment.method=DOCKER_COMPOSE
        -DlocalTransform.core-aio.url=http://transform-core-aio:8090/
        -Dcsrf.filter.enabled=false
	&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;-Dauthentication.ticket.ticketsExpire=true
	-Dauthentication.ticket.expiryMode=AFTER_INACTIVITY
	-Dauthentication.ticket.validDuration=PT1H&lt;/STRONG&gt;&lt;/FONT&gt;
        -XX:MinRAMPercentage=50 -XX:MaxRAMPercentage=80
        "
&lt;/PRE&gt;
&lt;P&gt;If you are looking to set the timeout at servlet container level, you need to set the following:&lt;/P&gt;
&lt;P&gt;[For example Share] tomcat\webapps\&lt;STRONG&gt;share\WEB-INF\web.xml&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;PRE&gt;&amp;lt;session-config&amp;gt;&lt;BR /&gt;    &amp;lt;!-- default --&amp;gt;
&lt;STRONG&gt;    &amp;lt;session-timeout&amp;gt;60&amp;lt;/session-timeout&amp;gt;
&lt;/STRONG&gt;&amp;lt;/session-config&amp;gt;&lt;/PRE&gt;
&lt;P&gt;In dockerized environment, if you have to add above config then you need to use combination of DockerFile and docker-compose.yml. for example:&lt;/P&gt;
&lt;PRE&gt;ARG SHARE_TAG

FROM alfresco/alfresco-share:${SHARE_TAG}

ARG TOMCAT_DIR=/usr/local/tomcat

# In base image it tries to write logs at root directory which requires 'root' user access.
RUN sed -i "s|log4j.appender.File.File\=share.log|log4j.appender.File.File\=logs/share.log |g" $TOMCAT_DIR/webapps/share/WEB-INF/classes/log4j.properties ;

&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;# Update session timeout config from default 60 minutes to 30 minutes:
RUN sed -i 's@&amp;lt;session-timeout&amp;gt;60&amp;lt;/session-timeout&amp;gt;@&amp;lt;session-timeout&amp;gt;30&amp;lt;/session-timeout&amp;gt;@' \
	$TOMCAT_DIR/webapps/share/WEB-INF/web.xml&lt;/STRONG&gt;&lt;/FONT&gt;

# Copy and apply amp add-ons
COPY Dockerfile add-ons/*.amp $TOMCAT_DIR/amps_share/
RUN java -jar $TOMCAT_DIR/alfresco-mmt/alfresco-mmt*.jar install \
              $TOMCAT_DIR/amps_share $TOMCAT_DIR/webapps/share -directory -nobackup -force
			  
#TODO:: Add more steps as needed&lt;/PRE&gt;
&lt;PRE&gt; share:
        build:
          &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;dockerfile: ./Dockerfile
          context: ./configs-to-override/share&lt;/STRONG&gt;&lt;/FONT&gt;
          args:
            SHARE_TAG: ${SHARE_TAG}
        mem_limit: 2g
        environment:
            REPO_HOST: "alfresco"
            REPO_PORT: "7080"
            JAVA_OPTS: "
                -XX:MinRAMPercentage=50
                -XX:MaxRAMPercentage=80
                -Dalfresco.host=localhost
                -Dalfresco.port=7080
                -Dalfresco.context=alfresco
                -Dalfresco.protocol=http
                "&lt;/PRE&gt;
&lt;P&gt;You can refer &lt;A href="https://github.com/abhinavmishra14/change-acs-share-port-demo" target="_self" rel="nofollow noopener noreferrer"&gt;this project&lt;/A&gt; as a reference:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/abhinavmishra14/change-acs-share-port-demo/blob/master/configs-to-override/share/Dockerfile#L34" target="_blank" rel="nofollow noopener noreferrer"&gt;https://github.com/abhinavmishra14/change-acs-share-port-demo/blob/master/configs-to-override/share/Dockerfile#L34&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/abhinavmishra14/change-acs-share-port-demo/blob/master/docker-compose.yml#L70" target="_blank" rel="nofollow noopener noreferrer"&gt;https://github.com/abhinavmishra14/change-acs-share-port-demo/blob/master/docker-compose.yml#L70&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 09 Jun 2022 17:23:27 GMT</pubDate>
    <dc:creator>abhinavmishra14</dc:creator>
    <dc:date>2022-06-09T17:23:27Z</dc:date>
    <item>
      <title>Session Timeout</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/session-timeout/m-p/128302#M34795</link>
      <description>&lt;P&gt;How Can I Increase/Decrease session timeout in docker environment?&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jun 2022 04:04:49 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/session-timeout/m-p/128302#M34795</guid>
      <dc:creator>sp2</dc:creator>
      <dc:date>2022-06-09T04:04:49Z</dc:date>
    </item>
    <item>
      <title>Re: Session Timeout</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/session-timeout/m-p/128303#M34796</link>
      <description>&lt;P&gt;Timeouts can be set for tickets and overall container session.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you are looking for increasing/decreasing alfresco alf_ticket timeout then refer following properties:&lt;/P&gt;
&lt;PRE&gt;&lt;STRONG&gt;# Do authentication tickets expire or live for ever?
&lt;/STRONG&gt;&lt;FONT color="#FF0000"&gt;authentication.ticket.ticketsExpire=true
&lt;/FONT&gt;&lt;STRONG&gt;# If ticketsEpire is true then how they should expire?
# Valid values are: AFTER_INACTIVITY, AFTER_FIXED_TIME, DO_NOT_EXPIRE
# The default is AFTER_FIXED_TIME&lt;/STRONG&gt;
&lt;FONT color="#FF0000"&gt;authentication.ticket.expiryMode=AFTER_INACTIVITY
&lt;/FONT&gt;&lt;STRONG&gt;# If authentication.ticket.ticketsExpire is true and
# authentication.ticket.expiryMode is AFTER_FIXED_TIME or AFTER_INACTIVITY,
# this controls the minimum period for which tickets are valid. 
# The default is PT1H for one hour.&lt;/STRONG&gt;
&lt;FONT color="#FF0000"&gt;authentication.ticket.validDuration=PT1H
&lt;/FONT&gt;&lt;/PRE&gt;
&lt;P&gt;These properties can be passed as follows:&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;ervices:
  alfresco:
    image: alfresco/alfresco-content-repository-community:7.2.0
    mem_limit: 2g
    environment:
      JAVA_TOOL_OPTIONS: "
        -Dencryption.keystore.type=JCEKS
        -Dencryption.cipherAlgorithm=DESede/CBC/PKCS5Padding
        -Dencryption.keyAlgorithm=DESede
        -Dencryption.keystore.location=/usr/local/tomcat/shared/classes/alfresco/extension/keystore/keystore
        -Dmetadata-keystore.password=mp6yc0UD9e
        -Dmetadata-keystore.aliases=metadata
        -Dmetadata-keystore.metadata.password=oKIWzVdEdA
        -Dmetadata-keystore.metadata.algorithm=DESede
        "
      JAVA_OPTS: "
        -Ddb.driver=org.postgresql.Driver
        -Ddb.username=alfresco
        -Ddb.password=alfresco
        -Ddb.url=jdbc:postgresql://postgres:5432/alfresco
        -Dsolr.host=solr6
        -Dsolr.port=8983
        -Dsolr.http.connection.timeout=1000
        -Dsolr.secureComms=secret
        -Dsolr.sharedSecret=secret
        -Dsolr.base.url=/solr
        -Dindex.subsystem.name=solr6
        -Dshare.host=127.0.0.1
        -Dshare.port=8080
        -Dalfresco.host=localhost
        -Dalfresco.port=8080
        -Daos.baseUrlOverwrite=http://localhost:8080/alfresco/aos
        -Dmessaging.broker.url=\"failover:(nio://activemq:61616)?timeout=3000&amp;amp;jms.useCompression=true\"
        -Ddeployment.method=DOCKER_COMPOSE
        -DlocalTransform.core-aio.url=http://transform-core-aio:8090/
        -Dcsrf.filter.enabled=false
	&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;-Dauthentication.ticket.ticketsExpire=true
	-Dauthentication.ticket.expiryMode=AFTER_INACTIVITY
	-Dauthentication.ticket.validDuration=PT1H&lt;/STRONG&gt;&lt;/FONT&gt;
        -XX:MinRAMPercentage=50 -XX:MaxRAMPercentage=80
        "
&lt;/PRE&gt;
&lt;P&gt;If you are looking to set the timeout at servlet container level, you need to set the following:&lt;/P&gt;
&lt;P&gt;[For example Share] tomcat\webapps\&lt;STRONG&gt;share\WEB-INF\web.xml&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;PRE&gt;&amp;lt;session-config&amp;gt;&lt;BR /&gt;    &amp;lt;!-- default --&amp;gt;
&lt;STRONG&gt;    &amp;lt;session-timeout&amp;gt;60&amp;lt;/session-timeout&amp;gt;
&lt;/STRONG&gt;&amp;lt;/session-config&amp;gt;&lt;/PRE&gt;
&lt;P&gt;In dockerized environment, if you have to add above config then you need to use combination of DockerFile and docker-compose.yml. for example:&lt;/P&gt;
&lt;PRE&gt;ARG SHARE_TAG

FROM alfresco/alfresco-share:${SHARE_TAG}

ARG TOMCAT_DIR=/usr/local/tomcat

# In base image it tries to write logs at root directory which requires 'root' user access.
RUN sed -i "s|log4j.appender.File.File\=share.log|log4j.appender.File.File\=logs/share.log |g" $TOMCAT_DIR/webapps/share/WEB-INF/classes/log4j.properties ;

&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;# Update session timeout config from default 60 minutes to 30 minutes:
RUN sed -i 's@&amp;lt;session-timeout&amp;gt;60&amp;lt;/session-timeout&amp;gt;@&amp;lt;session-timeout&amp;gt;30&amp;lt;/session-timeout&amp;gt;@' \
	$TOMCAT_DIR/webapps/share/WEB-INF/web.xml&lt;/STRONG&gt;&lt;/FONT&gt;

# Copy and apply amp add-ons
COPY Dockerfile add-ons/*.amp $TOMCAT_DIR/amps_share/
RUN java -jar $TOMCAT_DIR/alfresco-mmt/alfresco-mmt*.jar install \
              $TOMCAT_DIR/amps_share $TOMCAT_DIR/webapps/share -directory -nobackup -force
			  
#TODO:: Add more steps as needed&lt;/PRE&gt;
&lt;PRE&gt; share:
        build:
          &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;dockerfile: ./Dockerfile
          context: ./configs-to-override/share&lt;/STRONG&gt;&lt;/FONT&gt;
          args:
            SHARE_TAG: ${SHARE_TAG}
        mem_limit: 2g
        environment:
            REPO_HOST: "alfresco"
            REPO_PORT: "7080"
            JAVA_OPTS: "
                -XX:MinRAMPercentage=50
                -XX:MaxRAMPercentage=80
                -Dalfresco.host=localhost
                -Dalfresco.port=7080
                -Dalfresco.context=alfresco
                -Dalfresco.protocol=http
                "&lt;/PRE&gt;
&lt;P&gt;You can refer &lt;A href="https://github.com/abhinavmishra14/change-acs-share-port-demo" target="_self" rel="nofollow noopener noreferrer"&gt;this project&lt;/A&gt; as a reference:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/abhinavmishra14/change-acs-share-port-demo/blob/master/configs-to-override/share/Dockerfile#L34" target="_blank" rel="nofollow noopener noreferrer"&gt;https://github.com/abhinavmishra14/change-acs-share-port-demo/blob/master/configs-to-override/share/Dockerfile#L34&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/abhinavmishra14/change-acs-share-port-demo/blob/master/docker-compose.yml#L70" target="_blank" rel="nofollow noopener noreferrer"&gt;https://github.com/abhinavmishra14/change-acs-share-port-demo/blob/master/docker-compose.yml#L70&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jun 2022 17:23:27 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/session-timeout/m-p/128303#M34796</guid>
      <dc:creator>abhinavmishra14</dc:creator>
      <dc:date>2022-06-09T17:23:27Z</dc:date>
    </item>
  </channel>
</rss>

