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
2
2
3
3
RUN set -eu \
4
4
&& cecho() { echo "\0 33[1;32m$1\0 33[0m" ; } \
@@ -17,6 +17,7 @@ ENV LDAPAUTHD_LOGLEVEL=INFO \
17
17
LDAPAUTHD_PORT=80 \
18
18
LDAPAUTHD_REALM=Authorization\ required \
19
19
LDAPAUTHD_SESSION_STORAGE=memcached \
20
+ LDAPAUTHD_SESSION_PREFIX= \
20
21
LDAPAUTHD_SESSION_DOMAIN= \
21
22
LDAPAUTHD_SESSION_HOST=sessiondb:11211 \
22
23
LDAPAUTHD_SESSION_TTL=900 \
Original file line number Diff line number Diff line change 1
1
MAJOR ?= 1
2
- MINOR ?= 2
3
- PATCH ?= 3
2
+ MINOR ?= 3
3
+ PATCH ?= 0
4
4
5
5
TAG = g0dscookie/ldapauthd
6
6
TAGLIST = -t ${TAG}:${MAJOR} -t ${TAG}:${MAJOR}.${MINOR} -t ${TAG}:${MAJOR}.${MINOR}.${PATCH}
7
7
BUILDARGS = --build-arg VERSION=${MAJOR}.${MINOR}.${PATCH}
8
8
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 :
22
10
docker build ${BUILDARGS} ${TAGLIST} .
23
11
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
27
14
28
- .PHONY : clean
29
15
clean :
30
- docker rmi -f $(shell docker images -aq ${TAG})
16
+ docker rmi -f $(shell docker images -qt ${TAG})
31
17
32
- .PHONY : push
33
18
push :
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
80
80
| LDAPAUTHD_USER | User the daemon should be run with. | nobody |
81
81
| LDAPAUTHD_REALM | String to set in WWW-Authenticate. | Authorization required |
82
82
| 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 | |
83
84
| LDAPAUTHD_SESSION_DOMAIN | Set domain for your session cookie. | |
84
85
| LDAPAUTHD_SESSION_HOST | Host address of your session storage. | localhost:11211 |
85
86
| 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:
19
19
# - LDAPAUTHD_REALM=Authorization required
20
20
# Choose session storage backend. Available: memcached
21
21
# - LDAPAUTHD_SESSION_STORAGE=memcached
22
+ # Key prefix to avoid collisions inside memcache when running multiple ldapauthd instances
23
+ # - LDAPAUTHD_SESSION_PREFIX=
22
24
# Set domain for your session cookie.
23
25
# - LDAPAUTHD_SESSION_DOMAIN=
24
26
# Host address of your session storage.
Original file line number Diff line number Diff line change @@ -230,7 +230,7 @@ def __init__(self):
230
230
"connect_timeout" : 10 ,
231
231
"timeout" : 10 ,
232
232
"no_delay" : True ,
233
- "key_prefix" : b"lad_sess_" ,
233
+ "key_prefix" : b"lad_sess_" + os . getenv ( "LDAPAUTHD_SESSION_PREFIX" , "" ). encode ( "utf8" ) ,
234
234
}
235
235
self ._client = base .Client (host , ** _opts )
236
236
self ._retryCount = int (os .getenv ("LDAPAUTHD_SESSION_RETRY" , 1 ))
You can’t perform that action at this time.
0 commit comments