Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4819194

doPrivileged should retain DomainCombiner

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 6
    • 5.0
    • security-libs
    • None
    • beta
    • generic
    • solaris_7

      A java.security.DomainCombiner provides a means to dynamically
      update the ProtectionDomains associated with the current
      AccessControlContext.

      A DomainCombiner is passed as a parameter to the
      appropriate constructor for AccessControlContext.
      The newly constructed context is then passed to the
      AccessController.doPrivileged(..., context) method
      to bind it (and its associated DomainCombiner)
      to the current execution thread. Subsequent calls to
      AccessController.getContext or AccessController.checkPermission
      cause the DomainCombiner.combine method to get invoked.
      The DomainCombiner.combiner method can then
      update the ProtectionDomains as needed before the domains
      are passed to the policy implementation for evaluation.

      One consequence of the above approach is that a
      DomainCombiner bound to the current execution thread
      is lost during a subsequent call to AccessController.doPrivileged.
      The reason is because doPrivileged truncates the call stack and
      throws away the previously bound AccessControlContext
      (where the DomainCombiner resides).
      For example, if the current execution thread were
      updated with user-specific information, that information
      is lost during a call to doPrivileged.

      This RFE proposes to modify doPrivileged to retain the combiner.

            claisunw Charlie Lai (Inactive)
            claisunw Charlie Lai (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: