Native code for Mac in distribution jar is unsigned

オープン
#658 コメント 3 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
java
領域
build-system

調査の方向性

The affected files are the three macOS native libraries under org/xerial/snappy/native/Mac/ in the distribution jar. Start by inspecting how these binaries are produced and packaged, then check their signatures with Apple’s notarization tooling; done means each library is signed with a valid Apple Developer ID and passes notarization validation when included as a dependency.

索引モデルが issue の本文から書いたものです。

説明

In the distribution jar, the files

org/xerial/snappy/native/Mac/aarch64/libsnappyjava.dylib,
org/xerial/snappy/native/Mac/x86/libsnappyjava.jnilib,
and
org/xerial/snappy/native/Mac/x86_64/libsnappyjava.dylib,

are currently not properly signed with an Apple Developer ID.

While aarch64/libsnappyjava.dylib according to the signcode command (signcode -vvvvvv aarch64/libsnappyjava.dylib) does have a signature in principle, it is rejected by Apple's notarization mechanism when the jar is included as a dependency:

    { 
      "severity": "error",
      "code": null,
      "path": "[...]/lib/snappy-java-1.1.10.5.jar/org/xerial/snappy/native/Mac/aarch64/libsnappyjava.dylib",
      "message": "The binary is not signed with a valid Developer ID certificate.",
      "docUrl": "https://developer.apple.com/documentation/security/notarizing_macos_software_before_distribution/resolving_common_notarization_issues#3087721",
      "architecture": "arm64"
    },

The files x86/libsnappyjava.jnilib and x86_64/libsnappyjava.dylib do not have a signature at all and are rejected as well:

    { 
      "severity": "error",
      "code": null,
      "path": "[...]/lib/snappy-java-1.1.10.5.jar/org/xerial/snappy/native/Mac/x86_64/libsnappyjava.dylib",
      "message": "The binary is not signed.",
      "docUrl": "https://developer.apple.com/documentation/security/notarizing_macos_software_before_distribution/resolving_common_notarization_issues#3087721",
      "architecture": "x86_64"
    },

The signatures have been faulty/lacking at least since 1.1.10.5 up to the current release.

BTW: If anyone encounters this problem, a workaround is to unpack the jar, sign the files yourself, repack and sign the jar as well. For me, it worked best to use jar xf and jar cf for this. See also https://developer.apple.com/forums/thread/764017

主要言語
Java
スター
1.1k
フォーク
261
平均マージ
2分
マージ済み PR(30日)
2

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

xerial/snappy-java のほかの issue

xerial/snappy-java の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。