Skip to content

Sign Windows installer with GitHub OIDC instead of IAM user keys - #197

Merged
manojnks merged 1 commit into
developfrom
alexeyt/oidc-signing
Dec 2, 2026
Merged

manojnks merged 1 commit into
developfrom
alexeyt/oidc-signing

Conversation

@alexey-temnikov

@alexey-temnikov alexey-temnikov commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Sign the Windows installer with GitHub Actions OIDC instead of long-lived IAM user access keys.

Description

The signing steps in win-build.yml assume the signer's artifact access role with a stored IAM user access key. STS now rejects that key ("The security token included in the request is invalid", see run 45716520159), so signed installers can't be built. The signer role now trusts GitHub's OIDC provider for this repository's develop branch (sub = repo:aws/amazon-documentdb-odbc-driver:ref:refs/heads/develop, aud = sts.amazonaws.com).

Changes, all in .github/workflows/win-build.yml:

  • build-windows32 and build-windows64 get permissions: { contents: read, id-token: write }, so the jobs can request an OIDC token. The repository's default token is already read-only, so the only permission dropped is packages: read, which these jobs don't use.
  • Both "Configure AWS credentials" signing steps move from configure-aws-credentials@v1 to v6.3.1, pinned by commit SHA. They pass only aws-region, role-to-assume and role-duration-seconds. The access key, secret key, ExternalId and session-tagging inputs are removed because they don't apply to AssumeRoleWithWebIdentity.

Signing still runs only on workflow_dispatch with sign: true, through the existing if: env.SIGNING_ENABLED == 'true' guards. A dispatch from any branch other than develop fails at the credentials step, because the role only trusts develop. That is intended.

Relationship to #196. #196 removes the unconditional configure-aws-credentials step at the top of build-windows64 (b3ae684) and bumps the retired artifact actions. This PR doesn't touch that step. It branches from develop and merges cleanly with #196 in either order; I checked both with git merge-tree. After both merge, the only configure-aws-credentials steps left are the two guarded signing steps. A signed build needs both PRs, because the retired upload-artifact@v3 steps fail the job.

Testing. actionlint shows no new findings. The total drops from 25 to 23 because two @v1 steps are gone; the rest are pre-existing "action too old" warnings. The signed path can only be exercised after merge, because the role trusts develop only.

CI on this PR. All the failing or stuck checks come from problems that already exist on develop. None of them come from this change, and none are required checks (develop requires 1 approval and no status checks).

  • build-windows32, build-windows64, build-windows64_coverage and build-power-bi-connector fail at Set up job with "uses a deprecated version of actions/upload-artifact: v3". develop still references the retired v3; Update retired GitHub artifact actions in win-build workflow #196 bumps it.
  • With Update retired GitHub artifact actions in win-build workflow #196 applied, the Windows jobs build and then fail later, in steps this PR doesn't touch:
    • Fork PRs such as Update retired GitHub artifact actions in win-build workflow #196 get no repository secrets, so scripts/reinstall_mongodb.ps1 runs createUser with an empty DOC_DB_PASSWORD, and MongoDB answers Error preflighting UTF-8 conversion: U_STRING_NOT_TERMINATED_WARNING.
    • Same-repo runs, which do get secrets, pass that step and fail 4 of 275 tests. The failures are the SSH-tunnel cases TestConnectionRestore{Internal,External}SSHTunnel and TestDocumentDbConnectionGetSshTunnelPort*, which can't reach the SSH host (java.net.ConnectException: Connection timed out). See run 45716520159.
  • build-linux64-debug, build-linux-docker-image and build-mac-debug stay queued because linux-build.yml uses ubuntu-20.04 and the mac workflows use macos-11. GitHub retired both runner images, so no runner ever picks these jobs up.

None of this blocks signing. In build-windows32 and build-windows64, "Configure AWS credentials", "Sign Executables" and the artifact uploads (when sign: true) all run before register-driver, Setup MongoDB and run-tests.

After merge

  1. Once the signer stack change is deployed and Update retired GitHub artifact actions in win-build workflow #196 and this PR are merged, run ODBC Driver for Windows from develop with sign: true, and check that both signing steps upload, get a job ID, and download the signed installers.
  2. Then delete the secrets that are no longer used: AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY and AWS_ROLE_EXTERNAL_ID. Keep AWS_ROLE_TO_ASSUME, AWS_KEY, AWS_UNSIGNED_BUCKET and AWS_SIGNED_BUCKET.

Related Issue

#196. Companion: aws/amazon-documentdb-jdbc-driver#578 (Tableau connector signing over OIDC).

Additional Reviewers

@manojnks
@alexey-temnikov
@birschick-bq

STS rejects the IAM user access key the signing steps use ("The
security token included in the request is invalid"), so signed
installers can't be built. The signer's artifact access role now trusts
GitHub's OIDC provider for workflows on develop.

- Grant id-token: write (and contents: read) to build-windows32 and
  build-windows64, the jobs that sign.
- Switch the signing credential steps to configure-aws-credentials
  v6.3.1, pinned by SHA, with role-to-assume only. Drop the access key,
  secret key, ExternalId and session-tagging inputs, which do not apply
  to AssumeRoleWithWebIdentity.
@alexey-temnikov
alexey-temnikov marked this pull request as ready for review December 2, 2026 01:50
@manojnks
manojnks merged commit 6571114 into develop Dec 2, 2026
6 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants