Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Nanjiang Shu <[email protected]>
  • Loading branch information
aaperis and nanjiangshu authored Dec 17, 2024
1 parent b7ee34f commit 77f75de
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ if [ ! -f "${reencryptedFile%.c4gh}" ] ; then
fi
mv "${reencryptedFile%.c4gh}" full2.bam


if ! cmp --silent full1.bam full2.bam; then
echo "Decrypted version of $reencryptedFile and the original unencrypted file, are different"
exit 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ fi
dataset="https://doi.example/ty009.sfrrss/600.45asasga"
file="dummy_data"
clientkey=$(base64 -w0 client.pub.pem)
bad_token=token2=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJyZXF1ZXN0ZXJAZGVtby5vcmciLCJhdWQiOlsiYXVkMiIsImF1ZDMiXSwiYXpwIjoiYXpwIiwic2NvcGUiOiJvcGVuaWQiLCJpc3MiOiJodHRwczovL2RlbW8uZXhhbXBsZSIsImV4cCI6OTk5OTk5OTk5OSwiaWF0IjoxNTYxNjIxOTEzLCJqdGkiOiI2YWQ3YWE0Mi0zZTljLTQ4MzMtYmQxNi03NjVjYjgwYzIxMDIifQ.ncUyjNytxqS9bqLnsbjv6D839PnHVw-anQS4bFpAs20
bad_token=BADeyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJyZXF1ZXN0ZXJAZGVtby5vcmciLCJhdWQiOlsiYXVkMiIsImF1ZDMiXSwiYXpwIjoiYXpwIiwic2NvcGUiOiJvcGVuaWQiLCJpc3MiOiJodHRwczovL2RlbW8uZXhhbXBsZSIsImV4cCI6OTk5OTk5OTk5OSwiaWF0IjoxNTYxNjIxOTEzLCJqdGkiOiI2YWQ3YWE0Mi0zZTljLTQ4MzMtYmQxNi03NjVjYjgwYzIxMDIifQ.ncUyjNytxqS9bqLnsbjv6D839PnHVw-anQS4bFpAs20

# Test error codes and error messages returned to the user

Expand Down
6 changes: 3 additions & 3 deletions sda-download/api/api.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# API

The Download API service provides functionality for downloading files from the Archive.
It implements the [Data Out API](https://neic-sda.readthedocs.io/en/latest/dataout/#rest-api-endpoints). Further, it enables the endpoint `/s3` used for htsget and other services that need to interface with an s3-backend storage.
It implements the [Data Out API](https://neic-sda.readthedocs.io/en/latest/dataout/#rest-api-endpoints). Further, it enables the endpoint `/s3`, which is used for htsget and other services that need to interface with an S3-backend storage.

The response can be restricted to only contain a given range of a file, and the files can be returned encrypted or unencrypted, depending on the configuration of the service.

Expand All @@ -22,7 +22,7 @@ The client can establish a session to bypass time-costly visa validations for fu
- `/metadata/datasets/*dataset`
- `/files/:fileid`

**[File download requests, for s3 endpoint](#file-download-requests)**
**[File download requests, for `/s3` endpoint](#file-download-requests)**

- `/s3/*datasetid/*filepath`

Expand Down Expand Up @@ -96,7 +96,7 @@ Parts of a file can be requested with specific byte ranges using `startCoordinat
```

### File download requests
This endpoint is designed for usage with [htsget](https://samtools.github.io/hts-specs/htsget.html) or other external applications that interface with s3-storage backends.
This endpoint is designed for usage with [htsget](https://samtools.github.io/hts-specs/htsget.html) or other external applications that interface with S3-storage backends.

The `/s3` endpoint accepts the parameters described below. Note that depending on the configuration of the download service, `/s3` may either serve only encrypted or decrypted files.

Expand Down

0 comments on commit 77f75de

Please sign in to comment.