Skip to content

Commit bce2531

Browse files
authored
Pin ldap3 version and update params for SSL validation (#11)
1 parent d261002 commit bce2531

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

Singularity

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ From: nickjer/singularity-r
4949
"https://bootstrap.pypa.io/get-pip.py"
5050
python3 get-pip.py
5151
rm -f get-pip.py
52-
pip3 install ldap3
52+
pip3 install 'ldap3==2.9'
5353

5454
# Clean up
5555
rm -rf /var/lib/apt/lists/*

Singularity.3.6.2

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ From: nickjer/singularity-r:3.6.2
4949
"https://bootstrap.pypa.io/get-pip.py"
5050
python3 get-pip.py
5151
rm -f get-pip.py
52-
pip3 install ldap3
52+
pip3 install 'ldap3==2.9'
5353

5454
# Clean up
5555
rm -rf /var/lib/apt/lists/*

ldap_auth.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@
1919
LDAPInvalidCredentialsResult - 49 - invalidCredentials - None - 80090308: LdapErr: DSID-0C09042F, comment: AcceptSecurityContext error, data 52e, v2580 - bindResponse - None
2020
failed
2121
22-
[0] A certificate file is only required if the default system
23-
certificate store is not accepted by the LDAP server.
22+
[0] A certificate file is only required if mandated by the LDAP host
23+
and the default system certificate store is not accepted by the LDAP
24+
server.
2425
2526
"""
2627

@@ -77,8 +78,7 @@ def main(arguments):
7778
use_ssl=True,
7879
tls=ldap3.Tls(
7980
ca_certs_file=args.cert_file,
80-
# validate=ssl.CERT_NONE,
81-
validate=ssl.CERT_REQUIRED,
81+
validate=ssl.CERT_OPTIONAL,
8282
),
8383
get_info=ldap3.NONE,
8484
connect_timeout=args.timeout,

0 commit comments

Comments
 (0)