Status=404 text_status="Not Found" /oauth2/auth/requests/login/{challange}


#1

I have run hydra, postgresql, and hydra-login-consent-node in my local kubernetes.
I have made test client.
When I attempt to perform login, the authorization flow returns error in login GET request.
Hydra sends redirect to hydra-login-consent-node whit challange. Then the hydra-login-consent-node sends GET to hydra’s endpoint /oauth2/auth/requests/login/{challange} and the result is HTTP 404.

There is log from hydra (I put XXXX in place of IP and dns names):

time=“2018-12-17T14:24:34Z” level=info msg=“started handling request” method=GET remote=XXXX request="/oauth2/auth?response_type=token&client_id=dingo&redirect_uri=https%3A%2F%2FXXXXXXX%2Fcallback&scope=openid&state=123456189&prompt=&max_age=0"
time=“2018-12-17T14:24:34Z” level=info msg=“completed handling request” measure#XXXXXXXX/.latency=12279057 method=GET remote=10.5.15.108 request="/oauth2/auth?response_type=token&client_id=xxxxxx&redirect_uri=https%3A%2F%2FXXXXXXXXXXXX%2Fcallback&scope=openid&state=123456189&prompt=&max_age=0" status=302 text_status=Found took=12.279057ms
time=“2018-12-17T14:24:34Z” level=info msg=“started handling request” method=GET remote=XXXXXXXX request=/oauth2/auth/requests/login/223e348b4eb8438e83ec3efd20126bcc
time=“2018-12-17T14:24:34Z” level=info msg=“completed handling request” measure#XXXXXXXXXX/.latency=97126 method=GET remote=XXXXXXX request=/oauth2/auth/requests/login/223e348b4eb8438e83ec3efd20126bcc status=404 text_status=“Not Found” took="97.126µs

There is log from my hydra-login-consent-node app (I have modified the app, and put console.log in hydra.js line 17):

GET /login?login_challenge=ba2e6129effd4963bbc53f61ee4a5ab6 500 34.161 ms - 641
response /oauth2/auth/requests/login/223e348b4eb8438e83ec3efd20126bcc: Response {
_ size: 0,_
_ timeout: 0,_
_ [Symbol(Body internals)]:_
_ { body:_
_ PassThrough {_
_ readableState: [ReadableState],
_ readable: true,_
_ domain: null,_
_ events: [Object],
_ eventsCount: 3,
_ maxListeners: undefined,
_ writableState: [WritableState],
_ writable: false,_
_ allowHalfOpen: true,_
_ transformState: [Object] },
_ disturbed: false,_
_ error: null },_
_ [Symbol(Response internals)]:_
_ { url: ‘XXXXXXXX/oauth2/auth/requests/login/223e348b4eb8438e83ec3efd20126bcc’,_
_ status: 404,_
_ statusText: ‘Not Found’,_
_ headers: Headers { [Symbol(map)]: [Object] } } }_

Any idea what I did wrong?

Hydra version is docker.io/oryd/hydra:v1.0.0-rc.5_oryOS.10

I found that in hydra’s code in /consent/manager_sql.go, method GetAuthenticationRequest is query:
SELECT r.*, COALESCE(hr.was_used, false) as was_handled FROM hydra_oauth2_authentication_request r "+
"LEFT JOIN hydra_oauth2_authentication_request_handled hr ON r.challenge = hr.challenge WHERE r.challenge=?

I have run this query from pgsql. It return 1 row.


#2

You migh be calling the wrong port (public vs admin)


#3

I call public port. It should be admin I guess? Tomorow I will check it out.


#4

Thanks for help. It works :slight_smile: