Skip to content

Commit

Permalink
docs: quick setup steps for github auth (cesanta#234)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamdecaf authored and rojer committed Jun 1, 2018
1 parent 3420ca1 commit e10780b
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ This server fills the gap and implements the protocol described [here](https://g
Supported authentication methods:
* Static list of users
* Google Sign-In (incl. Google for Work / GApps for domain) (documented [here](https://github.com/cesanta/docker_auth/blob/master/examples/reference.yml))
* [Github Sign-In](docs/auth-methods.md#github)
* LDAP bind ([demo](https://github.com/kwk/docker-registry-setup))
* MongoDB user collection
* [External program](https://github.com/cesanta/docker_auth/blob/master/examples/ext_auth.sh)
Expand Down
26 changes: 26 additions & 0 deletions docs/auth-methods.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
## Github

First you need to setup a [Github OAuth Application](https://github.com/settings/applications).

- The callback url needs to be `$fqdn:5001/github_auth`
- `$fqdn` is the domain where docker_auth is accessed
- `5001` or what port is specified in the `server` block

Once you have setup a Github OAuth application you need to add a `github` block to the docker_auth config file:

```yaml
github_auth:
organization: "my-org-name"
client_id: "..."
client_secret: "..." # or client_secret_file
token_db: /data/tokens.db
```
Then specify what teams can do via acls
```yaml
acl:
- match: {team: "infrastructure"}
actions: ["pull", "push"]
comment: "Infrastructure team members can push and all images"
```

0 comments on commit e10780b

Please sign in to comment.