Regenerate S3 Authorization header

Open
#345 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
aws, c
Domain
cloud, networking

Research direction

Compare the proposed behavior with commit bee8b607780c717b894fc0d977eb4d93878fe555 and the context in PR #209, then trace the S3 HTTP request and Authorization handling. Done means a seek in a large file more than five minutes after the initial token generation does not reuse a stale Authorization header.

Written by the indexing model from the issue text.

Description

bug S3

Also need to handle the S3 reauthentication, as when seeking within a file more than 5 minutes after the first token generation the HTTP request will be rejected as the auth goes stale - I've implemented this on our code here.

[As noted by @jpiper on PR #209; it's not about [aws_session_]token, but rather that the message hashed into the Authorization header contains a timestamp. So the Authorization header is only valid for a limited time (to prevent replay attacks), and on a large file seeking may send a new HTTP request containing the original now-expired Authorization header.]

Dominant language
C
Stars
950
Forks
475
Avg merge
3d 13h
Merged PRs (30d)
11

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from samtools/htslib

All issues in samtools/htslib

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.