You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Salvage the apm-review-panel follow-up delta that landed after PR #1733 was squash-merged for issue #1680.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
17
17
of `~/.hermes/config.yaml` (written atomically with `0o600` perms, preserving
18
18
unrelated config keys and refusing to overwrite a malformed file). `HERMES_HOME`
19
19
overrides the Hermes home directory. See the [Hermes integration guide](https://microsoft.github.io/apm/integrations/hermes/).
20
-
- Enterprise bootstrap mirror mode lets `install.sh`, `install.ps1`, and `apm self-update` use internal release, installer, and PyPI mirrors with fail-closed public fallback, and closes #1680. (#1733)
20
+
- Enterprise bootstrap mirror mode lets `install.sh`, `install.ps1`, and `apm self-update` use `APM_RELEASE_METADATA_URL`, `APM_RELEASE_BASE_URL`, `APM_INSTALLER_BASE_URL`, `APM_PYPI_INDEX_URL`, and `APM_NO_DIRECT_FALLBACK` for internal release, installer, and PyPI mirrors with fail-closed public fallback, and closes #1680. (#1733)
Copy file name to clipboardExpand all lines: docs/src/content/docs/getting-started/installation.md
+7-3Lines changed: 7 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -102,7 +102,7 @@ jobs:
102
102
103
103
### Enterprise bootstrap mirror mode
104
104
105
-
Mirror mode lets locked-down workstations install and update APM without direct public egress:
105
+
APM ships native enterprise mirror support: five env vars route bootstrap traffic through internal hosts, with fail-closed mode ensuring no public fallback.
Fail-closed scoping keys off the public `github.com` default. The guard only blocks egress when the resolved host would be public GitHub (`github.com` / `api.github.com`), `aka.ms`, or public PyPI. It does **not** suppress egress to a custom `GITHUB_URL`: if you set a GHES host (for example `GITHUB_URL=https://github.corp.com`) together with `APM_NO_DIRECT_FALLBACK=1` and no release mirror, the installer still reaches that GHES host. This is intentional coexistence with GHES, but "no direct fallback" should not be read as "zero egress" -- it means "no fallback to public hosts". For true zero-egress, set the `APM_RELEASE_METADATA_URL` / `APM_RELEASE_BASE_URL` / `APM_INSTALLER_BASE_URL` / `APM_PYPI_INDEX_URL` mirrors so every request resolves to your internal hosts. The GitHub token is attached only when the request targets the canonical GitHub / configured GHES host; it is never sent to a mirror host.
147
+
Fail-closed scoping keys off the public `github.com` default. The guard only blocks egress when the resolved host would be public GitHub (`github.com` / `api.github.com`), `aka.ms`, or public PyPI. It does **not** suppress egress to a custom `GITHUB_URL`: if you set a GHES host (for example `GITHUB_URL=https://github.corp.com`) together with `APM_NO_DIRECT_FALLBACK=1` and no release mirror, the installer still reaches that GHES host. This is intentional coexistence with GHES, but "no direct fallback" should not be read as "zero egress" -- it means "no fallback to public hosts". For true zero-egress, set the `APM_RELEASE_METADATA_URL` / `APM_RELEASE_BASE_URL` / `APM_INSTALLER_BASE_URL` / `APM_PYPI_INDEX_URL` mirrors so every request resolves to your internal hosts. When `APM_RELEASE_METADATA_URL` is unset, GHES metadata requests intentionally use the resolved GitHub token for that host; mirror metadata requests never receive it. The GitHub token is attached only when the request targets the canonical GitHub / configured GHES host, never a mirror host.
148
148
149
149
Homebrew and Scoop mirror support is docs-only in this v0: mirror the tap or bucket with your package manager's normal enterprise controls, but the APM env vars above do not rewrite Homebrew or Scoop internals.
sh .apm-mirror-smoke/mirror/apm-install/install.sh || test $? -eq 1
197
+
sh .apm-mirror-smoke/mirror/apm-install/install.sh
198
+
status=$?
199
+
set -e
200
+
test "$status" -ne 0
197
201
```
198
202
199
203
For `apm self-update`, run `apm self-update --check` with the same env vars and verify your proxy, firewall, or CI egress logs show only the mirror host. Use a disposable runner for a full `apm self-update` because it executes the mirrored installer.
Copy file name to clipboardExpand all lines: docs/src/content/docs/reference/cli/self-update.md
+2-4Lines changed: 2 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,7 +41,7 @@ Some package-manager distributions (for example, Homebrew) disable self-update a
41
41
|----------|---------|--------|
42
42
|`APM_RELEASE_METADATA_URL`|_(unset)_| Exact URL for mirrored release metadata, usually a static `latest.json` with at least `{"tag_name":"vX.Y.Z"}`. Overrides GitHub release metadata lookup. |
43
43
|`APM_INSTALLER_BASE_URL`|_(unset)_| Base URL containing `install.sh` and `install.ps1`. `apm self-update` downloads the platform script from this base. |
44
-
|`APM_RELEASE_BASE_URL`|_(unset)_| Base URL containing release assets at `{base}/{tag}/{asset}`. The downloaded installer subprocess inherits this value. |
44
+
|`APM_RELEASE_BASE_URL`|_(unset)_| Base URL containing release assets at `{base}/{tag}/{asset}`. Used when self-update runs the installer to fetch binary archives. |
45
45
|`APM_PYPI_INDEX_URL`|_(unset)_| PyPI-compatible index used by installer pip fallback. |
46
46
|`APM_NO_DIRECT_FALLBACK`|_(unset)_| Set to `1` to fail closed instead of using public GitHub, `aka.ms`, or PyPI fallback. |
47
47
|`GITHUB_URL`|`https://github.com`| Legacy GitHub/GHES base URL. Still supported when mirror env vars are not set. |
@@ -61,9 +61,7 @@ apm self-update --check
61
61
apm self-update
62
62
```
63
63
64
-
With `APM_NO_DIRECT_FALLBACK=1`, missing or unreachable mirror settings are hard failures with a non-zero exit. APM does not fall back to public GitHub, `aka.ms`, or PyPI in that mode.
65
-
66
-
Fail-closed scoping keys off the public `github.com` default: it blocks fallback to public hosts, not all egress. A custom `GITHUB_URL` (a GHES host) combined with `APM_NO_DIRECT_FALLBACK=1` and no release mirror still egresses to that GHES host -- this is intentional GHES coexistence. For zero public egress set the `APM_RELEASE_METADATA_URL` / `APM_RELEASE_BASE_URL` / `APM_INSTALLER_BASE_URL` / `APM_PYPI_INDEX_URL` mirrors. The GitHub token is sent only to the canonical GitHub / configured GHES host, never to a mirror host.
64
+
With `APM_NO_DIRECT_FALLBACK=1`, missing or unreachable mirror settings are hard failures with a non-zero exit. For the full fail-closed scope, GHES token boundary, and no-egress smoke recipe, see [Enterprise bootstrap mirror mode](../../../getting-started/installation/#enterprise-bootstrap-mirror-mode).
Use these env vars to install and update APM through an internal mirror and fail closed when a public fallback would be required:
73
-
74
-
| Variable | Purpose |
75
-
|----------|---------|
76
-
|`APM_INSTALLER_BASE_URL`| Base URL containing `install.sh` and `install.ps1`. |
77
-
|`APM_RELEASE_METADATA_URL`| Exact URL for mirrored `latest.json` release metadata. |
78
-
|`APM_RELEASE_BASE_URL`| Base URL for release assets at `{base}/{tag}/{asset}`. |
79
-
|`APM_PYPI_INDEX_URL`| PyPI proxy used by installer pip fallback. |
80
-
|`APM_NO_DIRECT_FALLBACK`| Set to `1` to block public GitHub, `aka.ms`, and PyPI fallback. |
72
+
Set `APM_INSTALLER_BASE_URL`, `APM_RELEASE_METADATA_URL`, `APM_RELEASE_BASE_URL`, `APM_PYPI_INDEX_URL`, and `APM_NO_DIRECT_FALLBACK=1` to install and update APM through an internal mirror while failing closed on public fallback. The canonical variable table, GHES scoping note, and no-egress smoke recipe live in [installation.md](https://github.com/microsoft/apm/blob/main/docs/src/content/docs/getting-started/installation.md#enterprise-bootstrap-mirror-mode).
For dependency installs after bootstrap, keep using `PROXY_REGISTRY_URL` and `PROXY_REGISTRY_ONLY=1`. Homebrew and Scoop mirroring is package-manager documentation only in v0; these env vars do not rewrite Homebrew or Scoop internals.
93
85
94
-
Fail-closed scoping keys off the public `github.com` default: it blocks fallback to public hosts, not all egress. A custom `GITHUB_URL` (GHES host) plus `APM_NO_DIRECT_FALLBACK=1` and no release mirror still reaches that GHES host. Set the four mirror URLs for zero public egress. The GitHub token is attached only to the canonical GitHub / configured GHES host, never to a mirror host (symmetric across `install.sh` and `install.ps1`).
95
-
96
-
No-egress smoke test: run the installer on a disposable runner with `curl` and `pip` wrappers (or an egress proxy) that deny `github.com`, `api.github.com`, `aka.ms`, `pypi.org`, `pythonhosted.org`, Homebrew, and Scoop upstreams. Wrapping `pip` keeps the proof honest about the PyPI fallback path. With all mirror env vars set, the only allowed outbound host should be your mirror. Run `apm self-update --check` under the same env vars and confirm proxy logs show only the mirror host.
97
-
98
86
## Troubleshooting
99
87
100
88
-**macOS/Linux "command not found":** ensure your install directory (default `/usr/local/bin`) is in `$PATH`.
0 commit comments