Authentication
- class couchbase.auth.AuthDomain(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
Where a user is managed.
Local users are managed by Couchbase Server, and External users by an outside service such as LDAP.
- External = 1
- Local = 0
- class couchbase.auth.Authenticator
The credentials a cluster connects with.
Each subclass is one authentication mechanism. An instance is a dict of the settings the connection takes, and its repr hides the password, the token and the key path.
- class couchbase.auth.CertificateAuthenticator(cert_path: str | None = None, key_path: str | None = None, trust_store_path: str | None = None)
Certificate authentication mechanism.
- class couchbase.auth.JwtAuthenticator(token: str)
JWT (JSON Web Token) authentication mechanism.
Uses OAUTHBEARER SASL mechanism for KV connections and Bearer token for HTTP services.
- Parameters:
token (str) – The JWT token to use for authentication.
- Raises:
InvalidArgumentException – If token is not a string.
- class couchbase.auth.PasswordAuthenticator(username: str, password: str, cert_path: str | None = None, **kwargs: Any)
Password authentication mechanism.
- Parameters:
- static ldap_compatible(username: str, password: str) PasswordAuthenticator
A password authenticator that sends the password with SASL PLAIN, which LDAP users need.
PLAIN sends the password as it is, so use it over TLS.
- Parameters:
- Returns:
An authenticator allowing only the PLAIN mechanism.
- Return type: