[FOLIO-1059] Error from stripes UI settings/about page OKAPI version shows unknown Created: 08/Feb/18 Updated: 12/Nov/18 Resolved: 03/Apr/18 |
|
| Status: | Closed |
| Project: | FOLIO |
| Components: | None |
| Affects versions: | None |
| Fix versions: | None |
| Type: | Bug | Priority: | P2 |
| Reporter: | Tanuja Gadde | Assignee: | Adam Dickmeiss |
| Resolution: | Cannot Reproduce | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | 1 hour | ||
| Original estimate: | Not Specified | ||
| Attachments: |
|
| Sprint: |
| Description |
|
1) Enable mod-permissions, mod-login, mod-users, mod-users-bl, mod-configuration for the OKAPI supertenant |
| Comments |
| Comment by Mike Taylor [ 08/Feb/18 ] |
|
On my local dev setup (with a folio-testing-backend VM) I see
On my http://folio-snapshot.aws.indexdata.com/ I see the same. So is this something you are seeing only on your local development setup? |
| Comment by Mike Taylor [ 08/Feb/18 ] |
|
If you look at the Network tab of your browser's development tools when FOLIO starts up (e.g. after you hit Reload), you should see that one of the first requests it makes is for What is the response? |
| Comment by Tanuja Gadde [ 08/Feb/18 ] |
|
We are seeing this within our hosting environment.I belive one of the major difference is enabling the supertenant as x-okapi-tenant and using supertenant to generate the auth token. Here is the Reponse from console browser. *Req: curl -vi {foliohostingurl}/_/version *Response: > User-Agent: curl/7.53.1 > Accept: / > < HTTP/1.1 400 Bad Request HTTP/1.1 400 Bad Request < Date: Thu, 08 Feb 2018 17:38:40 GMT Date: Thu, 08 Feb 2018 17:38:40 GMT < Transfer-Encoding: chunked Transfer-Encoding: chunked < Connection: keep-alive Connection: keep-alive < Server: nginx/1.10.3 Server: nginx/1.10.3 < X-Okapi-Trace: GET mod-authtoken-1.2.0-SNAPSHOT.77 X-Okapi-Trace: GET mod-authtoken-1.2.0-SNAPSHOT.77 < Missing header: X-Okapi-Tenant *Req: curl -vi {foliohostingurl} /_/version -H "x-okapi-tenant:supertenant" |
| Comment by Mike Taylor [ 08/Feb/18 ] |
|
Assigning to Adam as this seems to be an Okapi-specific issue. |
| Comment by Adam Dickmeiss [ 09/Feb/18 ] |
|
Don't see the response above .. Length is 14, but what is the content?? |
| Comment by Tanuja Gadde [ 09/Feb/18 ] |
|
The response comes back as 2.8.4-SNAPSHOT
curl -vi {foliohostingurl}/_/version -H "x-okapi-tenant:supertenant"
* TCP_NODELAY set
* Connected to {hosturl} port 9130 (#0)
> GET /_/version HTTP/1.1
> Host: {hosturl}
> User-Agent: curl/7.53.1
> Accept: */*
> x-okapi-tenant:supertenant
>
< HTTP/1.1 200 OK
HTTP/1.1 200 OK
< Date: Fri, 09 Feb 2018 14:03:30 GMT
Date: Fri, 09 Feb 2018 14:03:30 GMT
< Content-Type: text/plain
Content-Type: text/plain
< Content-Length: 14
Content-Length: 14
< Connection: keep-alive
Connection: keep-alive
< Server: nginx/1.10.3
Server: nginx/1.10.3
< X-Okapi-Trace: GET mod-authtoken-1.2.0-SNAPSHOT.77{url} : 202 4019us
X-Okapi-Trace: GET mod-authtoken-1.2.0-SNAPSHOT.77 {url}: 202 4019us
< X-Okapi-Trace: GET okapi-2.8.4-SNAPSHOT /_/version : 200 370us
X-Okapi-Trace: GET okapi-2.8.4-SNAPSHOT /_/version : 200 370us
<
* Connection #0 to host {url} left intact
2.8.4-SNAPSHOT
|
| Comment by Craig McNally [ 13/Feb/18 ] |
|
I think the problem is more broad than the title implies... Based on what I'm seeing, it looks like stripes is failing to send the X-Okapi-Tenant and X-Okapi-Token headers when making these requests... So if you have OKAPI locked down, these calls can't succeed, and the about page is useless. |
| Comment by Heikki Levanto [ 13/Feb/18 ] |
|
Hmm, yes. If there is no X-Okapi-Tenant or -Token header, Okapi can not figure which tenant the call is made for, and can not see which modules should be enabled. Of course the okapi version should be the same for all tenants, but the routing of the request still needs to have a tenant at hand. The actual version request does not seem to need any specific permissions. So it ought to be enough to pass the X-Okapi-Tenant header to get the version. passing a (valid) token should also work. |
| Comment by Adam Dickmeiss [ 03/Apr/18 ] |
|
Can not reproduce in Okapi at least. |
| Comment by Craig McNally [ 12/Jun/18 ] |
|
This is still an issue for us... If OKAPI is locked down, the about page breaks. The problem is that the UI isn't sending either: X-Okapi-Tenant or X-Okapi-Token on the call to //version or //proxy/tenants/fs00000000/modules?full=true when the page loads. As such, you get 400 responses: $ curl http://pvt.lb.fse.folio-eis.us-east-1:9130/_/version -v * Trying 10.23.32.8... * TCP_NODELAY set * Connected to pvt.lb.fse.folio-eis.us-east-1 (10.23.32.8) port 9130 (#0) > GET /_/version HTTP/1.1 > Host: pvt.lb.fse.folio-eis.us-east-1:9130 > User-Agent: curl/7.53.1 > Accept: */* > < HTTP/1.1 400 Bad Request < Date: Tue, 12 Jun 2018 19:14:29 GMT < Transfer-Encoding: chunked < Connection: keep-alive < Server: nginx/1.10.3 < X-Okapi-Trace: GET mod-authtoken-1.4.1-SNAPSHOT.107 http://pvt.lb.fse.folio-eis.us-east-1:8051/mod-authtoken/_/version : 400 4989us < * Connection #0 to host pvt.lb.fse.folio-eis.us-east-1 left intact Missing header: X-Okapi-Tenant $ curl 'http://pvt.lb.fse.folio-eis.us-east-1:9130/_/proxy/tenants/fs00000000/modules?full=true' -v * Trying 10.23.32.8... * TCP_NODELAY set * Connected to pvt.lb.fse.folio-eis.us-east-1 (10.23.32.8) port 9130 (#0) > GET /_/proxy/tenants/fs00000000/modules?full=true HTTP/1.1 > Host: pvt.lb.fse.folio-eis.us-east-1:9130 > User-Agent: curl/7.53.1 > Accept: */* > < HTTP/1.1 400 Bad Request < Date: Tue, 12 Jun 2018 19:16:00 GMT < Transfer-Encoding: chunked < Connection: keep-alive < Server: nginx/1.10.3 < X-Okapi-Trace: GET mod-authtoken-1.4.1-SNAPSHOT.107 http://pvt.lb.fse.folio-eis.us-east-1:8051/mod-authtoken/_/proxy/tenants/fs00000000/modules.. : 400 3930us < * Connection #0 to host pvt.lb.fse.folio-eis.us-east-1 left intact Missing header: X-Okapi-Tenant |
| Comment by Craig McNally [ 12/Jun/18 ] |
| Comment by Craig McNally [ 12/Jun/18 ] |
|
Note that if you explicitly provide "X-Okapi-Tenant: supertenant" these work fine... $ curl http://pvt.lb.fse.folio-eis.us-east-1:9130/_/version -v -H "X-Okapi-Tenant: supertenant" * Trying 10.23.32.69... * TCP_NODELAY set * Connected to pvt.lb.fse.folio-eis.us-east-1 (10.23.32.69) port 9130 (#0) > GET /_/version HTTP/1.1 > Host: pvt.lb.fse.folio-eis.us-east-1:9130 > User-Agent: curl/7.53.1 > Accept: */* > X-Okapi-Tenant: supertenant > < HTTP/1.1 200 OK < Date: Tue, 12 Jun 2018 19:25:55 GMT < Content-Type: text/plain < Content-Length: 15 < Connection: keep-alive < Server: nginx/1.10.3 < X-Okapi-Trace: GET mod-authtoken-1.4.1-SNAPSHOT.107 http://pvt.lb.fse.folio-eis.us-east-1:8051/mod-authtoken/_/version : 202 5684us < X-Okapi-Trace: GET okapi-2.14.2-SNAPSHOT /_/version : 200 518us < * Connection #0 to host pvt.lb.fse.folio-eis.us-east-1 left intact 2.14.2-SNAPSHOT |
| Comment by Craig McNally [ 12/Jun/18 ] |
|
Adam Dickmeiss FYI: https://github.com/folio-org/stripes-core/pull/322 |
| Comment by Tanuja Gadde [ 19/Jun/18 ] |
|
Closing since this is fixed now. |