How to login sso in knox via rest api

228 views Asked by At

I'd like to call rest api of zeppelin behind knox. The following code works if I didn't enable knox sso. But it won't work if I enabled sso, does anyone know can I call zeppelin rest api in this case ? Thanks

response = Unirest.get("https://localhost:8443/gateway/sandbox/zeppelin/api/notebook")
        .basicAuth("guest", "guest-password")
        .asString();
System.out.println(response.getBody());
1

There are 1 answers

0
lmccay On

You need to add a new topology for API use that leverages HTTP Basic from the ShiroProvider. This will allow the use of username and password as you are doing above without removing the SSO support for UIs that you have presumably added to the sandbox.xml topology.