aleph icon indicating copy to clipboard operation
aleph copied to clipboard

new user not authorized?

Open RMHogervorst opened this issue 3 years ago • 9 comments

I run aleph in a kubernetes cluster. I created a user in the shell. this user is also visible in the postgres database. When I log in with a wrong password I get a prompt that the user or password is wrong (So far so good) When I log in with the right password I get a 403 uncaught exception.

specifically, (according to chrome developertools), there is a request to /api/2/role/4 with result a json: {"status","error","message":"You are not authorized to do this.", "roles":[1]} The other request is to /api/2/alerts?limit=9999

RMHogervorst avatar Apr 21 '22 14:04 RMHogervorst

I see no rows in permissions, no rows in role_membership

Did I create a user without permissions?

RMHogervorst avatar Apr 21 '22 14:04 RMHogervorst

oh wait it does say somewhere I should run aleph upgrade from shell too!

RMHogervorst avatar Apr 22 '22 06:04 RMHogervorst

upgrade does not fix the problem

RMHogervorst avatar Apr 22 '22 07:04 RMHogervorst

Can you check whether Aleph is sending an authrization token in the request header for the request to api/2/roles/4? From the error message it looks to me like Aleph is treating you like an anonymous user.

sunu avatar Apr 22 '22 12:04 sunu

That seems to be the problem, when i curl to the api with the authorization header i do get something back

RMHogervorst avatar Apr 22 '22 14:04 RMHogervorst

I think this is enough for me to get on track, I will get back when I found a solution, thanks for the help!

RMHogervorst avatar Apr 22 '22 15:04 RMHogervorst

@RMHogervorst Do you have an update on this issue. Did you manage to find a solution?

Rosencrantz avatar May 18 '22 14:05 Rosencrantz

I havent solved it yet but it seems the forwarding didnt work as expected

RMHogervorst avatar May 18 '22 15:05 RMHogervorst

So the requests were stripped of the auth header

RMHogervorst avatar May 18 '22 15:05 RMHogervorst

@RMHogervorst This ticket has been very quiet. Were you ever able to resolve this issue?

Rosencrantz avatar Nov 02 '22 12:11 Rosencrantz

To be honest I gave up

RMHogervorst avatar Nov 02 '22 12:11 RMHogervorst