FileDocCategorySizeDatePackage
EjbIORConfigurationDescriptor.javaAPI DocGlassfish v2 API9820Fri May 04 22:31:20 BST 2007com.sun.enterprise.deployment

EjbIORConfigurationDescriptor

public class EjbIORConfigurationDescriptor extends Object implements Serializable
This descriptor holds the security configuration of an EJB IOR.

Fields Summary
public static final String
NONE
public static final String
SUPPORTED
public static final String
REQUIRED
public static final String
USERNAME_PASSWORD
public static final String
DEFAULT_REALM
private String
integrity
private String
confidentiality
private String
establishTrustInTarget
private String
establishTrustInClient
private String
authenticationMethod
private String
realmName
private String
callerPropagation
private boolean
required
static Logger
_logger
Constructors Summary
public EjbIORConfigurationDescriptor()
Default constructor.

    
            
      
	try {	
	    if (Boolean.getBoolean("interop.ssl.required")) {
		integrity = REQUIRED;
		confidentiality = REQUIRED;
		establishTrustInClient = REQUIRED;
		establishTrustInTarget = SUPPORTED;
	    }

            if (Boolean.getBoolean("interop.authRequired.enabled")) {
		required = true;
		authenticationMethod = USERNAME_PASSWORD;
	    }
	} catch(Throwable ioe) {
	    //ioe.printStackTrace();
         _logger.log(Level.WARNING,"enterprise.deployment_ioexcp",ioe);
            
	    // ignore
	}
    
public EjbIORConfigurationDescriptor(boolean enableUsernamePassword)

	if(enableUsernamePassword) {
	    required = true;
	    authenticationMethod = USERNAME_PASSWORD;
	}
    
Methods Summary
public java.lang.StringgetAuthenticationMethod()
Return the authentication method used to authenticate clients. The default value is "username_password".

return
the authentication method.

	return authenticationMethod;
    
public java.lang.StringgetCallerPropagation()
Return the value of identity assertion in the SAS_Context layer.

return
the value (one of none, required or supported).

	return callerPropagation;
    
public java.lang.StringgetConfidentiality()
Get the value of the confidentiality element. Default value is "supported".

return
the value (one of supported, required, none).

	return confidentiality;
    
public java.lang.StringgetEstablishTrustInClient()
Get the value of establishTrustInClient in the transport layer. The default value is "supported".

return
the value (required, supported, or none)

	return establishTrustInClient;
    
public java.lang.StringgetEstablishTrustInTarget()
Get the value of establishTrustInTarget in the transport layer. The default value is "supported".

return
the value (required, supported, or none)

	return establishTrustInTarget;
    
public java.lang.StringgetIntegrity()
Get the value of the integrity element. Default value is "supported".

return
the value (one of supported, required, none).

	return integrity;
    
public java.lang.StringgetRealmName()
Return the realm name to authenticate the caller in. The default value is "default".

return
the realm name.

	return realmName;
    
public booleanisAuthMethodRequired()
Get whether the establishTrustInClient element is required in the AS_context.

return
the value (true or false).

	return required;
    
public voidprint(java.lang.StringBuffer toStringBuffer)
Returns a formatted String of the attributes of this object.

	toStringBuffer.append("\n integrity ").append(integrity);
	toStringBuffer.append( "\n confidentiality " ).append( confidentiality);
	toStringBuffer.append( "\n establishTrustInTarget ").append(establishTrustInTarget);
	toStringBuffer.append( "\n establishTrustInClient ").append(establishTrustInClient);
	toStringBuffer.append( "\n callerPropagation ").append(callerPropagation);
	toStringBuffer.append( "\n realm ").append(realmName);
	toStringBuffer.append( "\n authenticationMethod ").append(authenticationMethod).append("\n");
    
public voidsetAuthMethodRequired(boolean val)
Set whether the establishTrustInClient element should be required in the AS_context.

param
the value (true or false).

	required = val;
    
public voidsetAuthMethodRequired(java.lang.String val)
Set whether the establishTrustInClient element should be required in the AS_context.

param
the value (true or false).

	required = Boolean.valueOf(val).booleanValue();
    
public voidsetAuthenticationMethod(java.lang.String val)
Set the authentication method used to authenticate clients.

param
the authentication method.

	if(!val.equalsIgnoreCase(USERNAME_PASSWORD) && !val.equalsIgnoreCase(NONE)) {
	    throw new RuntimeException("Incorrect value for " + 
	    	"authentication method:" + val);
	}
	authenticationMethod = val;
    
public voidsetCallerPropagation(java.lang.String val)
Set the value of identity assertion in the SAS_Context layer.

param
the value (one of none, required or supported).

	if(!val.equalsIgnoreCase(NONE) && !val.equalsIgnoreCase(SUPPORTED) && 
	    !val.equalsIgnoreCase(REQUIRED)) {
	    throw new RuntimeException("Incorrect value for callerPropagation:" + val);
	}
	callerPropagation = val;
    
public voidsetConfidentiality(java.lang.String val)
Set the value of the confidentiality element to the specified value.

param
the value (one of supported, required, none).

	if(!val.equalsIgnoreCase(NONE) && !val.equalsIgnoreCase(SUPPORTED) && 
	    !val.equalsIgnoreCase(REQUIRED)) {
	    throw new RuntimeException("Incorrect value for confidentiality:" +
					val);
	}
	confidentiality = val;
    
public voidsetEstablishTrustInClient(java.lang.String val)
Set the value of establishTrustInClient in the transport layer.

param
the value (required, supported, or none)

	if(!val.equalsIgnoreCase(NONE) && !val.equalsIgnoreCase(SUPPORTED) && 
	    !val.equalsIgnoreCase(REQUIRED)) {
	    throw new RuntimeException("Incorrect value for " + 
	    	"establishTrustInClient:" + val);
	}

	establishTrustInClient = val;
    
public voidsetEstablishTrustInTarget(java.lang.String val)
Set the value of establishTrustInTarget in the transport layer.

param
the value (required, supported, or none)

	if(!val.equalsIgnoreCase(NONE) && !val.equalsIgnoreCase(SUPPORTED)) {
	    throw new RuntimeException("Incorrect value for " + 
	        "establishTrustInTarget:" + val);
	}

	establishTrustInTarget = val;
    
public voidsetIntegrity(java.lang.String val)
Set the value of the integrity element to the specified value.

param
the value (one of supported, required, none).

	if(!val.equalsIgnoreCase(NONE) && !val.equalsIgnoreCase(SUPPORTED) && 
	    !val.equalsIgnoreCase(REQUIRED)) {
	    throw new RuntimeException("Incorrect value for integrity:" + val);
	}

	integrity = val;
    
public voidsetRealmName(java.lang.String val)
Set the realm name to authenticate the caller in.

param
the realm name.

	realmName = val;