<commit_before><?xml version="1.0" encoding="UTF-8"?>
<!-- 
 * Asimba Server
 * 
 * Copyright (C) 2012 Asimba
 * 
 * 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.
 * 
 * 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 www.gnu.org/licenses
 * 
 * Asimba - Serious Open Source SSO - More information on www.asimba.org
 * 
 -->

<asimba-server>
	<!--  Server configuration -->
	<server id="%(hostname)s" friendlyname="Gluu Asimba Proxy">
		<organization id="%(hostname)s" friendlyname="Gluu Asimba SSO"/>
	</server>

	<!-- 
		Crypto configuration describes the behavior of the central cryptographic services
		and keystores that are used for protocol operations. There is a keystore that holds
		the cryptographic credentials (private- and public key and certificate) of the server itself
		as well as a truststore, that works as a placeholder for certificates of trusted entities 
		For using SHA2 as signing algorithm, the value of signing algorithm 
		should be "SHA256withRSA" -->
	<crypto>
		<message_digest algorithm="SHA1"/>		
		<random_generator algorithm="SHA1PRNG" />
		
		<signing algorithm="SHA1withRSA">
			<signingfactory class="com.alfaariss.oa.engine.crypto.keystore.KeystoreSigningFactory">
				<keystore>
					<file>%(asimbaJksFn)s</file>
					<type>JKS</type>
					<keystore_password>%(asimbaJksPass)s</keystore_password>		
					<alias>%(hostname)s</alias>	
					<password><PASSWORD>>
				</keystore>
	
				<!-- No truststore in baseline config yet; to enable the truststore, rename 
				     the 'no_truststore' element to 'truststore' 
				-->
				<no_truststore>
					<file>${webapp.root}/WEB-INF/sample-data/asimba-demo-truststore.jks</file>
					<type>JKS</type>
					<keystore_password><PASSWORD></keystore_password>
				</no_truststore>
			</signingfactory>
		</signing>
	</crypto>  
		
        <!-- Configure sessionfactory implementation and behavior. The baseline server configures
             an in-memory session store.
         -->
        <sessionfactory class="com.alfaariss.oa.engine.session.memory.MemorySessionFactory">
            <!-- Expiration interval in seconds. -->
            <expire>3600</expire>
            <!-- Storage cleaner interval in seconds. 0 = cleaning is disabled. -->
            <interval>60</interval>
            <!-- Maximum count of unexpired Session objects in memory, 0=infinity.  -->
            <max>1000</max>
        </sessionfactory>

        <!-- Configure the TicketGrantingTicket-factory implemententation and behavior. The baseline
             server configures an in-memory TGT store  -->
        <tgtfactory class="com.alfaariss.oa.engine.tgt.memory.MemoryTGTFactory">
            <!-- Expiration interval in seconds -->
            <expire>3600</expire>
            <!-- Storage cleaner interval in seconds. 0 = cleaning is disabled. -->
            <interval>60</interval>
            <!-- Maximum count of unexpired TGT objects in memory, 0=infinity  -->
            <max>1000</max>
        </tgtfactory>
	
	<!-- 
		RequestorPoolFactory defines how requestors (sp's) are defined; they can be defined in this configuration file,
		but they can also be sourced from a table, available through a JDBC-connection (not in baseline config)
		A ResourcePool groups together the following attributes and behavior for a SP making a request:
		  * the actual Requestor definitions
		  * which authentication-profiles are available for a user
		  * the attributerelease policy to apply
		  * the pre- and post-authorization policy to apply
		  * a property-list for each requestor 
		  *
		  * LDAPFactory class: reads IDPs both from XML configuration and LDAP.
	-->
	<requestorpoolfactory class="org.gluu.asimba.engine.requestor.ldap.LDAPFactory">
		<pool id="requestorpool.1" friendlyname="Requestor Pool 1" enabled="true">
			<authentication forced="false">
				<profile id="remote.saml2" />
			</authentication>

		    <!--
		       This configuration is for SP which will be connected with Asimba server.
		       Add SP / protecte location in requestFactory section.
		       * Requestor ID: It should be the entityID of SP
		       * FriendlyName: It can be anything. Should be human readable.
		       * enabled: true -->

			<requestors>
				<requestor id="http://sptest2.gluu.org/secure" friendlyname="Gluu Test SP"
					enabled="true" />
			</requestors>			

			<authorization>
                <post profile="postauthz.1" />
            </authorization>

            <attributerelease policy="asimba.releasepolicy.1" />
        </pool>
    </requestorpoolfactory>
        

	<!-- authentication: define Authentication Profiles; an AuthenticationProfile is made up of one or 
	     more authentication methods, which are executed sequentially. The behaviour of the actual authentication
	     methods is defined in the websso section of the configuration  -->
    <authentication class="com.alfaariss.oa.engine.authentication.configuration.ConfigurationFactory">
        <profile id="remote.saml2" friendlyname="remote.saml2" enabled="true">
            <method id="RemoteSAML" />
        </profile>
    </authentication>

	<!-- websso: configure the behaviour of the server frontend. This is made up of
	       * authentication: the authentication methods
	       * profiles: the IDP profiles (SAML, A-Select, etc.)
	       * postauthorization: the web postauthorization phase
	-->
	<websso>
		<authentication always_show_select_form="false">
			<methods>
                <method id="RemoteSAML" friendlyname="Remote SAML authentication"
                        enabled="true"
                        response_signing_required="true"
                        class="com.alfaariss.oa.authentication.remote.saml2.SAML2AuthenticationMethod">

						<!-- Custom attribute will be configured here map ext == The source attribute ( i.e: uid, email etc)
							int == The name of custom attribute  -->
						<attributemapper>
<!--
		                    <map ext="urn:oid:0.9.2342.19200300.100.1.1" int="$$CustomAttribute" />
-->
		                </attributemapper>
		
						<!-- The SAML2 IDP Profile that services the ResponseEndpoint for the Remote SAML2 AuthenticationMethod, implementing a SAML2 SP  -->
		                <idpprofile id="saml2" />
		
					    <!-- When IDP could not be automatically selected, use a selector component to select an IDP -->
		                <selector class="org.gluu.authentication.remote.saml2.selector.ApplicationSelectorLDAP" always_show_select_form="true" />
                  
						<!-- Indicate whether logout is supported by the SAML-SP profile -->
						<logout enabled="false" />

						<authnstmt>
							<window before_offset="1800" after_offset="60" />
						</authnstmt>

						<!--
							<idps> configure the IDP's that this SAML-SP can use to request authentication. Configure remote IDP/ADFS which will do the authenticati                    on. 
							* Download the metdata of remote IDP/ADFS and save it in some location with xml extension. 
							* Grab the Base64 encoded SAML certificate of this IDP/ADFS and insert it in the JKS. Check �Work on keystore� in: 
							    http://www.gluu.org/docs/admin-guide/saml/inbound-saml/#asimba-configuration-with-gluu-server
							* idp id: It should be the entityID of remote IDP/ADFS
							* friendlyName: Anything human readable
							* scoping: false
							* avoid_subjectconfirmation: false
							* nameidpolicy enabled: false
							* �file�: Provide the absolute location of metadata 
							* 
							* IDPStorageLDAP class: reads IDPs both from XML configuration and LDAP.
						--><commit_msg>timestamp window parameter - asimba.xml<commit_after><?xml version="1.0" encoding="UTF-8"?>
<!-- 
 * Asimba Server
 * 
 * Copyright (C) 2012 Asimba
 * 
 * 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.
 * 
 * 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 www.gnu.org/licenses
 * 
 * Asimba - Serious Open Source SSO - More information on www.asimba.org
 * 
 -->

<asimba-server>
	<!--  Server configuration -->
	<server id="%(hostname)s" friendlyname="Gluu Asimba Proxy">
		<organization id="%(hostname)s" friendlyname="Gluu Asimba SSO"/>
	</server>

	<!-- 
		Crypto configuration describes the behavior of the central cryptographic services
		and keystores that are used for protocol operations. There is a keystore that holds
		the cryptographic credentials (private- and public key and certificate) of the server itself
		as well as a truststore, that works as a placeholder for certificates of trusted entities 
		For using SHA2 as signing algorithm, the value of signing algorithm 
		should be "SHA256withRSA" -->
	<crypto>
		<message_digest algorithm="SHA1"/>		
		<random_generator algorithm="SHA1PRNG" />
		
		<signing algorithm="SHA1withRSA">
			<signingfactory class="com.alfaariss.oa.engine.crypto.keystore.KeystoreSigningFactory">
				<keystore>
					<file>%(asimbaJksFn)s</file>
					<type>JKS</type>
					<keystore_password>%(asimbaJksPass)s</keystore_password>		
					<alias>%(hostname)s</alias>	
					<password>%(<PASSWORD>>
				</keystore>
	
				<!-- No truststore in baseline config yet; to enable the truststore, rename 
				     the 'no_truststore' element to 'truststore' 
				-->
				<no_truststore>
					<file>${webapp.root}/WEB-INF/sample-data/asimba-demo-truststore.jks</file>
					<type>JKS</type>
					<keystore_password><PASSWORD></keystore_password>
				</no_truststore>
			</signingfactory>
		</signing>
	</crypto>  
		
        <!-- Configure sessionfactory implementation and behavior. The baseline server configures
             an in-memory session store.
         -->
        <sessionfactory class="com.alfaariss.oa.engine.session.memory.MemorySessionFactory">
            <!-- Expiration interval in seconds. -->
            <expire>3600</expire>
            <!-- Storage cleaner interval in seconds. 0 = cleaning is disabled. -->
            <interval>60</interval>
            <!-- Maximum count of unexpired Session objects in memory, 0=infinity.  -->
            <max>1000</max>
        </sessionfactory>

        <!-- Configure the TicketGrantingTicket-factory implemententation and behavior. The baseline
             server configures an in-memory TGT store  -->
        <tgtfactory class="com.alfaariss.oa.engine.tgt.memory.MemoryTGTFactory">
            <!-- Expiration interval in seconds -->
            <expire>3600</expire>
            <!-- Storage cleaner interval in seconds. 0 = cleaning is disabled. -->
            <interval>60</interval>
            <!-- Maximum count of unexpired TGT objects in memory, 0=infinity  -->
            <max>1000</max>
        </tgtfactory>
	
	<!-- 
		RequestorPoolFactory defines how requestors (sp's) are defined; they can be defined in this configuration file,
		but they can also be sourced from a table, available through a JDBC-connection (not in baseline config)
		A ResourcePool groups together the following attributes and behavior for a SP making a request:
		  * the actual Requestor definitions
		  * which authentication-profiles are available for a user
		  * the attributerelease policy to apply
		  * the pre- and post-authorization policy to apply
		  * a property-list for each requestor 
		  *
		  * LDAPFactory class: reads IDPs both from XML configuration and LDAP.
	-->
	<requestorpoolfactory class="org.gluu.asimba.engine.requestor.ldap.LDAPFactory">
		<pool id="requestorpool.1" friendlyname="Requestor Pool 1" enabled="true">
			<authentication forced="false">
				<profile id="remote.saml2" />
			</authentication>

		    <!--
		       This configuration is for SP which will be connected with Asimba server.
		       Add SP / protecte location in requestFactory section.
		       * Requestor ID: It should be the entityID of SP
		       * FriendlyName: It can be anything. Should be human readable.
		       * enabled: true -->

			<requestors>
				<requestor id="http://sptest2.gluu.org/secure" friendlyname="Gluu Test SP"
					enabled="true" />
			</requestors>			

			<authorization>
                <post profile="postauthz.1" />
            </authorization>

            <attributerelease policy="asimba.releasepolicy.1" />
        </pool>
    </requestorpoolfactory>
        

	<!-- authentication: define Authentication Profiles; an AuthenticationProfile is made up of one or 
	     more authentication methods, which are executed sequentially. The behaviour of the actual authentication
	     methods is defined in the websso section of the configuration  -->
    <authentication class="com.alfaariss.oa.engine.authentication.configuration.ConfigurationFactory">
        <profile id="remote.saml2" friendlyname="remote.saml2" enabled="true">
            <method id="RemoteSAML" />
        </profile>
    </authentication>

	<!-- websso: configure the behaviour of the server frontend. This is made up of
	       * authentication: the authentication methods
	       * profiles: the IDP profiles (SAML, A-Select, etc.)
	       * postauthorization: the web postauthorization phase
	-->
	<websso>
		<authentication always_show_select_form="false">
			<methods>
                <method id="RemoteSAML" friendlyname="Remote SAML authentication"
                        enabled="true"
                        response_signing_required="true"
                        class="com.alfaariss.oa.authentication.remote.saml2.SAML2AuthenticationMethod">

						<!-- Custom attribute will be configured here map ext == The source attribute ( i.e: uid, email etc)
							int == The name of custom attribute  -->
						<attributemapper>
<!--
		                    <map ext="urn:oid:0.9.2342.19200300.100.1.1" int="$$CustomAttribute" />
-->
		                </attributemapper>
		
						<!-- The SAML2 IDP Profile that services the ResponseEndpoint for the Remote SAML2 AuthenticationMethod, implementing a SAML2 SP  -->
		                <idpprofile id="saml2" />
		
					    <!-- When IDP could not be automatically selected, use a selector component to select an IDP -->
		                <selector class="org.gluu.authentication.remote.saml2.selector.ApplicationSelectorLDAP" always_show_select_form="true" />
                  
						<!-- Indicate whether logout is supported by the SAML-SP profile -->
						<logout enabled="false" />

                        <!-- SAML2 TimestampWindow parameters. Configures the timewindow for validating the timestamp of SAML messages -->
						<authnstmt>
							<window before_offset="1800" after_offset="60" />
						</authnstmt>

						<!--
							<idps> configure the IDP's that this SAML-SP can use to request authentication. Configure remote IDP/ADFS which will do the authenticati                    on. 
							* Download the metdata of remote IDP/ADFS and save it in some location with xml extension. 
							* Grab the Base64 encoded SAML certificate of this IDP/ADFS and insert it in the JKS. Check �Work on keystore� in: 
							    http://www.gluu.org/docs/admin-guide/saml/inbound-saml/#asimba-configuration-with-gluu-server
							* idp id: It should be the entityID of remote IDP/ADFS
							* friendlyName: Anything human readable
							* scoping: false
							* avoid_subjectconfirmation: false
							* nameidpolicy enabled: false
							* �file�: Provide the absolute location of metadata 
							* 
							* IDPStorageLDAP class: reads IDPs both from XML configuration and LDAP.
						-->
{'fraction_non_alphanumeric': 0.09545870161536117, 'fraction_numerical': 0.009935995123437976, 'mean_word_length': 2.7550926985580224, 'pattern_counts': {'":': 0, '<': 214, '<?xml version=': 2, '>': 216, 'https://': 0, 'lorem ipsum': 0, 'www.': 6, 'xml': 5}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '769906', 'n_tokens_mistral': 5188, 'n_tokens_neox': 4367, 'n_words': 1488}