Skip to content

Commit

Permalink
doc/source: Update client authentication description
Browse files Browse the repository at this point in the history
Signed-off-by: hamistao <[email protected]>
  • Loading branch information
hamistao committed Jul 17, 2024
1 parent 149a840 commit 7087942
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
11 changes: 6 additions & 5 deletions doc/source/authentication.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ Client Authentication
=====================

When using LXD over https, LXD uses an asymmetric keypair for authentication.
The keypairs are added to the authentication database after entering the LXD
instance's "trust password".
The keypairs are added to the authentication database after entering a secret.
The secret can be the LXD trust password, when using LXD 5.0 or older, or a
trust token otherwise.


Generate a certificate
Expand Down Expand Up @@ -35,11 +36,11 @@ essentially meaning that the authentication has not yet occurred.
>>> client.trusted
False
In order to authenticate the client, pass the lxd instance's trust
password to `Client.authenticate`
In order to authenticate the client, pass the LXD instance's trust
password or token to `Client.authenticate`

.. code-block:: python
>>> client.authenticate('a-secret-trust-password')
>>> client.authenticate('a-secret')
>>> client.trusted
>>> True
7 changes: 4 additions & 3 deletions doc/source/certificates.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ methods:

- `all()` - Retrieve all certificates.
- `get()` - Get a specifit certificate, by its fingerprint.
- `create()` - Create a new certificate. This method requires
a first argument that is the LXD trust password, and the cert
data, in binary format.
- `create()` - Create a new certificate. This method requires a first argument
that is a secret and a second containing the cert data, in binary format.
The secret can be the LXD trust password, when using LXD 5.0 or older,
or a trust token otherwise.


Certificate attributes
Expand Down

0 comments on commit 7087942

Please sign in to comment.