Skip to content

[C++][CI][Packaging][FlightPRC] Manual ODBC Windows MSI installer signing #49404

Open

Description

@alinaliBQ

Describe the enhancement requested

The Apache Arrow Flight SQL ODBC Windows MSI installer needs to be signed in order for Windows defender to allow install.

Acceptance Criteria:

Implement manual code signing process to:

  • Sign ODBC Windows MSI installer
  • Sign ODBC DLL files that will be installed by MSI installer

Reference comment for this issue: #48934 (comment)

Component(s)

FlightRPC, Packaging

Activity

  1. amoeba commented on Feb 27, 2026

    @amoeba
    Member

    I've sent a request to ASF Infra requesting access to code signing. I'll update here when that's done and I can continue with this.

  2. alinaliBQ commented on Feb 27, 2026

    @alinaliBQ
    CollaboratorAuthor

    Thanks Bryce!

  3. alinaliBQ commented on Mar 11, 2026

    @alinaliBQ
    CollaboratorAuthor

    Hi @amoeba do you know if Windows MSI signing could be included in Arrow 24.0?

  4. amoeba commented on Mar 11, 2026

    @amoeba
    Member

    My request with ASF for access to code signing is still in progress. I just pinged them. Once we get that, I think we can move ahead with a patch to implement manual code signing. I did some research on how hard it would be to make the Windows .DLL and .MSI files reproducible and it looks hard if not impossible.

  5. changed the title [-][C++][CI][Packaging][FlightPRC] ODBC Windows MSI installer signing[/-] [+][C++][CI][Packaging][FlightPRC] Manual ODBC Windows MSI installer signing[/+] on Mar 11, 2026
  6. alinaliBQ commented on Mar 11, 2026

    @alinaliBQ
    CollaboratorAuthor

    Got it, I have changed the issue description to indicate manual code signing process instead. Thanks Bryce for helping out!

  7. amoeba commented on Mar 12, 2026

    @amoeba
    Member

    I now have access to Windows code signing. This weekend I'll work on doing a dry-run with the cert and jsign so we can know if it will work at release time. I'm almost set up for macOS too.

  8. amoeba commented on Mar 16, 2026

    @amoeba
    Member

    I did a test signing today with jsign to confirm everything from ASF infra is set up. It was just a single jsign command as indicated in #48934 (comment) and it works with SmartScreen as expected.

    I think we need a few more things here:

    1. Since both the .DLL and the final .MSI need to get signed (two steps), the odbc-msvc job needs to be modified to upload the raw materials for the installer (as many files as needed so cpack will run) and the later steps in that workflow may need to be tweaked.
    2. We should investigate static linkage on Windows. The driver uses shared linkage on Win32 and, from my understanding of SmartScreen, we may have to sign all the DLL dependencies (which we don't want to do since each signing costs money). Right now, arrow_flight_sql_odbc.dll is dynamically linked to {arrow,arrow_compute,arrow_flight,arrow_flight_sql}.dll. Can we investigate static linkage (i.e., make arrow_flight_sql_odbc.dll only depend on system deps) @alinaliBQ?
    3. Modify 04-binary-download.sh to download the raw WiX installer artifacts instead of the MSI
    4. Modify 05-binary-upload.sh to jsign the arrow_flight_sql_odbc.dll inside the WiX installer artifacts dir, build the installer, and jsign the installer. Both the jsign command and WiX are hard for existing release managers to run (jsign requires credentials and WiX is Windows only). We should talk about the best way to integrate this into the release process and whether a separate step should be added.

    I did a quick research into reproducible builds for Windows .DLL and .MSI and my initial findings weren't that promising but I think more research could be done here. @raulcd @kou what do you think about having a manual step that requires setup and Windows in the release process?

  9. kou commented on Mar 16, 2026

    @kou
    Member

    How about using GitHub Actions to build MSI with WiX and signed artifacts?

    (Uploading the signed artifacts to GitHub Releases -> Run GitHub Actions via workflow_dispatch -> Build the MSI on GitHub Actions and upload it to GitHub Releases -> Download the MSI from GitHub Releases and sign it)

  10. amoeba commented on Mar 16, 2026

    @amoeba
    Member

    That would be better. How about making a new script like 07-flightsqlodbc-upload.sh to handle those steps + the jsign commands.

  11. alinaliBQ commented on Mar 16, 2026

    @alinaliBQ
    CollaboratorAuthor
    1. For signing, we can add a new step to upload the raw materials for installer. I think existing ODBC MSI upload can be kept for the nightly package.
    2. To start, I can experiment on converting ODBC to static linkage on Windows.
    3. For 07-flightsqlodbc-upload.sh, this is my understanding based on the discussion:
      How does this flow sound?
      i. Download materials from workflow run id -> sign ODBC DLL -> upload to GitHub release.
      ii. gh workflow run to trigger workflow that retrieves signed materials from GitHub release and runs cpack to generate MSI, then uploads unsigned MSI to GitHub release. Wait until the workflow run is finished with gh run watch.
      iii. Download ODBC MSI -> sign ODBC MSI -> upload to GitHub release.
      If we have new script 07-flightsqlodbc-upload.sh, then I imagine the existing ODBC-related code in 04-binary-download.sh and 05-binary-upload.sh will need to be removed as well.

    Later I can create issues for 1) upload the raw materials for installer and 2) static Windows ODBC linkage and post here. I can raise the issues for 3) 07-flightsqlodbc-upload.sh after we reach consensus

  12. alinaliBQ commented on Mar 17, 2026

    @alinaliBQ
    CollaboratorAuthor

    I have raised issues for 1) uploading the raw materials for Windows MSI installer #49537 and 2) static linkage support for Windows ODBC #49538

  13. alinaliBQ commented on Mar 19, 2026

    @alinaliBQ
    CollaboratorAuthor

    @amoeba @kou Regards to GH-49537, I checked and it appears that cpack is not designed to run using build artifact materials produced on another machine. cpack relies on hard-coded paths such as paths to WiX files within the repository. Instead of uploading all artifact materials, we just upload the ODBC DLL arrow_flight_sql_odbc.dll.

    To expand on kou's point, may I suggest this approach for 07-flightsqlodbc-upload.sh:

    1. [get ODBC DLL] Trigger CI A - This CI will build arrow_flight_sql_odbc.dll and upload the DLL to GitHub release as arrow_flight_sql_odbc_unsigned.dll to differentiate from signed DLL.
    2. [sign ODBC DLL] Sign the ODBC DLL on local machine, then upload signed DLL to GitHub release as arrow_flight_sql_odbc.dll.
    3. [get ODBC MSI] Trigger CI B - This CI will generate cpack files (and unsigned ODBC), then download signed arrow_flight_sql_odbc.dll from GitHub release, and then replace unsigned DLL with the signed DLL locally. Then run cpack and build the unsigned MSI, and upload the MSI to GitHub release. This MSI will pick up the signed DLL.
    4. [sign ODBC MSI] Sign the MSI on local machine, then upload signed MSI to GitHub release.

    If it sound good, I can work on the CI A and B needed in step 1 and 3. Please let me know what you guys think.

  14. amoeba commented on Mar 20, 2026

    @amoeba
    Member

    Hi @alinaliBQ, that sounds good.

  15. amoeba commented on Apr 18, 2026

    @amoeba
    Member

    I marked my two PRs as ready for review:

    Once the current release is over, we can start getting these PRs reviewed and merge.

  16. added a commit that references this issue on Apr 22, 2026
  17. added a commit that references this issue on May 26, 2026
  18. added a commit that references this issue on Sep 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions