Examples of SAS_ContextSec


Examples of org.omg.CSIIOP.SAS_ContextSec

                        & ~clientSupports) != 0) {
                    // target requires EstablishTrustInClient, but client does not support it: skip this securityMech.
                    continue;
                }

                SAS_ContextSec identityConfig = securityMech.sas_context_mech;

                if ((IdentityAssertion.value & (identityConfig.target_requires ^ clientSupports)
                        & ~clientSupports) != 0) {
                    // target requires IdentityAssertion, but client does not support it: skip this securityMech
                    continue;
View Full Code Here

Examples of org.omg.CSIIOP.SAS_ContextSec

     * @param securityMech the {@code CompoundSecMech} to create the string for.
     * @param builder      the buffer to write to.
     */
    public static void toString(CompoundSecMech securityMech, StringBuilder builder) {
        AS_ContextSec asMech = securityMech != null ? securityMech.as_context_mech : null;
        SAS_ContextSec sasMech = securityMech != null ? securityMech.sas_context_mech : null;
        if (securityMech != null) {
            builder.append("CompoundSecMech[");
            builder.append("target_requires: ");
            builder.append(securityMech.target_requires);
            if (asMech != null) {
View Full Code Here

Examples of org.omg.CSIIOP.SAS_ContextSec

        // create AS Context.
        AS_ContextSec asContext = createAuthenticationServiceContext(metadata);

        // create SAS Context.
        SAS_ContextSec sasContext = createSecureAttributeServiceContext(metadata);

        // create target_requires bit field (AssociationOption) can't read directly the transport_mech TaggedComponent.
        int target_requires = createTargetRequires(metadata.getTransportConfig()) | asContext.target_requires |
                sasContext.target_requires;
View Full Code Here

Examples of org.omg.CSIIOP.SAS_ContextSec

     *
     * @param metadata the metadata object that contains the CSIv2 security configuration info.
     * @return the constructed {@code SAS_ContextSec} instance.
     */
    public static SAS_ContextSec createSecureAttributeServiceContext(IORSecurityConfigMetadata metadata) {
        SAS_ContextSec context;

        // context contains target_supports, target_requires, privilige_authorities, supported_naming_mechanisms, supported_identity_types.
        int support = 0;
        int require = 0;
        ServiceConfiguration[] privilAuth = new ServiceConfiguration[0];
        byte[][] supNamMechs = {};
        int supIdenTypes = 0; // 0 means ITTAbsent

        // the the SasContext metadata.
        SasContext sasMeta = metadata.getSasContext();

        // if no SAS context metadata, or caller propagation is not supported, we return with a more or less empty sas context.
        if (sasMeta == null || !sasMeta.isCallerPropagationSupported()) {
            context = new SAS_ContextSec((short) support, (short) require, privilAuth, supNamMechs, supIdenTypes);
        } else {
            support = IdentityAssertion.value;

            // supporting GSSUP (username/password) naming mechanism.
            byte[] upMech = createGSSUPMechOID();
            supNamMechs = new byte[1][upMech.length];
            System.arraycopy(upMech, 0, supNamMechs[0], 0, upMech.length);

            // since we support IdentityAssertion we need to specify supported identity types. CTS says we need them all
            supIdenTypes = ITTAnonymous.value | ITTPrincipalName.value | ITTX509CertChain.value | ITTDistinguishedName.value;
            context = new SAS_ContextSec((short) support, (short) require, privilAuth, supNamMechs, supIdenTypes);
        }

        return context;
    }
View Full Code Here

Examples of org.omg.CSIIOP.SAS_ContextSec

                        & ~clientSupports) != 0) {
                    // target requires EstablishTrustInClient, but client does not support it: skip this securityMech.
                    continue;
                }

                SAS_ContextSec identityConfig = securityMech.sas_context_mech;

                if ((IdentityAssertion.value & (identityConfig.target_requires ^ clientSupports)
                        & ~clientSupports) != 0) {
                    // target requires IdentityAssertion, but client does not support it: skip this securityMech
                    continue;
View Full Code Here

Examples of org.omg.CSIIOP.SAS_ContextSec

     * @param securityMech the {@code CompoundSecMech} to create the string for.
     * @param builder      the buffer to write to.
     */
    public static void toString(CompoundSecMech securityMech, StringBuilder builder) {
        AS_ContextSec asMech = securityMech != null ? securityMech.as_context_mech : null;
        SAS_ContextSec sasMech = securityMech != null ? securityMech.sas_context_mech : null;
        if (securityMech != null) {
            builder.append("CompoundSecMech[");
            builder.append("target_requires: ");
            builder.append(securityMech.target_requires);
            if (asMech != null) {
View Full Code Here

Examples of org.omg.CSIIOP.SAS_ContextSec

                    cdrProfile = codec.encode(any);
                    serviceConfiguration = new ServiceConfiguration[1];
                    serviceConfiguration[0] =
                        new ServiceConfiguration(SCS_ATLAS.value, cdrProfile);
                }
                SAS_ContextSec sasContextSec =
                    new SAS_ContextSec((short)0,
                                       (short)0,
                                       serviceConfiguration,
                                       new byte[0][0],
                                       0);
View Full Code Here

Examples of org.omg.CSIIOP.SAS_ContextSec

        if (required) requires |= (short) (supports & DelegationByClient.value);
    }

    public SAS_ContextSec encodeIOR(ORB orb, Codec codec) throws Exception {

        SAS_ContextSec result = new SAS_ContextSec();

        int i = 0;
        result.privilege_authorities = new ServiceConfiguration[privilegeAuthorities.size()];
        for (Iterator iter = privilegeAuthorities.iterator(); iter.hasNext();) {
            result.privilege_authorities[i++] = ((TSSServiceConfigurationConfig) iter.next()).generateServiceConfiguration();
View Full Code Here

Examples of org.omg.CSIIOP.SAS_ContextSec

     
      // Create AS Context
      AS_ContextSec asContext = createAuthenticationServiceContext(metadata);
     
      // Create SAS Context
      SAS_ContextSec sasContext = createSecureAttributeServiceContext(metadata);

      // Create target_requires bit field (AssociationOption)
      // can't read directly the transport_mech TaggedComponent
      int target_requires =
         createTargetRequires(metadata.getTransportConfig()) |
View Full Code Here

Examples of org.omg.CSIIOP.SAS_ContextSec

    **/
   public static SAS_ContextSec createSecureAttributeServiceContext(
      IorSecurityConfigMetaData metadata
      )
   {
      SAS_ContextSec context = null;
     
      // context contains
      // target_supports, target_requires, privilige_authorities,
      // supported_naming_mechanisms, supported_identity_types
      int support = 0;
      int require = 0;
      ServiceConfiguration[] privilAuth = new ServiceConfiguration[0];
      byte[][] supNamMechs = {};
      int supIdenTypes = 0;     // 0 means ITTAbsent
     
      // the the SasContext metadata
      SasContext sasMeta = metadata.getSasContext();
     
      // if no SAS context metadata, or caller propagation is not
      // supported, we return with a more or less empty sas context
      if( sasMeta == null || !sasMeta.isCallerPropagationSupported() )
      {
         context = new SAS_ContextSec((short) support,
            (short) require,
            privilAuth,
            supNamMechs,
            supIdenTypes);
      }
      else
      {
         support = IdentityAssertion.value;
        
         // supporting GSSUP (username/password) naming mechanism
         byte[] upMech = createGSSUPMechOID();
         supNamMechs = new byte[1][upMech.length];
         System.arraycopy(upMech, 0, supNamMechs[0], 0, upMech.length);
        
         // since we support IdentityAssertion we need to specify
         // supported identity types. CTS says we need them all
         supIdenTypes = ITTAnonymous.value |
            ITTPrincipalName.value |
            ITTX509CertChain.value |
            ITTDistinguishedName.value;
         // wrap it up
         context = new SAS_ContextSec((short) support,
            (short) require,
            privilAuth,
            supNamMechs,
            supIdenTypes);
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.