Description — Couchbase Lite’s Peer-to-Peer Synchronization enables edge devices to synchronize securely without consuming centralized cloud-server resources
Abstract — This content covers how to manage TLS identities using Couchbase Lite peer-to-peer sync
Related Content — API Reference | Passive Peer | Active Peer
Description — Couchbase Lite’s Peer-to-Peer Synchronization enables edge devices to synchronize securely without consuming centralized cloud-server resources
Abstract — This content covers how to manage TLS identities using Couchbase Lite peer-to-peer sync
Related Content — API Reference | Passive Peer | Active Peer
API References
You can find Android API References here.
Creating TLS Identity
There are couple of options by which TLS Identity is created:
-
You can use the anonymous self-signed cert auto-generated by Couchbase Lite
-
You can import a cert to be bundled with the app and-or stored in the keychain
Use Anonymous Cert
Anonymous certification uses the self signed certificate auto-generated by Couchbase Lite when TLS is enabled, but no TLSIdentity is provided.
listenerConfig.disableTLS = false // Use with anonymous self signed cert
listenerConfig.tlsIdentity = nil
Import a Cert
Use the TLSIdentity class’s importIdentity() method to import a certificate that can be bundled with the app and-or added to the keychain.
-
First check the keychain to see if the identity already exists
-
Check for an existing resource bundle
-
Import from an existing resource bundle
-
Store imported identity in keychain
-
Use keychain identity in config
Delete TLS Identity
String thisAlias = "alias-to-delete";
final KeyStore thisKeyStore
= KeyStore.getInstance("AndroidKeyStore");
thisKeyStore.load(null);
thisKeyStore.deleteEntry(thisAlias);
Related Content
|
Enterprise Edition only
This an Enterprise Edition feature.
Purchase the Enterprise License, which includes official Couchbase Support, to use it in production (see the license and support https://www.couchbase.com/licensing-and-support-faq).
|