<commit_before><?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<article>
  <title>Using simpleSAMLphp as a Service Provider</title>

  <articleinfo>
    <date>2007-10-15</date>

    <pubdate>Thu Feb 28 11:23:01 2008</pubdate>

    <author>
      <firstname><NAME></firstname>

      <surname>Solberg</surname>

      <email><EMAIL></email>
    </author>
  </articleinfo>

  <note>
    <para>This document is in progress of beeing updated to correspond to
    simpleSAMLphp version 1.0. simpleSAMLphp version 1.0 is scheduled to be
    released in March 2008.</para>
  </note>

  <section>
    <title>Introduction</title>

    <para>simpleSAMLphp can run as both a SAML 2.0 Service Provider and as a
    Shibboleth 1.3 Service Provider. The configuration and metadata would be
    somewhat different, therefore there are separate chapter for the two,
    although the configuration is similar.</para>
  </section>

  <section>
    <title>Configuring metadata for SAML 2.0 SP</title>

    <para>When you are setting up a SAML 2.0 SP, you would need to configure
    two metadata files. <filename>saml20-sp-hosted.php</filename> and
    <filename>saml20-idp-remote.php</filename>.
    <filename>saml20-sp-hosted.php</filename> represent the SAML entity of the
    service provider itself, while the
    <filename>saml20-idp-remote.php</filename> configuration lists all the
    trusted SAML 2.0 IdP and how to connect to them.</para>

    <section>
      <title>Configuring SAML 2.0 SP Hosted metadata</title>

      <para>You need to know at least two variables to be able to setup this
      metadata. You need to know the hostname of the server you are using, and
      you need to set an entity ID for this server. Talk to the people running
      the IdP of what entity ID you should use.</para>

      <note>
        <para>Feide has special rules for setting entity IDs. These rules and
        instructions on how to select an entity ID to use in Feide is
        documented in this document:</para>

        <itemizedlist>
          <listitem>
            <para><ulink url="http://docs.feide.no/fs-0051-1.0-en.html">Feide
            entity names (in norwegian)</ulink></para>
          </listitem>
        </itemizedlist>
      </note>

      <example>
        <title>Example of metadata for hosted SAML 2.0 SP</title>

        <para>Here is an example of the metadata file:</para>

        <programlisting>/*
 * Example of a hosted SP 
 */
'sp-entityid' =&gt; array(
	'host' =&gt; 'sp.example.org'
)</programlisting>
      </example>

      <para>You may add any number of SP definitions in the same installation
      of simpleSAMLphp. simpleSAMLphp will discover automatically which
      configuration to use in a specific scenario, by looking up the current
      hostname sent by the client and map that to the <literal>host</literal>
      entry in the metadata.</para>

      <para>Below is a description of the mandatory and optional fields in the
      SAML 2.0 SP hosted metadata.</para>

      <section>
        <title>Mandatory metadata fields</title>

        <para>These field are required to be included in the metadata:</para>

        <glosslist>
          <glossentry>
            <glossterm>index (the index of the array)</glossterm>

            <glossdef>
              <para>The entity ID of the hosted SP entity.</para>
            </glossdef>
          </glossentry>

          <glossentry>
            <glossterm>host</glossterm>
<commit_msg>Adding another sp example metadata in documentation for sp<commit_after><?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<article>
  <title>Using simpleSAMLphp as a Service Provider</title>

  <articleinfo>
    <date>2007-10-15</date>

    <pubdate>Wed Mar  5 15:38:05 2008</pubdate>

    <author>
      <firstname><NAME></firstname>

      <surname>Solberg</surname>

      <email><EMAIL></email>
    </author>
  </articleinfo>

  <note>
    <para>This document is in progress of beeing updated to correspond to
    simpleSAMLphp version 1.0. simpleSAMLphp version 1.0 is scheduled to be
    released in March 2008.</para>
  </note>

  <section>
    <title>Introduction</title>

    <para>simpleSAMLphp can run as both a SAML 2.0 Service Provider and as a
    Shibboleth 1.3 Service Provider. The configuration and metadata would be
    somewhat different, therefore there are separate chapter for the two,
    although the configuration is similar.</para>
  </section>

  <section>
    <title>Configuring metadata for SAML 2.0 SP</title>

    <para>When you are setting up a SAML 2.0 SP, you would need to configure
    two metadata files. <filename>saml20-sp-hosted.php</filename> and
    <filename>saml20-idp-remote.php</filename>.
    <filename>saml20-sp-hosted.php</filename> represent the SAML entity of the
    service provider itself, while the
    <filename>saml20-idp-remote.php</filename> configuration lists all the
    trusted SAML 2.0 IdP and how to connect to them.</para>

    <section>
      <title>Configuring SAML 2.0 SP Hosted metadata</title>

      <para>You need to know at least two variables to be able to setup this
      metadata. You need to know the hostname of the server you are using, and
      you need to set an entity ID for this server. Talk to the people running
      the IdP of what entity ID you should use.</para>

      <note>
        <para>Feide has special rules for setting entity IDs. These rules and
        instructions on how to select an entity ID to use in Feide is
        documented in this document:</para>

        <itemizedlist>
          <listitem>
            <para><ulink url="http://docs.feide.no/fs-0051-1.0-en.html">Feide
            entity names (in norwegian)</ulink></para>
          </listitem>
        </itemizedlist>
      </note>

      <example>
        <title>Example of metadata for hosted SAML 2.0 SP</title>

        <para>Here is an example of the metadata file:</para>

        <programlisting>/*
 * Example of a hosted SP 
 */
'sp-entityid' =&gt; array(
	'host' =&gt; 'sp.example.org'
)</programlisting>
      </example>

      <example>
        <title>Real life example</title>

        <para>Here is a real life example from Feide:</para>

        <programlisting>'urn:mace:feide.no:services:no.feide.foodle' =&gt; array(
 'host' =&gt; 'foodle.feide.no',
),
</programlisting>

        <para>Here the service run on the host
        <literal>foodle.feide.no</literal> and have the entity ID
        <literal>urn:mace:feide.no:services:no.feide.foodle</literal>.</para>
      </example>

      <para>You may add any number of SP definitions in the same installation
      of simpleSAMLphp. simpleSAMLphp will discover automatically which
      configuration to use in a specific scenario, by looking up the current
      hostname sent by the client and map that to the <literal>host</literal>
      entry in the metadata.</para>

      <para>Below is a description of the mandatory and optional fields in the
      SAML 2.0 SP hosted metadata.</para>

      <section>
        <title>Mandatory metadata fields</title>

        <para>These field are required to be included in the metadata:</para>

        <glosslist>
          <glossentry>
            <glossterm>index (the index of the array)</glossterm>

            <glossdef>
              <para>The entity ID of the hosted SP entity.</para>
            </glossdef>
          </glossentry>

          <glossentry>
            <glossterm>host</glossterm>

{'fraction_non_alphanumeric': 0.10115870329384195, 'fraction_numerical': 0.016794688191641715, 'mean_word_length': 2.7111111111111112, 'pattern_counts': {'":': 0, '<': 201, '<?xml version=': 2, '>': 201, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 4}, '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': '1762468', 'n_tokens_mistral': 2437, 'n_tokens_neox': 2245, 'n_words': 804}