What a Bastion is
A Bastion (in full: Bastion by Quader) is a read-only, internet-facing cache of your installation that serves packages to clients outside your network.
The two sides
A Bastion is the Quader image started as quader serve --role bastion, installed with its own chart quader-bastion in a namespace or
cluster of its own. It holds no repository list and no permission: for every read it asks the main installation, with the caller's own
token, whether the caller may read, and serves the bytes from its cache when the answer is yes.
| Main installation | Bastion | |
|---|---|---|
| Holds | Repositories, permissions, tokens, the audit trail | A cache of artifacts and metadata, short-lived answers of the main installation |
| Serves | Everything | Reads of every format; optionally a web interface for visitors |
| Sign-in | Every method | None: the caller's personal, service-account or CI token |
| Needs | PostgreSQL, the object store | The main installation, a cache volume or bucket, optionally a Valkey of its own |
| Reachable from | Your network and your endpoints | The internet, through its own ingress |
It serves the package paths (/api/<format>/<repository>/…), the raw files (/files/<repository>/…) and the container registry at the
root of its address, so an image is <Bastion host>/<project>/<repository>/<image>:<tag>. A write is refused with 403; every other
path answers 404.
The Bastion's own credential is a token of the type bst (qdr_bst_…) of a registration on the main installation. It lets the
Bastion check callers, read the feed of revocations and report downloads; it reads no package and changes nothing. A registration is a
principal bastion:<name> without policy, role or group.
What a client names
A client names the Bastion's address where it would name the main installation's; Set up client renders the snippets
(Install through a Bastion). For a Bastion at https://packages.example.com and
the project web (examples):
| Client | What it names |
|---|---|
| npm, pnpm, Yarn | https://packages.example.com/api/npm/web/npm-all/ |
dotnet, nuget |
https://packages.example.com/api/nuget/web/nuget-all/v3/index.json |
| Docker, Podman, Kubernetes | packages.example.com/web/docker-local/myapp:1.0 |
| APT | https://packages.example.com/api/deb/web/apt/, its key signing-key.asc through the Bastion |
ansible-galaxy |
https://packages.example.com/api/ansible/web/galaxy/ |
| freshclam | PrivateMirror https://packages.example.com/api/clamav/upstream/clamav |
Signed content passes unchanged: APT checks the release files with the repository's key, an image client each layer and manifest by its digest.
What it distributes
A Bastion serves only what two people chose: an administrator allows a project on its card, and the project's Owner ticks the Bastion in a repository's Settings › Visibility (Choose what it distributes). Any other repository answers as one that does not exist, to an administrator's token too. A virtual repository serves only its members that are distributed there as well.
What it does not do
- It accepts no upload: publish, push and delete on the main installation. Its answers name nothing of the main installation, not even where to publish.
- A new version reaches its cache after the metadata period
(
bastion.cache.metadata_revalidate_after); a deleted or blocked package, a revoked token and a repository made private reach it through the feed within seconds. - An anonymous client never makes a remote repository fetch from its upstream (Limits and blocking).
- Downloads it serves from its cache count in the main installation's download counts and audit trail, reported in batches.
- A ClamAV installation admitted by its client certificate alone cannot update through it; a token or a public
upstream/clamavcan.