mirror of
https://github.com/wekan/wekan.git
synced 2026-11-24 09:59:47 -05:00
It was recorded as impossible: Jira signs in only with an Authorization header, and the bridge proxy takes that header for the grain's grant. But Sandstorm's HTTP driver can keep the sign-in in the grant itself (shell/imports/server/drivers/external-ui-view.js in the Sandstorm source): the member connects the Powerbox to "any address" and enters the Jira address with the credentials in it - https://EMAIL:API-TOKEN@site (the e-mail's @ as %40), or https://jira.example.org#TOKEN for a Server / Data Center token - and Sandstorm moves them into the grant and adds Authorization: Basic (or Bearer) to every request the grain sends through it. WeKan never sees them. - egress.mjs syncApiRoot grants a Jira list at its own address, and the Powerbox request asks for Basic authentication (ApiSession.PowerboxTag.authentication; apiSessionDescriptor takes it). - In a grain the Jira fetcher sends no Authorization of its own, and a Jira source needs no WeKan token there: a marker credential says the grant holds the sign-in. Only for Jira - GitLab sends its token in the query, where a marker would reach GitLab. - The List Sync popup tells a Jira list in a grain what to enter in the Powerbox, translated in all locales; the Sandstorm docs say how, and that the same #token form may let a private GitHub, Gitea or Forgejo through (not tried yet). - TODO Later drops "Not possible from a Sandstorm grain", its last category naming an issue; changelogFormat no longer needs one. Not run in a real grain here. Tests: sandstormSyncEgress.test.mjs (the root and the Basic descriptor, and an address with credentials in it still refused), sandstormJiraGrant.test.cjs (the server, the fetcher, the marker only for Jira, the popup and the docs). Thanks to xet7 !