Giter Club home page Giter Club logo

terraform-provider-pkcs12's Introduction

Terraform Provider pkcs12

Run the following command to build the provider

go build -o terraform-provider-pkcs12

Test sample configuration

First, build and install the provider.

make install

Then, run the following command to initialize the workspace and apply the sample configuration.

terraform init && terraform apply

terraform-provider-pkcs12's People

Contributors

bgpat avatar caseyr232 avatar chilicat avatar ppaci avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

terraform-provider-pkcs12's Issues

Feature Request: Allow the inverse

I also had a requirement to create PKCS12 from PEM files, so thank you for making this provider!!

I was wondering, would it be possible for you to also do the inverse?
Allow PEM files to be created from a PFX file.
I would imagine:
A data block for the PFX file
A resource block for the certificate (in PEM format)
A resource block for the private key (in PEM format, with no password, or password to be optional as some requirements need PEM format with no password on the file, and some allow a private key password)
Maybe a resource block for the ca cert?

CA certificates are not being included in pkcs12 file

In theory, this provider should include the CA certificates when you use the parameter ca_pem, but if you inspect the pkcs12 file generated, it does not include them, I'm using:

openssl pkcs12 -in certificate.pfx -cacerts -nokeys -chain | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > cacerts.cer

But the file cacerts.cer is empty, looks like you can't include them and in consecuence, when you try to use the generated pfx, it send errors about missing intermediate certs.

An additional argument for encoder type

Hello there,

Thank you for this useful Terraform provider, good job.

Unfortunately, I was not able to use it for Google Cloud. It was necessary to create a resource with PKCS12 keystore. Still, it turned out that it was created using OpenSSL v1.x and other resources in the Google Cloud project refused to accept the unsupported keystore format. In this regard, could you add another argument to set up the encoder type, e.g. Modern2023 or Legacy?

Best regards.

Provider can no longer accept Fullchain-type certificates

Ever since this commit here which was part of a refactor for v0.1.0 around a month ago, we can no longer provide a full certificate chain (public cert + CA/intermediate certs) to cert_pem. It instead returns an error saying cert_pem must contains exactly one certificate.

This is problematic for us because we use the pcks12_from_pem resource to create PFX files from two different sources, one of which, azurerm_key_vault_certificate_data, only provides a fullchain and privatekey and does not provide a separate attribute to get the certificate and chain separately.

Is there a way the provider could be adjusted to support this kind of scenario ? For now I configured Terraform to only use version 0.0.7, which does not contain this fix, but we're not big fans of using old/unsupported versions of providers.

Thanks!

SHA1 Thumbprint Output

Would it be possible to add an output for the sha1 thumbprint besides the resulting base64?

Ability to convert CA root certificate to PKCS12

Feature request: Ability to convert trusted root CA certificates from PEM to PKCS12/PFX.

Currently password and private_key_pem are required attributes. However, if conversion is needed for trusted, unencrypted root CA certificate in PFX format, it means that password and private key are not applicable.

Sensitive flag on result

Is there a reason why the sensitive flag isn't set on the result? I get that PKCS12 should be encrypted with a password that "only I know" but I have a funny use case, where I really don't need that functionality, just have two PEMs for an app that demands PKCS12.

With that in mind, would there be harm in a PR that sets the result to be sensitive?

I would also suggest making the "password" field optional too since providing just an empty string seems to work fine...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.