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

crypto: Add new module openssl_csr #21004

Merged
merged 1 commit into from
Apr 6, 2017
Merged

Conversation

Spredzy
Copy link
Contributor

@Spredzy Spredzy commented Feb 3, 2017

ISSUE TYPE
  • New Module Pull Request
COMPONENT NAME
  • openssl_csr
ANSIBLE VERSION
ansible 2.3.0 (openssl_csr 13dda2c2c3) last updated 2017/02/03 12:49:27 (GMT +200)
  config file = /etc/ansible/ansible.cfg
  configured module search path = Default w/o overrides
SUMMARY

This module aims to allow a user to manage the lifecycle of SSL Certificate Signing Requests (CSR). Internally it relies on the pyOpenSSL python library to interact with openssl. It supports the SAN extention.

This module is best used with the openssl_privatekey module introduced in ansible/ansible-modules-extras#2326

A simple use case would be :

- openssl_csr:
    commonName: www.ansible.com
    path: /etc/ssl/csr
    privatekey_path: /etc/ssl/private/ansible.com.pem

A user can specify CSR specific subject fields:

- openssl_csr:
    commonName: www.ansible.com
    path: /etc/ssl/csr
    privatekey_path: /etc/ssl/private/ansible.com.pem
    countryName: FR
    organizationName: Ansible
    emailAddress: jdoe@ansible.com

A user can specify subjectAltName (SAN) extention names:

- openssl_csr:
    commonName: www.ansible.com
    path: /etc/ssl/csr
    privatekey_path: /etc/ssl/private/ansible.com.pem
    subjectAltName: 'DNS:www.ansible.com,DNS:m.ansible.com'

A use can also force the regeneration of the CSR:

- openssl_csr:
    commonName: www.ansible.com
    path: /etc/ssl/csr
    privatekey_path: /etc/ssl/private/ansible.com.pem
    force: True

This new module allows one to automate the generation of OpenSSL
Certificate Signing Request. It supports SAN extension.
@Spredzy
Copy link
Contributor Author

Spredzy commented Feb 3, 2017

cc @mscherer @WhileLoop

@ansibot ansibot added affects_2.3 This issue/PR affects Ansible v2.3 community_review In order to be merged, this PR must follow the community review workflow. module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. new_module This PR includes a new module. new_plugin This PR includes a new plugin. labels Feb 3, 2017
@s-hertel s-hertel removed the needs_triage Needs a first human triage before being processed. label Feb 3, 2017
@mscherer
Copy link
Contributor

shipit

@lungati
Copy link

lungati commented Mar 24, 2017

What's the status on this? Is it available now?

@mscherer mscherer merged commit 2705e7a into ansible:devel Apr 6, 2017
@mscherer
Copy link
Contributor

mscherer commented Apr 6, 2017

Ok so merging since there is a specific process and not using the bot for now. We did review that extensively in the past, so I assume that's good.

@dagwieers dagwieers added the crypto Crypto community (ACME, openssl, letsencrypt) label Feb 7, 2019
@ansible ansible locked and limited conversation to collaborators Apr 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.3 This issue/PR affects Ansible v2.3 community_review In order to be merged, this PR must follow the community review workflow. crypto Crypto community (ACME, openssl, letsencrypt) module This issue/PR relates to a module. new_module This PR includes a new module. new_plugin This PR includes a new plugin.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants