jupyter-incubator / sparkmagic

Jupyter magics and kernels for working with remote Spark clusters
Other
1.33k stars 447 forks source link

configure kernel_python_credentials #777

Closed cometta closed 2 years ago

cometta commented 2 years ago

may i know is it possible to use %%configure to configure kernel_python_credentials so that user key in username and password in jupyster notebook for basic authentication and no need to save password in .sparkmagic/config.json file on the server?

devstein commented 2 years ago

@cometta Yes!

cometta commented 2 years ago

Hello @devstein, I ran below command, but still get 401 for subsequent call . Can you provide snippet to change username/password in %%configure ? For you info, if i keyed in directly in .sparkmagic/config.json, then no issue.

%%configure -f
{

"kernel_python_credentials" : {
    "username": "adhoc_username",
    "password": "adhoc_test",
    "url": "https://url_to_server",
    "auth": "Basic_Access"
},

}

after that i use %%info to check and the session info is correctly displayed. but still showing 401 because it read from incorrect credential from .sparkmagic/config.json instead of user/password i entered

utkarshgupta137 commented 2 years ago

Try #278