Sign inSign up

sbx/bc-basic-auth

Verified Publisher

By Docker, Inc

•Updated about 5 hours ago

Allows access to a Business Central backend and lets the sandbox proxy inject Basic auth credenti...

Sandbox Kit
0

380

sbx/bc-basic-auth repository overview

Digest

sha256:47ad9bf8cde0…

Size

717 Bytes

Schema

v3

Pushed

about 5 hours ago

Specificationspec.yaml

MIXIN

Allows access to a Business Central backend and lets the sandbox proxy inject Basic auth credentials for it. The credentials stay on the host.


Arguments
NameRequiredDefaultDescription
hostRequired—

Hostname of the Business Central backend, e.g. bc.example.com


CapabilitiesExpand a row to see its full configuration. See the full spec for the complete descriptor.
TypeRequiredDescription
com.docker.sandbox/network-policy@1Required—
com.docker.sandbox/credential@1RequiredBusiness 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.

Apply this mixin to a sandbox

sbx run <agent> --kit sbx/bc-basic-auth:latest --set host=<host>

Make sure you have docker sbx installed

Run the following command to install sbx on your machine.

macOS
brew install docker/tap/sbx
Windows
winget install Docker.sbx
Learn more about docker sbx⁠

Note

Experimental: Sandbox Kit v3

This kit uses the experimental Sandbox Kit specification⁠, specifically v3⁠. The format and runtime behavior may change before v3 is stable.

⁠bc-basic-auth

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.

⁠Prerequisites

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.

⁠Usage

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.

⁠How authentication works

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.

⁠Network policy

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.

⁠Cleanup

Remove the stored credential when it is no longer needed:

$ sbx secret rm -g microsoft-bc