OHDSI / WebAPI

OHDSI WebAPI contains all OHDSI services that can be called from OHDSI applications
Apache License 2.0
126 stars 156 forks source link

Getting HTTP/404 for WebAPI/user/* routes #2292

Open tstringer-fn opened 1 year ago

tstringer-fn commented 1 year ago

Expected behavior

Successful authentication.

Actual behavior

Failed authentication. It appears as though Atlas is getting HTTP/404 from WebAPI for the following routes:

I can verify this by running a local curl against WebAPI (away from Atlas) and noticing that WebAPI is in fact giving HTTP/404 for these routes.

I have setup security with the security configuration documentation but ended up in this state and unsure how to troubleshoot further.

Steps to reproduce behavior

I'm am unsure how to repro this, as I follow the documented for security setup.

Any help is much appreciated!

konstjar commented 1 year ago

First question, can you see response from WebAPI/info endpoint? Just to validate that WebAPI is up and running.

tstringer-fn commented 1 year ago

Yes! Sorry, I should've mentioned that. I do see a successful response from WebAPI/info.

eddyfrankenberger commented 1 year ago

Hi @konstjar, any thoughts as to what may be occurring here? I'm seeing the same behavior.

konstjar commented 1 year ago

HTTP/404 response to WebAPI/user/login/db could come in one case when security.provider property is not set correctly. Could you please check that you have AtlasRegularSecurity value set?

And one more note, you said that you have used curl to check. WebAPI/user/login/db is available for POST query only.

eddyfrankenberger commented 1 year ago

The AtlasRegularSecurity value set is set, and I see the 404 response in Chrome when navigating to these endpoints as well.

konstjar commented 1 year ago

In this case you should get 401 for /WebAPI/user/me endpoint in Chrome. Only that endpoint has GET request type.

eddyfrankenberger commented 1 year ago

Hi @konstjar please see attached image of 404 errors in Chrome when navigating to /WebAPI/user/me image (6)

konstjar commented 1 year ago

Just to avoid confusion, did you re-build the WebAPI after pom.xml changes? It looks like application does not see that security.provider property as AtlasRegularSecurity.

eddyfrankenberger commented 12 months ago

I did re-try building the WAR once more after confirming the security.provider property was set to AtlasRegularSecurity in the settings XML file, but I'm still seeing the same behavior.