aws / rolesanywhere-credential-helper

Apache License 2.0
127 stars 36 forks source link

[Question] Why only support `RSA`, `EC` and `PKCS #8` private key #73

Closed yagikota closed 1 day ago

yagikota commented 4 months ago

Now, this helper tool supports the following three private key formats (RSA, EC and PKCS #8). Do you have any reasons why it supports only these formats? I'm just wondering 🙏

https://github.com/aws/rolesanywhere-credential-helper/blob/9e9f3c425643b3e4c822109fba933929aef51a78/aws_signing_helper/signer.go#L661-L676

13ajay commented 3 months ago

So I believe readECPrivateKey and readRSAPrivateKey will read and parse PEM private key files that are in the SEC1 and PKCS#1 formats, respectively. And readPKCS8PrivateKey will handle both EC and RSA keys in the PKCS#8 format. The application supports PKCS#12 as well, through different logic (not in the function that you linked).

In general, these are pretty standard formats to have your private keys in. Do you require support for additional key formats?

yagikota commented 2 months ago

Do you require support for additional key formats?

No. I just want to know the reason. Thanks for your reply!