carbonblack / carbon-black-cloud-sdk-python

VMware Carbon Black Cloud Python SDK
MIT License
40 stars 23 forks source link

CBAPI-5227: FileCredentialProvider - Support UTF-16 Encoding #493

Closed abowersox-cb closed 6 months ago

abowersox-cb commented 7 months ago

Pull request checklist

Please check if your PR fulfills the following requirements:

What is the ticket or issue number?

https://jira.carbonblack.local/browse/CBAPI-5227

Pull Request Description

Added the ability for the FileCredentialProvider to parse UTF-16 configuration files in addition to UTF-8 ones. UTF-16 files must begin with a Unicode BOM character, U+FEFF. UTF-8 files may begin with an encoded BOM character, but need not.

Does this introduce a breaking change?

How Has This Been Tested?

New tests have been added (with appropriate test files in the repository) that test the added file formats. Coverage in file_credential_provider.py stands at 100%.