File tree Expand file tree Collapse file tree 5 files changed +15
-24
lines changed
Expand file tree Collapse file tree 5 files changed +15
-24
lines changed Original file line number Diff line number Diff line change 1- FROM alpine:3.9
1+ FROM alpine:3.11
22
33RUN set -eu \
44 && cecho() { echo "\0 33[1;32m$1\0 33[0m" ; } \
@@ -17,6 +17,7 @@ ENV LDAPAUTHD_LOGLEVEL=INFO \
1717 LDAPAUTHD_PORT=80 \
1818 LDAPAUTHD_REALM=Authorization\ required \
1919 LDAPAUTHD_SESSION_STORAGE=memcached \
20+ LDAPAUTHD_SESSION_PREFIX= \
2021 LDAPAUTHD_SESSION_DOMAIN= \
2122 LDAPAUTHD_SESSION_HOST=sessiondb:11211 \
2223 LDAPAUTHD_SESSION_TTL=900 \
Original file line number Diff line number Diff line change 11MAJOR ?= 1
2- MINOR ?= 2
3- PATCH ?= 3
2+ MINOR ?= 3
3+ PATCH ?= 0
44
55TAG = g0dscookie/ldapauthd
66TAGLIST = -t ${TAG}:${MAJOR} -t ${TAG}:${MAJOR}.${MINOR} -t ${TAG}:${MAJOR}.${MINOR}.${PATCH}
77BUILDARGS = --build-arg VERSION=${MAJOR}.${MINOR}.${PATCH}
88
9- .PHONY : nothing
10- nothing :
11- @echo " No job given."
12- @exit 1
13-
14- .PHONY : all
15- all : alpine3.9
16-
17- .PHONY : all-latest
18- all-latest : alpine3.9-latest
19-
20- .PHONY : alpine3.9
21- alpine3.9 :
9+ build :
2210 docker build ${BUILDARGS} ${TAGLIST} .
2311
24- .PHONY : alpine3.9-latest
25- alpine3.9-latest :
26- docker build ${BUILDARGS} -t ${TAG} :latest ${TAGLIST} .
12+ latest : TAGLIST := -t ${TAG}:latest ${TAGLIST}
13+ latest : build
2714
28- .PHONY : clean
2915clean :
30- docker rmi -f $(shell docker images -aq ${TAG})
16+ docker rmi -f $(shell docker images -qt ${TAG})
3117
32- .PHONY : push
3318push :
34- docker push $(TAG )
19+ docker push ${TAG}
20+
21+ .PHONY : build latest clean push
Original file line number Diff line number Diff line change @@ -80,6 +80,7 @@ Configuration for this daemon is read from the current environment. Available co
8080| LDAPAUTHD_USER | User the daemon should be run with. | nobody |
8181| LDAPAUTHD_REALM | String to set in WWW-Authenticate. | Authorization required |
8282| LDAPAUTHD_SESSION_STORAGE | Choose session storage backend. Available: memcached | memcached |
83+ | LDAPAUTHD_SESSION_PREFIX | Key prefix to avoid collisions inside memcache when running multiple ldapauthd instances | |
8384| LDAPAUTHD_SESSION_DOMAIN | Set domain for your session cookie. | |
8485| LDAPAUTHD_SESSION_HOST | Host address of your session storage. | localhost:11211 |
8586| LDAPAUTHD_SESSION_TTL | Maximum TTL for sessions in seconds. | 900 |
Original file line number Diff line number Diff line change @@ -19,6 +19,8 @@ services:
1919 # - LDAPAUTHD_REALM=Authorization required
2020 # Choose session storage backend. Available: memcached
2121 # - LDAPAUTHD_SESSION_STORAGE=memcached
22+ # Key prefix to avoid collisions inside memcache when running multiple ldapauthd instances
23+ # - LDAPAUTHD_SESSION_PREFIX=
2224 # Set domain for your session cookie.
2325 # - LDAPAUTHD_SESSION_DOMAIN=
2426 # Host address of your session storage.
Original file line number Diff line number Diff line change @@ -230,7 +230,7 @@ def __init__(self):
230230 "connect_timeout" : 10 ,
231231 "timeout" : 10 ,
232232 "no_delay" : True ,
233- "key_prefix" : b"lad_sess_" ,
233+ "key_prefix" : b"lad_sess_" + os . getenv ( "LDAPAUTHD_SESSION_PREFIX" , "" ). encode ( "utf8" ) ,
234234 }
235235 self ._client = base .Client (host , ** _opts )
236236 self ._retryCount = int (os .getenv ("LDAPAUTHD_SESSION_RETRY" , 1 ))
You can’t perform that action at this time.
0 commit comments