-
Notifications
You must be signed in to change notification settings - Fork 3
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
Htsget data-retrieval with encryption #7
Comments
I believe, client keys should be ad-hoc generated by the funnel. |
Initial development is here: https://github.com/mrtamm/funnel-gdi/tree/dev-htsget-crypt4gh At the moment, I still need to do more full-scale testing (and potentially fixing) before reaching a PR. So I'm estimating May 8 for the PR. |
From slack:
|
HTSGET storage configuration in Funnel now looks like this:
When
|
Overview about the local testing setup. Testing dependencies
Htsget Docker ImageInside htsget-rs directory: cp deploy/Dockerfile .
docker build -t ghcr.io/umccr/htsget-rs:latest . Htsget configurationformatting_style = "Compact"
# The main ticket-server:
ticket_server_addr = "0.0.0.0:8080"
# The local-data-server:
data_server_enabled = true
data_server_local_path = "/data" # This is INSIDE the container
[[resolvers]]
[resolvers.storage]
response_url = "http://localhost:9091/"
forward_headers = true
[resolvers.storage.endpoints]
file = "http://localhost:8081/"
index = "http://localhost:8081/"
[resolvers.object_type]
send_encrypted_to_client = true
private_key = "/crypt4gh/private.key"
public_key = "/crypt4gh/public.key" Folder-structure for Docker-Compose Data
Generate private and public keys using command: Sample VCF for testing: Generate index (TBI) for the VCF: Htsget on Docker-Composeservices:
htsget:
container_name: htsget
image: ghcr.io/umccr/htsget-rs:latest
command: htsget-actix --config /etc/htsget.toml
ports:
- "9090:8080"
- "9091:8081"
volumes:
- "./htsget/data:/data:ro"
- "./htsget/crypt4gh:/crypt4gh:ro"
- "./htsget/htsget.toml:/etc/htsget.toml:ro" After curl -H 'client-public-key: Qjn...' 'http://localhost:9090/variants/test_1000G?class=header' Htsget configuration in FunnelCopy config/default-config.yaml to my-config.yaml and modify HTSGETStorage:
Disabled: false
Protocol: http
SendPublicKey: true Htsget storage testing# copy the keys:
cp htsget/crypt4gh/private.key .private.key
cp htsget/crypt4gh/public.key .public.key
go run . storage get "htsget://localhost:9090/variants/test_data?class=header" header.vcf.gz -c my-config.yaml |
#7 Htsget data-retrieval with encryption
First of all, really nice that you are implementing support for htsget!
Thanks :) |
Hi and thank you for the feedback!
As shown above, I used
It depends. If it has to be done in the container, this (additional) task would be left to the container developer. However, the private key is already in the host system, so this decryption could be executed outside of the container as well. For the sake of user experience, I decided to decrypt the file beforehand, and leave the security task for the maintainer of the host system (where funnel is running). This is how I figured it out how it would work best but if there are more ways to solve it, I would gladly discuss them. |
Thanks for the answers, @mrtamm ! I think your reasoning makes sense, and I now have the complete setup running 👍 . A side note, in case someone else finds it useful: the htsget command ( |
Thanks for the feedback! I need to check, indeed, how the problems could be detected when something goes wrong with the commands. Secondly, I'm also considering support for other crypt4gh implementations (they have different CLI flags), or otherwise integrating decryption to the Funnel source code. Estimating this to be ready by the end of June. |
I added a new PR for having Htsget+Crypt4gh support right in the source code of Funnel: #12 |
Related PR #12 is ready for review and merge. |
It is now available in the |
Add support for requesting genomic data in encrypted (crypt4gh) format.
Htsget (more specifically htsget-rs) is supposed to support this functionality, as described here:
https://github.com/umccr/htsget-rs/blob/194457b077d3387414800fd5ffcb2a2141a6d1b3/docs/crypt4gh/ARCHITECTURE.md
Funnel needs to implement the referred htsget protocol for downloading encrypted files.
This means extending the current htsget protocol implementation:
The text was updated successfully, but these errors were encountered: