• Stars
    star
    1,276
  • Rank 36,897 (Top 0.8 %)
  • Language
    Go
  • License
    Apache License 2.0
  • Created over 9 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Authentication server for Docker Registry 2

Docker Registry 2 authentication server

The original Docker Registry server (v1) did not provide any support for authentication or authorization. Access control had to be performed externally, typically by deploying Nginx in the reverse proxy mode with Basic or other type of authentication. While performing simple user authentication is pretty straightforward, performing more fine-grained access control was cumbersome.

Docker Registry 2.0 introduced a new, token-based authentication and authorization protocol, but the server to generate them was not released. Thus, most guides found on the internet still describe a set up with a reverse proxy performing access control.

This server fills the gap and implements the protocol described here.

Supported authentication methods:

  • Static list of users
  • Google Sign-In (incl. Google for Work / GApps for domain) (documented here)
  • Github Sign-In
  • Gitlab Sign-In
  • LDAP bind (demo)
  • MongoDB user collection
  • MySQL/MariaDB, PostgreSQL, SQLite database table
  • External program

Supported authorization methods:

  • Static ACL
  • MongoDB-backed ACL
  • MySQL/MariaDB, PostgreSQL, SQLite backed ACL
  • External program

Installation and Examples

Using Helm/Kubernetes

A helm chart is available in the folder chart/docker-auth.

Docker

A public Docker image is available on Docker Hub: cesanta/docker_auth.

Tags available:

  • :edge - bleeding edge, usually works but breaking config changes are possible. You probably do not want to use this in production.
  • :latest - latest tagged release, will line up with :1 tag
  • :1 - the 1.x version, will have fixes, no breaking config changes. Previously known as :stable.
  • :1.x - specific release, see here for the list of current releases.

The binary takes a single argument - path to the config file. If no arguments are given, the Dockerfile defaults to /config/auth_config.yml.

Example command line:

$ docker run \
    --rm -it --name docker_auth -p 5001:5001 \
    -v /path/to/config_dir:/config:ro \
    -v /var/log/docker_auth:/logs \
    cesanta/docker_auth:1 /config/auth_config.yml

See the example config files to get an idea of what is possible.

Troubleshooting

Run with increased verbosity:

docker run ... cesanta/docker_auth:1 --v=2 --alsologtostderr /config/auth_config.yml

Contributing

Bug reports, feature requests and pull requests (for small fixes) are welcome. If you require larger changes, please file an issue. We cannot guarantee response but will do our best to address them.

Licensing

Copyright 2015 Cesanta Software Ltd.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this software except in compliance with the License. You may obtain a copy of the License at

   https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

More Repositories

1

mongoose

Embedded Web Server
C
11,050
star
2

mongoose-os

Mongoose OS - an IoT Firmware Development Framework. Supported microcontrollers: ESP32, ESP8266, CC3220, CC3200, STM32F4, STM32L4, STM32F7. Amazon AWS IoT, Microsoft Azure, Google IoT Core integrated. Code in C or JavaScript.
C
2,508
star
3

mjs

Embedded JavaScript engine for C/C++
C
1,903
star
4

elk

A low footprint JavaScript engine for embedded systems
C
1,581
star
5

v7

Embedded JavaScript engine for C/C++
C
1,405
star
6

frozen

JSON parser and generator for C/C++ with scanf/printf like interface. Targeting embedded systems.
C
691
star
7

slre

Super Light Regexp engine for C/C++
C
520
star
8

fossa

Async non-blocking multi-protocol networking library for C/C++
C
440
star
9

mjson

C/C++ JSON parser, emitter, JSON-RPC engine for embedded systems
C
402
star
10

ssl_wrapper

Wrap plain TCP traffic into SSL
C
85
star
11

mongoose-os-smart-light

An example of full IOT product based on Mongoose OS
JavaScript
43
star
12

mDash

Arduino / ESP-IDF library for mdash.net IoT service
C
33
star
13

mos-tool

The Mongoose OS command line tool
24
star
14

str

A single header string library for microcontrollers - printf, json, etc
C
23
star
15

mongoose-os-docs

Mongoose OS Documentation
HTML
19
star
16

polar

PorarSSL <-> OpenSSL compatibility layer
C
17
star
17

validate-json

JSON validation tool and library
Go
16
star
18

stm32-bluepill

STM32 BluePill baremetal firmware for remote control via a CCM module
C
12
star
19

mdash-smart-light

a full IoT product reference design
JavaScript
10
star
20

mongoose-os-ide

VSCode extension for Mongoose OS
JavaScript
9
star
21

mip

Mini TCP/IP stack for embedded devices
C
7
star
22

arduino-drivers

C
6
star
23

homebrew-mos

Ruby
6
star
24

ucl

UCL handling library in Go
Go
5
star
25

gopro

go tcp and serial protocol proxy and dumper
Go
5
star
26

tcpuart

TCPUART
Makefile
5
star
27

mongoose-os-device-simulator

C
4
star
28

micro-printf

Tiny extendable printf for microcontrollers
C
3
star
29

mongoose-esp-idf

Mongoose Library component for ESP-IDF
CMake
3
star
30

goxnet

Fork of golang.org/x/net/websocket with fixes
Go
3
star
31

clubby_demo_android

Java
2
star
32

ubjson

Go
2
star
33

mongoose-wizard

2
star
34

vcon-app-example

A complete fleet dashboard built on https://vcon.io IoT platform.
JavaScript
2
star
35

aws-pico-tutorial

HTML
1
star
36

ccm-test-fw

Test firmware projects for CCM
C
1
star
37

mongoose-iot-examples

C
1
star
38

simplelink_mbed

simplelink SPI driver for mbed
C
1
star
39

gerrit-test

Test for gerrithub
C
1
star
40

binary

Makefile
1
star