Hub 2023.3 Help

Change the Service Secret

Just like a password for a user account, you may want to change the service secret on a regular basis to maintain security. You should also change the service secret if a service that is connected to Hub has been compromised.

In Hub, you can generate a new service secret, or set the service secret manually. If the service secret is saved on the client side, you must also change the service secret in the connected service.

Prerequisites

You must have access to the relevant properties file in the connected service. If you do not change the service secret in the connected service, the service will not be able to connect to Hub.

To change the service secret:

  1. In the external Hub service, select Services from the Server Settings section of the Administration menu.

  2. Select the service from the list.

  3. On the Settings tab, click the Change button next to the Secret setting.

    • The Change Service Secret dialog opens.

    Change service secret dialog
  4. In the Change Service Secret dialog, you can either:

    1. Generate the new secret automatically:

      • Copy the new secret.

      • Click the Change secret button

    2. Key in the new secret manually:

      • Select the Key in tab.

      • Enter and confirm the new secret. Record the value that is set for the new secret. You need to update this value in the properties file of the service.

      • Click the Change secret button.

  5. Set the service secret property to the new service secret in the connected service.

If the service secret is saved on the client side, you need to set the service secret property to match the new service secret in Hub.

To change the service secret in TeamCity:

  1. In the TeamCity home directory, open the <service_home>/conf/hub-config.properties file.

    • For a Windows installation, the <service_home> directory is the installation directory.

    • For a Linux or macOS installation, the <service_home> directory is the location where the archive was unpacked during installation.

  2. Paste or write the new service secret into the hub.service.secret property. Remove any empty spaces at the end of the row.

  3. Save and close the properties file.

  4. Restart the service.

To change the service secret in YouTrack:

  1. In the YouTrack home directory, open the <service_home>/conf/internal/hub.properties file.

    • For a ZIP installation, the <service_home> directory is the location where the ZIP distribution was unpacked during installation.

    • For an MSI installation, the <service_home> directory is %\programdata%\\JetBrains\YouTrack.

  2. Paste or write the new service secret into the youtrack.service.secret property. Remove any empty spaces at the end of the row.

  3. Save and close the properties file.

  4. Restart the service.

Last modified: 27 February 2024