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

Java Packager Mac Sandbox App Entitlements

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Won't Fix
    • Icon: P3 P3
    • 11
    • None
    • deploy

      Mac AppStore entitlements are supported, but not Mac App Image entitlements.

      In the MacAppImageBuilder.java:

                      args.addAll(Arrays.asList("codesign",
                              "-s", signingIdentity, // sign with this key
                              "--prefix", identifierPrefix, // use the identifier as a prefix
                              "-vvvv"));
                      if (entitlementsFile != null &&
                              (p.toString().endsWith(".jar")
                                      || p.toString().endsWith(".dylib"))) {
                          args.add("--entitlements");
                          args.add(entitlementsFile); // entitlements
                      } else if (inheritedEntitlements != null && Files.isExecutable(p)) {
                          args.add("--entitlements");
                          args.add(inheritedEntitlements); // inherited entitlements for executable processes
                      }
                      if (keyChain != null && !keyChain.isEmpty()) {
                          args.add("--keychain");
                          args.add(keyChain);
                      }

      entitlementsFile is always null as it's passed in. Entitlements needs to be enabled for App Image, they are currently only enabled for Mac App Store Apps.

                  String signingIdentity = MAC_APP_STORE_APP_SIGNING_KEY.fetchFrom(p);
                  String identifierPrefix = BUNDLE_ID_SIGNING_PREFIX.fetchFrom(p);
                  String entitlementsFile = getConfig_Entitlements(p).toString();
                  String inheritEntitlements = getConfig_Inherit_Entitlements(p).toString();

                  MacAppImageBuilder.signAppBundle(p, appLocation.toPath(), signingIdentity, identifierPrefix, entitlementsFile, inheritEntitlements);

            vdrozdov Victor Drozdov (Inactive)
            cbensen Chris Bensen (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: