Updating your domain#

To update your Package Security Manager (On-prem) domain, you need to update the domain variables in both the .env and kc.yaml files:

  1. Open a terminal and connect to your instance of Package Security Manager.

  2. Enter to your installer directory by running the following command:

    # Replace <INSTALLER> with your installer directory
    cd <INSTALLER>
    
  3. Make a copy of the current .env file for reference and/or recovery purposes:

    cp .env .env.old
    
  4. Using your preferred file editor, open the .env file.

  5. Update the DOMAIN variable to your new domain.

    Example .env file
  6. Save your changes and close the file.

  7. Enter your keycloak directory by running the following command:

    cd keycloak/
    
  8. Using your preferred file editor, open the kc.yaml file.

  9. Locate the clientId: repo-service section of the file and add the following line:

    # Replace URL with your Package Security Manager URL
    rootUrl: "<URL>"
    
    Example kc.yaml file

    Note

    If you have existing clients (tools) configured to use Package Security Manager instances using the old DNS name, you will need to update those clients as well.

  10. Restart your pods and apply your changes by running the following commands:

    docker compose up -d
    
  11. Open a browser and log in to the Keycloak administrative console.

  12. Verify you are on the dev realm.

  13. Select Clients from the left-hand navigation.

  14. Select the repo-service client.

  15. Update the Root URL to your new domain.

  16. Prepend the Valid redirect URIs path with your new domain.

  17. Click Save.

Tip

If Keycloak demands you also update the Backchannel logout URL, add your new domain to the field under Logout settings, then save your changes. Next, delete the entry you just made and attempt to save again.

  1. If you are using SSL, update your certificates to refer to your new domain.

  2. You can now log in to Package Security Manager normally.