Channel Revision Published Runs on
6/stable 262 16 Jan 2026
Ubuntu 24.04 Ubuntu 22.04
6/stable 261 16 Jan 2026
Ubuntu 24.04 Ubuntu 22.04
6/candidate 262 16 Jan 2026
Ubuntu 24.04 Ubuntu 22.04
6/candidate 261 16 Jan 2026
Ubuntu 24.04 Ubuntu 22.04
6/beta 262 16 Jan 2026
Ubuntu 24.04 Ubuntu 22.04
6/beta 261 16 Jan 2026
Ubuntu 24.04 Ubuntu 22.04
6/edge 261 16 Jan 2026
Ubuntu 22.04
8-transition/edge 260 16 Jan 2026
Ubuntu 24.04
8/stable 262 17 Jan 2026
Ubuntu 24.04
8/candidate 262 17 Jan 2026
Ubuntu 24.04
8/beta 262 17 Jan 2026
Ubuntu 24.04
8/edge 262 16 Jan 2026
Ubuntu 24.04
juju deploy mongodb --channel 6/stable
Show information

Platform:

Ubuntu
24.04 22.04

charms.mongodb.v1.mongodb_tls

In this class we manage client database relations.

This class creates user and database for each application relation and expose needed information for client connection via fields in external relation.


class MongoDBTLS

Description

In this class we manage client database relations. None

Methods

MongoDBTLS. __init__( self , charm , peer_relation , substrate )

Description

Manager of MongoDB client relations. None

MongoDBTLS. is_tls_enabled( self , internal: bool )

Description

Returns a boolean indicating if TLS for a given internal/external is enabled. None

MongoDBTLS. request_certificate( self , param , internal: bool )

Description

Request TLS certificate. None

MongoDBTLS. is_waiting_for_both_certs( self )

Description

Returns a boolean indicating whether additional certs are needed. None

MongoDBTLS. request_new_certificates( self , internal: bool )

Description

Requests the renewel of a new certificate. None

MongoDBTLS. get_new_sans( self )

Create a list of DNS names for a MongoDB unit.

Returns

A list representing the hostnames of the MongoDB unit.

MongoDBTLS. get_current_sans( self , internal: bool )

Description

Gets the current SANs for the unit cert. None

MongoDBTLS. get_tls_files( self , internal: bool )

Prepare TLS files in special MongoDB way.

Description

MongoDB needs two files: — CA file should have a full chain. — PEM file should have private key and certificate without certificate chain.

MongoDBTLS. set_tls_secret( self , internal: bool , label_name: str , contents: str )

Description

Sets TLS secret, based on whether or not it is related to internal connections. None

MongoDBTLS. get_tls_secret( self , internal: bool , label_name: str )

Description

Gets TLS secret, based on whether or not it is related to internal connections. None

MongoDBTLS. is_set_waiting_for_cert_to_update( self , internal: bool )

Description

Returns True if we are waiting for a cert to update. None

MongoDBTLS. set_waiting_for_cert_to_update( self , waiting: bool , internal: bool )

Description

Sets a boolean indicator, for whether or not we are waiting for a cert to update. None