community.crypto.openssl_csr_info filter – Retrieve information from OpenSSL Certificate Signing Requests (CSR)
Note
This filter plugin is part of the community.crypto collection (version 2.24.0).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install community.crypto
.
You need further requirements to be able to use this filter plugin,
see Requirements for details.
To use it in a playbook, specify: community.crypto.openssl_csr_info
.
New in community.crypto 2.10.0
Synopsis
Provided an OpenSSL Certificate Signing Requests (CSR), retrieve information.
This is a filter version of the community.crypto.openssl_csr_info module.
Requirements
The below requirements are needed on the local controller node that executes this filter.
If
name_encoding
is set to another value thanignore
, the idna Python library needs to be installed.
Input
This describes the input of the filter, the value before | community.crypto.openssl_csr_info
.
Parameter |
Comments |
---|---|
The content of the OpenSSL CSR. |
Keyword parameters
This describes keyword parameters of the filter. These are the values key1=value1
, key2=value2
and so on in the following
example: input | community.crypto.openssl_csr_info(key1=value1, key2=value2, ...)
Parameter |
Comments |
---|---|
How to encode names (DNS names, URIs, email addresses) in return values.
Note that Choices:
|
See Also
See also
- community.crypto.openssl_csr_info
Provide information of OpenSSL Certificate Signing Requests (CSR).
- community.crypto.to_serial filter plugin
Convert an integer to a colon-separated list of hex numbers.
Examples
- name: Show the Subject Alt Names of the CSR
ansible.builtin.debug:
msg: >-
{{
(
lookup('ansible.builtin.file', '/path/to/cert.csr')
| community.crypto.openssl_csr_info
).subject_alt_name | join(', ')
}}
Return Value
Key |
Description |
---|---|
Information on the certificate. Returned: success |
|
The CSR’s authority cert issuer as a list of general names. Is See Returned: success Sample: |
|
The CSR’s authority cert serial number. Is This return value is an integer. If you need the serial numbers as a colon-separated hex string, such as Returned: success Sample: |
|
The CSR’s authority key identifier. The identifier is returned in hexadecimal, with Is Returned: success Sample: |
|
Entries in the Returned: success Sample: |
|
Whether the Returned: success |
|
Entries in the Returned: success Sample: |
|
Whether the Returned: success |
|
Returns a dictionary for every extension OID. Returned: success Sample: |
|
Whether the extension is critical. Returned: success |
|
The Base64 encoded value (in DER format) of the extension. Note that depending on the Returned: success Sample: |
|
Entries in the Returned: success Sample: |
|
Whether the Returned: success |
|
Whether the Is Returned: success |
|
List of excluded subtrees the CA cannot sign certificates for. Is See Returned: success Sample: |
|
List of permitted subtrees to sign certificates for. Returned: success Sample: |
|
Returned: success |
|
Whether the Returned: success |
|
CSR’s public key in PEM format. Returned: success Sample: |
|
Public key data. Depends on the public key’s type. Returned: success |
|
The curve’s name for ECC. Returned: When |
|
The RSA key’s public exponent. Returned: When |
|
The maximum number of bits of a private key. This is basically the bit size of the subgroup used. Returned: When |
|
The This is the element spanning the subgroup of the multiplicative group of the prime field used. Returned: When |
|
The RSA key’s modulus. Returned: When |
|
The This is the prime modulus upon which arithmetic takes place. Returned: When |
|
The This is a prime that divides Returned: When |
|
Bit size of modulus (RSA) or prime number (DSA). Returned: When |
|
The Returned: When |
|
For For Returned: When |
|
Fingerprints of CSR’s public key. For every hash algorithm available, the fingerprint is computed. Returned: success Sample: |
|
The CSR’s public key’s type. One of Will start with Returned: success Sample: |
|
Whether the CSR’s signature is valid. In case the check returns Returned: success |
|
The CSR’s subject as a dictionary. Note that for repeated values, only the last one will be returned. Returned: success Sample: |
|
Entries in the See Returned: success Sample: |
|
Whether the Returned: success |
|
The CSR’s subject key identifier. The identifier is returned in hexadecimal, with Is Returned: success Sample: |
|
The CSR’s subject as an ordered list of tuples. Returned: success Sample: |