Skip to content

Commit

Permalink
adding token based auth to the manager
Browse files Browse the repository at this point in the history
  • Loading branch information
Naor Livne committed Mar 5, 2019
1 parent e49da6a commit 7e1b63b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ freeze==1.0.10
idna==2.8
ipaddress==1.0.22
kafka-python==1.4.4
NebulaPythonSDK==2.2.0
NebulaPythonSDK==2.2.1
psutil==5.5.1
requests==2.21.0
retrying==1.3.3
Expand Down
3 changes: 2 additions & 1 deletion worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ def get_device_group_info(nebula_connection_object, device_group_to_get_info):
# the following config variables are for configuring Nebula workers
nebula_manager_auth_user = get_conf_setting("nebula_manager_auth_user", auth_file, None)
nebula_manager_auth_password = get_conf_setting("nebula_manager_auth_password", auth_file, None)
nebula_manager_auth_token = get_conf_setting("nebula_manager_auth_token", auth_file, None)
nebula_manager_host = get_conf_setting("nebula_manager_host", auth_file)
nebula_manager_port = int(get_conf_setting("nebula_manager_port", auth_file, "80"))
nebula_manager_protocol = get_conf_setting("nebula_manager_protocol", auth_file, "http")
Expand Down Expand Up @@ -253,7 +254,7 @@ def get_device_group_info(nebula_connection_object, device_group_to_get_info):
# login to the nebula manager
nebula_connection = Nebula(username=nebula_manager_auth_user, password=nebula_manager_auth_password,
host=nebula_manager_host, port=nebula_manager_port, protocol=nebula_manager_protocol,
request_timeout=nebula_manager_request_timeout)
request_timeout=nebula_manager_request_timeout, token=nebula_manager_auth_token)

# make sure the nebula manager connects properly
try:
Expand Down

0 comments on commit 7e1b63b

Please sign in to comment.