Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-5631

Extend SecurityManagerSetup to add extra privileges to the set of default privileges (merge two policy files)

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.9.1.0
    • Fix Version/s: 10.9.1.0
    • Component/s: Test
    • Labels:
      None

      Description

      When moving ProtocolTest into suites all (see DERBY-2031), I needed to allow the test code to create a socket. There was already a policy file for the old harness for doing this, but when using this with the JUnit framework I ended up adding privilege after privilege to get the framework itself running.
      Instead of creating a large policy file duplicating all the privileges that the framework requires to function properly, I think it would be better to make the SecurityManagerSetup capable of merging the test specific policy file with the default policy file.
      This mode of operation can be used when you need a few extra privileges to execute the test, but there are probably also tests where you want full control of the privileges - in which case you use the existing mode of operation.

      I'm not 100% sure this approach will always work, but basic testing has shown promising results.

        Attachments

        1. derby-5631-1a-merge_policy_files.diff
          10 kB
          Kristian Waagan
        2. derby-5631-1b-merge_policy_files.diff
          9 kB
          Kristian Waagan
        3. derby-5631-1c-merge_policy_files.diff
          9 kB
          Kristian Waagan
        4. derby-5631-1d-merge_policy_files-fix.diff
          2 kB
          Kristian Waagan
        5. derby-5631-1e-merge_policy_files-fix-url.diff
          2 kB
          Kristian Waagan
        6. derby-5631-1f-merge_policy_files_fix-priv.diff
          5 kB
          Kristian Waagan
        7. derby-5631-2a-introduce_NO_POLICY_constant.diff
          3 kB
          Kristian Waagan

          Activity

            People

            • Assignee:
              kristwaa Kristian Waagan
              Reporter:
              kristwaa Kristian Waagan
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: