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

[RFE] Set a UserAgent for --upload-protocol s3 #3688

Open
TrevorBenson opened this issue Jun 26, 2024 · 2 comments · May be fixed by #3823
Open

[RFE] Set a UserAgent for --upload-protocol s3 #3688

TrevorBenson opened this issue Jun 26, 2024 · 2 comments · May be fixed by #3823

Comments

@TrevorBenson
Copy link
Member

TrevorBenson commented Jun 26, 2024

Request

Set a custom UserAgent for S3 (boto3) so that sos report can be identified as the upload client for S3 buckets. This could be a string like sos, sosreport, or sos-report etc..

Reason

Permits identifying sos report/collect as a specific UserAgent instead of generically reporting the same UseAgent any Python script using boto3 does. Custom policies can be defined on s3 buckets. One use of a policy could be a condition/requirement for the UserAgent string. Two potential use cases by using a custom UserAgent in a policy:

  • Limit uploads even, when valid credentials are provided, to only work with the specified UserAgent.
  • Allow a specific UserAgent to upload an archive to a bucket without requiring valid credentials (access/secret keypair).
@TrevorBenson
Copy link
Member Author

@pmoravec @TurboTurtle Is sosreport acceptable as the UserAgent label for uploads from both sos report and sos collect? Did I miss any UserAgent which might be preferred instead?

TIA

@TurboTurtle
Copy link
Member

TurboTurtle commented Jun 27, 2024

Good question. A safe default may just be sos, to cover both use cases. Alternatively, we could just match it to the component, e.g. sos-report and sos-collect, if it would for any reason be desirable to not glob everything together.

TrevorBenson added a commit to TrevorBenson/sos that referenced this issue Oct 25, 2024
TrevorBenson added a commit to TrevorBenson/sos that referenced this issue Oct 25, 2024
TrevorBenson added a commit to TrevorBenson/sos that referenced this issue Oct 25, 2024
@TrevorBenson TrevorBenson linked a pull request Nov 15, 2024 that will close this issue
6 tasks
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

Successfully merging a pull request may close this issue.

2 participants