Skip to content

Commit

Permalink
Use port 80 as default
Browse files Browse the repository at this point in the history
  • Loading branch information
g0dsCookie committed Feb 18, 2019
1 parent b96b0f2 commit 5c2b746
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ ENV LDAPAUTHD_LOGLEVEL=INFO \
LDAPAUTHD_USER=nobody \
LDAPAUTHD_UMASK=755 \
LDAPAUTHD_IP=0.0.0.0 \
LDAPAUTHD_PORT=8080 \
LDAPAUTHD_PORT=80 \
LDAP_HOST=dc01.example.org \
LDAP_PORT=636 \
LDAP_SSL=True \
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Configuration for this daemon is read from the current environment. Available co
| LDAPAUTHD_USER | User the daemon should be run with. | nobody |
| LDAPAUTHD_UMASK | Umask the daemon should run with. | 755 |
| LDAPAUTHD_IP | IP address the daemon should listen on. | 0.0.0.0 |
| LDAPAUTHD_PORT | Port the daemon should listen on. | 8080 |
| LDAPAUTHD_PORT | Port the daemon should listen on. | 80 |
| LDAP_HOST | Hostname of your domain controller. | |
| LDAP_PORT | Port on your domain controller to connect to. | 636 |
| LDAP_SSL | Use SSL for ldap connection. | True |
Expand All @@ -65,11 +65,11 @@ You can configure allowed users/groups with HTTP headers. These are all optional

#### Curl example

`$ curl -v --user 'username:password' localhost:8080`
`$ curl -v --user 'username:password' localhost`

With headers:

`$ curl -v --user 'username:password' --header 'X-Ldap-AllowedUsers: username' --header 'X-Ldap-AllowedGroups: group1' localhost:8080`
`$ curl -v --user 'username:password' --header 'X-Ldap-AllowedUsers: username' --header 'X-Ldap-AllowedGroups: group1' localhost`

# Special Thanks

Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ services:
ldapauthd:
image: g0dscookie/ldapauthd
ports:
- 8080:8080
- 80:80
environment:
# loglevel for ldapauthd
#- LDAPAUTHD_LOGLEVEL=INFO
Expand All @@ -14,7 +14,7 @@ services:
# listen on this ip address
#- LDAPAUTHD_IP=0.0.0.0
# listen on this port
#- LDAPAUTHD_PORT=8080
#- LDAPAUTHD_PORT=80
# connect to this ldap host
#- LDAP_HOST=dc01.example.org
# use this port for connection
Expand Down
2 changes: 1 addition & 1 deletion ldapauthd.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def read_env():
"user": os.getenv("LDAPAUTHD_USER", "nobody"),
"umask": int(os.getenv("LDAPAUTHD_UMASK", 755)),
"listen": os.getenv("LDAPAUTHD_IP", "0.0.0.0"),
"port": int(os.getenv("LDAPAUTHD_PORT", 8080)),
"port": int(os.getenv("LDAPAUTHD_PORT", 80)),
},
"ldap": {
"host": os.getenv("LDAP_HOST"),
Expand Down

0 comments on commit 5c2b746

Please sign in to comment.