Try the fastest and simplest way to install ONLYOFFICE

[SOLVED] Document Server 5.2.3 - no Authorization header

Integration questions/issues

[SOLVED] Document Server 5.2.3 - no Authorization header

Postby AndrewG » Thu Nov 15, 2018 2:01 pm

Hello everyone,

just upgraded the Docker image to the latest version and...., and integration with Document Server got broken.
Diagnostics shows that NO Authorization header (with Bearer) JWT token is being sent anymore from Document Server to the callBack URL.

Basically I am talking about most first step after opening the document, when Document Server sends POST request to the callBack URL, and Document Storage Server (in this case - our implementation) returns {"error": 0}
https://api.onlyoffice.com/editors/callback#error-0

Before upgrade this POST request was sent with "Authorization Bearer XXXXX.XXXX.XXXX" header, but now - no "Authorization" header present at all.

Before docker image upgrade (I think I had version 5.1.X) everything worked absolutely fine!
Also I do confirm that all settings are set according to: https://api.onlyoffice.com/editors/signature/

I have tried the inBody param, but that also didn't help, nothing was added to the POST body except standard content.
https://api.onlyoffice.com/editors/signature/body

Any suggestions?

Thank you!
Last edited by AndrewG on Sat Nov 17, 2018 10:36 am, edited 1 time in total.
--
Best regards,
Andrew
User avatar
AndrewG
 
Posts: 22
Joined: Sat May 06, 2017 3:09 am

Re: Document Server 5.2.3 - no Authorization header

Postby Carl » Fri Nov 16, 2018 7:53 am

Hello,

The config of Document Server was probably reverted to default after the update. In order to avoid it, we recommend to set JWT parameters as environment variables when running a container:
https://github.com/ONLYOFFICE/Docker-Do ... parameters

You can also change the settings manually: enter the container and open the file /etc/onlyoffice/documentserver/local.json. Enter your JWT settings there and restart all document server services: supervisorctl restart all. But in this case the changes will be again reverted after next update.
Carl
 
Posts: 92
Joined: Thu Apr 12, 2018 10:00 am

Re: Document Server 5.2.3 - no Authorization header

Postby AndrewG » Sat Nov 17, 2018 3:22 am

Hi Carl,

thank you so much! Your suggestion helped me to fix the issue!

Some insights: usually I was manually adjusting the default.json inside container after Docker image update, as I use different keys for inbox and outbox. But looks like around 7 month ago the Docker configuration was changed from reading default.json to reading local.json
Here is the change: https://github.com/ONLYOFFICE/Docker-Do ... bfb7ce381e

As friendly suggestion: consider please updating the docs here: https://api.onlyoffice.com/editors/signature/
As the still points to default.json

But you are right, probably it makes sense simply move to using just a JWT* Docker env params as suggested, to avoid additional hassle. :)

Thank you!
--
Best regards,
Andrew
User avatar
AndrewG
 
Posts: 22
Joined: Sat May 06, 2017 3:09 am

Re: [SOLVED] Document Server 5.2.3 - no Authorization header

Postby Carl » Tue Nov 20, 2018 12:04 pm

Andrew,

I'm glad you've managed to fix the issue. The change regarding local.json was introduced with the release of Document Server 5.2.

Thank you for the suggestion, we are currently working on adding the information about local.json in the documentation.
Carl
 
Posts: 92
Joined: Thu Apr 12, 2018 10:00 am


Return to API

Who is online

Users browsing this forum: No registered users and 2 guests