Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Enterprise JavaBeans™ Specification, Version 2.0 - Sun Microsystems.pdf
Скачиваний:
14
Добавлен:
24.05.2014
Размер:
2.71 Mб
Скачать

Sun Microsystems Inc

Security Interoperability

Enterprise JavaBeans 2.0, Public Draft

Support for Distribution and Interoperability

Web and EJB containers are required to support at least caller propagation (where the initiating client’s principal is propagated down the chain of calls on enterprise beans). This is needed for scenarios 1, 3 and 4 where the internet or intranet user’s principal needs to be propagated to the target EJB container.

18.7.1.2 Application Client Authentication

Application client containers may authenticate the user by interacting with an authentication service (e.g. the Kerberos KDC) in the enterprise, may inherit an authentication context which was established at system login time from the operating system process, or may obtain the user’s certificate from a cli- ent-side store. These may be achieved by plugging in a Java Authentication and Authorization Service (JAAS) login module for the particular authentication service. After authentication is completed, a credential is associated with the client’s thread of execution, which is used for all invocations on enterprise beans made from that thread.

If there is no authentication infrastructure (such as certificates, Kerberos) installed in the client’s environment, the client may send its private credentials (e.g. password) over a secure connection to the EJB server, which authenticates the user by interacting with an authentication service (e.g. a secure user/password database). This is similar to the basic authentication feature of HTTP.

18.7.2 Securing EJB invocations

This subsection describes the interoperable protocol requirements for providing authentication, protection of integrity and confidentiality, and principal propagation for invocations on enterprise beans. The invocation takes place over an enterprise’s intranet as described in the scenarios in section 18.3. Since EJB invocations use the IIOP protocol, we need to secure IIOP messages between client and server containers. The client may be any of the J2EE containers and the server is an EJB container.

The secure interoperability requirements for EJB2.0 and other J2EE1.3 containers correspond to Conformance Level 0 of the Common Secure Interoperability version 2 (CSIv2) draft revised submission [ 20 ] which is under development by OMG.

The Secure Sockets Layer (SSL 3.0) protocol [ 19 ] and the related IETF standard Transport Layer Security (TLS 1.0) protocol [ 17 ] provide authentication and protection of integrity and confidentiality of messages at the transport layer. The original SSL and TLS specifications supported only X.509 certificates for authenticating principals. Recently, Kerberos-based authentication mechanisms and cipher suites have been added to TLS (RFC 2712 [ 18 ]). Thus the TLS specification supports the two main security technologies that are expected to be widely deployed in enterprises.

EJB, web and application client containers are required to support both SSL3.0 and TLS1.0 as security protocols for IIOP. This satisfies interoperability requirement 3 in section 18.3.5.

The following SSL and TLS cipher suites are required to be supported:

SSL_RSA_EXPORT_WITH_RC4_40_MD5

SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA

TLS_RSA_EXPORT_WITH_RC4_40_MD5

373

5/31/00

Sun Microsystems Inc.

Support for Distribution and Interoperability

Enterprise JavaBeans 2.0, Public Draft

Security Interoperability

TLS_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA

SSL_RSA_EXPORT_WITH_RC4_128_MD5

SSL_DHE_DSS_EXPORT_WITH_DES_CBC_SHA

TLS_RSA_EXPORT_WITH_RC4_128_MD5

TLS_DHE_DSS_EXPORT_WITH_DES_CBC_SHA

When using IIOP over SSL, a secure channel between client and server containers is established at the SSL layer. The SSL handshake layer handles authentication (either mutual or server-only) between containers, negotiation of cipher suite for bulk data encryption, and optionally provides a compression method. The SSL record layer performs confidentiality and integrity protection on application data. Since compliant J2EE products are already required to support SSL (HTTPS for Internet communication), this provides a relatively easier route to interoperable security.

18.7.2.1 Initiating a secure connection

Before initiating a secure connection to the EJB container, the client needs to know the hostname and port number at which the server is listening for SSL connections, and the security protocols supported or required by the server object. This information is obtained from the EJBObject or EJBHome reference’s IOR.

The CSIv2 draft revised submission [ 20 ] describes the TAG_CSI_SEC_MECH_LIST tagged component which must be included in EJBHome and EJBObject IORs. This component contains a sequence of CSIIOP::CompoundSecMech structures (in decreasing order of preference) which contain the target object’s security information for transport layer and service context layers. This structure contains the following nested tagged components.

TAG_SSL_SEC_TRANS: contains the SSLIOP::SSL structure which conveys the server’s SSL port and supported/required security options. The EstablishTrustInClient, EstablishTrustInTarget, Integrity and Confidentiality options must be set in the target_supports field of this component.

TAG_AS_CONTEXT_SEC: contains the CSIIOP::AS_ContextSec structure which describes the client authentication functionality supported by the target object using the CSIv2’s SAS service context protocol. EJBHome and EJBObject IORs must contain at least one CompoundSecMech structure with an AS_ContextSec component in which the client_authentication_mech field has the value for the username-password authentication mechanism.

TAG_SAS_CONTEXT_SEC: contains the CSIIOP::SAS_ContextSec structure which describes the security options supported and required by the target object. EJBHome and EJBObject IORs must contain at least one CompoundSecMech structure with an SAS_ContextSec component in which the target_supports field has the CallerPropagation option.

5/31/00

374

Sun Microsystems Inc

Security Interoperability

Enterprise JavaBeans 2.0, Public Draft

Support for Distribution and Interoperability

All compliant EJB containers are required to include the above tagged components in the IORs for EJBHome and EJBObject references, according to the Conformance Level 0 rules described in the CSIv2 draft revised submission. EJB containers may also allow access to enterprise beans over plain IIOP.

18.7.2.2 Propagating principals and authentication data in IIOP messages

To support propagation of client principals and authentication data between two containers using IIOP/SSL, the client container is required to include the invoking client’s principal and authentication data in the IIOP message service context, in accordance with the format and rules defined by the CSIv2 draft revised submission.

It is assumed that all information exchanged between client and server at the SSL layer is also available to the container: e.g. the certificates used for authentication at the SSL layer may be used by the container for authorization.

C

HTTP(S)

 

S1

IIOP/SSL

 

S2

IIOP/SSL

 

 

 

 

 

 

 

 

 

application client

 

 

 

 

 

EJB or web

 

 

EJB container

or web client

container

 

 

 

The following cases are required to be supported:

1.Application client invocations on enterprise beans with mutual authentication between the application client and EJB container (C and S1) at the SSL layer (scenario 2.1 in section 18.3.2, interoperability requirement 4.1 in section 18.3.5). This is possible when the enterprise has a Kerberos based authentication infrastructure or when client-side certificates have been installed. In this case no additional information is required to be included in the security context of the IIOP message sent from C to S1.

2.Application client invocations on enterprise beans with server-only authentication between the application client and EJB container (C and S1) at the SSL layer (scenario 2.2 in section 18.3.2, interoperability requirement 4.2 in section 18.3.5). This usually happens when there is no client-side authentication infrastructure. In this case the IIOP message service context must include the Security Attribute Service (SAS) context element (defined in the CSIv2 submission) with the client C’s authentication data. Once the EJB container S1 has authenticated the client, it may or may not maintain state about the client, so subsequent invocations from the client on the same SSL connection may need to be authenticated again. The SAS context must contain the following:

a client authentication token for the username/password authentication mechanism (which contains client C’s password and principal name), or some other authentication mechanism. This allows S1 to authenticate C.

an identity token which has the “absent” type to indicate that the client’s principal must be obtained from the client authentication token.

375

5/31/00

Sun Microsystems Inc.

Support for Distribution and Interoperability

Enterprise JavaBeans 2.0, Public Draft

Security Interoperability

3.Invocations from web/EJB clients to enterprise beans with a trust relationship between the client container S1 and server container S2 (scenario 3 in section 18.3.3, interoperability requirements 5 and 6 in section 18.3.5). S2 does not need to independently authenticate the initiating client C. The IIOP message sent from S1 to S2 must contain the Security Attribute Service context element with the following:

an identity token which contains either C’s principal, or the RunAs principal of the J2EE component in S1, or the anonymous principal type if C did not authenticate itself to S1. The principal may be propagated as an X.509 certificate or as a typed principal name encoded using the formats described in the CSIv2 submission.

a client authentication token which is of length zero if S1 and S2 mutually authenticated at the SSL layer.

J2EE containers are required to support the stateless mode of propagating principal and authentication information defined in CSIv2 (where the server does not store any state for a particular client principal across invocations), and may optionally support the stateful mode.

The caller principal String provided by EJBContext.getCallerPrincipal().getName() is defined as follows:

For case 1, the principal is the distinguished name obtained from the client’s X.509 certificate which was provided to the server during SSL mutual authentication.

For case 2, the principal is the username obtained from the client authentication token in the Security Attribute Service context of the IIOP message.

For case 3, if the client’s X.509 certificate was propagated in the identity token in the Security Attribute Service Context then the principal is the distinguished name from the certificate. If the client’s principal was propagated as a typed principal in the Security Attribute Service Context, then the mechanism-specific principal name is returned. If the anonymous principal type was propagated, then getCallerPrincipal().getName() returns a product-specific unauthenticated principal name.

18.7.2.3SSL configuration for containers

Since the interoperability scenarios involve IIOP/SSL usage in intranets, it is assumed that client and server container administrators cooperatively configure a consistent set of security policies for the enterprise.

At product installation or application deployment time, client and server container administrators may configure the container and SSL infrastructure as described below. These preferences may be specified at any level of granularity (e.g. per host or per container process or per enterprise bean).

Configure the list of supported SSL cipher suites in preference order.

For server containers, configure a list of trusted client container principals with whom the server has a trust relationship.

Configure authentication preferences and requirements (e.g. if the server prefers authenticated clients to anonymous clients). In particular, if a trust relationship has been configured between

5/31/00

376