<commit_before><?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ JBoss, Home of Professional Open Source.
  ~ Copyright 2010, Red Hat, Inc., and individual contributors
  ~ as indicated by the @author tags. See the copyright.txt file in the
  ~ distribution for a full listing of individual contributors.
  ~
  ~ This is free software; you can redistribute it and/or modify it
  ~ under the terms of the GNU Lesser General Public License as
  ~ published by the Free Software Foundation; either version 2.1 of
  ~ the License, or (at your option) any later version.
  ~
  ~ This software 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
  ~ Lesser General Public License for more details.
  ~
  ~ You should have received a copy of the GNU Lesser General Public
  ~ License along with this software; if not, write to the Free
  ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
  -->

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
           targetNamespace="urn:jboss:domain:security:1.0"
           xmlns="urn:jboss:domain:security:1.0"
           elementFormDefault="qualified"
           attributeFormDefault="unqualified"
           version="1.0">

   <!-- The security subsystem root element -->
   <xs:element name="subsystem" type="security-containerType" />

   <!-- The security container configuration -->
   <xs:complexType name="security-containerType">
      <xs:annotation>
         <xs:documentation>
                <![CDATA[
                    The security subsystem, used to configure authentication and authorization.
                ]]>
         </xs:documentation>
      </xs:annotation>
      <xs:all>
         <xs:element name="security-management" type="securityManagementType" minOccurs="0" maxOccurs="1"/>
         <xs:element name="subject-factory" type="subjectFactoryType" minOccurs="0" maxOccurs="1"/>
         <xs:element name="jaas" type="jaasType" minOccurs="0" maxOccurs="1"/>
      </xs:all>
   </xs:complexType>
   
   <!-- The security management element -->
   <xs:complexType name="securityManagementType">
      <xs:annotation>
         <xs:documentation>
                <![CDATA[
                    The optional "authentication-manager-class-name" attribute specifies the AuthenticationManager
                    implementation class name to use. To use the container default set the value to "default".
                    
                    The optional "deep-copy-subject-mode" attribute sets the copy mode of subjects done by the security
                    managers to be deep copies that makes copies of the subject principals and credentials if they are
                    cloneable. It should be set to true if subject include mutable content that can be corrupted when
                    multiple threads have the same identity and cache flushes/logout clearing the subject in one thread
                    results in subject references affecting other threads. Default value is "false".
                    
                    The optional "default-callback-handler-class-name" specifies a global class name for the
                    CallbackHandler implementation to be used with login modules. To use the container default set the
                    value to "default".
                    
                    The optional "authorization-manager-class-name" attribute specifies the AuthorizationManager
                    implementation class name to use. To use the container default set the value to "default".
                    
                    The optional "audit-manager-class-name" attribute specifies the AuditManager
                    implementation class name to use. To use the container default set the value to "default".
                    
                    The optional "identity-trust-manager-class-name" attribute specifies the IdentityTrustManager
                    implementation class name to use. To use the container default set the value to "default".
                    
                    The optional "mapping-manager-class-name" attribute specifies the MappingManager
                    implementation class name to use. To use the container default set the value to "default".
                ]]>
         </xs:documentation>
      </xs:annotation>
      <xs:attribute name="authentication-manager-class-name" type="xs:string" use="optional"/>
      <xs:attribute name="deep-copy-subject-mode" type="xs:boolean" use="optional"/>
      <xs:attribute name="default-callback-handler-class-name" type="xs:string" use="optional"/>
      <xs:attribute name="authorization-manager-class-name" type="xs:string" use="optional"/>
      <xs:attribute name="audit-manager-class-name" type="xs:string" use="optional"/>
      <xs:attribute name="identity-trust-manager-class-name" type="xs:string" use="optional"/>
      <xs:attribute name="mapping-manager-class-name" type="xs:string" use="optional"/>
   </xs:complexType>

   <!-- The subject factory element -->
   <xs:complexType name="subjectFactoryType">
      <xs:annotation>
         <xs:documentation>
               <![CDATA[
                    The optional "subject-factory-class-name" attribute sets the class name for the SubjectFactory
                    implementation to be used. To use the container default set the value to "default".
                ]]>
         </xs:documentation>
      </xs:annotation>
      <xs:attribute name="subject-factory-class-name" type="xs:string" use="optional"/>
   </xs:complexType>
   
   <!-- Configuration for JAAS -->
   <xs:complexType name="jaasType">
      <xs:annotation>
         <xs:documentation>
               <![CDATA[
                    Configures security domains for applications.
                ]]>
         </xs:documentation>
      </xs:annotation>
      <xs:sequence>
         <xs:element name="application-policy" type="applicationPolicyType" minOccurs="0" maxOccurs="unbounded"/>
      </xs:sequence>
   </xs:complexType>
   
   <xs:complexType name="applicationPolicyType">
      <xs:annotation>
         <xs:documentation>
               <![CDATA[
                    An application policy configures a security domain.
                ]]>
         </xs:documentation>
      </xs:annotation>
      <xs:sequence>
         <xs:choice>
            <xs:element name="authentication" type="authenticationType"/>
            <xs:element name="authentication-jaspi" type="authenticationJaspiType"/>
         </xs:choice>
         <xs:element name="authorization" type="authorizationType" minOccurs="0" maxOccurs="unbounded"/>
         <xs:element name="acl" type="aclType" minOccurs="0"/>
         <xs:element name="mapping" type="mappingType" minOccurs="0"/>
         <xs:element name="audit" type="auditType" minOccurs="0"/>
         <xs:element name="identity-trust" type="identityTrustType" minOccurs="0"/>
      </xs:sequence>
      <xs:attribute name="name" type="xs:string" use="required"/>
      <xs:attribute name="extends" type="xs:string" use="optional"/>
   </xs:complexType>
   
   <xs:complexType name="authenticationType">
      <xs:annotation><commit_msg>change application-policy to security-domain in the xsd<commit_after><?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ JBoss, Home of Professional Open Source.
  ~ Copyright 2010, Red Hat, Inc., and individual contributors
  ~ as indicated by the @author tags. See the copyright.txt file in the
  ~ distribution for a full listing of individual contributors.
  ~
  ~ This is free software; you can redistribute it and/or modify it
  ~ under the terms of the GNU Lesser General Public License as
  ~ published by the Free Software Foundation; either version 2.1 of
  ~ the License, or (at your option) any later version.
  ~
  ~ This software 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
  ~ Lesser General Public License for more details.
  ~
  ~ You should have received a copy of the GNU Lesser General Public
  ~ License along with this software; if not, write to the Free
  ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
  -->

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
           targetNamespace="urn:jboss:domain:security:1.0"
           xmlns="urn:jboss:domain:security:1.0"
           elementFormDefault="qualified"
           attributeFormDefault="unqualified"
           version="1.0">

   <!-- The security subsystem root element -->
   <xs:element name="subsystem" type="security-containerType" />

   <!-- The security container configuration -->
   <xs:complexType name="security-containerType">
      <xs:annotation>
         <xs:documentation>
                <![CDATA[
                    The security subsystem, used to configure authentication and authorization.
                ]]>
         </xs:documentation>
      </xs:annotation>
      <xs:all>
         <xs:element name="security-management" type="securityManagementType" minOccurs="0" maxOccurs="1"/>
         <xs:element name="subject-factory" type="subjectFactoryType" minOccurs="0" maxOccurs="1"/>
         <xs:element name="jaas" type="jaasType" minOccurs="0" maxOccurs="1"/>
      </xs:all>
   </xs:complexType>
   
   <!-- The security management element -->
   <xs:complexType name="securityManagementType">
      <xs:annotation>
         <xs:documentation>
                <![CDATA[
                    The optional "authentication-manager-class-name" attribute specifies the AuthenticationManager
                    implementation class name to use. To use the container default set the value to "default".
                    
                    The optional "deep-copy-subject-mode" attribute sets the copy mode of subjects done by the security
                    managers to be deep copies that makes copies of the subject principals and credentials if they are
                    cloneable. It should be set to true if subject include mutable content that can be corrupted when
                    multiple threads have the same identity and cache flushes/logout clearing the subject in one thread
                    results in subject references affecting other threads. Default value is "false".
                    
                    The optional "default-callback-handler-class-name" specifies a global class name for the
                    CallbackHandler implementation to be used with login modules. To use the container default set the
                    value to "default".
                    
                    The optional "authorization-manager-class-name" attribute specifies the AuthorizationManager
                    implementation class name to use. To use the container default set the value to "default".
                    
                    The optional "audit-manager-class-name" attribute specifies the AuditManager
                    implementation class name to use. To use the container default set the value to "default".
                    
                    The optional "identity-trust-manager-class-name" attribute specifies the IdentityTrustManager
                    implementation class name to use. To use the container default set the value to "default".
                    
                    The optional "mapping-manager-class-name" attribute specifies the MappingManager
                    implementation class name to use. To use the container default set the value to "default".
                ]]>
         </xs:documentation>
      </xs:annotation>
      <xs:attribute name="authentication-manager-class-name" type="xs:string" use="optional"/>
      <xs:attribute name="deep-copy-subject-mode" type="xs:boolean" use="optional"/>
      <xs:attribute name="default-callback-handler-class-name" type="xs:string" use="optional"/>
      <xs:attribute name="authorization-manager-class-name" type="xs:string" use="optional"/>
      <xs:attribute name="audit-manager-class-name" type="xs:string" use="optional"/>
      <xs:attribute name="identity-trust-manager-class-name" type="xs:string" use="optional"/>
      <xs:attribute name="mapping-manager-class-name" type="xs:string" use="optional"/>
   </xs:complexType>

   <!-- The subject factory element -->
   <xs:complexType name="subjectFactoryType">
      <xs:annotation>
         <xs:documentation>
               <![CDATA[
                    The optional "subject-factory-class-name" attribute sets the class name for the SubjectFactory
                    implementation to be used. To use the container default set the value to "default".
                ]]>
         </xs:documentation>
      </xs:annotation>
      <xs:attribute name="subject-factory-class-name" type="xs:string" use="optional"/>
   </xs:complexType>
   
   <!-- Configuration for JAAS -->
   <xs:complexType name="jaasType">
      <xs:annotation>
         <xs:documentation>
               <![CDATA[
                    Configures security domains for applications.
                ]]>
         </xs:documentation>
      </xs:annotation>
      <xs:sequence>
         <xs:element name="security-domain" type="securityDomainType" minOccurs="0" maxOccurs="unbounded"/>
      </xs:sequence>
   </xs:complexType>
   
   <xs:complexType name="securityDomainType">
      <xs:annotation>
         <xs:documentation>
               <![CDATA[
                    Definition of a security domain.
                ]]>
         </xs:documentation>
      </xs:annotation>
      <xs:sequence>
         <xs:choice>
            <xs:element name="authentication" type="authenticationType"/>
            <xs:element name="authentication-jaspi" type="authenticationJaspiType"/>
         </xs:choice>
         <xs:element name="authorization" type="authorizationType" minOccurs="0" maxOccurs="unbounded"/>
         <xs:element name="acl" type="aclType" minOccurs="0"/>
         <xs:element name="mapping" type="mappingType" minOccurs="0"/>
         <xs:element name="audit" type="auditType" minOccurs="0"/>
         <xs:element name="identity-trust" type="identityTrustType" minOccurs="0"/>
      </xs:sequence>
      <xs:attribute name="name" type="xs:string" use="required"/>
      <xs:attribute name="extends" type="xs:string" use="optional"/>
   </xs:complexType>
   
   <xs:complexType name="authenticationType">
      <xs:annotation>
{'fraction_non_alphanumeric': 0.10414960414960416, 'fraction_numerical': 0.00586950586950587, 'mean_word_length': 2.5215092525835137, 'pattern_counts': {'":': 0, '<': 153, '<?xml version=': 2, '>': 153, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 6}, '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': '7585228', 'n_tokens_mistral': 3774, 'n_tokens_neox': 3565, 'n_words': 1171}