Error "The document security token is not correctly formed"

Ask a how-to resolve this problem
Document Server version: 7.3.3
Connector version: 6.1
Alfresco version: 6.1
OS: Docker
Updated documentserver from 5.5.3 to 7.3.3
And I want to configure the jwt token to work
I’ve added these items to the docker compose
- JWT_ENABLED=true
- JWT_SECRET=secret
- JWT_HEADER=Authorization
- JWT_IN_BODY=true
In alfresco-global.properties, I added this variable
onlyoffice.jwtsecret=secret

I have not found any errors in the alfresco logs
There is an error like this in the documentserver logs
[2023-04-27T12:42:42.000] [WARN] [localhost] [39eaf4b9-4d96-4604-9ce6-2682d164de69_20180302113230] [userId] nodeJS - checkJwt error: name = JsonWebTokenError message = jwt must be provided token = undefined

With JWT_ENABLED=false everything works

Hello @ifeelsogood

Please take a look at the official guide about Alfresco integration:
https://helpcenter.onlyoffice.com/integration/gettingstarted-alfresco.aspx#Configure_block

Also, please note this information in the other post:

Hello @Constantine

Unfortunately, I do not have access to the Alfresco Administration Console
So I configured everything via alfresco-global.properties
And I did everything according to the instructions

When disabling the jwt token verification, documents are working

yes, i can send files

Hello @ifeelsogood

Unfortunately, without access to the connector settings page in the web interface it is impossible to save JWT settings. You need to manually insert them in the corresponding fields and press Save button to connect.

@Constantine
Yeah, thanks, I’ll try to get access
I’ll let you know if it works out.

1 Like

Waiting for your feedback.

@Constantine
It seems that the problem was that the module was not installed correctly and was not displayed in share/page/console/admin-console/module-package
After installing the module correctly and opening the connector settings page it worked
Thanks for your help

1 Like

Glad to hear that the problem is resolved.