Skip to content

Commit

Permalink
Use unique name for TNC
Browse files Browse the repository at this point in the history
  • Loading branch information
sonicaj committed Dec 12, 2024
1 parent 12c720d commit dc58b83
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/middlewared/middlewared/plugins/truenas_connect/acme.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import logging
import uuid

from middlewared.plugins.crypto_.utils import CERT_TYPE_EXISTING
from middlewared.service import CallError, job, Service
Expand Down Expand Up @@ -55,7 +56,7 @@ async def initiate_cert_generation(self):
cert_id = await self.middleware.call(
'datastore.insert',
'system.certificate', {
'name': 'TNC',
'name': f'truenas_connect_{str(uuid.uuid4())[-5:]}',
'type': CERT_TYPE_EXISTING,
'certificate': cert_details['cert'],
'privatekey': cert_details['private_key'],
Expand Down

0 comments on commit dc58b83

Please sign in to comment.