Hi Aravind,

Running those curl commands give the same behaviour as you show above. What
I see in Chrome is that once hitting /go I get redirected back to the login
page immediately. Confusingly, using Curl is fine, which led me to do some
digging... I can log in fine using an alternative browser (Firefox), and it
turns out Chrome refuses to accept cookies set on localhost! I'm guessing
you've been using something other than Chrome for your testing?

Glad that mystery is solved

Chris

On 5 July 2017 at 23:57, Aravind SV <[email protected]> wrote:

> Hello Chris,
>
> Ok. That's the same one I tried earlier. It still works for me. I've
> attached the full run log and all other logs, if it helps. What is the
> output of this command, for you?
>
> $ *curl -v 'http://localhost:8153/go/auth/security_check
> <http://localhost:8153/go/auth/security_check>' -H 'Origin:
> http://localhost:8153 <http://localhost:8153>' -H 'Content-Type:
> application/x-www-form-urlencoded' --data
> 'j_username=root&j_password=correct+horse+battery+staple'*
> *   Trying ::1...
> * TCP_NODELAY set
> * Connection failed
> * connect to ::1 port 8153 failed: Connection refused
> *   Trying 127.0.0.1...
> * TCP_NODELAY set
> * Connected to localhost (127.0.0.1) port 8153 (#0)
> > POST /go/auth/security_check HTTP/1.1
> > Host: localhost:8153
> > User-Agent: curl/7.51.0
> > Accept: */*
> > Origin: http://localhost:8153
> > Content-Type: application/x-www-form-urlencoded
> > Connection: keep-alive
> > Content-Length: 55
> >
> * upload completely sent off: 55 out of 55 bytes
> < HTTP/1.1 302 Found
> < Date: Wed, 05 Jul 2017 22:54:47 GMT
> < Expires: Thu, 01 Jan 1970 00:00:00 GMT
> < Set-Cookie: JSESSIONID=11ull5sun5gyw1wn0ikfb1thvu;Path=/go;Expires=Wed,
> 19-Jul-2017 22:54:47 GMT;HttpOnly
> < Location: http://localhost:8153/go/
> < Content-Length: 0
> <
> * Curl_http_done: called premature == 0
> * Connection #0 to host localhost left intact
>
>
>
> and, this one:
>
>
>
> $ *curl -v 'http://localhost:8153/go/auth/security_check
> <http://localhost:8153/go/auth/security_check>' -H 'Origin:
> http://localhost:8153 <http://localhost:8153>' -H 'Content-Type:
> application/x-www-form-urlencoded' --data
> 'j_username=root&j_password=WRONG'*
> *   Trying ::1...
> * TCP_NODELAY set
> * Connection failed
> * connect to ::1 port 8153 failed: Connection refused
> *   Trying 127.0.0.1...
> * TCP_NODELAY set
> * Connected to localhost (127.0.0.1) port 8153 (#0)
> > POST /go/auth/security_check HTTP/1.1
> > Host: localhost:8153
> > User-Agent: curl/7.51.0
> > Accept: */*
> > Origin: http://localhost:8153
> > Content-Type: application/x-www-form-urlencoded
> > Connection: keep-alive
> > Content-Length: 32
> >
> * upload completely sent off: 32 out of 32 bytes
> < HTTP/1.1 302 Found
> < Date: Wed, 05 Jul 2017 22:55:36 GMT
> < Set-Cookie: JSESSIONID=1jd9v0tk1vz2b1ghkuanudcaep;Path=/go;Expires=Wed,
> 19-Jul-2017 22:55:36 GMT;HttpOnly
> < Expires: Thu, 01 Jan 1970 00:00:00 GMT
> < Location: http://localhost:8153/go/auth/login?login_error=1
> < Content-Length: 0
> <
> * Curl_http_done: called premature == 0
> * Connection #0 to host localhost left intact
>
> Cheers,
> Aravind
>
>
> On Wed, Jul 5, 2017 at 5:38 PM, Chris Northwood <[email protected]>
> wrote:
>
>> Hi Aravind,
>>
>> It's the Vagrant box in this repo:
>> https://github.com/cnorthwood/gocd-tls-auth
>>
>> You should just be able to vagrant up, and then hit http://localhost:8153
>> which is mapped through to the VM. I used the old gocd-demo Vagrantfile
>> for
>> the config, but on top of Ubuntu Xenial to get Java 8 (there's some
>> additional stuff in there to get an Apache doing TLS client certificate
>> auth to support the dev of my plugin, but using port 8153 should bypass
>> all
>> that).
>>
>> Chris
>>
>> On 5 July 2017 at 22:37, Chris Northwood <[email protected]> wrote:
>>
>>> Hi Aravind,
>>>
>>> It's the Vagrant box in this repo: https://github.com/cnort
>>> hwood/gocd-tls-auth
>>>
>>> You should just be able to vagrant up, and then hit
>>> http://localhost:8153 which is mapped through to the VM. I used the old
>>> gocd-demo Vagrantfile for the config, but on top of Ubuntu Xenial to get
>>> Java 8 (there's some additional stuff in there to get an Apache doing TLS
>>> client certificate auth to support the dev of my plugin, but using port
>>> 8153 should bypass all that).
>>>
>>> Chris
>>>
>>> On 5 July 2017 at 21:47, Aravind SV <[email protected]> wrote:
>>>
>>>> Hey Chris,
>>>>
>>>> On Wed, Jul 5, 2017 at 7:02 AM, Chris Northwood <[email protected]>
>>>> wrote:
>>>>
>>>>> I'm not running the server on localhost, but on a Vagrant box, and
>>>>> then using the port forwarding feature, I'm unsure if that'll matter?
>>>>>
>>>>
>>>> It's probably related to that, somehow. How can I reproduce this setup?
>>>> Can you provide more information? Is it a remote box that you're somehow
>>>> connecting to?
>>>>
>>>> Cheers,
>>>> Aravind
>>>>
>>>> --
>>>> You received this message because you are subscribed to a topic in the
>>>> Google Groups "go-cd" group.
>>>> To unsubscribe from this topic, visit https://groups.google.com/d/to
>>>> pic/go-cd/la2lmt7C07U/unsubscribe.
>>>> To unsubscribe from this group and all its topics, send an email to
>>>> [email protected].
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "go-cd" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "go-cd" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/go-cd/la2lmt7C07U/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"go-cd" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to