ohnosequences / nice-sbt-settings

sbt plugin with common settings for all era7/ohnosequences releases
GNU Affero General Public License v3.0
10 stars 2 forks source link

version 0.4.0 can't handle iam role credentials #22

Closed evdokim closed 10 years ago

laughedelic commented 10 years ago

any details here? "can" or "can't"? example? link to the project?

evdokim commented 10 years ago

doesn't work for https://github.com/ohnosequences/monoids-in-the-clouds/tree/compota/compota-wordcount

laughedelic commented 10 years ago

same, I don't have access to that repo. and what exactly doesn't work? where do you store credentials, what are you .sbt files?

evdokim commented 10 years ago

I'm not going to store credentials at all, just use IAM credentials

laughedelic commented 10 years ago

Ah, so you meant role credentials. Yes, they are not looked up by default. But it's easy to fix it in your config:

import com.amazonaws.auth._

s3credentials := new STSAssumeRoleSessionCredentialsProvider

or it should be new InstanceProfileCredentialsProvider, I'm not sure which one is for the role credentials.. See docs for one and for the other

evdokim commented 10 years ago

@laughedelic it's a wrong behavior they should be retrieved by default (as it was in past). Under IAM credentials I mean instance profile credentials with InstanceProfileCredentialsProvider provider

laughedelic commented 10 years ago

I was never a default behaviour. Before, for using role credentials you needed to set empty credentials for the ivy-s3-resolver. Maybe it works now as well. Does it work with s3credentials := new InstanceProfileCredentialsProvider?

evdokim commented 10 years ago

It was. The ivy resolver did it automatically, now removed this code and it requires credentials provider.

laughedelic commented 10 years ago

As far as I remember, it worked only with empty credentials (but you had to set them). Anyway, what's you point? you want to add this credentials provider to the default chain?

evdokim commented 10 years ago

It always worked because you had to pass credentials to ivy resolver before in anyway. So yes, it should included in the default chain of providers together with EnvironmentVariableCredentialsProvider

laughedelic commented 10 years ago

ok, I'll add it in the next version. EnvironmentVariableCredentialsProvider is already in the default chain (again, see the link).