Note:

Extension of the classes in this package is prohibited unless otherwise documented. Similarly, extension or implementation of the interfaces in this package is prohibited except as documented.

Package com.sas.services.information.metadata


@CodeSet("sas.platform") @SASScope("ALL") package com.sas.services.information.metadata
Information Service metadata.

How to Use the SAS Metadata Authorization Interfaces

    Introduction

    Introduced in 9.3, the SAS Metadata Authorization Services provide a set of interfaces for managing authorizations on MetadataInterface objects and also for AccessControlTemplateInterface definitions. These interfaces insulate consuming code from direct interaction with authorization interfaces provided by the SAS Metadata Server. The following operations are done for a specific MetadataInterface or AccessControlTemplateInterface object.

  • Setting a direct authorization by granting or denying permission to an IdentityInterface on the object. The identity can be an individual user or a group. The PermissionInfoInterface provides constants corresponding to the pre-defined set of SAS Metadata permissions as well as related getter and setter methods.
  • Getting the permission grant or deny settings for the object. Some of these permissions may be set directly on the object. Other permissions are inherited from a parent object that the object inherits authorizations from. Authorization inheritance relationships are defined by the SAS Open Metadata Server.
  • Getting the set of identities that have permissions set for the object. These include identities providing direct and/or inherited permissions. Each identity is represented by an AuthorizationIdentityInfoInterface instance.
  • Getting the "explain" details for permissions set on the object. This is provided by the PermissionExplainedInfoInterface via a set of nested IndirectPermissionInfoInterface instances.
  • Managing AccessControlTemplateInterface instances that project an MetadataInterface object.
  • Committing or discarding pending authorization changes on a MetadataInterface or AccessControlTemplateInterface instance.


    Basic Authorization Interfaces

    AuthorizationUtilInterface

    The AuthorizationUtilInterface provides a set of methods for managing authorizations that protect a SAS Java Metadata object. Before any of these methods can be called, the AuthorizationUtilInterface must be obtained for the MetadataInterface object. The AuthorizationUtilInterface extends AuthorizationBaseInterface and defines additional methods used to manage AccessControlTemplateInterface instances that protect other objects. See the section Methods for managing AccessControlTemplates that protect objects for more information on this.

    Example 1: Obtaining the AuthorizationUtilInterface for a MetadataInterface

    AuthorizationBaseInterface

    AuthorizationBaseInterface provides the common methods necessary for managing direct permissions settings that protect MetadataInterface objects as well as those permission settings that define an AccessControlTemplateInterface. When used to to manage permissions settings that define an AccessControlTemplate, the methods must be invoked from an AuthorizationBaseInterface obtained from calling the AccessControlTemplateInterface.getAuthorizationDefinitionUtil() method.

    Example 2: Obtaining the AuthorizationBaseInterface for authorization definitions on an AccessControlTemplateInterface

    AuthorizationIdentityInfoInterface

    The AuthorizationIdentityInfoInterface represents an Identity that has one or more permissions set for the MetadataInterface object. An instance of AuthorizationIdentityInfoInterface contains an IdentityInterface representing the actual Identity object as well as other authorization-related attributes about the Identity. These attributes include membership in various special roles as well as whether or not the Identity's permissions are set directly on the MetadataInterface object and/or come via inheritance.

    Example 3: Getting the AuthorizationIdentityInfoInterface List for permissions set on an object

    PermissionInfoInterface

    The PermissionInfoInterface represents a permission for the MetadataInterface object. The following examples demonstrate using a List of PermissionInfoInterface instances to get or set permissions on the MetadataInterface object for a single identity in a single call.

    Example 4: Getting the PermissionInfoInterface List for a single identity
    Example 5: Setting the PermissionInfoInterface List for a single identity

    AuthorizationInfoInterface

    The permissions represents an Identity and its permission list for the MetadataInterface object. The following examples demonstrate using a List of AuthorizationIdentityInfoInterface instances to get or set permissions on the MetadataInterface object for multiple identities in a single call.

    Example 6: Getting the AuthorizationInfoInterface List for multiple identities
    Example 7: Setting the AuthorizationInfoInterface List for multiple identities


    Explain Authorization Interfaces

    AuthorizationExplainedInfoInterface

    The AuthorizationExplainedInfoInterface represents a nested set of objects that describe the source of each requested permission. These are represented by:

    IndirectPermissionInfoInterface

    The IndirectPermissionInfoInterface represents the source of an permission that is not set directly on the MetadataInterface object. Indirect permissions come from a Group membership, AccessControlTemplate, or Inheritance Parent object.

    PermissionExplainedInfoInterface

    The PermissionExplainedInfoInterface extends the PermissionInfoInterface and anchors a nested List of IndirectPermissionInfoInterface instances.

    Example 8: Getting the AuthorizationExplainedInfoInterface List for a single identity
    Example 9: Getting the AuthorizationExplainedInfoInterface List for multiple identities
    Example 10: Getting the AuthorizationExplainedInfoInterface List for All identities and permissions


    AccessControlTemplate Usage

    Methods for managing AccessControlTemplates that protect objects

    Note: these methods are only available on the AuthorizationUtilInterface obtained as shown in Example 1.

    Example 11: Getting the List of AccessControlTemplateInterface instances that protect an object
    Example 12: Setting an AccessControlTemplateInterface to protect an object
    Example 13: Removing an AccessControlTemplateInterface from protecting an object


    Managing Pending Authorization Changes

    Several methods on the AuthorizationUtilInterface (for MetadataInterface authorization) and the AuthorizationBaseInterface (for AccessControlTemplate definition) result in pending changes that are queued in the SAS Metadata Server. These changes are not persisted until specific action is taken to do so. There are two ways to make this happen. The first is to call the object's MetadataInterface.update() or AccessControlTemplateInterface.update() method which by default*** results in any object attribute changes as well as any pending authorization changes being persisted to the SAS Metadata Server. The second commits pending authorization changes independently of object-related attribute changes made to the MetadataInterface or AccessControlTemplateInterface instance. This is accomplish by calling AuthorizationUtilInterface.commit() in the object authorizations scenario -OR- AuthorizationBaseInterface.commit() in the AccessControlTemplate definition scenario.

    ***By default the CommitOnUpdate directive is set true for each instance of an AuthorizationUtilInterface or AuthorizationBaseInterface. This results in pending authorization changes being committed to the SAS Metadata Server along with any object attribute value changes. If your usage has cases where the update() method should not also commit pending authorization changes then invoke AuthorizationUtilInterface.setCommitOnUpdate(false) in the object authorizations scenario -OR- AuthorizationBaseInterface.setCommitOnUpdate(false) in the AccessControlTemplate definition scenario. When this is the desired behavior then setCommitOnUpdate(false) must be invoked prior to update(). This will cause the update() method to only commit object-related attribute changes while any pending authorization changes remain queued in the SAS Metadata Server. A corresponding call to setCommitOnUpdate(true) will revert to the default behavior.

    Example 14: Using update() with pending authorization changes
    Example 15: Committing authorization changes
    Example 16: Discarding authorization changes


    Example 1: Obtaining the AuthorizationUtilInterface for a MetadataInterface

    This is an example of how to get the AuthorizationUtilInterface for a SAS Services-level Metadata object.

      try
      {
          MetadataInterface object;  // any Services-level MetadataInterface object type will work here (your code must fill this in)
          AuthorizationUtilInterface authUtil = object.getAuthorizationUtil();
      }
      catch (ServiceException e)
      {
          e.printStackTrace();
      }
      catch (RemoteException e)
      {
          e.printStackTrace();
      }
            

    Example 2: Obtaining the AuthorizationBaseInterface for authorization definitions on an AccessControlTemplateInterface.

    This is an example of how to get the AuthorizationBaseInterface for a AccessControlTemplateInterface definition. The interface provides methods to manage permissions and identities that define the AccessControlTemplate.

      try
      {
          AccessControlTemplateInterface act;  // only provide an AccessControlTemplateInterface-type object in this case (your code must fill this in)
          AuthorizationBaseInterface authBase = act.getAuthorizationDefinitionUtil();
      }
      catch (ServiceException e)
      {
          e.printStackTrace();
      }
      catch (RemoteException e)
      {
          e.printStackTrace();
      }
            

    Example 3: Getting the AuthorizationIdentityInfoInterface List for permissions set on an object

    This is an example of getting the AuthorizationIdentityInfoInterface objects for permissions set on a MetadataInterface object.

      try
      {
          MetadataInterface object;  // any Services-level MetadataInterface object type will work here (your code must fill this in)
          AuthorizationUtilInterface authUtil = object.getAuthorizationUtil();
          List<AuthorizationIdentityInfoInterface>authIdentityInfoList = authUtil.getIdentities();
          for ( AuthorizationIdentityInfoInterface authIdentityInfo : authIdentityInfoList )
          {
              // Example showing authorization identity-related attributes for
              // each returned AuthorizationIdentityInfoInterface instance
              authIdentityInfo.getIdentity();
              authIdentityInfo.isDirect();
              authIdentityInfo.isInherited();
              authIdentityInfo.isInOperatorsRole();
              authIdentityInfo.isInUnrestricedRole();
              authIdentityInfo.isInUserAdminsRole();
              authIdentityInfo.isNew();
          }
      }
      catch (ServiceException e)
      {
          e.printStackTrace();
      }
      catch (RemoteException e)
      {
          e.printStackTrace();
      }
            

    Example 4: Getting the PermissionInfoInterface List for a single identity

    This is an example of getting the List of PermissionInfoInterface instances for a single IdentityInterface.

      try
      {
          MetadataInterface object;  // any Services-level MetadataInterface object type will work here (your code must fill this in)
          AuthorizationUtilInterface authUtil = object.getAuthorizationUtil();
          IdentityInterface identity; // Some IdentityInterface object (probably from the List returned by Example 2.
          List <String>permissions = Collections.emptyList(); // Indicate empty list to get all applicable Permissions for the object
          List <PermissionInfoInterface>permInfoList = authUtil.getAuthorizations(identity, permissions);
          for ( PermissionInfoInterface permInfo : permInfoList )
          {
              // Example showing permission-related attributes for each returned PermissionInfoInterface instance
              permInfo.getPermission();
              permInfo.getPermissionType();
              permInfo.getPermissionSource();
              permInfo.getPermissionCondition();
          }
      }
      catch (ServiceException e)
      {
          e.printStackTrace();
      }
      catch (RemoteException e)
      {
         e.printStackTrace();
      }
      

    Example 5: Setting the PermissionInfoInterface List for a single identity

    This is an example of setting the List of PermissionInfoInterface instances for a single IdentityInterface object. Each PermissionInfoInterface instance added to the List represents the GRANT or DENY for valid Permission name. A Permission name should only be granted or denied once.

      try
      {
          MetadataInterface object;  // any Services-level MetadataInterface object type will work here (your code must fill this in)
          AuthorizationUtilInterface authUtil = object.getAuthorizationUtil();
          IdentityInterface identity;  // The IdentityInterface for which Permissions are being set.
          // GRANT ReadMetadata and DENY WriteMetdata for this Identity
          List <PermissionInfoInterface>permInfoList = new ArrayList<PermissionInfoInterface>(2);
          permInfoList.add(new PermissionInfo(PermissionType.GRANT, PermissionInfoInterface.PERMISSION_READMETADATA ));
          permInfoList.add(new PermissionInfo(PermissionType.DENY, PermissionInfoInterface.PERMISSION_WRITEMETADATA ));
          authUtil.setAuthorizations(Identity, permInfoList);
      }
      catch (ServiceException e)
      {
         e.printStackTrace();
      }
      catch (RemoteException e)
      {
         e.printStackTrace();
      }
      

    Example 6: Getting the AuthorizationInfoInterface List for multiple identities

    This is an example of getting the List of AuthorizationInfoInterface instances for more than one Identity object. Note that the return value differs from the single Identity usage in Example 4. Because AuthorizationUtilInterface.getAuthorizations() will return Permission Info for multiple Identities, it is necessary to encapsulate the PermissionInfoInterface List for each returned Identity. AuthorizationInfoInterface does exactly that.

      try
      {
          MetadataInterface object;  // any Services-level MetadataInterface object type will work here (your code must fill this in)
          AuthorizationUtilInterface authUtil = object.getAuthorizationUtil();
          List <IdentityInterface>identities; // A List of Identity objects (probably from the List returned by Example 2.)
          List <String>permissions = Collections.emptyList(); // Indicate empty list to get all applicable Permissions for the object
          List <AuthorizationInfoInterface>authInfoList = authUtil.getAuthorizations(identities, permissions);
      }
      catch (ServiceException e)
      {
          e.printStackTrace();
      }
      catch (RemoteException e)
      {
         e.printStackTrace();
      }
      

    Example 7: Setting the AuthorizationInfoInterface List for multiple identities

    This is an example of invoking AuthorizationUtilInterface.setAuthorizations() with a List of AuthorizationInfoInterface instances that represent permissions set for multiple IdentityInterface objects.

      try
      {
          MetadataInterface object;  // any Services-level MetadataInterface object type will work here (your code must fill this in)
          AuthorizationUtilInterface authUtil = object.getAuthorizationUtil();
    
          // Instance a List to contain MdAuthorizationInfo instances created below
          List <AuthorizationInfoInterface>authInfoList = new ArrayList<AuthorizationInfoInterface>(2);
    
          IdentityInterface identity1;  // The first IdentityInterface for which permissions are being set (your code must set this Identity object value)
          List <MdPermissionInfo>permInfoList1 = new ArrayList<MdPermissionInfo>(2);
          permInfoList1.add(new PermissionInfo(PermissionType.GRANT, PermissionInfoInterface.PERMISSION_READMETADATA ));
          permInfoList1.add(new PermissionInfoInterfaceImpl(PermissionType.DENY, PermissionInfoInterface.PERMISSION_WRITEMETADATA ));
          authInfoList.add(new AuthorizationInfo(identity1, permInfoList1);
    
          IdentityInterface identity2;  // The second IdentityInterface for which permissions are being set (your code must set this Identity object value)
          List <PermissionInfoInterface>permInfoList2 = new ArrayList<PermissionInfoInterface>(3);
          permInfoList2.add(new PermissionInfo(PermissionType.DENY, PermissionInfoInterface.PERMISSION_READ ));
          permInfoList2.add(new PermissionInfo(PermissionType.DENY, PermissionInfoInterface.PERMISSION_WRITE ));
          permInfoList2.add(new PermissionInfo(PermissionType.DENY, PermissionInfoInterface.PERMISSION_DELETE ));
          authInfoList.add(new AuthorizationInfo(identity2, permInfoList2);
    
          IdentityInterface identity3;  // The third IdentityInterface for which permissions are being set (your code must set this Identity object value)
          List <PermissionInfoInterface>permInfoList3 = new ArrayList<PermissionInfoInterface>(4);
          permInfoList3.add(new PermissionInfo(PermissionType.GRANT, PermissionInfoInterface.PERMISSION_CHECKINMETADATA ));
          permInfoList3.add(new PermissionInfo(PermissionType.GRANT, PermissionInfoInterface.PERMISSION_CREATE ));
          permInfoList3.add(new PermissionInfo(PermissionType.GRANT, PermissionInfoInterface.PERMISSION_ADMINISTER ));
          permInfoList3.add(new PermissionInfo(PermissionType.DENY, PermissionInfoInterface.PERMISSION_DELETE ));
          authInfoList.add(new AuthorizationInfo(identity3, permInfoList3);
    
          authUtil.setAuthorizations(authInfoList);
      }
      catch (ServiceException e)
      {
          e.printStackTrace();
      }
      catch (RemoteException e)
      {
          e.printStackTrace();
      }
      

    Example 8: Getting the AuthorizationExplainedInfoInterface List for a single identity with permissions specified

    This is an example of getting the List of AuthorizationExplainedInfoInterface instances for a single IdentityInterface and two specified permissions.

      try
      {
          MetadataInterface object;  // any Services-level MetadataInterface object type will work here (your code must fill this in)
          AuthorizationUtilInterface authUtil = object.getAuthorizationUtil();
          IdentityInterface identity; // Some IdentityInterface object
          List <String>permissions = new ArrayList(2); // Get an ArrayList instance for the permission strings
          permissions.add(PermissionInfoInterface.PERMISSION_READ);
          permissions.add(PermissionInfoInterface.PERMISSION_WRITE);
          List authExplainedInfoList = authUtil.getAuthorizationsExplained(identity, permissions);
          for ( AuthorizationExplainedInfoInterface authExplainedInfo : authExplainedInfoList )
          {
              // Example showing authorization explain-related attributes for each returned AuthorizationExplainedInfoInterface
              // instance.  NOTE: IndirectPermissionInfoInterface instances can be nested to arbitrary levels
            List <PermissionExplainedInfoInterface> permExplainedInfoList =
                  authExplainedInfo.getPermissionExplainedInfoList();
              for ( PermissionExplainedInfoInterface permExplainedInfo : permExplainedInfoList )
              {
                  List <IndirectPermissionInfoInterface> indirectPermInfoList1 =
                      permExplainedInfo.getIndirectPermissionInfo();
                  // NOTE:  Concentric loops demonstrate nesting of Indirect Permission level information
                  //        A common scenario represents a Permission for an Identity where the Identity
                  //        member in a Group.  The permission is set on the Group via an ACT applied to
                  //        an Inheritance parent.  IndirectPermissionInfoInterface represent this info
                  //        with nesting the following levels:
                  //            level 1 : Inheritance Parent
                  //               level 2 : Group
                  //                  level 3 : AccessControlTemplate
                  if (indirectPermInfoList1 != null)
                  {
                      for ( IndirectPermissionInfoInterface ndirPermInfo : indirectPermInfoList1 )
                      {
                          List <IndirectPermissionInfoInterface> indirectPermInfoList2 =
                              permExplainedInfo.getIndirectPermissionInfo();
                          if (indirectPermInfoList2 != null)
                          {
                              for ( IndirectPermissionInfoInterface ndirPermInfo2 : indirectPermInfoList2 )
                                    // nesting could continue
                          }
                      }
                  }
              }
          }
      }
      catch (ServiceException e)
      {
         e.printStackTrace();
      }
      catch (RemoteException e)
      {
         e.printStackTrace();
      }
      

    Example 9: Getting the AuthorizationExplainedInfoInterface List for multiple identities with permissions specified

    This is an example of getting the List of AuthorizationExplainedInfoInterface instances for a single IdentityInterface and three specified permissions.

      try
      {
          MetadataInterface object;  // any Services-level MetadataInterface object type will work here (your code must fill this in)
          AuthorizationUtilInterface authUtil = object.getAuthorizationUtil();
          List <IdentityInterface>identities; // A List of Identity objects (probably from the List returned by Example 2.)
          List <String>permissions = new ArrayList(3); // Get an ArrayList instance for the permission strings
          permissions.add(PermissionInfoInterface.PERMISSION_CREATETABLE);
          permissions.add(PermissionInfoInterface.PERMISSION_ALTERTABLE);
          permissions.add(PermissionInfoInterface.PERMISSION_ADMINISTER);
          List <AuthorizationExplainedInfoInterface>authInfoList = authUtil.getAuthorizationsExplained(identities, permissions);
      }
      catch (ServiceException e)
      {
          e.printStackTrace();
      }
      catch (RemoteException e)
      {
          e.printStackTrace();
      }
      

    Example 10: Getting the AuthorizationExplainedInfoInterface List for All identities and permissions

    This is an example of getting the List of AuthorizationExplainedInfoInterface instances for All identities and permissions.

      try
      {
          MetadataInterface object;  // any Services-level MetadataInterface object type will work here (your code must fill this in)
          AuthorizationUtilInterface authUtil = object.getAuthorizationUtil();
          List <AuthorizationExplainedInfoInterface>authInfoList = authUtil.getAuthorizationsExplainedAll();
      }
      catch (ServiceException e)
      {
          e.printStackTrace();
      }
      catch (RemoteException e)
      {
          e.printStackTrace();
      }
      

    Example 11: Getting the List of AccessControlTemplateInterface instances that protect an object

    This is an example of getting the List of AccessControlTemplateInterface instances for a MetadataInterface object.

      try
      {
          MetadataInterface object;  // any Services-level MetadataInterface object type will work here (your code must fill this in)
          AuthorizationUtilInterface authUtil = object.getAuthorizationUtil();
          List <AccessControlTemplateInterface>authInfoList = authUtil.getACTs();
      }
      catch (ServiceException e)
      {
          e.printStackTrace();
      }
      catch (RemoteException e)
      {
          e.printStackTrace();
      }
      

    Example 12: Setting an AccessControlTemplateInterface to protect an object

    This is an example of setting an AccessControlTemplateInterface on a MetadataInterface object so that all authorizations defined in the AccessControlTemplate are applied to this object. If the AccessControlTemplate definition is changed this will be reflected in all of the MetadataInterface objects that it protects.

      try
      {
          MetadataInterface object;  // any Services-level MetadataInterface object type will work here (your code must fill this in)
          AuthorizationUtilInterface authUtil = object.getAuthorizationUtil();
          authUtil.applyACT();
      }
      catch (ServiceException e)
      {
          e.printStackTrace();
      }
      catch (RemoteException e)
      {
          e.printStackTrace();
      }
      

    Example 13: Removing an AccessControlTemplateInterface from protecting an object

    This is an example of removing an AccessControlTemplateInterface so it no longer protects the MetadataInterface object that the AuthorizationUtilInterface was obtained for. This removal only effects the specified MetadataInterface instance and does not impact any other objects protected by the AccessControlTemplate.

      try
      {
          MetadataInterface object;  // any Services-level MetadataInterface object type will work here (your code must fill this in)
          AuthorizationUtilInterface authUtil = object.getAuthorizationUtil();
          authUtil.removeACT();
      }
      catch (ServiceException e)
      {
          e.printStackTrace();
      }
      catch (RemoteException e)
      {
          e.printStackTrace();
      }
      

    Example 14: Using update() with pending authorization change

    This is an example of persisting both authorization and object-level attribute changes to the SAS Metadata Server by invoking the MetadataInterface.update() method.

      try
      {
          MetadataInterface object;  // any Services-level MetadataInterface object type will work here (your code must fill this in)
          AccessControlTemplateInterface act; // an existing AccessControlTemplate with authorization definitions already set up
          AuthorizationUtilInterface authUtil = object.getAuthorizationUtil();
    
          IdentityInterface identity;  // The IdentityInterface for which permissions are being set (your code must set this Identity object value)
          List <MdPermissionInfo>permInfoList = new ArrayList<MdPermissionInfo>(1);
          permInfoList1.add(new PermissionInfo(PermissionType.GRANT, PermissionInfoInterface.PERMISSION_ADMINISTER ));
    
          // Perform the authorization changes on 'object'
          authUtil.setAuthorizations(identity, permInfoList);
          authUtil.applyACT(act);
    
          // Change an attribute in the MetadataInterface instance 'object'
          object.setDescription("Authorizations just updated");
    
          // This will persist both authorization and object-level attribute changes
          object.update();
      }
      catch (ServiceException e)
      {
          e.printStackTrace();
      }
      catch (RemoteException e)
      {
          e.printStackTrace();
      }
      

    Example 15: Committing authorization changes

    This is an example of committing pending authorization changes for an AccessControlTemplateInterface definition change. The same sequence also applies to MetadataInterface authorization changes using an AuthorizationUtilInterface instance obtained as shown in Example 1.

      try
      {
          AccessControlTemplateInterface act; // an existing AccessControlTemplate
          AuthorizationBaseInterface authBase = act.getAuthorizationDefinitionUtil();
    
          IdentityInterface identity1;  // The IdentityInterface for which permissions are being set (your code must set this Identity object value)
          List <MdPermissionInfo>permInfoList = new ArrayList<MdPermissionInfo>(1);
          permInfoList1.add(new PermissionInfo(PermissionType.DENY, PermissionInfoInterface.PERMISSION_WRITE ));
    
          // Perform the authorization definition changes on 'act'
          authBase.setAuthorizations(identity, permInfoList);
    
          // This will persist authorization definition changes to the act only.  If your code has modified any attributes
          // on the AccessControlTemplateInterface then a separate update() operation is required to persist them.
          authBase.commit();
      }
      catch (ServiceException e)
      {
          e.printStackTrace();
      }
      catch (RemoteException e)
      {
          e.printStackTrace();
      }
      

    Example 16: Discarding authorization changes

    This is an example of discarding authorization changes so they are not persisted to the SAS Metadata Server.

      try
      {
          MetadataInterface object;  // any Services-level MetadataInterface object type will work here (your code must fill this in)
          AccessControlTemplateInterface act; // an existing AccessControlTemplate with authorization definitions already set up
          AuthorizationUtilInterface authUtil = object.getAuthorizationUtil();
    
          IdentityInterface identity;  // The IdentityInterface for which permissions are being set (your code must set this Identity object value)
          List <MdPermissionInfo>permInfoList = new ArrayList<MdPermissionInfo>(1);
          permInfoList1.add(new PermissionInfo(PermissionType.DENY, PermissionInfoInterface.PERMISSION_WRITEMETADATA ));
    
          // Perform the authorization changes on 'object'
          authUtil.setAuthorizations(identity, permInfoList);
          authUtil.applyACT(act);
    
          // This will discard authorization pending authorization changes
          // that result from the prior two authUtil calls.
          authUtil.discard();
      }
      catch (ServiceException e)
      {
          e.printStackTrace();
      }
      catch (RemoteException e)
      {
          e.printStackTrace();
      }