generated from ansible-collections/collection_template
-
Notifications
You must be signed in to change notification settings - Fork 64
Closed
Description
SUMMARY
Add a new module to manage PVE authentication realms.
I'm currently implementing this module and would like to get feedback before opening a PR. I also have several design questions (see below).
Current implementation proposal
A generic module named proxmox_domain_realm to manage all realm types (ad, ldap, openid, ...).
Module documentation:
module: proxmox_domain_realm
short_description: Management of authentication realms for Proxmox VE cluster
description:
- Create, update or delete Proxmox VE authentication realms.
author:
- Clément Cruau (@PendaGTP)
version_added: "1.6.0"
attributes:
check_mode:
support: full
diff_mode:
support: none
options:
realm:
description:
- The realm name.
type: str
aliases: ["name"]
required: true
state:
description:
- Desired state of the realm.
choices: ["present", "absent"]
default: present
type: str
type:
description:
- The realm type.
- Only required when O(state=present).
type: str
choices: ["ad", "ldap", "openid", "pam", "pve"]
options:
description:
- Realm configuration options.
- See U(https://pve.proxmox.com/wiki/Manual:_datacenter.cfg) and L(Authentication Realms,https://pve.proxmox.com/pve-docs/chapter-pveum.html).
- The entire value is masked in logs.
type: dict
seealso:
- module: community.proxmox.proxmox_domain_info
description: Retrieve information about Proxmox VE authentication realms.
extends_documentation_fragment:
- community.proxmox.proxmox.actiongroup_proxmox
- community.proxmox.proxmox.documentation
- community.proxmox.attributesExamples:
- name: Update the comment on the pam realm
community.proxmox.proxmox_domain_realm:
api_host: node1
api_user: root@pam
api_password: password
realm: pam
type: pam
options:
comment: Updated PAM authentication comment
- name: Create a new Proxmox VE openid realm
community.proxmox.proxmox_domain_realm:
api_host: node1
api_user: root@pam
api_password: password
realm: openid
type: openid
options:
comment: OpenID authentication
client-id: 1234567890
client-key: 1234567890
issuer-url: https://example.com/issuer
- name: Delete a Proxmox VE openid realm
community.proxmox.proxmox_domain_realm:
api_host: node1
api_user: root@pam
api_password: password
realm: openid
state: absentDesign Questions
Handling realm options, with options param:
Currently:
optionsis a simple dict- No pre-validation is performed
- The entire
optionsdict is marked withno_log=True
Questions:
- Is masking the entire options dict acceptable?
- Should all possible realm parameters be explicitly defined as module options instead of using a generic dict?
What are your thoughts? Any feedback or suggestions are welcome. If preferred, I can open a draft PR with the current implementation.
ISSUE TYPE
- Feature Idea
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels