Hey John, I looked at the Drill code and it does use the Jetty FormAuthenticator and not the BasicAuthenticator. So what I was trying will not work.
I'll do as you suggested and post the login form to get a JSESSION cookie back. I'm using Python as well. So I'll do what you suggested. Thanks! Jean-Claude On Wed, Mar 23, 2016 at 8:30 PM, John Omernik <[email protected]> wrote: > Yes, to do authenticated requests, I create a session object with Python > requests, post creds to the login page, get the session cookies, and them > do the queries. I do not believe Drill supports just using basic auth. > This as far as I can tell is actually a good thing because forces you to > manage session cookie which allows you to issue multiple queries such as > use schema them your query, or configure session level options. > > Not sure what you are using to connect, Python requests is really simple. > > John > > On Wednesday, March 23, 2016, Jean-Claude Cote <[email protected]> wrote: > > > I'm trying to send queries via the /query.json REST endpoint. This works > > just fine however if I turn > > > > on authentication I get a 307 redirect to the login page. > > > > So I added the HTTP header Authorization: Basic dm9yZGVsOnZvcmRlbA== > > > > but I'm still getting a 307 redirect to the login page. Is that normal? > > > > > > Thanks > > > > Jean-Claude > > > > > -- > Sent from my iThing >
