drawio: Gitlab repo authorization fails on self-hosted instances

Recent releases of diagrams.net (not sure but at least in 14.9.7) self-hosted docker instance cannot authorize in GitLab 14.1.2 self-hosted instance as well). I thought this fails was due to some misconfiguration from my side… but…

https://github.com/jgraph/drawio/blob/609d031c9430ae737dc30fb11ac11709fb63a19d/src/main/webapp/js/diagramly/GitLabClient.js#L44

It is strange that .html has been missed ^^^ while it is explicitly emphasized in Guides (link1, jgraph/drawio#493 ), that gitlab.html is important!

Suggested fix:

---GitLabClient.prototype.redirectUri = window.location.protocol + '//' + window.location.host + '/gitlab'; 
+++GitLabClient.prototype.redirectUri = window.location.protocol + '//' + window.location.host + '/gitlab.html'; 

this workaround worked before GitLab authetication process upgraded since release 14.6.7 and [docker-drawio] corresponding upgrade](https://github.com/jgraph/docker-drawio/commit/d52488974a0f7740a17c66929ba4943ecc4ccb1a). Nowdays similar way doesn’t work…

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 40 (2 by maintainers)

Most upvoted comments

This helped to finally fix the issue: https://stackoverflow.com/a/42377335/8655060

Just imported self-signed certificate of gitlab instance into java keystore inside self-hosted drawio container and restarted it!

Thanks everybody!

We have used the fix as in #2193.

As for servlet and serving the project we aren’t following. What do you mean by serving the project? Do we need to activate or configure something else?

We are running a self-hosted GitLab and DrawIO runs as a container inside an OpenShift cluster. We are setting thethe following environment variables:

  • DRAWIO_GITLAB_ID
  • DRAWIO_GITLAB_URL
  • DRAWIO_BASE_URL

but not

  • DRAWIO_GITLAB_SECRET