How to Authenticate Using Basic Auth in Dask-Gateway?
See original GitHub issueI added an environmental variable (the password) to a docker file, and then in the helm chart, I reference the environmental variable like so:
auth:
# The auth type to use. One of {simple, kerberos, jupyterhub, custom}.
type: simple
simple:
# A shared password to use for all users.
password: $DASK_GATEWAY_PASSWORD
Now when I try to establish a connection and invoke BasicAuth, it still says I’m unauthorized.
auth = BasicAuth(os.environ['DASK_GATEWAY_PASSWORD'])
gateway = Gateway(
address=os.environ['IP_ADDRESS'],
auth=auth
)
What happened: I cannot establish a connection w/ Dask Gateway when I enter BasicAuth information; I get the following error:
ClientResponseError: 401, message='Unauthorized'
Anything else we need to know?: I am using an internal load balancer on GCP to expose the proxy server. When I wasn’t using the simple authenticator, there were no issues establishing a connection to Dask Gateway
Environment:
- Dask-Gateway-Server version: latest
- Python version: 3.7.8
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (6 by maintainers)
Top Results From Across the Web
Authentication — Dask Gateway 2022.11.0 documentation
This method implements authentication with no validation of the password field ... To do this, you'll need to create a HTTP service principal...
Read more >dask-gateway/auth.py at main
"""Authentication hook before client request is sent. This is only called after a 401 response from the server.
Read more >Connecting to Dask-Gateway cluster from Outside a ...
Log into the Hub (staging.hub.pangeo.io in this example) · Navigate to the Control Panel (File > Hub Control Panel) · Navigate to the...
Read more >python/dask/dask-gateway/dask-gateway/dask_gateway/auth.py
python/dask/dask-gateway/dask-gateway/dask_gateway/auth.py ... pass class BasicAuth(GatewayAuth): """Attaches HTTP Basic Authentication to the given Request ...
Read more >Multi-Cloud workflows with Pangeo and Dask Gateway
In [1]: import getpass import dask from distributed import. Client from dask_gateway import. Gateway. ,. BasicAuth import intake import.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks @droctothorpe, that seemed to do the trick. That was a bad oversight on my part!
We could always use better docs, though I think that should go in the client docs, somewhere in https://gateway.dask.org/configuration-user.html#configuration