Allows access to a Business Central backend and lets the sandbox proxy inject Basic auth credenti...
380
Allows access to a Business Central backend and lets the sandbox proxy inject Basic auth credentials for it. The credentials stay on the host.
| Name | Required | Default | Description |
|---|---|---|---|
host | Required | — | Hostname of the Business Central backend, e.g. bc.example.com |
| Type | Required | Description | |
|---|---|---|---|
com.docker.sandbox/network-policy@1 | Required | — | |
com.docker.sandbox/credential@1 | Required | Business Central username and password, stored on the host as base64 of `user:password`; the proxy injects it as Basic auth on requests to the backend. | |
sbx run <agent> --kit sbx/bc-basic-auth:latest --set host=<host>Run the following command to install sbx on your machine.
brew install docker/tap/sbxwinget install Docker.sbxNote
Experimental: Sandbox Kit v3This kit uses the experimental Sandbox Kit specification, specifically v3. The format and runtime behavior may change before v3 is stable.
A declaration-only mixin that allows access to a Microsoft Dynamics 365 Business Central backend and injects Basic authentication through the sandbox credential proxy. The username and password stay on the host.
Store the credentials on the host under the microsoft-bc service as base64-encoded
username:password:
$ sbx secret set -g microsoft-bc "$(printf '%s:%s' '<username>' '<password>' | base64 | tr -d '\n')"
The credential is required: sandbox creation fails when the microsoft-bc secret is not
available.
Set host to the Business Central backend hostname, without a scheme, port, or
path:
$ sbx run \
--kit docker.io/sbx/bc-basic-auth:latest \
--kit-arg bc-basic-auth.host=bc.example.com \
<agent>
Or directly from this repository:
$ sbx run \
--kit "git+https://github.com/docker/sbx-kits-contrib.git#dir=bc-basic-auth" \
--kit-arg bc-basic-auth.host=bc.example.com \
<agent>
Or from a local clone:
$ sbx run \
--kit ./bc-basic-auth \
--kit-arg bc-basic-auth.host=bc.example.com \
<agent>
Kit v3 needs an sbx release candidate or nightly build from
docker/sbx-releases; the
stable line does not load v3 kits.
The kit contributes no files and runs no lifecycle hooks. It declares the backend host in the runtime network policy and registers a required credential for the same host.
When a process sends a request to the configured backend, the sandbox proxy sets this header:
Authorization: Basic <base64(username:password)>
The container never receives the real credential or a placeholder environment variable. Requests to other hosts are not given the credential.
The runtime allow list contains only the hostname supplied through the required
host argument. Add any separate identity, API, or download hosts needed by
your environment through another kit or a per-sandbox network rule.
Remove the stored credential when it is no longer needed:
$ sbx secret rm -g microsoft-bc