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

Test Connection button on configure screen does not test with newly supplied credentials #15

Closed
jarrodspiga opened this issue Nov 22, 2017 · 6 comments
Labels

Comments

@jarrodspiga
Copy link

Steps to re-produce:

  • Fresh deployment of Jenkins with the ec2-fleet plugin installed;
  • Instance profile for the Jenkins instance has no ec2 permissions configured, IAM User has ec2:* permissions defined in IAM as well as a secret key/access key id;
  • During configuration of plugin at Manage Jenkins > Configure Jenkins, set the "AWS Crendentials" (sic: there's a typo here that also needs to be fixed) as the access key id & secret key created above. Fill out the rest of the form then hit "Test Connection". This fails with "You are not authorized to perform this operation. (Service: AmazonEC2; Status Code: 403; Error Code: UnauthorizedOperation; Request ID: xxxxxxxxxxxx)"
  • Add the ec2:describeSpotFleetInstances permission to the Instance profile role. Repeat "Test Connection" and "Success" is displayed.
@teekennedy
Copy link

I ran into this as well. When I first added the credentials it worked, but after I created a different spot fleet and reconfigured the plugin to use that instead, it stopped working. Temporarily adding full administrator access to the jenkins user did not help - the credentials are definitely not being used.

I think attaching the Spot instance management policies to the Instance profile role is the better way to go. That way there's no need to manage a jenkins user and credentials separately.

@terma
Copy link

terma commented May 18, 2019

probably duplicate #71

@terma terma added the bug label May 18, 2019
@terma
Copy link

terma commented May 18, 2019

Looks like two different issues:

@jarrodspiga I don't think this is an issue with the plugin, it cannot work without permission, so first failed to try looks ok for me. Do you expect different behavior?

@Cyphus in your case did you just change one fleet on another?

@teekennedy
Copy link

@terma yes, the only change I made was to update the spot fleet instance to connect to a different spot fleet.

terma added a commit that referenced this issue May 21, 2019
#15 Fix test connections (avoid conflict credentialsId with ssh creds)
@terma
Copy link

terma commented May 22, 2019

@Cyphus fixed in a release 1.2.1 please try if you have time, thx

@terma
Copy link

terma commented May 22, 2019

going to close issues, feel free to open if you still have problem or questions, thx

@terma terma closed this as completed May 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants