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

Test policy should extend the default system policy

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 10
    • Component/s: core-libs

      Description

      Some logging tests such as test/jdk/java/util/logging/LogManager/Configuration/updateConfiguration run with security manager enabled and disabled.

      The test creates its custom security policy to grant the permissions required by the test. It overrides the default system policy (lib/security/default.policy) that grants permissions to the deprivileged modules.

      If any deprivileged module is loaded and executes security sensitive operations, the permission would be denied.

      For example, the locale providers are loaded by SimpleUpdateConfigWithInputStreamTest test but the failed permission check is silently swallowed by the LocaleProviderAdapter implementation and hence this test passes. The tests should be fixed to extend the default security policy instead; otherwise, these tests will start failing if JDK-8189272 changes the behavior to throw the exception if it fails loading the provider due to security reason.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                naoto Naoto Sato
                Reporter:
                mchung Mandy Chung
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: