Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
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

At deployment time, the deployer of the client container (which may be an EJB, web, or application client container) should obtain the host/port of the server’s CosNaming service and the CosNaming name of the server EJBHome object (e.g. by browsing the server’s namespace) for each ejb-ref element in the client component’s deployment descriptor. The ejb-ref-name (which is used by the client code in the JNDI lookup call) should then be linked to the EJBHome object’s CosNaming name. At run-time, the client component’s JNDI lookup call uses the CosNaming service provider, which contacts the server’s CosNaming service, resolves the CosNaming name, and returns the EJBHome object reference to the client component.

Since the EJBHome object’s name is scoped within the namespace of the CosNaming service which is accessible at the provided host and port, it is not necessary to federate the namespaces of the client and server containers.

The advantage of using CosNaming is better integration with the IIOP infrastructure that is already required for interoperability, as well as interoperability with non-J2EE CORBA clients and servers. Since CosNaming stores only CORBA objects it is likely that vendors will use other enterprise directory services for storing other resources.

Security of CosNaming service access is achieved using the security interoperability protocol described in Section 18.7. The CosNaming service must support this protocol. Clients which construct the root NamingContext object reference from a URL should send an IIOP LocateRequest message to the CosNaming service to obtain the complete IOR (with SSL information) of the root NamingContext, and then initiate an SSL session with the CosNaming service.

18.7 Security Interoperability

This section describes the interoperable mechanisms which support secure invocations on enterprise beans in intranets. These mechanisms are based on the CORBA/IIOP protocol.

18.7.1 Introduction

The goal of the secure invocation mechanisms is to support the interoperability requirements described earlier in this chapter, as well as support security technologies that are expected to be widely deployed in enterprises, including Kerberos-based secret key mechanisms and X.509 certificate-based public key mechanisms.

The authentication identity (i.e. principal) associated with a J2EE component is usually that of the user on whose behalf the component is executing[32]. The principal under which an enterprise bean invocation is performed is either that of the bean’s caller or the runAs principal which was configured by the deployer. When there is a chain of invocations across web components and enterprise beans, an intermediate component may use the principal of the caller (the initiating client) or the intermediate component may use its runAs principal to perform an invocation on the callee.

[32]When there are concurrent invocations on a component from multiple clients, a different principal may be associated with the thread of execution for each invocation.

371

5/31/00

Sun Microsystems Inc.

Support for Distribution and Interoperability

Enterprise JavaBeans 2.0, Public Draft

Security Interoperability

The security principal associated with a container depends on the type of container. Application client containers usually do not have a separate principal associated with them (they operate under the user’s principal). Web and EJB containers are typically associated with a security principal of their own (e.g., the operating system user for the container’s process) which may be configured by the administrator at deployment time. When the client is a web or EJB container, the difference between the client component’s principal and the client container’s principal is significant for interoperability considerations.

18.7.1.1 Trust relationships between containers, principal propagation

C

 

 

S1

 

 

S2

 

 

 

 

application client

 

 

 

 

 

EJB or web

EJB container

or web client

container

(target)

(initiating client)

(intermediate)

 

When there is a chain of multiple invocations across web components and enterprise beans, intermediate components may not have access to the authentication data of the initiating client in order to provide proof of the client’s identity to the target. In such cases, the target’s authentication requirements can be satisfied if the target container trusts the intermediate container to vouch for the authenticity of the propagated principal. The call is made using the intermediate container’s principal and authentication data, while also carrying the propagated principal of the initiating client. The invocation on the target enterprise bean is authorized and performed using the propagated principal. This procedure also avoids the overhead associated with authentication of clients on every remote invocation in a chain.

EJB containers are required to provide deployers or administrators with the tools to configure trust relationships for interactions with intermediate web or EJB containers[33]. If a trust relationship is set up, the containers will usually be configured to perform mutual authentication, unless the security of the network can be ensured by some physical means. After a trust relationship is set up, the target EJB container does not need to independently authenticate the initiating client principal sent by the intermediate container on invocations. Thus only the principal name of the initiating client (which may include a realm) needs to be propagated.

For the current interoperability needs of J2EE, it is assumed that trust relationships are transitive, such that if a target container trusts an intermediate container, it implicitly trusts all containers trusted by the intermediate container.

If no trust relationship has been set up between a target EJB container and intermediate web or EJB containers, the target container needs to have access to and independently verify the propagated initiating client principal’s authentication data. Support for this scenario (where containers do not have a trust relationship) is not currently required.

[33] One way to achieve this is to configure a “trusted container list” (TCL) for each EJB container which contains the list of i ntermediate client containers that are trusted. If the TCL is empty, then the target EJB container does not have a trust relationship with any intermediate container.

5/31/00

372