dropbox / dropbox/PyHive

Cannot use LDAP: Password / LDAP auth not picked up?

Open
#143 10 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
1.7k
Forks
545
PR merge metrics
No merged PRs in 30d

Description

I am trying to use LDAP auth, but I can't see to get the code to accept it:

Input vars:
```
AUTH = LDAP
PRINCIPAL = ""
HOST =
port =
```

```
conn = hive.Connection(host=HOST, port=PORT, auth=AUTH, \
database=databse,kerberos_service_name=PRINCIPAL)
```

I added some output right above this check (which should be logged anyway for debugging, it is not):

```
print "password: " + str(password)
print "auth: " + str(auth)

if (password is not None) != (auth == 'LDAP'):
raise ValueError("password should be set if and only if in LDAP mode")
```

I get this raise even when the password value is "None" and auth value is "LDAP".

It appears this logic check should be:

```
if (password is not None) and (auth != "LDAP"):
```

Agreed?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.