sosreport / sos

A unified tool for collecting system logs and other debug information
http://sos.rtfd.org
GNU General Public License v2.0
497 stars 539 forks source link

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

Open TrevorBenson opened 2 weeks ago

TrevorBenson commented 2 weeks ago

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:

TrevorBenson commented 1 week ago

@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 commented 1 week ago

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.