You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As users transition to use v4 instead of v3 and migrate a deployed charm, they may want to re-use and existing private key instead of having it be re-generated by the lib. To support this, the lib should accept a private_key as an argument, though we will discourage users from using this in the long run.
Usage
private_key=self.get_private_key_from_workload()
self._certificates=TLSCertificatesRequiresV4(
charm=self,
relationship_name=TLS_RELATION_NAME,
certificate_requests=[self._get_certificate_request()],
private_key=PrivateKey.from_string(private_key) # New argument
)
Where
classTLSCertificatesRequiresV4(Object):
def__init__(
self,
...
private_key: Optional[PrivateKey] =None,
):
"""Create a new instance of the TLSCertificatesRequiresV4 class. Args: ... private_key (PrivateKey): We do not recommend using this parameter. If provided, the library will used the provided private key for creating certificate requests. """
...
self.private_key=private_key
The text was updated successfully, but these errors were encountered:
+1
As part of our product specification, we need to provide the end user the option of setting their private key. Currently, we are doing this by using the private function from the library and replacing the content of the secret used by it manually. We believe this is error-prone and can break anytime you make a change to your API that touches the used function.
Enhancement Proposal
As users transition to use v4 instead of v3 and migrate a deployed charm, they may want to re-use and existing private key instead of having it be re-generated by the lib. To support this, the lib should accept a private_key as an argument, though we will discourage users from using this in the long run.
Usage
Where
The text was updated successfully, but these errors were encountered: