Package com.sun.enterprise.deployment

Examples of com.sun.enterprise.deployment.EjbIORConfigurationDescriptor


  if (size == 0) {
      // No IOR config descriptors:
      // Either none were configured or 1.2.x app.

      // Create an IOR config desc with SSL supported
      EjbIORConfigurationDescriptor eDesc =
    new EjbIORConfigurationDescriptor();
      eDesc.setIntegrity(
    EjbIORConfigurationDescriptor.SUPPORTED);
      eDesc.setConfidentiality(
    EjbIORConfigurationDescriptor.SUPPORTED);
      eDesc.setEstablishTrustInClient(
    EjbIORConfigurationDescriptor.SUPPORTED);
      iorDescSet.add(eDesc);
      size = 1;

      // Check if method permissions are set on the descriptor.
      // If they are then enable username_password mechanism in as_context
      Set permissions = desc.getPermissionedRoles();
      if (permissions.size() > 0) {
                if(_logger.isLoggable(Level.FINE)){
                    _logger.log(Level.FINE,"IIOP:Application has protected methods");
                }

          eDesc.setAuthMethodRequired(true);

                if (_realm_name != null) {
                    eDesc.setRealmName(_realm_name);
                }
      }
  }

  return (Set<EjbIORConfigurationDescriptor>)iorDescSet ;
View Full Code Here


        if(_logger.isLoggable(Level.FINE)){
        _logger.log(Level.FINE,"IORDescSet SIZE:" + iorDescSet.size());
  }

  for(int i = 0; i < iorDescSet.size(); i++) {
      EjbIORConfigurationDescriptor iorDesc = itr.next();
            int target_requires = getTargetRequires(iorDesc);
      org.omg.IOP.TaggedComponent comp = maker.evaluate( iorDesc ) ;
     
      // Create AS_Context
            AS_ContextSec asContext = createASContextSec(iorDesc);
View Full Code Here

  Iterator<EjbIORConfigurationDescriptor> itr =
      iorDescSet.iterator();

  for(int i = 0; i < size; i++) {
      EjbIORConfigurationDescriptor iorDesc = itr.next();
            int target_requires = getTargetRequires(iorDesc);
      if(target_requires == 0) {
    return false;
      }
  }
View Full Code Here

                logger.finest(" IOR configuration:");
                Set iors = ejb.getIORConfigurationDescriptors();
                if (iors != null) {
                    Iterator iorsi = iors.iterator();
                    while (iorsi.hasNext()) {
                        EjbIORConfigurationDescriptor ior =
                            (EjbIORConfigurationDescriptor)iorsi.next();
                        StringBuffer iorsb = new StringBuffer();
                        iorsb.append("realm=");
                        iorsb.append(ior.getRealmName());
                        iorsb.append(", integrity=");
                        iorsb.append(ior.getIntegrity());
                        iorsb.append(", trust-in-target=");
                        iorsb.append(ior.getEstablishTrustInTarget());
                        iorsb.append(", trust-in-client=");
                        iorsb.append(ior.getEstablishTrustInClient());
                        iorsb.append(", propagation=");
                        iorsb.append(ior.getCallerPropagation());
                        iorsb.append(", auth-method=");
                        iorsb.append(ior.getAuthenticationMethod());
                        logger.finest(iorsb.toString());
                    }
                }
            }
        }
View Full Code Here

        Iterator ejbs = bundleDescriptor.getEjbs().iterator();
        for(; ejbs.hasNext();){
            EjbDescriptor ejb = (EjbDescriptor) ejbs.next();
            Iterator iorconfig = ejb.getIORConfigurationDescriptors().iterator();
            for (;iorconfig.hasNext(); ){
                EjbIORConfigurationDescriptor desc =
                    (EjbIORConfigurationDescriptor)iorconfig.next();
                desc.setRealmName(rlm);
            }
        }
    }
