DrydockDrydock
ConfigurationAuthenticationBasic

Basic Authentication

The basic authentication lets you protect drydock access using the Http Basic auth standard.

The basic authentication lets you protect drydock access using the Http Basic auth standard.

Variables

Env varRequiredDescriptionSupported valuesDefault value when missing
DD_AUTH_BASIC_{auth_name}_USER🔴Username
DD_AUTH_BASIC_{auth_name}_HASH🔴Htpasswd compliant hashSee htpasswd documentation
Hash values may contain special characters ($, {, }); don't forget to protect them! Use single quotes in Bash commands DD_AUTH_BASIC_JOHN_HASH='{SHA}1rToTufzHYhhemtgQhRRJy6/Gjo='
Known limitation: Passwords containing colon characters (:) are not supported due to a bug in the underlying passport-http library. Authentication will fail if your password contains a colon. Use passwords without colons until this is resolved.

Examples

services:
  drydock:
    image: codeswhat/drydock
    ...
    environment:
      - DD_AUTH_BASIC_JOHN_USER=john
      - DD_AUTH_BASIC_JOHN_HASH={SHA}1rToTufzHYhhemtgQhRRJy6/Gjo=
      - DD_AUTH_BASIC_JANE_USER=jane
      - DD_AUTH_BASIC_JANE_HASH={SHA}GHntYTv7Vgljq49/TZ+KI9s6PB0=
      - DD_AUTH_BASIC_BOB_USER=bob
      - DD_AUTH_BASIC_BOB_HASH={SHA}tjm75MZa6ep5tCaHAehlaoDJWxQ=
docker run \
  -e DD_AUTH_BASIC_JOHN_USER="john" \
  -e DD_AUTH_BASIC_JOHN_HASH='{SHA}1rToTufzHYhhemtgQhRRJy6/Gjo=' \
  -e DD_AUTH_BASIC_JANE_USER="jane" \
  -e DD_AUTH_BASIC_JANE_HASH='{SHA}GHntYTv7Vgljq49/TZ+KI9s6PB0=' \
  -e DD_AUTH_BASIC_BOB_USER="bob" \
  -e DD_AUTH_BASIC_BOB_HASH='{SHA}tjm75MZa6ep5tCaHAehlaoDJWxQ=' \
  ...
  codeswhat/drydock

How to create a password hash

You can use htpasswd with SHA

htpasswd -nbs john doe

# Output: john:{SHA}1rToTufzHYhhemtgQhRRJy6/Gjo=

Or you can use an online service

Like this one.

On this page