<commit_before><?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright (C) 2000 - 2009 Silverpeas

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU Affero General Public License as
    published by the Free Software Foundation, either version 3 of the
    License, or (at your option) any later version.

    As a special exception to the terms and conditions of version 3.0 of
    the GPL, you may redistribute this Program in connection with Free/Libre
    Open Source Software ("FLOSS") applications as described in Silverpeas's
    FLOSS exception.  You should have recieved a copy of the text describing
    the FLOSS exception, and it is also available here:
    "http://repository.silverpeas.com/legal/licensing"

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Affero General Public License for more details.

    You should have received a copy of the GNU Affero General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.

-->
<document>
  <properties>
    <author><NAME></author>
    <title>CASifying Silverpeas</title>
  </properties>
  <head>
  </head>
  <body>
    <section name="Configuring the keystore">
      <p>
        On the Silverpeas Sever (ServerB). Go and edit the file <i>$SILVERPEAS_HOME/initialize/systemSettings.properties</i>.<br/>
        Set the various parameters (supposing that the keystore you have generated following the <a href="certificates.html">documentation</a> is in C:\Java\keystore.jks) :
      </p>
      <ul>
        <li><b>javax.net.ssl.trustStore</b>=C:\Java\keystore.jks</li>
        <li><b>ssl.keystore</b>=C:\Java\keystore.jks</li>
        <li><b>ssl.keystore.password</b>=<PASSWORD></li>
      </ul>
    </section>
    <section name="Configuration the servlet filter">
      <p>
        You need to enable the CAS Servlet Filter. To do this edit the <i>$JBOSS_HOME/server/deploy/silverpeas.ear/war-ic.war/WEB-INF/web.xml</i>.<br/>
        and add the following configuration :
      </p>
      <fieldset>
        <pre><![CDATA[
        <filter>
          <filter-name>CAS Filter</filter-name>
          <filter-class>edu.yale.its.tp.cas.client.filter.CASFilter</filter-class>
          <init-param>
            <param-name>edu.yale.its.tp.cas.client.filter.loginUrl</param-name>
            <param-value>https://serverA:8443/cas/login</param-value>
          </init-param>
          <init-param>
            <param-name>edu.yale.its.tp.cas.client.filter.validateUrl</param-name>
            <param-value>https://serverA:8443/cas/proxyValidate</param-value>
          </init-param>
          <init-param>
            <param-name>edu.yale.its.tp.cas.client.filter.serverName</param-name>
            <param-value>localhost:8000</param-value>
          </init-param>
          <init-param>
            <param-name>edu.yale.its.tp.cas.client.filter.wrapRequest</param-name>
            <param-value>true</param-value>
          </init-param>
        </filter>

        <filter-mapping>
          <filter-name>CAS Filter</filter-name>
          <url-pattern>/*</url-pattern>
        </filter-mapping>
      ]]></pre>
      </fieldset>
    </section>
    <section name="Configuring the Login page">
      <p>
        Edit the file in <i>$SILVERPEAS_HOME/properties/com/stratelia/silverpeas/lookAndFeel/generalLook.properties</i>,
        update the parameter <code>loginPage</code> and add the two following parameters like this :
      </p>
      <fieldset>
        <pre>
          loginPage = AuthenticationServlet
          loginPage.param0.name=DomainId
          loginPage.param0.value=0
        </pre>
      </fieldset>
      <p>Now we need to repeat this operation for ServerB.</p>
    </section>
    <section name="Activating the realm">
      <p>
        Edit the file in <i>$SILVERPEAS_HOME/properties/com/stratelia/silverpeas/authentication/autDomainSP.properties</i>,
        set the parameter <code>autServer0.enabled</code> to true and thus enable the CAS authentication :
      </p>
      <fieldset>
        <pre>
          autServer0.type=com.stratelia.silverpeas.authentication.AuthenticationCAS
          autServer0.enabled=true
          autServer0.SQLJDBCUrl=jdbc:postgresql://localhost:5432/SilverpeasV5
          autServer0.SQLAccessLogin=postgres
          autServer0.SQLAccessPasswd=<PASSWORD>
          autServer0.SQLDriverClass=org.postgresql.Driver
          autServer0.SQLUserTableName=DomainSP_User
          autServer0.SQLUserLoginColumnName=login
        </pre>
      </fieldset>
      <p>
        Since the authentication was performed beforehand, the class AuthenticationCAS just check for an existing user in the user table of Silverpeas.
      </p>
    </section>
  </body>
</document><commit_msg>Updating CAS SSO documentation<commit_after><?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright (C) 2000 - 2009 Silverpeas

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU Affero General Public License as
    published by the Free Software Foundation, either version 3 of the
    License, or (at your option) any later version.

    As a special exception to the terms and conditions of version 3.0 of
    the GPL, you may redistribute this Program in connection with Free/Libre
    Open Source Software ("FLOSS") applications as described in Silverpeas's
    FLOSS exception.  You should have recieved a copy of the text describing
    the FLOSS exception, and it is also available here:
    "http://repository.silverpeas.com/legal/licensing"

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Affero General Public License for more details.

    You should have received a copy of the GNU Affero General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.

-->
<document>
  <properties>
    <author><NAME></author>
    <title>CASifying Silverpeas</title>
  </properties>
  <head>
  </head>
  <body>
    <section name="Configuring the keystore">
      <p>
        On the Silverpeas Sever (ServerB). Go and edit the file <i>$SILVERPEAS_HOME/initialize/systemSettings.properties</i>.<br/>
        Set the various parameters (supposing that the keystore you have generated following the <a href="certificates.html">documentation</a> is in C:\Java\keystore.jks) :
      </p>
      <ul>
        <li><b>javax.net.ssl.trustStore</b>=C:\Java\keystore.jks</li>
        <li><b>ssl.keystore</b>=C:\Java\keystore.jks</li>
        <li><b>ssl.keystore.password</b>=<PASSWORD></li>
      </ul>
    </section>
    <section name="Configuration the servlet filter">
      <p>
        You need to enable the CAS Servlet Filter. To do this edit the <i>$JBOSS_HOME/server/deploy/silverpeas.ear/war-ic.war/WEB-INF/web.xml</i>.<br/>
        and add the following configuration :
      </p>
      <fieldset>
        <pre><![CDATA[
        <context-param>
          <param-name>serverName</param-name>
          <param-value>http://localhost:8000</param-value>
        </context-param>

        ....

        <filter>
          <filter-name>CAS Authentication Filter</filter-name>
          <filter-class>org.jasig.cas.client.authentication.AuthenticationFilter</filter-class>
          <init-param>
            <param-name>casServerLoginUrl</param-name>
            <param-value>https://ServerA:8443/cas/login</param-value>
          </init-param>
          <init-param>
            <param-name>service</param-name>
            <param-value>http://ServerB:8000/silverpeas/</param-value>
          </init-param>
        </filter>
        <filter>
          <filter-name>CAS Validation Filter</filter-name>
          <filter-class>org.jasig.cas.client.validation.Cas20ProxyReceivingTicketValidationFilter</filter-class>
          <init-param>
            <param-name>casServerUrlPrefix</param-name>
            <param-value>https://ServerA:8443/cas</param-value>
          </init-param>
        </filter>
        <filter>
          <filter-name>CAS HttpServletRequest Wrapper Filter</filter-name>
          <filter-class>org.jasig.cas.client.util.HttpServletRequestWrapperFilter</filter-class>
        </filter>

        ...

        <filter-mapping>
          <filter-name>CAS Authentication Filter</filter-name>
          <url-pattern>/*</url-pattern>
        </filter-mapping>
        <filter-mapping>
          <filter-name>CAS Validation Filter</filter-name>
          <url-pattern>/*</url-pattern>
        </filter-mapping>
        <filter-mapping>
          <filter-name>CAS HttpServletRequest Wrapper Filter</filter-name>
          <url-pattern>/*</url-pattern>
        </filter-mapping>
        ]]></pre>
      </fieldset>
      <p>
        You can find more informations from CAS website: <a href="http://www.ja-sig.org/wiki/display/CASC/web.xml+for+Tomcat+5.5+Tomcat+Manager">Sample web.xml</a>,
        <a href="http://www.ja-sig.org/wiki/display/CASC/Configuring+the+JA-SIG+CAS+Client+for+Java+in+the+web.xml">Configuration details</a> and
        <a href="http://www.ja-sig.org/wiki/display/CASC/CAS+Client+for+Java+3.1">CAS Java Client</a>.
      </p>
    </section>
    <section name="Configuring the Login page">
      <p>
        Edit the file in <i>$SILVERPEAS_HOME/properties/com/stratelia/silverpeas/lookAndFeel/generalLook.properties</i>,
        update the parameter <code>loginPage</code>  like this :
      </p>
      <fieldset>
        <pre>
          loginPage = AuthenticationServlet
        </pre>
      </fieldset>
    </section>
    <section name="Activating the realm">
      <p>
        Edit the file in <i>$SILVERPEAS_HOME/properties/com/stratelia/silverpeas/authentication/autDomainSP.properties</i>,
        set the parameter <code>autServer0.enabled</code> to true and thus enable the CAS authentication :
      </p>
      <fieldset>
        <pre>
          autServer0.type=com.stratelia.silverpeas.authentication.AuthenticationCAS
          autServer0.enabled=true
          autServer0.SQLJDBCUrl=jdbc:postgresql://localhost:5432/SilverpeasV5
          autServer0.SQLAccessLogin=postgres
          autServer0.SQLAccessPasswd=<PASSWORD>
          autServer0.SQLDriverClass=org.postgresql.Driver
          autServer0.SQLUserTableName=DomainSP_User
          autServer0.SQLUserLoginColumnName=login
        </pre>
      </fieldset>
      <p>
        Since the authentication was performed beforehand, the class AuthenticationCAS just check for an existing
        user in the user table of Silverpeas.
      </p>
      <p>
        Now we need to define the <code>domainId</code> that is going to be used by CAS. By default it is <emp>0</emp> to match the previous configuration but
        this can be configured by editing the file in <i>$SILVERPEAS_HOME/properties/com/silverpeas/authentication/settings/authenticationSettings.properties</i>,
        and add the following parameter like this :
      </p>
       <fieldset>
        <pre>
          cas.authentication.domainId=0
        </pre>
      </fieldset>
    </section>
  </body>
</document>
{'fraction_non_alphanumeric': 0.1164612676056338, 'fraction_numerical': 0.008362676056338027, 'mean_word_length': 2.6250797702616464, 'pattern_counts': {'":': 0, '<': 279, '<?xml version=': 2, '>': 279, 'https://': 4, 'lorem ipsum': 0, 'www.': 5, 'xml': 7}, 'pii_count': 0, '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': '5704574', 'n_tokens_mistral': 3480, 'n_tokens_neox': 3347, 'n_words': 834}