Tolerate an armored/whitespaced SIGNING_KEY (workaround for the valtimo-platform org secret) - #7
Closed
Klaas-Ritense wants to merge 1 commit into
Closed
Tolerate an armored/whitespaced SIGNING_KEY (workaround for the valtimo-platform org secret)#7Klaas-Ritense wants to merge 1 commit into
Klaas-Ritense wants to merge 1 commit into
Conversation
…oding The publish step failed with 'bad character in base64 value' while decoding the SIGNING_KEY secret. Handle both an already ASCII-armored key and a line-wrapped base64 value by stripping whitespace before decodeBase64(). Same fix as publictask-plugin 3954820.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What actually happens
gradle/publishing.gradlecallsSystem.getenv("SIGNING_KEY").decodeBase64()unconditionally. That throws while evaluating the script when the secret is not plain base64:Evidence that this is an org-secret problem, not a slack-plugin problem
slack-plugin's workflow and
gradle/publishing.gradleare byte-identical to repos that publish fine (diffed againstarchief-plugin: only thescmURLs differ), and it has no repo-level secrets at all.Across all 14 valtimo-platform plugin repos:
SIGNING_KEYvalue-mapper looked like a counter-example, so I re-ran it unchanged. It now fails with the identical error. Its earlier success was at 2026-08-17T08:53Z; slack's first failure was 11:21Z the same day.
That pins it down: the org
SIGNING_KEYwas changed to a non-base64 value (most likely the ASCII-armored key pasted directly) between those two times. Every repo still publishing is protected only by a repo-level override or by the tolerant decode publictask already has.Two ways forward
valtimo-platform→SIGNING_KEYas plain base64, e.g.base64 -w0 private-key.asc. That fixes slack, value-mapper and every future repo, and lets the 11 repo-level overrides be deleted so the org secret is genuinely the single source. This PR then becomes unnecessary.Verification of the code change itself
Reproduced locally against this repo by evaluating the build script with each form of the secret:
SIGNING_KEYform-----BEGIN …)bad character in base64 valueNote on publishing either way
publish-backend.yamltriggers onbackend/**only, so this change won't re-trigger it — the publish needs a manual re-run to get slack 6.0.1 out. And every plugin repo publishes withpublishingType = USER_MANAGED, so the artifact then waits for a manual release at https://central.sonatype.com/publishing/deployments.