Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NAS-133587 / 25.04 / Use system generated cert after TNC has been revoked #15403

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,16 @@ async def unset_registration_details(self):
if creds is None:
return

# If we have a cert set, we will try to revoke it
# If we have a cert set, we will try to revoke it and also update system to use system cert
if config['certificate']:
logger.debug('Setting up self generated cert for UI')
await self.middleware.call('certificate.setup_self_signed_cert_for_ui')
logger.debug('Restarting nginx to consume self generated cert')
await self.middleware.call('system.general.ui_restart', 2)
logger.debug('Revoking existing TNC cert')
await self.middleware.call('tn_connect.acme.revoke_cert')

logger.debug('Revoking TNC user account')
# We need to revoke the user account now
response = await self._call(
get_account_service_url(config).format(**creds), 'delete', headers=await self.auth_headers(config),
Expand Down
Loading