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

Plugin can't work if AWS keys are not set (use the given role) #35

Open
omerxx opened this issue Oct 16, 2017 · 3 comments
Open

Plugin can't work if AWS keys are not set (use the given role) #35

omerxx opened this issue Oct 16, 2017 · 3 comments

Comments

@omerxx
Copy link

omerxx commented Oct 16, 2017

Maybe just ignoring the fact that the credentials are empty is enough
(Removing https://github.com/drone-plugins/drone-s3-sync/blob/master/plugin.go#L63)

But basically any plugin communicating with aws should have the ability to work with a role

@tboerger
Copy link
Contributor

Pull requests that implement it similar to https://github.com/drone-plugins/drone-s3/blob/master/plugin.go#L90-L103 are welcome.

@fernandrone
Copy link
Contributor

@tboerger I stumbled upon the same problem, so I'll probably make a PR with a fix tomorrow... however, that signed yaml is deprecated, right? I can't find anything about it on the current CLI documentation (http://docs.drone.io/cli-installation/)

Would just this be acceptable then?

	//Allowing to use the instance role or provide a key and secret
	if p.Key != "" && p.Secret != "" {
		conf.Credentials = credentials.NewStaticCredentials(p.Key, p.Secret, "")
	}
	client := s3.New(session.New(), conf)

Or are there other security measures we should be taking?

@fernandrone
Copy link
Contributor

For example, this: #38

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants