Bahriya Tersane

Access and credentials

A Bahriya Tersane licence gives your organisation two kinds of credential. They are independent of each other, and each is used in a different place.

Credential Used for Used by
Chart credential Downloading the charts from tersane.maml.uk Helm, on the machine that installs and upgrades releases
Image token Pulling the container images the charts run from 1x.ax Kubernetes, on every node, through a pull secret

Both are created in the Mamluk console, on the organisation’s Tersane page, by an administrator of the organisation. Every member of the organisation can see the list; only administrators can add, reset or revoke.

Creating a credential

Give each credential a name, such as the cluster, person or CI system that will use it. An organisation can hold several of each kind, up to the limit the console shows, so that one can be replaced without affecting the others.

A secret is shown once. When a credential is created or reset, the console shows its secret, with the commands below already filled in. The secret is not stored by Mamluk and cannot be shown again, so copy it before closing the panel. If it is lost, reset the credential to obtain a new one.

Resetting issues a new secret and stops the old one working immediately. Revoking stops the credential working immediately and cannot be undone.

The chart repository

The charts are served from a Helm repository at tersane.maml.uk. Add it once on each machine that runs Helm, with a chart credential. The shell asks for the secret and does not show it, and Helm reads it on standard input, so it does not appear in your shell history or in the list of running processes. If the prompt is interrupted before you enter the secret, run stty echo to make the terminal show what you type again:

printf 'Chart credential secret: '; stty -echo; IFS= read -r SECRET; stty echo; echo
printf '%s\n' "$SECRET" | helm repo add tersane https://tersane.maml.uk \
  --username <username> --password-stdin
helm repo update

The username is shown beside the credential in the console and does not change when the credential is reset. The secret stays in the shell variable SECRET for the convoy repository below; run unset SECRET when you have added the repositories you need.

Helm stores the credential in its own repository configuration on that machine. It is never needed inside the cluster.

Each convoy is a separate repository under tersane.maml.uk/convoys/, available to organisations whose licence includes it. One chart credential serves every repository the licence includes. The Compliance and Assurance Convoy is added in the same way:

printf '%s\n' "$SECRET" | helm repo add compliance-convoy https://tersane.maml.uk/convoys/compliance \
  --username <username> --password-stdin
unset SECRET

If you add it in a new shell, read the secret first, as above.

A published chart version is never changed or withdrawn, so a release pinned to a version can always be reinstalled.

When the repository refuses a request

Response Meaning
401 Unauthorized The username or secret is not recognised, or the credential has been reset or revoked.
403 Forbidden The credential is valid, but the licence is suspended, revoked or expired, or does not include that convoy.
503 Service Unavailable The licensing service could not be reached. Try again shortly.

Every request is checked against the licence, so a change to the licence or to a credential takes effect on the next request.

The image registry

Every image the charts supply is pulled from 1x.ax, which needs an image token. That includes the upstream software the charts run, such as Memcached, ClamAV and the metrics exporters: Mamluk copies each upstream image there unchanged, at the exact version the chart pins, so a chart never pulls from a public registry. The one exception is the application image you give the khadim, saat and safeena charts, which comes from wherever you keep it; its own pull secret goes in imagePullSecrets beside 1x-ax.

Tersane’s images are under 1x.ax/tersane/core, by publisher and image, such as 1x.ax/tersane/core/kubernetes/kubectl. The charts name each image in full, so nothing needs setting for this.

The username is your organisation’s, shown in the console above the tokens, and is the same for every token; the token is the password. To check a token from a workstation, using the commands the console shows:

docker login 1x.ax -u <username>
docker pull 1x.ax/tersane/core/<publisher>/<image>:<tag>

The console lists the images your licence may pull, each with its newest tag.

Creating the pull secret

Kubernetes reads the token from a pull secret, which must exist in every namespace that runs a chart. Create it from a file rather than typing the token into a command, so that the token does not appear in your shell history or in the list of running processes. First write the file; the shell asks for the token and does not show it. The parentheses keep the token and the file permissions to these commands, so your shell is left as it was. The commands work in sh, bash and zsh. If the prompt is interrupted before you enter the token, run stty echo to make the terminal show what you type again:

(
  umask 077
  printf 'Image token: '; stty -echo; IFS= read -r TOKEN; stty echo; echo
  printf '{"auths":{"1x.ax":{"auth":"%s"}}}\n' \
    "$(printf '%s:%s' '<username>' "$TOKEN" | base64 | tr -d '\n')" > 1x-ax.json
)

Then create the secret from it in each namespace that needs it:

kubectl --namespace <namespace> create secret generic 1x-ax \
  --type=kubernetes.io/dockerconfigjson \
  --from-file=.dockerconfigjson=1x-ax.json

The file holds the token, readable only by you. Delete it once the last secret is created:

rm 1x-ax.json

Then name the secret in the release’s values:

imagePullSecrets:
  - name: 1x-ax

Set imagePullSecrets explicitly in each release’s values file. Every chart but valkey names 1x-ax by default, and valkey names a different secret. A release that names a secret which does not exist leaves its pods unable to start.

An image token stops working when the licence is suspended, revoked or expires, and works again if the licence is restored. A change of licence state can take up to 15 minutes to reach the registry. When a licence is renewed, its tokens are extended with it. If a licence is renewed within 30 days of its end date, its tokens are restored unchanged; after that, renewal requires new image tokens, created in the console.

Verifying an image

Every image the charts supply is signed with Mamluk’s image signing key. The public key is published at https://bke.maml.uk/signing/bke-images-2026.pub. To verify an image with cosign, logged in to 1x.ax as above:

curl -fsSLO https://bke.maml.uk/signing/bke-images-2026.pub
cosign verify --key bke-images-2026.pub --insecure-ignore-tlog=true \
  1x.ax/tersane/core/<publisher>/<image>:<tag>

The signatures are not recorded in a public transparency log, so that they can be verified on a network with no route to the internet; --insecure-ignore-tlog tells cosign not to look for one, and cosign prints a warning saying so. A verified image reports The cosign claims were validated.

Copying the images into your own registry

Your organisation may copy the images into a registry of its own, for its own licensed use, including a registry on a network with no route to the internet. Every image a chart runs is named in its values, so nothing in the chart needs changing. From a connected machine, logged in to 1x.ax with an image token:

  1. Download the chart, and list the images it runs with the values file you keep:

    helm pull tersane/<chart> --version <chart version>
    helm template <release> <chart>-<chart version>.tgz -f <values file> | grep 'image:'
    
  2. Verify each image, as above.
  3. Copy each image by digest, so that the copy is byte for byte the original and any digest the chart pins still resolves. With skopeo, for example:

    skopeo copy --all --preserve-digests \
      docker://1x.ax/tersane/core/<publisher>/<image>:<tag> \
      docker://<your registry>/<path>/<image>:<tag>
    
  4. In the values file you keep, set each image value the chart’s page lists, such as image.repository, to the copy in your registry, keeping the tag and any digest. Name your registry’s pull secret in imagePullSecrets.

Install the downloaded chart from its file inside your network. Each new chart version may run new images, so repeat these steps for every upgrade.

When the licence ends, the licence requires your organisation to remove the Tersane charts, and any copies of Tersane images in its own registries, within 30 days of the end date. Your data remains your organisation’s throughout. The licence terms set this out in clause 10.2.