<?xml version="1.0" encoding="UTF-8"?>
<!--Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements.  See the NOTICE file distributed with
    this work for additional information regarding copyright ownership.
    The ASF licenses this file to You under the Apache License, Version 2.0
    (the "License"); you may not use this file except in compliance with
    the License.  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.-->
<!--$Rev: 690859 $ $Date: 2008-08-31 23:30:25 -0700 (Sun, 31 Aug 2008) $-->
<module xmlns="http://geronimo.apache.org/xml/ns/deployment-1.2">
  <!--CORBA-->
  <environment>
    <moduleId>
      <groupId>org.apache.geronimo.configs</groupId>
      <artifactId>j2ee-corba-yoko</artifactId>
      <version>2.2</version>
      <type>car</type>
    </moduleId>
    <dependencies>
      <dependency>
        <groupId>org.apache.geronimo.configs</groupId>
        <artifactId>openejb</artifactId>
        <version>2.2</version>
        <type>car</type>
      </dependency>
      <dependency>
        <groupId>org.apache.geronimo.modules</groupId>
        <artifactId>geronimo-corba</artifactId>
        <version>2.2</version>
        <type>jar</type>
      </dependency>
      <dependency>
        <groupId>org.apache.geronimo.modules</groupId>
        <artifactId>geronimo-yoko</artifactId>
        <version>2.2</version>
        <type>jar</type>
      </dependency>
      <dependency>
        <groupId>org.apache.yoko</groupId>
        <artifactId>yoko-core</artifactId>
        <version>1.0</version>
        <type>jar</type>
      </dependency>
      <dependency>
        <groupId>org.apache.yoko</groupId>
        <artifactId>yoko-rmi-impl</artifactId>
        <version>1.0</version>
        <type>jar</type>
      </dependency>
      <dependency>
        <groupId>org.apache.bcel</groupId>
        <artifactId>bcel</artifactId>
        <version>5.2</version>
        <type>jar</type>
      </dependency>
    </dependencies>
    <hidden-classes/>
    <non-overridable-classes/>
    <private-classes/>
  </environment>
  <gbean name="DynamicORBStubClassLoader" class="org.apache.geronimo.corba.util.DynamicStubClassLoaderGBean">
    <dependency>
      <name>ORBConfigAdapter</name>
    </dependency>
  </gbean>
  <gbean name="ORBConfigAdapter" class="org.apache.geronimo.yoko.ORBConfigAdapterGBean"/>
  <gbean name="NameServer" class="org.apache.geronimo.corba.NameServiceGBean">
    <reference name="ServerInfo">
      <name>ServerInfo</name>
    </reference>
    <reference name="ConfigAdapter">
      <name>ORBConfigAdapter</name>
    </reference>
    <attribute name="port">1050</attribute>
    <attribute name="host">localhost</attribute>
  </gbean>
  <gbean name="CORBASSLConfig" class="org.apache.geronimo.corba.security.config.ssl.SSLConfigGBean">
    <attribute name="keyStore">geronimo-default</attribute>
    <attribute name="keyAlias">geronimo</attribute>
    <attribute name="trustStore">geronimo-default</attribute>
    <attribute name="algorithm">Default</attribute>
    <attribute name="protocol">SSL</attribute>
    <reference name="KeystoreManager">
      <name>KeystoreManager</name>
    </reference>
  </gbean>
  <!--connections require SSL, no client cert, client logs in with password, no identity token-->
  <gbean name="Server" class="org.apache.geronimo.corba.CORBAEjbBeanGBean">
    <attribute name="host">localhost</attribute>
    <attribute name="port">2001</attribute>
    <reference name="ConfigAdapter">
      <name>ORBConfigAdapter</name>
    </reference>
    <reference name="NameService">
      <name>NameServer</name>
    </reference>
    <reference name="OpenEjbSystem"/>
    <reference name="SSLConfig">
      <name>CORBASSLConfig</name>
    </reference>
    <xml-attribute name="tssConfig">
      <tss:tss xmlns:tss="http://www.openejb.org/xml/ns/corba-tss-config-2.0" xmlns:sec="http://geronimo.apache.org/xml/ns/security-1.2">
        <!--<tss:default-principal>-->
        <!--<sec:principal class="org.apache.geronimo.security.realm.providers.GeronimoUserPrincipal" name="guest"/>-->
        <!--</tss:default-principal>-->
        <tss:SSL port="2001" hostname="localhost">
          <tss:supports>Integrity Confidentiality EstablishTrustInTarget</tss:supports>
          <tss:requires>Integrity Confidentiality</tss:requires>
        </tss:SSL>
        <tss:compoundSecMechTypeList>
          <tss:compoundSecMech>
            <tss:GSSUP required="true" targetName="default"/>
            <tss:sasMech>
              <tss:identityTokenTypes>
                <tss:ITTAbsent/>
              </tss:identityTokenTypes>
            </tss:sasMech>
          </tss:compoundSecMech>
        </tss:compoundSecMechTypeList>
      </tss:tss>
    </xml-attribute>
  </gbean>
  <!--orb with no security whatsoever-->
  <gbean name="UnprotectedServer" class="org.apache.geronimo.corba.CORBAEjbBeanGBean">
    <attribute name="host">localhost</attribute>
    <attribute name="port">6882</attribute>
    <reference name="ConfigAdapter">
      <name>ORBConfigAdapter</name>
    </reference>
    <reference name="NameService">
      <name>NameServer</name>
    </reference>
    <reference name="SSLConfig">
      <name>CORBASSLConfig</name>
    </reference>
    <xml-attribute name="tssConfig">
      <tss:tss xmlns:tss="http://www.openejb.org/xml/ns/corba-tss-config-2.0" xmlns:sec="http://geronimo.apache.org/xml/ns/security-1.2">
        <!--<tss:default-principal>-->
        <!--<sec:principal class="org.apache.geronimo.security.realm.providers.GeronimoUserPrincipal" name="guest"/>-->
        <!--</tss:default-principal>-->
        <tss:compoundSecMechTypeList>
          <tss:compoundSecMech>
            <tss:GSSUP required="true" targetName="default"/>
            <tss:sasMech>
              <tss:identityTokenTypes>
                <tss:ITTAbsent/>
              </tss:identityTokenTypes>
            </tss:sasMech>
          </tss:compoundSecMech>
        </tss:compoundSecMechTypeList>
      </tss:tss>
    </xml-attribute>
  </gbean>
  <!--tss bean examples, specify requirements for connection to orb.  Provide a ref in an ejb-->
  <!--<gbean name="SSLClientCert" class="org.apache.geronimo.corba.TSSBeanGBean">
        <attribute name="POAName">SSLClientCert</attribute>
        <reference name="Server">
            <name>Server</name>
        </reference>
        <xml-attribute name="tssConfig">
            <tss:tss xmlns:tss="http://www.openejb.org/xml/ns/corba-tss-config-2.0" xmlns:sec="http://geronimo.apache.org/xml/ns/security-1.2">
                <tss:default-principal>
                    <sec:principal class="org.apache.geronimo.security.realm.providers.GeronimoUserPrincipal" name="guest"/>
                </tss:default-principal>
                <tss:SSL port="2001" hostname="localhost">
                    <tss:supports>Integrity Confidentiality EstablishTrustInTarget EstablishTrustInClient</tss:supports>
                    <tss:requires>Integrity Confidentiality EstablishTrustInClient</tss:requires>
                </tss:SSL>
                <tss:compoundSecMechTypeList>
                    <tss:compoundSecMech>
                        <tss:sasMech>
                            <tss:identityTokenTypes>
                                <tss:ITTAbsent/>
                            </tss:identityTokenTypes>
                        </tss:sasMech>
                    </tss:compoundSecMech>
                </tss:compoundSecMechTypeList>
            </tss:tss>
        </xml-attribute>
    </gbean>

    <gbean name="SSLClientPassword" class="org.apache.geronimo.corba.TSSBeanGBean">
        <attribute name="POAName">SSLClientPassword</attribute>
        <reference name="Server">
            <name>Server</name>
        </reference>
        <xml-attribute name="tssConfig">
            <tss:tss xmlns:tss="http://www.openejb.org/xml/ns/corba-tss-config-2.0" xmlns:sec="http://geronimo.apache.org/xml/ns/security-1.2">
                <tss:default-principal>
                    <sec:principal class="org.apache.geronimo.security.realm.providers.GeronimoUserPrincipal" name="guest"/>
                </tss:default-principal>
                <tss:SSL port="2001" hostname="localhost">
                    <tss:supports>Integrity Confidentiality EstablishTrustInTarget</tss:supports>
                    <tss:requires>Integrity Confidentiality</tss:requires>
                </tss:SSL>
                <tss:compoundSecMechTypeList>
                    <tss:compoundSecMech>
                        <tss:GSSUP required="true" targetName="default"/>
                        <tss:sasMech>
                            <tss:identityTokenTypes>
                                <tss:ITTAbsent/>
                            </tss:identityTokenTypes>
                        </tss:sasMech>
                    </tss:compoundSecMech>
                </tss:compoundSecMechTypeList>
            </tss:tss>
        </xml-attribute>
    </gbean>

    <gbean name="SSLIdentityToken" class="org.apache.geronimo.corba.TSSBeanGBean">
        <attribute name="POAName">SSLIdentityToken</attribute>
        <reference name="Server">
            <name>Server</name>
        </reference>
        <xml-attribute name="tssConfig">
            <tss:tss xmlns:tss="http://www.openejb.org/xml/ns/corba-tss-config-2.0" xmlns:sec="http://geronimo.apache.org/xml/ns/security-1.2">
                <tss:default-principal>
                    <sec:principal class="org.apache.geronimo.security.realm.providers.GeronimoUserPrincipal" name="guest"/>
                </tss:default-principal>
                <tss:SSL port="2001" hostname="localhost">
                    <tss:supports>Integrity Confidentiality EstablishTrustInTarget</tss:supports>
                    <tss:requires>Integrity Confidentiality</tss:requires>
                </tss:SSL>
                <tss:compoundSecMechTypeList>
                    <tss:compoundSecMech>
                        <tss:sasMech>
                            <tss:identityTokenTypes>
                                <tss:ITTAnonymous/>
                                <tss:ITTPrincipalNameGSSUP principal-class="org.apache.geronimo.security.realm.providers.GeronimoUserPrincipal"/>
                                <tss:ITTDistinguishedName/>
                                <tss:ITTX509CertChain/>
                            </tss:identityTokenTypes>
                        </tss:sasMech>
                    </tss:compoundSecMech>
                </tss:compoundSecMechTypeList>
            </tss:tss>
        </xml-attribute>
    </gbean>

    <gbean name="IdentityTokenNoSecurity" class="org.apache.geronimo.corba.TSSBeanGBean">
        <attribute name="POAName">IdentityTokenNoSecurity</attribute>
        <reference name="Server">
            <name>UnprotectedServer</name>
        </reference>
        <xml-attribute name="tssConfig">
            <tss:tss xmlns:tss="http://www.openejb.org/xml/ns/corba-tss-config-2.0" xmlns:sec="http://geronimo.apache.org/xml/ns/security-1.2">
                <tss:default-principal>
                    <sec:principal class="org.apache.geronimo.security.realm.providers.GeronimoUserPrincipal" name="guest"/>
                </tss:default-principal>
                <tss:compoundSecMechTypeList>
                    <tss:compoundSecMech>
                        <tss:sasMech>
                            <tss:identityTokenTypes>
                                <tss:ITTAnonymous/>
                                <tss:ITTPrincipalNameGSSUP principal-class="org.apache.geronimo.security.realm.providers.GeronimoUserPrincipal"/>
                                <tss:ITTDistinguishedName/>
                                <tss:ITTX509CertChain/>
                            </tss:identityTokenTypes>
                        </tss:sasMech>
                    </tss:compoundSecMech>
                </tss:compoundSecMechTypeList>
            </tss:tss>
        </xml-attribute>
    </gbean>

    <gbean name="SSLClientCertIdentityToken" class="org.apache.geronimo.corba.TSSBeanGBean">
        <attribute name="POAName">SSLClientCertIdentityToken</attribute>
        <reference name="Server">
            <name>Server</name>
        </reference>
        <xml-attribute name="tssConfig">
            <tss:tss xmlns:tss="http://www.openejb.org/xml/ns/corba-tss-config-2.0" xmlns:sec="http://geronimo.apache.org/xml/ns/security-1.2">
                <tss:default-principal>
                    <sec:principal class="org.apache.geronimo.security.realm.providers.GeronimoUserPrincipal" name="guest"/>
                </tss:default-principal>
                <tss:SSL port="2001" hostname="localhost">
                    <tss:supports>Integrity Confidentiality EstablishTrustInTarget EstablishTrustInClient</tss:supports>
                    <tss:requires>Integrity Confidentiality EstablishTrustInClient</tss:requires>
                </tss:SSL>
                <tss:compoundSecMechTypeList>
                    <tss:compoundSecMech>
                        <tss:sasMech>
                            <tss:identityTokenTypes>
                                <tss:ITTAnonymous/>
                                <tss:ITTPrincipalNameGSSUP principal-class="org.apache.geronimo.security.realm.providers.GeronimoUserPrincipal"/>
                                <tss:ITTDistinguishedName/>
                                <tss:ITTX509CertChain/>
                            </tss:identityTokenTypes>
                        </tss:sasMech>
                    </tss:compoundSecMech>
                </tss:compoundSecMechTypeList>
            </tss:tss>
        </xml-attribute>
    </gbean>-->
  <!--CSS beans for client security.  These specify what the client is willing to provide-->
  <!--<gbean name="SSLClientCert" class="org.apache.geronimo.corba.CSSBeanGBean">
        <reference name="TransactionManager">
            <name>TransactionManager</name>
        </reference>
        <reference name="ConfigAdapter">
            <name>ORBConfigAdapter</name>
        </reference>
        <reference name="SSLConfig">
            <name>CORBASSLConfig</name>
        </reference>
        <attribute name="description">SSLClientCert</attribute>
        <xml-attribute name="cssConfig">
            <css:css xmlns:css="http://www.openejb.org/xml/ns/corba-css-config-2.0">
                <css:compoundSecMechTypeList>
                    <css:compoundSecMech>
                        <css:SSL>
                            <css:supports>Integrity Confidentiality EstablishTrustInTarget EstablishTrustInClient</css:supports>
                            <css:requires>Integrity Confidentiality EstablishTrustInClient</css:requires>
                        </css:SSL>
                        <css:sasMech>
                            <css:ITTAbsent/>
                        </css:sasMech>
                    </css:compoundSecMech>
                </css:compoundSecMechTypeList>
            </css:css>
        </xml-attribute>
    </gbean>

    <gbean name="SSLClientPassword" class="org.apache.geronimo.corba.CSSBeanGBean">
        <reference name="TransactionManager">
            <name>TransactionManager</name>
        </reference>
        <reference name="ConfigAdapter">
            <name>ORBConfigAdapter</name>
        </reference>
        <reference name="SSLConfig">
            <name>CORBASSLConfig</name>
        </reference>
        <attribute name="description">SSLClientPassword</attribute>
        <xml-attribute name="cssConfig">
            <css:css xmlns:css="http://www.openejb.org/xml/ns/corba-css-config-2.0">
                <css:compoundSecMechTypeList>
                    <css:compoundSecMech>
                        <css:SSL>
                            <css:supports>Integrity Confidentiality EstablishTrustInClient</css:supports>
                            <css:requires>Integrity Confidentiality</css:requires>
                        </css:SSL>
                        <css:GSSUPStatic username="j2ee" password="j2ee" domain="default"/>
                        <css:sasMech>
                            <css:ITTAbsent/>
                        </css:sasMech>
                    </css:compoundSecMech>
                </css:compoundSecMechTypeList>
            </css:css>
        </xml-attribute>
    </gbean>

    <gbean name="SSLIdentityTokenPrincipal" class="org.apache.geronimo.corba.CSSBeanGBean">
        <reference name="TransactionManager">
            <name>TransactionManager</name>
        </reference>
        <reference name="ConfigAdapter">
            <name>ORBConfigAdapter</name>
        </reference>
        <reference name="SSLConfig">
            <name>CORBASSLConfig</name>
        </reference>
        <attribute name="description">SSLIdentityTokenPrincipal</attribute>
        <xml-attribute name="cssConfig">
            <css:css xmlns:css="http://www.openejb.org/xml/ns/corba-css-config-2.0">
                <css:compoundSecMechTypeList>
                    <css:compoundSecMech>
                        <css:SSL>
                            <css:supports>Integrity Confidentiality EstablishTrustInClient</css:supports>
                            <css:requires>Integrity Confidentiality</css:requires>
                        </css:SSL>
                        <css:sasMech>
                            <css:ITTPrincipalNameDynamic principal-class="org.apache.geronimo.security.realm.providers.GeronimoUserPrincipal"/>
                        </css:sasMech>
                    </css:compoundSecMech>
                </css:compoundSecMechTypeList>
            </css:css>
        </xml-attribute>
    </gbean>

    <gbean name="SSLIdentityTokenCert" class="org.apache.geronimo.corba.CSSBeanGBean">
        <reference name="TransactionManager">
            <name>TransactionManager</name>
        </reference>
        <reference name="ConfigAdapter">
            <name>ORBConfigAdapter</name>
        </reference>
        <reference name="SSLConfig">
            <name>CORBASSLConfig</name>
        </reference>
        <attribute name="description">SSLIdentityTokenCert</attribute>
        <xml-attribute name="cssConfig">
            <css:css xmlns:css="http://www.openejb.org/xml/ns/corba-css-config-2.0">
                <css:compoundSecMechTypeList>
                    <css:compoundSecMech>
                        <css:SSL>
                            <css:supports>Integrity Confidentiality EstablishTrustInClient</css:supports>
                            <css:requires>Integrity Confidentiality</css:requires>
                        </css:SSL>
                        <css:sasMech>
                            <css:ITTPrincipalNameDynamic principal-class="org.apache.geronimo.security.realm.providers.GeronimoUserPrincipal"/>
                        </css:sasMech>
                    </css:compoundSecMech>
                </css:compoundSecMechTypeList>
            </css:css>
        </xml-attribute>
    </gbean>

    <gbean name="NoSecurityIdentityTokenPrincipal" class="org.apache.geronimo.corba.CSSBeanGBean">
        <reference name="TransactionManager">
            <name>TransactionManager</name>
        </reference>
        <reference name="ConfigAdapter">
            <name>ORBConfigAdapter</name>
        </reference>
        <reference name="SSLConfig">
            <name>CORBASSLConfig</name>
        </reference>
        <attribute name="description">NoSecurityIdentityTokenPrincipal</attribute>
        <xml-attribute name="cssConfig">
            <css:css xmlns:css="http://www.openejb.org/xml/ns/corba-css-config-2.0">
                <css:compoundSecMechTypeList>
                    <css:compoundSecMech>
                        <css:sasMech>
                            <css:ITTPrincipalNameDynamic principal-class="org.apache.geronimo.security.realm.providers.GeronimoUserPrincipal"/>
                        </css:sasMech>
                    </css:compoundSecMech>
                </css:compoundSecMechTypeList>
            </css:css>
        </xml-attribute>
    </gbean>

    <gbean name="NoSecurityIdentityTokenCert" class="org.apache.geronimo.corba.CSSBeanGBean">
        <reference name="TransactionManager">
            <name>TransactionManager</name>
        </reference>
        <reference name="ConfigAdapter">
            <name>ORBConfigAdapter</name>
        </reference>
        <reference name="SSLConfig">
            <name>CORBASSLConfig</name>
        </reference>
        <attribute name="description">NoSecurityIdentityTokenCert</attribute>
        <xml-attribute name="cssConfig">
            <css:css xmlns:css="http://www.openejb.org/xml/ns/corba-css-config-2.0">
                <css:compoundSecMechTypeList>
                    <css:compoundSecMech>
                        <css:sasMech>
                            <css:ITTPrincipalNameDynamic principal-class="org.apache.geronimo.security.realm.providers.GeronimoUserPrincipal"/>
                        </css:sasMech>
                    </css:compoundSecMech>
                </css:compoundSecMechTypeList>
            </css:css>
        </xml-attribute>
    </gbean>

    <gbean name="NoSecurity" class="org.apache.geronimo.corba.CSSBeanGBean">
        <reference name="TransactionManager">
            <name>TransactionManager</name>
        </reference>
        <reference name="ConfigAdapter">
            <name>ORBConfigAdapter</name>
        </reference>
        <reference name="SSLConfig">
            <name>CORBASSLConfig</name>
        </reference>
        <attribute name="description">NoSecurity</attribute>
        <attribute name="cssArgs"></attribute>
        <xml-attribute name="cssConfig">
            <css:css xmlns:css="http://www.openejb.org/xml/ns/corba-css-config-2.0">
                <css:compoundSecMechTypeList>
                    <css:compoundSecMech>
                        <css:SSL>
                            <css:supports>Integrity Confidentiality EstablishTrustInTarget EstablishTrustInClient</css:supports>
                            <css:requires></css:requires>
                        </css:SSL>
                    </css:compoundSecMech>
                </css:compoundSecMechTypeList>
            </css:css>
        </xml-attribute>
    </gbean>-->
</module>