-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Feature/aws profile auth #139
Conversation
collector/aws/auth.go
Outdated
log.WithField("region", region).Info("auth: using aws profile") | ||
config := &awsClient.Config{ | ||
Region: ®ion, | ||
Credentials: credentials.NewSharedCredentials("", profile), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why don't you give the option to pass custom Profile file ?
configuration/collector.yaml
Outdated
@@ -12,6 +12,7 @@ providers: | |||
# access_key: <access_key> | |||
# secret_key: <secret_key> | |||
# role: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we want to order the types of login like the code expects them ( hierarchy)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed
collector/aws/detector.go
Outdated
@@ -32,6 +32,7 @@ const ( | |||
|
|||
// DetectorManager describe tje detector manager | |||
type DetectorManager struct { | |||
awsAuth AuthDescriptor |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need it ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed
collector/aws/detector.go
Outdated
cloudWatchCLient := cloudwatch.NewCloudWatchManager(awsCloudwatch.New(regionSession, regionConfig)) | ||
|
||
callerIdentityOutput, _ := stsManager.client.GetCallerIdentity(&sts.GetCallerIdentityInput{}) | ||
return &DetectorManager{ | ||
awsAuth: awsAuth, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you need it ? I don't see any reference for using this type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed
What type of PR is this?
/Feature
What this PR does / why we need it:
Allow authenticate to aws with multiple profiles
Which issue(s) this PR fixes (if exists):
Fixes #80
Special notes for your reviewer:
I have reordered the AWS auth logic