summaryrefslogtreecommitdiff
path: root/python/samba/key_credential_link.py
AgeCommit message (Collapse)AuthorFilesLines
2025-08-20py:key_credential_link: filter_kcl_list helper for samba-toolDouglas Bagnall1-0/+27
This will be used in `samba-tool user keytrust delete` and `samba-tool computer keytrust delete` and is mainly to deduplicate that code. Potentially it could also be used in `keytrust view`. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
2025-08-20py:key_credential_list: add kcl_in_list functionDouglas Bagnall1-0/+13
This compares the key material and DN of a KeyCredentialLinkDn with a list of others, which is a different sense of equality than the default (which considers GUIDs and binary equality). This will be used by samba-tool to check whether a link is in fact a duplicate even if it seems not to be due to some insignificant field being non-identical. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
2025-08-20py:key_credential_links: allow encoding=='auto'Douglas Bagnall1-1/+4
'auto' is the same as None. This is helpful to samba-tool. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
2025-08-20python:key_credential_link: add descriptive methodsDouglas Bagnall1-2/+124
In samba-tool we are going to want a KeyCredentialLinkDn to be able to describe itself. We're adding the methods here because `samba-tool user` and `samba-tool computer` will both want to use them. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
2025-08-13python:key_credential_link: old python compatibilityDouglas Bagnall1-1/+1
int.to_bytes assumed these defaults in recent versions Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
2025-08-07python: add helpers to construct KeyCredentialLinkDn objectsDouglas Bagnall1-1/+161
We want to ensure the as best we can that the binary blob is in a useful format. This will be used by samba-tool. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
2025-08-07python: add KeyCredentialLinkDn BinaryDn subtypeDouglas Bagnall1-0/+56
This works as a BinaryDn, but it also does validation to ensure the binary contains a KEYCREDENTIALLINK_BLOB. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>