jenkinsci / jenkinsci/aws-credentials-plugin

Does not work in AWS Gov Cloud

Open
#89 3 comments 2 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
30
Forks
81
PR merge metrics
No merged PRs in 30d

Description

### Version report

Jenkins and plugins versions report:
Jenkins Version: 2.263.4
Plugin Version 1.29
- What Operating System are you using (both controller, and any agents involved in the problem)?
Host EC2 is RedHat
Running on Docker container
Docker version 19.03.8

### Reproduction steps
When I place access key and secret access key into add credentials > Kind AWS Credentials I get Auth Failure. This happens regardless of the keys and I've validated the keys are correct.

Issue looks to be in https://github.com/jenkinsci/aws-credentials-plugin/blob/master/src/main/java/com/cloudbees/jenkins/plugins/awscredentials/AWSCredentialsImpl.java

AmazonEC2 ec2 = new AmazonEC2Client(awsCredentials, getClientConfiguration());
// TODO better/smarter validation of the credentials instead of verifying the permission on EC2.READ in us-east-1 String region = "us-east-1";

Region is hard coded to us-east-1 for validation.
### Results

Expected result:

Authentication successful

Actual result:

These credentials are NOT valid: "AWS was not able to validate the provided access credentials (Service: AmazonEC2; Status Code: 401; Error Code: AuthFailure; Request ID: 54876057-08bf-4ef7-85b1-7b8fb516f5bd; Proxy: null)"

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.