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

Add support explicitly requesting desired checksum algorithm for HTTP-TPC #24

Open
paulmillar opened this issue Sep 18, 2024 · 0 comments

Comments

@paulmillar
Copy link

Currently, the choice of checksum algorithm follows a community convention, with the storage being configured to calculate the desired set of checksums.

In addition to this, dCache allows the HTTP-TPC client to request a specific checksum algorithm by using the standard Want-Digest HTTP header on the HTTP COPY request.

The following example shows how to request a SHA-256 checksum is calculated when transferring a file via HTTP-TPC.

 curl -H "Credential: none" \
 		-H "Want-Digest: SHA-256" \
		-X COPY \
		-H "Source: https://my-source.example.org/dir1/my-file.root" \
		-H "Authorization: Bearer $(oidc-token EGI-CHECKIN)" \
		https://dcache.example.org/Users/paul/my-file.root

If the Want-Digest header indicates multiple checksum algorithms then dCache will select the "strongest" (typically the one with the largest number of bits).

After a successful transfer, the file's checksums are stored within dCache's namespace. Subsequent RFC 3230 requests (e.g., via HTTP HEAD requests) may be used to fetch the value.

Please note that additional checksum algorithms may be calculated, depending on dCache configuration. These, too, may be fetched via RFC 3230 requests, irrespective of whether or not the HTTP-TPC client specifies a desired algorithm.

In addition, the requested checksum is made available as an HTTP trailer as part of the COPY request. This feature is only available if the client indicates it supports HTTP trailers.

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

No branches or pull requests

1 participant