Skip to content

Commit

Permalink
Merge pull request #10 from t-woerner/update_docs_for_1.12.0
Browse files Browse the repository at this point in the history
Update docs for 1.12.0 release
  • Loading branch information
rjeffman authored Dec 21, 2023
2 parents e160294 + 14c447c commit a16da86
Show file tree
Hide file tree
Showing 46 changed files with 1,991 additions and 162 deletions.
5 changes: 2 additions & 3 deletions src/documentation/plugins/automember.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
---
layout: page
title: automember
title: ipaautomember
---


Description
-----------

Expand All @@ -25,7 +24,7 @@ Requirements
------------

**Controller**
* Ansible version: 2.8+
* Ansible version: 2.13+

**Node**
* Supported FreeIPA version (see above)
Expand Down
5 changes: 2 additions & 3 deletions src/documentation/plugins/automountkey.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
---
layout: page
title: automountkey
title: ipaautomountkey
---


Description
-----------

Expand All @@ -24,7 +23,7 @@ FreeIPA versions 4.4.0 and up are supported by the ipaautomountkey module.
Requirements
------------
**Controller**
* Ansible version: 2.8+
* Ansible version: 2.13+

**Node**
* Supported FreeIPA version (see above)
Expand Down
5 changes: 2 additions & 3 deletions src/documentation/plugins/automountlocation.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
---
layout: page
title: automountlocation
title: ipaautomountlocation
---


Description
-----------

Expand All @@ -24,7 +23,7 @@ FreeIPA versions 4.4.0 and up are supported by the ipaautomountlocation module.
Requirements
------------
**Controller**
* Ansible version: 2.8+
* Ansible version: 2.13+

**Node**
* Supported FreeIPA version (see above)
Expand Down
30 changes: 21 additions & 9 deletions src/documentation/plugins/automountmap.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
---
layout: page
title: automountmap
title: ipaautomountmap
---


Description
-----------

Expand All @@ -24,7 +23,7 @@ FreeIPA versions 4.4.0 and up are supported by the ipaautomountmap module.
Requirements
------------
**Controller**
* Ansible version: 2.8+
* Ansible version: 2.13+

**Node**
* Supported FreeIPA version (see above)
Expand Down Expand Up @@ -57,6 +56,21 @@ Example playbook to ensure presence of an automount map:
desc: "this is a map for servers in the DMZ"
```
Automount maps can contain a submount key, which defines a mount location within the map the references another map. On FreeIPA, this is known as an indirect map. An indirect automount map is equivalent to adding a proper automount key to a map, referencyng another map (this second map is the indirect map). Use `parent` and `mount` parameters to create an indirect automount map with ansible-freeipa, without the need to directly manage the automount keys.

Example playbook to ensure an indirect automount map is present:

```yaml
---
- name: Playbook to add an indirect automount map
ipaautomountmap:
ipaadmin_password: SomeADMINpassword
name: auto.indirect
location: DMZ
parent: auto.DMZ
mount: dmz_indirect
```

Example playbook to ensure auto.DMZi is absent:

```yaml
Expand Down Expand Up @@ -84,16 +98,14 @@ Variable | Description | Required
`ipaadmin_password` | The admin password is a string and is required if there is no admin ticket available on the node | no
`name` \| `mapname` \| `map` \| `automountmapname` | Name of the map to manage | yes
`location` \| `automountlocation` \| `automountlocationcn` | Location name. | yes
`parentmap` | Parent map of the indirect map. Can only be used when creating new maps. Default: auto.master | no
`mount` | Indirect map mount point, relative to parent map. | yes, if `parent` is used.
`desc` \| `description` | Description of the map | yes
`state` | The state to ensure. It can be one of `present`, or `absent`, default: `present`. | no


Notes
=====

Creation of indirect mount points are not supported.

Authors
=======

Chris Procter
- Chris Procter
- Rafael Jeffman
194 changes: 194 additions & 0 deletions src/documentation/plugins/cert.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,194 @@
---
layout: page
title: ipacert
---

Description
-----------

The cert module makes it possible to request, revoke and retrieve SSL certificates for hosts, services and users.

Features
--------

* Certificate request
* Certificate hold/release
* Certificate revocation
* Certificate retrieval


Supported FreeIPA Versions
--------------------------

FreeIPA versions 4.4.0 and up are supported by the ipacert module.


Requirements
------------

**Controller**
* Ansible version: 2.13+
* Some tool to generate a certificate signing request (CSR) might be needed, like `openssl`.

**Node**
* Supported FreeIPA version (see above)


Usage
=====

Example inventory file

```ini
[ipaserver]
ipaserver.test.local
```

Example playbook to request a new certificate for a service:

