CertSet1 API guide
This document describes the public D-Bus interface com.axis.CertSet1.
This API lets applications manage certificate sets and retrieve filesystem paths to certificates and certificate sets for use in certificate-based authentication and authorization workflows.
Applications can create, update, delete, and list certificate sets, but can only access the sets that they own.
What the API is for
Use this API to:
- create certificate sets,
- get the filesystem path to a certificate set,
- get the filesystem path to a certificate in a set,
- update certificate/CA references in a set,
- delete certificate sets,
- list certificate sets owned by the caller.
Typical client flow:
Createa set (optionally with initial cert/CA references).Updatethe set when certificate assignments change.GetPathwhen an application needs the actual directory path.GetCertPathwhen an application needs the actual certificate path.Listto discover managed sets.Deletewhen a set is no longer needed.
D-Bus endpoint
- Service name:
com.axis.Certificate1 - Object path:
/com/axis/Certificate1/CertSet - Interface:
com.axis.CertSet1
Method reference
Create
Creates a new certificate set.
If both cert and ca are empty, an empty set is created.
If either is provided, references are assigned at create time.
The created certificate set is owned by the creating application.
A single application may only create up to 10 certificate sets.
Exceeding this limit returns com.axis.CertSet1.Error.TooManySets.
Current behavior supports zero or one certificate ID only.
If more than one certificate ID is provided, the method returns
com.axis.CertSet1.Error.InvalidArgument.
If provided, the certificate in cert must meet the security
requirements defined by the system's cryptographic policy. Otherwise
com.axis.CertSet1.Error.NotSupported is returned.
In parameters
name(s): certificate set name (valid UTF-8, 1..128 octets, no control charactersU+0000..U+001FandU+007F..U+009F).cert(as): certificate IDs to assign, empty list allowed.ca(as): CA certificate IDs, empty list allowed.
Out parameters
- none
Common errors
com.axis.CertSet1.Error.SetAlreadyExistscom.axis.CertSet1.Error.InvalidArgumentcom.axis.CertSet1.Error.AccessDeniedcom.axis.CertSet1.Error.InternalErrorcom.axis.CertSet1.Error.TooManySetscom.axis.CertSet1.Error.NotSupported
GetPath
Returns the path of a certificate set directory. This is the method to call when an application wishes to retrieve the path of a certificate set. If a CA has been assigned to the certificate set, the returned path can be used as a CA path. An application can access only certificate sets that it owns.
In parameters
name(s): certificate set name.
Out parameters
path(s): absolute path to the certificate set directory.
Common errors
com.axis.CertSet1.Error.NoSuchSetcom.axis.CertSet1.Error.AccessDeniedcom.axis.CertSet1.Error.InvalidArgumentcom.axis.CertSet1.Error.InternalError
GetCertPath
Returns the absolute path to the certificate in a set, if it exists. Call this when an application needs to use the certificate in their set. An application can access only certificates in the sets that it owns.
In parameters
name(s): certificate set name.
Out parameters
path(s): absolute path to the certificate.
Common errors
com.axis.CertSet1.Error.NoSuchSetcom.axis.CertSet1.Error.NoSuchCertificatecom.axis.CertSet1.Error.AccessDeniedcom.axis.CertSet1.Error.InvalidArgumentcom.axis.CertSet1.Error.InternalError
Update
Replaces certificate-set contents with provided certificate references. An application can only update certificate sets that it owns.
Current behavior supports zero or one certificate ID only.
If more than one certificate ID is provided, the method returns
com.axis.CertSet1.Error.InvalidArgument.
If provided, the certificate in cert must meet the security
requirements defined by the system's cryptographic policy. Otherwise
com.axis.CertSet1.Error.NotSupported is returned.
In parameters
name(s): certificate set name.cert(as): certificate IDs to assign, or empty list to clear.ca(as): CA certificate IDs to assign, or empty list to clear.
Out parameters
updated(b):trueif any change was applied,falseif no-op.
Common errors
com.axis.CertSet1.Error.NoSuchSetcom.axis.CertSet1.Error.NoSuchCertificatecom.axis.CertSet1.Error.AccessDeniedcom.axis.CertSet1.Error.InvalidArgumentcom.axis.CertSet1.Error.InternalErrorcom.axis.CertSet1.Error.NotSupported
Delete
Deletes an existing certificate set. An application can only remove certificate sets that it owns.
In parameters
name(s): certificate set name.
Out parameters
- none
Common errors
com.axis.CertSet1.Error.NoSuchSetcom.axis.CertSet1.Error.AccessDeniedcom.axis.CertSet1.Error.InvalidArgumentcom.axis.CertSet1.Error.InternalError
List
Lists certificate sets that are owned by the caller.
In parameters
- none
Out parameters
-
result(a{sa{sv}}): dictionary keyed by certificate set ID.For each key
<cert-set-name>, the value is a dictionary with:cert(as): currently assigned certificate IDs, empty list allowed.ca(as): currently assigned CA certificate IDs, empty list allowed.path(s): absolute path to certificate set directory.
Conceptual shape:
{"My Cert Set 1": {"cert": ["Axis device ID ECC-P256 (802.1AR)"],"ca": ["Axis device ID Root CA ECC", "Axis device ID Root CA RSA"],"path": "/etc/certs/acap-myacap/client/tls/0"},"An empty cert set": {"cert": [],"ca": [],"path": "/etc/certs/acap-myacap/client/tls/1"}}
Common errors
com.axis.CertSet1.Error.InternalError
Call examples
# Create(s name, as cert, as ca)
gdbus call --system --dest "com.axis.Certificate1" --object-path "/com/axis/Certificate1/CertSet" --method "com.axis.CertSet1.Create" "MyCertSet" "['MyCertificate']" "['ca-cert-1','ca-cert-2']"
# Create empty(s name, as cert, as ca)
gdbus call --system --dest "com.axis.Certificate1" --object-path "/com/axis/Certificate1/CertSet" --method "com.axis.CertSet1.Create" "MyCertSet" "[]" "[]"
# GetPath(s name) -> (s path)
gdbus call --system --dest "com.axis.Certificate1" --object-path "/com/axis/Certificate1/CertSet" --method "com.axis.CertSet1.GetPath" "MyCertSet"
# GetCertPath(s name) -> (s path)
gdbus call --system --dest "com.axis.Certificate1" --object-path "/com/axis/Certificate1/CertSet" --method "com.axis.CertSet1.GetCertPath" "MyCertSet"
# Update(s name, as cert, as ca) -> (b updated)
gdbus call --system --dest "com.axis.Certificate1" --object-path "/com/axis/Certificate1/CertSet" --method "com.axis.CertSet1.Update" "MyCertSet" "['MyCertificate']" "['ca-cert-1','ca-cert-2']"
# Delete(s name)
gdbus call --system --dest "com.axis.Certificate1" --object-path "/com/axis/Certificate1/CertSet" --method "com.axis.CertSet1.Delete" "MyCertSet"
# List() -> (a{sa{sv}} result)
gdbus call --system --dest "com.axis.Certificate1" --object-path "/com/axis/Certificate1/CertSet" --method "com.axis.CertSet1.List"