View Full Code Here

        // go through each EjbIORConfigurationDescriptor trying to find
        // a find a CompoundSecMechanism that matches client's actions.
        boolean checkSkipped = false;
        for (Iterator itr = iorDescSet.iterator(); itr.hasNext();) {
            EjbIORConfigurationDescriptor iorDesc =
                (EjbIORConfigurationDescriptor) itr.next();
            if(skip_client_conformance(iorDesc)){
    if(_logger.isLoggable(Level.FINE)) {
        _logger.log(Level.FINE,
        "SecurityMechanismSelector.evaluate_client_conformance: skip_client_conformance");
View Full Code Here

        // go through each EjbIORConfigurationDescriptor trying to find
        // a find a CompoundSecMechanism that matches client's actions.
        boolean checkSkipped = false;
        for (Iterator itr = iorDescSet.iterator(); itr.hasNext();) {
            EjbIORConfigurationDescriptor iorDesc =
                (EjbIORConfigurationDescriptor) itr.next();
            if(skip_client_conformance(iorDesc)){
    if(_logger.isLoggable(Level.FINE)) {
        _logger.log(Level.FINE,
        "SecurityMechanismSelector.evaluate_client_conformance: skip_client_conformance");
    }
                checkSkipped = true;
                continue;
            }
            if (! evaluate_client_conformance_ssl(iorDesc, ssl_used, certchain)){
    if(_logger.isLoggable(Level.FINE)) {
        _logger.log(Level.FINE,
        "SecurityMechanismSelector.evaluate_client_conformance: evaluate_client_conformance_ssl");
    }
                checkSkipped = false;
                continue;
            }
            String realmName = "default";
            if(ejbDesc != null && ejbDesc.getApplication() != null) {
                realmName = ejbDesc.getApplication().getRealm();
            }
            if(realmName == null) {
                realmName = iorDesc.getRealmName();
            }
            if (realmName == null) {
                realmName = "default";
            }
            if ( ! evaluate_client_conformance_ascontext(ctx, iorDesc ,realmName)){
View Full Code Here

    sslRequired = true;
      }

      // initialize corbaIORDescSet with security config for CORBA objects
      corbaIORDescSet = new HashSet<EjbIORConfigurationDescriptor>();
      EjbIORConfigurationDescriptor iorDesc =
              new EjbIORConfigurationDescriptor();
      EjbIORConfigurationDescriptor iorDesc2 =
              new EjbIORConfigurationDescriptor();
      String serverSslReqd =
                    (orbHelper.getCSIv2Props()).getProperty(GlassFishORBHelper.ORB_SSL_SERVER_REQUIRED);
      if ( serverSslReqd != null && serverSslReqd.equals("true") ) {
    iorDesc.setIntegrity(EjbIORConfigurationDescriptor.REQUIRED);
    iorDesc.setConfidentiality(
          EjbIORConfigurationDescriptor.REQUIRED);
    iorDesc2.setIntegrity(EjbIORConfigurationDescriptor.REQUIRED);
    iorDesc2.setConfidentiality(
          EjbIORConfigurationDescriptor.REQUIRED);
      }
      String clientAuthReq =
    (orbHelper.getCSIv2Props()).getProperty(GlassFishORBHelper.ORB_CLIENT_AUTH_REQUIRED);
      if ( clientAuthReq != null && clientAuthReq.equals("true") ) {
    // Need auth either by SSL or username-password.
    // This sets SSL clientauth to required.
    iorDesc.setEstablishTrustInClient(
          EjbIORConfigurationDescriptor.REQUIRED);
    // This sets username-password auth to required.
    iorDesc2.setAuthMethodRequired(true);
    getCorbaIORDescSet().add(iorDesc2);
      }
      getCorbaIORDescSet().add(iorDesc);

        } catch(Exception e) {
View Full Code Here

  if (size == 0) {
      // No IOR config descriptors:
      // Either none were configured or 1.2.x app.

      // Create an IOR config desc with SSL supported
      EjbIORConfigurationDescriptor eDesc =
    new EjbIORConfigurationDescriptor();
      eDesc.setIntegrity(
    EjbIORConfigurationDescriptor.SUPPORTED);
      eDesc.setConfidentiality(
    EjbIORConfigurationDescriptor.SUPPORTED);
      eDesc.setEstablishTrustInClient(
    EjbIORConfigurationDescriptor.SUPPORTED);
      iorDescSet.add(eDesc);
      size = 1;

      // Check if method permissions are set on the descriptor.
      // If they are then enable username_password mechanism in as_context
      Set permissions = desc.getPermissionedRoles();
      if (permissions.size() > 0) {
                if(_logger.isLoggable(Level.FINE)){
                    _logger.log(Level.FINE,"IIOP:Application has protected methods");
                }

          eDesc.setAuthMethodRequired(true);
                String realmName = DEFAULT_REALM;


                if (desc.getApplication() != null) {
                    realmName = desc.getApplication().getRealm();
                }
               
                if (realmName == null) {
                    realmName = DEFAULT_REALM;
                }
                eDesc.setRealmName(realmName);
      }
  }

  return (Set<EjbIORConfigurationDescriptor>)iorDescSet ;
    }
View Full Code Here

        _logger.log(Level.FINE,"IORDescSet SIZE:" + iorDescSet.size());
  }
        String realmName = DEFAULT_REALM;

  for(int i = 0; i < iorDescSet.size(); i++) {
      EjbIORConfigurationDescriptor iorDesc = itr.next();
            int target_requires = getTargetRequires(iorDesc);
      org.omg.IOP.TaggedComponent comp = maker.evaluate( iorDesc ) ;
     
            if(desc != null && desc.getApplication() != null)  {
                realmName = desc.getApplication().getRealm();
            }

            if(realmName == null) {
                realmName = iorDesc.getRealmName();
            }

            if(realmName == null) {
                realmName = DEFAULT_REALM;
            }
View Full Code Here

TOP

Related Classes of com.sun.enterprise.deployment.EjbIORConfigurationDescriptor

Copyright © 2018 www.massapicom. 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.