Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Use botocore.UNSIGNED signature version with custom config #220

Merged
merged 3 commits into from
Mar 28, 2023
Merged

Use botocore.UNSIGNED signature version with custom config #220

merged 3 commits into from
Mar 28, 2023

Conversation

dominictarro
Copy link
Contributor

@dominictarro dominictarro commented Mar 16, 2023

The "signature_version" argument of botocore.config.Config accepts strings for signers and the botocore.UNSIGNED singleton when a signed should not be configured.

Change allows users to pass the AWSCredentials configuration {"signature_version": "unsigned"} and prefect_aws.ClientParameters.get_params_override will convert it to the singleton.

Also changed TestAwsClientParameters.test_with_custom_config test argument for ClientParameters.config to a dictionary since that is what it will receive from Orion.

This should probably be handled within botocore, but it's a quick patch for accessing some public buckets.

Closes #219

Example

Screenshots

Checklist

  • References any related issue by including "Closes #" or "Closes ".
    • If no issue exists and your change is not a small fix, please create an issue first.
  • Includes tests or only affects documentation.
  • Passes pre-commit checks.
    • Run pre-commit install && pre-commit run --all locally for formatting and linting.
  • Includes screenshots of documentation updates.
    • Run mkdocs serve view documentation locally.
  • Summarizes PR's changes in CHANGELOG.md

The "signature_version" argument of `botocore.config.Config` accepts strings for signers and the `botocore.UNSIGNED` singleton when a signed should not be configured.

Change allows users to pass the `AWSCredentials` configuration {"signature_version": "unsigned"} and `prefect_aws.ClientParameters.get_params_override` will convert it to the singleton.

This should probably be handled within `botocore`, but it's a quick patch for accessing some [public buckets](https://registry.opendata.aws/noaa-ghcn/).
@dominictarro dominictarro requested a review from a team March 16, 2023 14:23
Copy link
Member

@desertaxle desertaxle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution! I have one nit on the changelog; otherwise, this looks good!

CHANGELOG.md Outdated Show resolved Hide resolved
Co-authored-by: Alexander Streed <[email protected]>
@zanieb
Copy link
Contributor

zanieb commented Mar 16, 2023

Thanks!

@desertaxle desertaxle merged commit e96a0f3 into PrefectHQ:main Mar 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No mechanism to use buckets with unsigned requests
3 participants