Skip to content
This repository was archived by the owner on Feb 21, 2025. It is now read-only.

20230725_SSO_Migration

Dimitris Papagiannis edited this page Aug 8, 2023 · 12 revisions

Planned SSO Migration on August 7th, 2023

The final date that the Run Registry SSO migration will take place is Monday, August 7th.

Steps to update your client

Updating from the QA test client

If you are already using the test client mentioned in the previous post, follow this procedure.

Step 1/2: Remove the ENVIRONMENT variable.

Depending on your setup, you should either edit your .env file to remove the ENVIRONMENT=qa or to not export the ENVIRONMENT variable at all.

Step 2/2: Update the runregistry package.

Using the python from your virtual environment, run:

python -m pip uninstall runregistry  # remove the one installed from the Test PyPI repository
python -m pip install runregistry>=1.0.0  # install from PyPI

Note Make sure to remove any use of --index-url https://test.pypi.org/simple from your package installation procedure and requirements.txt file, to make sure you are no longer using the test runregistry package.

Your script is now using the main production SSO proxy of Run Registry.

Updating from version 0.2.8

If you have been using version 0.2.8 with Grid Certificates, follow this procedure.

Step 1/3: Registering your application

To update your application, you will first need to follow the instructions found in section For CERN APIs using the ""new"" SSO of cernrequests's repository.

Once you complete the procedure, you should have a Client ID and a Client Secret.

Step 2/3: Updating your Python packages

Make sure you have the appropriate cernrequests version installed:

pip install cernrequests>=0.4.1

Then, install the latest runregistry package:

pip install runregistry>=1.0.0

Step 3/3: Set your environment variables.

You will need to export the following environment variables before running your application:

SSO_CLIENT_ID=<your client id>
SSO_CLIENT_SECRET=<your client secret>

You can either do that:

  • by exporting those variables directly in your terminal or
  • by creating a file named .env in the root of your project, containing the lines above.

And that should do it. If all went well, you should be now accessing Run Registry through the new CERN SSO.