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

CodeCommit credentials-helper does not endcode url before creating canonical request #9327

Open
1 task
vgamz opened this issue Feb 26, 2025 · 0 comments
Open
1 task
Assignees
Labels
bug This issue is a bug. codecommit investigating This issue is being investigated and/or work is in progress to resolve the issue. p2 This is a standard priority issue

Comments

@vgamz
Copy link

vgamz commented Feb 26, 2025

Describe the bug

CodeCommit's credential-helper is the recommended way to sign the request and pass SigV4 credentials to git protocol requests.
It seems that the cli is not encoding the URL path before creating canonical request. This causes signature mismatch on the service side when there is a special character in the path.

request.url = url_to_sign

Creating SigV4 signed request
https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_sigv-create-signed-request.html

Regression Issue

  • Select this option if this issue appears to be a regression.

Expected Behavior

credential-helper should encode the url path before creating canonical request. If adding encoding might be backward incompatible the cli can take in it as a parameter.

Current Behavior

As the url path is currently not encoded, the signature computed at the service does not match the signature in the request.

Reproduction Steps

git clone https://codeconnections/account/specialCharacterInPath
request fails

Possible Solution

No response

Additional Information/Context

No response

CLI version used

2

Environment details (OS name and version, etc.)

Mac OS 15

@vgamz vgamz added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Feb 26, 2025
@RyanFitzSimmonsAK RyanFitzSimmonsAK self-assigned this Feb 26, 2025
@RyanFitzSimmonsAK RyanFitzSimmonsAK added investigating This issue is being investigated and/or work is in progress to resolve the issue. codecommit p2 This is a standard priority issue and removed needs-triage This issue or PR still needs to be triaged. labels Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. codecommit investigating This issue is being investigated and/or work is in progress to resolve the issue. p2 This is a standard priority issue
Projects
None yet
Development

No branches or pull requests

2 participants