Skip to content
Menu

Quick start#

This quick start copies the example config and environment file, validates them, builds the gateway image, and runs the rig against a mock provider. You need Docker and nothing else; the steps run PHP and Composer inside the composer:2.11.1 container.

Step 1: Clone the repository and install dependencies#

PowerShell

git clone https://git.wayne.edu/enterprise-apps/drawbridge.git; cd drawbridge
docker run --rm -v "${PWD}:/app" -w /app composer:2.11.1@sha256:8de2184c6de224f4689e8f80ed5f5edaf0030b6b8b7839a22a2bcb6722ac87d0 composer install --no-interaction

sh

git clone https://git.wayne.edu/enterprise-apps/drawbridge.git && cd drawbridge
docker run --rm -v "$PWD:/app" -w /app composer:2.11.1@sha256:8de2184c6de224f4689e8f80ed5f5edaf0030b6b8b7839a22a2bcb6722ac87d0 composer install --no-interaction

Step 2: Copy the example config and environment file#

PowerShell

Copy-Item .env.example .env
Copy-Item config\drawbridge.example.yaml config\drawbridge.yaml

sh

cp .env.example .env
cp config/drawbridge.example.yaml config/drawbridge.yaml

You now have .env and config/drawbridge.yaml, both copied from the examples. The gateway image also needs the signing.key file and the two secrets in its environment to start; the rig supplies throwaway values for all of them.

Step 3: Validate the config#

docker run --rm -v "$PWD:/app" -w /app composer:2.11.1@sha256:8de2184c6de224f4689e8f80ed5f5edaf0030b6b8b7839a22a2bcb6722ac87d0 php bin/drawbridge config:validate --config=config/drawbridge.yaml

The same command runs on Windows (PowerShell), with ${PWD} in place of $PWD. See Commands for what config:validate reports.

Step 4: Build the gateway image#

docker build -f docker/gateway/Dockerfile -t drawbridge-gateway .

Expected result: the image is built and tagged drawbridge-gateway.

Step 5: Run the rig against the mock provider#

The container rig is the local trial: the real gateway image, a mock OpenID Connect provider standing in for Entra, and a tiny echo app. It signs in synthetic users through the mock and checks protected and public paths, spoofed headers, forged callbacks, logout and step-up to an authentication context. Nothing in the rig reaches Entra.

PowerShell

rig\run.ps1          # Windows

sh

sh rig/run.sh        # Linux, macOS

Expected result: the rig is green. When the rig is green, the next step is the first real sign-in, which ENTRA_TEST.md walks through.

What you built#

You have the gateway image drawbridge-gateway built from docker/gateway/Dockerfile, a validated config/drawbridge.yaml copied from the example, and a green rig run: the real gateway image in front of a mock OpenID Connect provider and a tiny echo app, with protected and public paths, spoofed headers, forged callbacks, logout and step-up all checked.

Next steps#