Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inject content hash into URL into document preview URL #1340

Closed
vsgoulart opened this issue Dec 19, 2024 · 0 comments · Fixed by #1342
Closed

Inject content hash into URL into document preview URL #1340

vsgoulart opened this issue Dec 19, 2024 · 0 comments · Fixed by #1342
Assignees

Comments

@vsgoulart
Copy link
Contributor

vsgoulart commented Dec 19, 2024

What should we do?

In order for the document preview to work together with Camunda Tasklist we must inject a content hash as query param in the document URL for security reasons.
This content hash will be provided via the metadata and must respect the following shape:

{
  documentId: string,
  contentHash?: string,
  metadata: {
    contentType: string,
    fileName: string,
  }
}

The query param will respect the follow pattern: http://<endpoint with documentId>?contentHash=<hash>

This solution should be a temporary solution because it's specific to Camunda's APIs and we should try to keep form-js as generic as possible. The best solution would be for Camunda Tasklist to have a BFF (backend for frontend) to manage this for the UI.

Why should we do it?

So the document preview works with Camunda Tasklist

@vsgoulart vsgoulart self-assigned this Dec 19, 2024
@bpmn-io-tasks bpmn-io-tasks bot added the in progress Currently worked on label Dec 19, 2024
@bpmn-io-tasks bpmn-io-tasks bot added needs review Review pending and removed in progress Currently worked on labels Dec 19, 2024
@bpmn-io-tasks bpmn-io-tasks bot removed the needs review Review pending label Dec 20, 2024
github-merge-queue bot pushed a commit to camunda/camunda that referenced this issue Dec 21, 2024
## Description

<!-- Describe the goal and purpose of this PR. -->

This PR bumps the `form-js` version which injects the content hash from
the document service metadata into each document URL

## Checklist

<!--- Please delete options that are not relevant. Boxes should be
checked by reviewer. -->
- [ ] for CI changes:
- [ ] structural/foundational changes signed off by [CI
DRI](https://github.com/cmur2)
- [ ]
[ci.yml](https://github.com/camunda/camunda/blob/main/.github/workflows/ci.yml)
modifications comply with ["Unified CI"
requirements](https://github.com/camunda/camunda/wiki/CI-&-Automation#workflow-inclusion-criteria)

## Related issues

Related to bpmn-io/form-js#1340
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant