Skip to content

[GOG-1783] Authenticate yarn install against npm.powerapp.cloud#40

Open
indiebrain wants to merge 2 commits into
mainfrom
fix/yarn-package-auth-build
Open

[GOG-1783] Authenticate yarn install against npm.powerapp.cloud#40
indiebrain wants to merge 2 commits into
mainfrom
fix/yarn-package-auth-build

Conversation

@indiebrain
Copy link
Copy Markdown

Summary

  • The build job in yarn-package.yml runs on GitHub-hosted runners whose egress IPs aren't in the HAProxy LAN allowlist (10/8, 192.168/16, 172.16/12) that fronts npm.powerapp.cloud. Unauthenticated tarball fetches receive 401 + WWW-Authenticate: Basic realm="npm-registry".
  • Until now this was latent: existing consumer yarn.lock files had every entry resolved at registry.yarnpkg.com, so the build job never actually hit the internal registry. Renovate (configured via powerhome/renovate-config's use-internal-registry.json) writes new lockfile entries with resolved: https://npm.powerapp.cloud/..., which forces yarn install to authenticate.
  • The npm_token secret was already declared as required on this reusable workflow but only consumed by the release job. This wires it into the build job too via setup-node's registry-url / always-auth and NODE_AUTH_TOKEN on yarn install.

Trigger / first observed failure: powerhome/compass#117 "Update dependency eslint to v10" — first PR to introduce a new dep through this workflow after Renovate's internal-registry config landed.

Test plan

  • After merge, re-run CI on powerhome/compass#117; yarn install --frozen-lockfile should succeed against the Renovate-generated resolved: https://npm.powerapp.cloud/... URLs.
  • Confirm no regression on other consumers of yarn-package.yml (existing repos whose lockfiles still point at registry.yarnpkg.com should continue to work; setup-node writing an authenticated .npmrc doesn't affect requests to other hosts).
  • Sanity check the release job still works on the next tag push — it sets its own registry-url: https://registry.npmjs.org for yarn publish, which is unrelated to the build-job change here.

The build job runs from GitHub-hosted runners whose egress IPs fall
outside the HAProxy LAN allowlist (10/8, 192.168/16, 172.16/12), so the
registry responds with 401 + Basic auth challenge for any unauthenticated
fetch from a tarball URL like https://npm.powerapp.cloud/...

Existing yarn.lock files in consumer repos historically resolved every
dep at registry.yarnpkg.com, so the build job never touched the internal
registry and the missing auth went unnoticed. Renovate now writes
lockfile entries with resolved: https://npm.powerapp.cloud/... (because
its own .npmrc, configured via powerhome/renovate-config, makes that the
default registry), which forces yarn install to authenticate.

The secret was already declared as required on this workflow but only
consumed by the release job; this wires it into the build job too via
setup-node's registry-url/always-auth and NODE_AUTH_TOKEN.
@indiebrain indiebrain requested a review from a team as a code owner May 11, 2026 21:23
@indiebrain indiebrain self-assigned this May 11, 2026
Comment thread .github/workflows/yarn-package.yml Outdated
@c-gerke c-gerke marked this pull request as draft May 12, 2026 14:55
@c-gerke c-gerke changed the title Authenticate yarn install against npm.powerapp.cloud [GOG-1783] Authenticate yarn install against npm.powerapp.cloud May 12, 2026
@c-gerke c-gerke marked this pull request as ready for review May 12, 2026 18:44
Comment thread .github/workflows/license-compliance.yml
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.

3 participants