aws / aws/aws-cli

Private CA Certificates in wrong format (extra tab)

Open
#3,465 17 comments 2 reactions 0 assignees View on GitHub
acm documentation p3
Dominant language
Python
Stars
17.3k
Forks
4.6k
Avg merge
1d 2h
Merged PRs (30d)
13

Description

I have a PrivateCA which has a "RootCA" that is in my control and the "Intermediary CA" that is run on the AWS hardware (a pretty standard setup).

When running this command the output is (as expected) a certificate chain file-

```
aws acm-pca get-certificate
--certificate-authority-arn ""
--certificate-arn ""
--output text > example.crt
```

The actual certificates themselves are fine, however there's an extra "tab" between the end of the first certificate and the start of the second one.

```
-----BEGIN CERTIFICATE-----
MIIFqDCCA5KgAwIBAgIRAL+jWvEn+XbyVX0EOUEISrYwCwYJKoZIhvcNAQELMHkx
~~truncated~~
DWnQAr/HgulUZ3J8
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
MIIF/jCCA+agAwIBAgICEAQwDQYJKoZIhvcNAQELBQAwgaIxCzAJBgNVBAYTAlVT
~~truncated~~
AH2v4FTwHfLXYElaP1tTgxsKxBUHVY5M9bhTy9ju/bO121BNv3nLutw7GuG0vac8
6Is=
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
MIIGLDCCBBSgAwIBAgIJAL/pftR0fQM1MA0GCSqGSIb3DQEBCwUAMIGiMQswCQYD
~~truncated~~
2Q4jYfYtRqSrGTzOMn5Dq1A4DhGlFcCx5ZPgioZpb1mCe0Qsn1glYJECwuDK9P7i
-----END CERTIFICATE-----
```

This tab is consistently there with all of the certificates I sign and retrieve, and it breaks the certificate chain formatting. While this bug persists it's impossible to get a working chain file directly from the AWS CLI- instead the output has to be filtered to remove the random tab or applications like nginx will choke on the certificate chain.

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.