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

Route 53 plugin should not require an access key ID or secret access key when specifying an IAM role on the command line #1192

Closed
xenophonf opened this issue Aug 9, 2019 · 1 comment
Milestone

Comments

@xenophonf
Copy link

xenophonf commented Aug 9, 2019

Issue description

When running win-acme non-interactively and using the Route 53 DNS-01 DCV plugin with an IAM role/instance profile, I get the following error:

 [EROR] Option --route53accesskeyid not provided
 [EROR] (Exception) Validation plugin Route53 aborted or failed: Option --route53accesskeyid not provided

Neither --route53accesskeyid nor --route53secretaccesskey should be required when providing --route53iamrole:

  • Setting a dummy value for --route53accesskeyid but not --route53secretaccesskey results in a similar error about the --route53secretaccesskey option not being provided.

  • Setting empty strings for either or both of these arguments ("") results in the same errors about options not being provided.

  • Setting dummy values for these arguments passes the option validation checks but results in the failure of the Route 53 API calls made by win-acme.

Running win-acme interactively and using the IAM role for validation works as expected.

Steps to reproduce

  1. Register a DNS domain (e.g., example.com) and host it using Amazon Route 53.

  2. Create an IAM role for EC2 (e.g., win-acme-route53) with the AmazonRoute53FullAccess policy attached.

  3. Launch a t2.micro EC2 instance running Microsoft Windows Server 2019 Core from the AWS Marketplace and with the above IAM role assigned to it.

  4. Log into the EC2 instance and install the current release of win-acme along with the corresponding version of its Route 53 validation plugin (2.0.9 build 386 at the time of writing) by running the following PowerShell commands:

$ver = "v2.0.9"
$bld = "386"
invoke-webrequest https://github.com/PKISharp/win-acme/releases/download/$ver/win-acme.$ver.$bld.zip -outfile $env:userprofile\downloads\win-acme.zip
unblock-file $env:userprofile\downloads\win-acme.zip
expand-archive $env:userprofile\downloads\win-acme.zip -destinationpath c:\win-acme -force
del $env:userprofile\downloads\win-acme.zip
invoke-webrequest https://github.com/PKISharp/win-acme/releases/download/$ver/win-acme.route53.$ver.$bld.zip -outfile $env:userprofile\downloads\win-acme-route53.zip
unblock-file $env:userprofile\downloads\win-acme-route53.zip
expand-archive $env:userprofile\downloads\win-acme-route53.zip -destinationpath c:\win-acme -force
del $env:userprofile\downloads\win-acme-route53.zip
  1. Non-interactively request a certificate for the domain registered and hosted in Route 53 above (e.g., example.com) by running the following PowerShell command:
& c:\win-acme\wacs.exe `
  --target manual `
  --host win-acme-test.example.com `
  --certificatestore My `
  --installation none `
  --validationmode dns-01 `
  --validation route53 `
  --route53iamrole win-acme-test `
  --emailaddress hostmaster@example.com `
  --accepttos `
  --usedefaulttaskuser
@xenophonf xenophonf changed the title Route 53 plugin CLI argument parsing bug Route 53 plugin should not require an access key ID or secret access key when specifying an IAM role on the command line Aug 9, 2019
@WouterTinus
Copy link
Member

Thanks for bringing this to our attention, it should be fixed in the next build!

@WouterTinus WouterTinus added this to the 2.0.10 milestone Aug 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants