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

auth.go uses a library that breaks when using cross-compilation #107

Closed
insasho opened this issue Feb 16, 2015 · 2 comments
Closed

auth.go uses a library that breaks when using cross-compilation #107

insasho opened this issue Feb 16, 2015 · 2 comments
Labels
bug This issue is a bug.

Comments

@insasho
Copy link

insasho commented Feb 16, 2015

golang/go#6376 describes the problem wherein the os/user library does not function properly on OSX when the binary is cross-compiled.

auth.go derives the path to the credentials profile by using user.Current() to determine the home directory of the current user.

Feature request: Instead of relying solely on user.Current(), the DetectCreds method should fall-back to using the ${HOME} environment variable which should be supported on all unix platforms (if set). If something like this is not done, any binary compiled against the aws-sdk-go package with a cross-compiler will fail using the default credential providers.

@lsegal
Copy link
Contributor

lsegal commented Feb 16, 2015

Thanks for reporting this. Using environment variables definitely seems like the right strategy. Admittedly, I was under the assumption that user.Current() would just defer to this type of environment variable lookup for the same cross-compatibility reasons-- certainly a little surprised to see that's not the case.

@lsegal lsegal added the bug This issue is a bug. label Feb 18, 2015
awinstan added a commit to awinstan/aws-sdk-go that referenced this issue Mar 13, 2015
…user.Current() relies on CGO causing it to fail if cross compiled. It has been replaced by checking environment variables HOME and USERPROFILE.
awinstan added a commit to awinstan/aws-sdk-go that referenced this issue Mar 13, 2015
Replaces mechanism to get the current user directory. user.Current() relies on CGO causing it to fail if cross compiled. It has been replaced by checking environment variables HOME and USERPROFILE.
@lsegal
Copy link
Contributor

lsegal commented Mar 14, 2015

This is fixed in the develop branch. I will close this issue when we merge develop into master. Thanks for reporting the issue!

@lsegal lsegal closed this as completed in ab32d52 Mar 26, 2015
skotambkar pushed a commit to skotambkar/aws-sdk-go that referenced this issue May 20, 2021
skotambkar pushed a commit to skotambkar/aws-sdk-go that referenced this issue May 20, 2021
Services
---
* Synced the V2 SDK with latests AWS service API definitions.

Breaking Changes
---
* `private/mode/api`: Refactor service paginator helpers to iterator pattern (aws#119)
	* Refactors the generated service client paginators to be an iterator pattern. This pattern improves usability while removing the need for callbacks.
	* See the linked PR for an example.
* `private/model/api`: Removes setter helpers from service API types (aws#101)
	* Removes the setter helper methods from service API types. Removing clutter and noise from the API type's signature.
	* Based on feedback aws#81
* `aws`: Rename CanceledErrorCode to ErrCodeRequestCanceled (aws#131)
	* Renames CanceledErrorCode to correct naming scheme.

SDK Bugs
---
* `internal/awsutil`: Fix DeepEqual to consider string alias type equal to string (aws#102)
	* Fixes SDK waiters not detecting the correct condition is met. aws#92
* `aws/external`: Fix EnvConfig misspelled container endpoint path getter (aws#106)
	* This caused the type to not satisfy the ContainerCredentialsEndpointPathProvider interface.
	* Fixes aws#105
* `service/s3/s3crypto`: Fix S3Crypto's handling of TagLen (aws#107)
	* Fixes the S3Crypto's handling of TagLen to only be set if present.
	* V2 Fix for aws#1742
* `private/model/api`: Update SDK service client initialization documentation (aws#141)
	* Updates the SDK's service initialization doc template to reflect the v2 SDK's configuration update change from v1.
	* Related to aws#136

SDK Enhancements
---
* `aws`: Improve pagination unit tests (aws#97)
	* V2 port of aws#1733
* `aws/external`: Add example for shared config and static credential helper (aws#109)
	* Adds examples for the  config helpers; WithSharedConfigProfile, WithCredentialsValue, WithMFATokenFunc.
* `private/model/api`: Add validation to prevent collision of api defintions (aws#112)
	* V2 port of aws#1758
* `aws/ec2metadata`: Add support for AWS_EC2_METADATA_DISABLED env var (aws#128)
	* When this environment variable is set. The SDK's EC2 Metadata Client will not attempt to make requests. All requests made with the EC2 Metadata Client will fail.
	* V2 port of aws#1799
* Add code of conduct (aws#138)
* Update SDK README dep usage (aws#140)
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.
Projects
None yet
Development

No branches or pull requests

2 participants