```yaml
---
- name: Certificate request
hosts: ipaserver

tasks:
- name: Request a certificate for a web server
ipacert:
ipaadmin_password: SomeADMINpassword
state: requested
csr: |
-----BEGIN CERTIFICATE REQUEST-----
MIGYMEwCAQAwGTEXMBUGA1UEAwwOZnJlZWlwYSBydWxlcyEwKjAFBgMrZXADIQBs
HlqIr4b/XNK+K8QLJKIzfvuNK0buBhLz3LAzY7QDEqAAMAUGAytlcANBAF4oSCbA
5aIPukCidnZJdr491G4LBE+URecYXsPknwYb+V+ONnf5ycZHyaFv+jkUBFGFeDgU
SYaXm/gF8cDYjQI=
-----END CERTIFICATE REQUEST-----
principal: HTTP/www.example.com
register: cert
```
Example playbook to revoke an existing certificate:
```yaml
---
- name: Revoke certificate
hosts: ipaserver

tasks:
- name Revoke a certificate
ipacert:
ipaadmin_password: SomeADMINpassword
serial_number: 123456789
reason: 5
state: revoked
```
When revoking a certificate a mnemonic can also be used to set the revocation reason:
```yaml
---
- name: Revoke certificate
hosts: ipaserver

tasks:
- name Revoke a certificate
ipacert:
ipaadmin_password: SomeADMINpassword
serial_number: 123456789
reason: cessationOfOperation
state: revoked
```
Example to hold a certificate (alias for revoking a certificate with reason `certificateHold (6)`):

```yaml
---
- name: Hold a certificate
hosts: ipaserver
tasks:
- name: Hold certificate
ipacert:
ipaadmin_password: SomeADMINpassword
serial_number: 0xAB1234
state: held
```

Example playbook to release hold of certificate (may be used with any revoked certificates, despite of the rovoke reason):

```yaml
---
- name: Release hold
hosts: ipaserver
tasks:
- name: Take a revoked certificate off hold
ipacert:
ipaadmin_password: SomeADMINpassword
serial_number: 0xAB1234
state: released
```

Example playbook to retrieve a certificate and save it to a file in the target node:

```yaml
---
- name: Retriev certificate
hosts: ipaserver
tasks:
- name: Retrieve a certificate and save it to file 'cert.pem'
ipacert:
ipaadmin_password: SomeADMINpassword
certificate_out: cert.pem
state: retrieved
```


ipacert
-------

Variable | Description | Required
-------- | ----------- | --------
`ipaadmin_principal` | The admin principal is a string and defaults to `admin` | no
`ipaadmin_password` | The admin password is a string and is required if there is no admin ticket available on the node | no
`ipaapi_context` | The context in which the module will execute. Executing in a server context is preferred. If not provided context will be determined by the execution environment. Valid values are `server` and `client`. | no
`ipaapi_ldap_cache` | Use LDAP cache for IPA connection. The bool setting defaults to yes. (bool) | no
`csr` | X509 certificate signing request, in PEM format. | yes, if `state: requested`
`principal` | Host/service/user principal for the certificate. | yes, if `state: requested`
`add` \| `add_principal` | Automatically add the principal if it doesn't exist (service principals only). (bool) | no
`profile_id` \| `profile` | Certificate Profile to use | no
`ca` | Name of the issuing certificate authority. | no
`chain` | Include certificate chain in output. (bool) | no
`serial_number` | Certificate serial number. (int) | yes, if `state` is `retrieved`, `held`, `released` or `revoked`.
`revocation_reason` \| `reason` | Reason for revoking the certificate. Use one of the reason strings, or the corresponding value: "unspecified" (0), "keyCompromise" (1), "cACompromise" (2), "affiliationChanged" (3), "superseded" (4), "cessationOfOperation" (5), "certificateHold" (6), "removeFromCRL" (8), "privilegeWithdrawn" (9), "aACompromise" (10) | yes, if `state: revoked`
`certificate_out` | Write certificate (chain if `chain` is set) to this file, on the target node. | no
`state` | The state to ensure. It can be one of `requested`, `held`, `released`, `revoked`, or `retrieved`. `held` is the same as revoke with reason "certificateHold" (6). `released` is the same as `cert-revoke-hold` on IPA CLI, releasing the hold status of a certificate. | yes


Return Values
=============

Values are returned only if `state` is `requested` or `retrieved` and if `certificate_out` is not defined.

Variable | Description | Returned When
-------- | ----------- | -------------
`certificate` | Certificate fields and data. (dict) <br>Options: | if `state` is `requested` or `retrieved` and if `certificate_out` is not defined
&nbsp; | `certificate` - Issued X509 certificate in PEM encoding. Will include certificate chain if `chain: true`. (list) | always
&nbsp; | `san_dnsname` - X509 Subject Alternative Name. | When DNSNames are present in the Subject Alternative Name extension of the issued certificate.
&nbsp; | `issuer` - X509 distinguished name of issuer. | always
&nbsp; | `subject` - X509 distinguished name of certificate subject. | always
&nbsp; | `serial_number` - Serial number of the issued certificate. (int) | always
&nbsp; | `revoked` - Revoked status of the certificate. (bool) | if certificate was revoked
&nbsp; | `owner_user` - The username that owns the certificate. | if `state: retrieved` and certificate is owned by a user
&nbsp; | `owner_host` - The host that owns the certificate. | if `state: retrieved` and certificate is owned by a host
&nbsp; | `owner_service` - The service that owns the certificate. | if `state: retrieved` and certificate is owned by a service
&nbsp; | `valid_not_before` - Time when issued certificate becomes valid, in GeneralizedTime format (YYYYMMDDHHMMSSZ) | always
&nbsp; | `valid_not_after` - Time when issued certificate ceases to be valid, in GeneralizedTime format (YYYYMMDDHHMMSSZ) | always


Authors
=======

Sam Morris
Rafael Jeffman
Loading

0 comments on commit a16da86

Please sign in to comment.