You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Airflow SambaHook authentication issue with SpnegoError and Kerberos #29590
I'm trying to use the SambaHook class in Airflow to connect to a Samba server. When I run my code, I get the following error:
Failed to authenticate with server: SpnegoError (1): SpnegoError (16): Operation not supported or available, Context: Retrieving NTLM store without NTLM_USER_FILE set to a filepath, Context: Unable to negotiate common mechanism
However, when I use smbclient to connect to the same server using Kerberos authentication from the Docker terminal, it works fine with the command: smbclient //'myhost'/'fld' -c 'ls "\workpath\*" ' -k
What I tried: I set up a connection to the Samba server in Airflow using the SambaHook class and tried to use the listdirmethod to retrieve a list of files in a specific directory.
What I expected to happen: I expected the listdir method to successfully retrieve a list of files in the specified directory from the Samba server.
What actually resulted: Instead, I encountered the following error message: Failed to authenticate with server: SpnegoError (1): SpnegoError (16): Operation not supported or available, Context: Retrieving NTLM store without NTLM_USER_FILE set to a filepath, Context: Unable to negotiate common mechanism
Activity
boring-cyborg commentedon Feb 17, 2023
Thanks for opening your first issue here! Be sure to follow the issue template!
Taragolis commentedon Feb 17, 2023
According to the the sources SambaHook not implements kerberos auth:
airflow/airflow/providers/samba/hooks/samba.py
Lines 47 to 67 in 2a34dc9
Add auth_protocol support to SambaHook for Kerberos authentication ap…
Add auth_protocol support to SambaHook for Kerberos authentication ap…
Add auth_protocol support to SambaHook for Kerberos authentication ap…
Add auth_protocol support to SambaHook for Kerberos authentication ap…
Add auth_protocol support to SambaHook for Kerberos authentication ap…
Add auth_protocol support to SambaHook for Kerberos authentication ap…
Add auth_protocol support to SambaHook for Kerberos authentication ap…
Add auth_protocol support to SambaHook for Kerberos authentication ap…
Add auth_protocol support to SambaHook for Kerberos authentication ap…
Add auth_protocol support to SambaHook for Kerberos authentication #2…
Add auth_protocol support to SambaHook for Kerberos authentication ap…
Add auth_protocol support to SambaHook for Kerberos authentication ap…