Borland VisiBroker® 7.0 - Borland Technical Publications

Borland VisiBroker® 7.0 - Borland Technical Publications Borland VisiBroker® 7.0 - Borland Technical Publications

11.07.2015 Views

CORBA authorizationCORBA authorizationAuthorization in the CORBA environment allows only identities in specific roles for agiven object can access that object. An object's access policy is specified by means ofa Quality of Protection policy for the Portable Object Adapter (POA) hosting the objectin question. Note that access policies can only be applied at the POA level.Rolemaps are also used to implement authorization for CORBA objects. Similarly, theJ2EE roles and concepts therein are also used in the CORBA environment.Setting up authorization for CORBA objectsIn order to set up authorization for an object, you need to perform the following:1 Create a ServerQopPolicy.2 Initialize the ServerQopPolicy with a ServerQopConfig object.3 Implement an AccessPolicyManager interface, which takes the following form:Java interface AccessPolicyManager {public java.lang.String domain();public com.borland.security.csiv2.ObjectAccessPolicy getAccessPolicy(org.omg.PortableServer.Servant servant, byte[] object_id byte []adapter_id);}C++ class AccessPolicyManager {public:virtual char* domain() =0;ObjectAccessPolicy_ptr getAccessPolicy(PortableServer_ServantBase*_servant,const ::PortableServer::ObjectId& id,const::CORBA::OctetSequence& _adapter_id) =0;}This interface should return the authorization domain from the domain() method anduses it to set the access manager in the ServerQopConfig object. The domain specifiesthe name of the authorization domain associated with the proper rolemap. You set thelocation and name of the rolemap by setting the property:vbroker.security.domain..48 VisiBroker Security Guide

CORBA authorizationwhere is a tautology, and is a relative pathto the rolemap file. The getAccessPolicy() method takes an instance of the servant, theobject identity, and the adapter identity and returns an implementation of theObjectAccessPolicy interface.1 Implement the ObjectAccessPolicy interface that returns the required roles and a runasrole for accessing a method of the object. There is no difference between J2EEand CORBA run-as roles in Borland's implementation. The ObjectAccessPolicyinterface takes the following form:Java interface ObjectAccessPolicy {public java.lang.String[] getRequiredRoles(java.lang.String method);public java.lang,String getRunAsRole(java.lang.String method);}C++ class ObjectAccessPolicy {public:getRequiredRoles (const char* _method) =0;}The getRequiredRoles() method takes a method name as its argument and returns asequence of roles. The getRunAsRole() method returns a run-as role, if any, foraccessing the method.Identities can be supplied using Callback Handlers. For more details, see Chapter 3,“Authentication.”Chapter 4: Authorization 49

CORBA authorizationwhere is a tautology, and is a relative pathto the rolemap file. The getAccessPolicy() method takes an instance of the servant, theobject identity, and the adapter identity and returns an implementation of theObjectAccessPolicy interface.1 Implement the ObjectAccessPolicy interface that returns the required roles and a runasrole for accessing a method of the object. There is no difference between J2EEand CORBA run-as roles in <strong>Borland</strong>'s implementation. The ObjectAccessPolicyinterface takes the following form:Java interface ObjectAccessPolicy {public java.lang.String[] getRequiredRoles(java.lang.String method);public java.lang,String getRunAsRole(java.lang.String method);}C++ class ObjectAccessPolicy {public:getRequiredRoles (const char* _method) =0;}The getRequiredRoles() method takes a method name as its argument and returns asequence of roles. The getRunAsRole() method returns a run-as role, if any, foraccessing the method.Identities can be supplied using Callback Handlers. For more details, see Chapter 3,“Authentication.”Chapter 4: Authorization 49

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!