Important Update Effective February 1, 2024!
Due to recent changes in Jira and Confluence, we've made the tough decision to discontinue the OpenID Connect (OIDC)/OAuth app and no longer provide new versions for the newest Jira/Confluence releases as of January 31, 2024.
This is due to some necessary components no longer shipping with Jira/Confluence, which would require some extensive rewrites of the OIDC App.
Important Update! This app will be discontinued soon!
Due to recent changes in Jira, which no longer ships with some components required for our Read Receipts app to run, we've made the tough decision to discontinue the app, as of Februar 5, 2025.
Important Update! This app will be discontinued soon!
We've made the tough business decision to discontinue the app, as of January 11, 2025.
Import, Export and Modify a User Sync Configuration
This tutorial explains how to download (export) an existing User Sync connector configuration, how to upload (import) it back again and how to modify (if needed) it and upload it back again.
That way you could re-use parts of existing configurations, i.e. on a staging server, without creating everything again by hand.
Normally this only makes sense, if you've added a lot of transformation rules across the config.
In our tutorial, we will show you two solutions. You can use REST API or a cheat code to get access to the JSON configuration file directly.
The steps below are intended for users who are familiar with REST and JSON, please contact our support, if you have any doubts.
Changing a configuration that way should be done with good care.
REST API
Export Configuration - REST
- Find the User Sync connector ID by clicking on the edit button first, and then scroll down to the Connector ID field of the first tab.
cURL
GET the connector configuration. The URL to retrieve the config looks like this, with the connector ID at the end:
curl -u user:password -X GET https://<baseurl>/rest/samlsso-admin/1.0/usersync/connector/<connector-ID>
You could also directly create a JSON file with the content of the connector configuration. In our example, we will create a JSON file called 'usersync_export.json' in the directory '~/Downloads/'
curl -u user:password -X GET https://<baseurl>/rest/samlsso-admin/1.0/usersync/connector/<connector-ID> --output ~/Downloads/usersync_export.json
Postman
GET the connector configuration. The URL to retrieve the config looks like this, with the connector ID at the end:
https://<basurl>/rest/samlsso-admin/1.0/usersync/connector/68e7f826-af8d-43f3-b303-4d3a28e83993
CODE- Use a local user and password (or API Token) with admin permissions for the Basic Auth. REST doesn't work with SAML.
Modify Configuration - REST
- Extract the configuration from the response
- not everything in the response from the call above is the configuration, you only need to preserve the configuration node of the JSON response
- We recommend pasting the response to a config.json file and open it in a text editor like Notepad++ or any other editor which highlights opening and closing brackets
- the below example shows the part which requires to be extracted, the value of the configuration field, including the curly brackets
- some child nodes have been collapsed for better readability
- some child nodes have been collapsed for better readability
- Copy that part, paste it to a new file and edit it as required
- in the sample below, I've changed the connector name and added a transformation
- in the sample below, I've changed the connector name and added a transformation
Import Configuration - REST
cURL
PUT (import) the edited configuration back to your instance. If you import a modified configuration it is important that your JSON file only contains the configuration node of the connector.
curl -u user:password -X PUT https://<baseurl>/rest/samlsso-admin/1.0/usersync/connector/<connector-id> -d @usersync_import.json --header "Content-Type: application/json"
Postman
- Copy the edited configuration and paste it back to Postman...
- ... into the Body tab with the radio button at "raw" and As JSON
- change the request method to PUT and press send
- you should get a 200 OK Result and see the complete response again
- checking the User Sync connector via the UI after refreshing the page should reflect the changes
JSON
Export Configuration - JSON
- Open the User Sync connector, you want to export, by clicking on the edit button first.
- Just type the cheat code 'godmode' to open a new dialog with the JSON-data.
- Extract the configuration from the response
- We recommend pasting the response to an us-export.json file and open it in a text editor like Notepad++ or any other editor which highlights opening and closing brackets
Modify Configuration - JSON
- Open the us-export.json file in a text editor like Notepad++ or any other editor which highlights opening and closing brackets.
- Not everything in the file is the configuration, you only need to preserve the configuration node of the JSON response
- Edit the file as required
- in the sample below, I've changed the connector name and added a transformation
Import Configuration - JSON
- Just create a new connector
- You don't need to start any configuration, just type the cheat code 'godmode' again.
- Delete the current configuration, which you see in the current connector configuration dialog.
- Copy & Paste your saved (or modified) configuration into the dialog.
- Apply the dialog (just press Close)
- Save and Return the User Sync Connector configuration.
- Checking the User Sync connector via the UI after refreshing the page should reflect the changes
Patch a connector configuration
It's possible to update specific parts of the configuration using HTTP PATCH. This can be done either using JSON Merge Patch (RFC 7686) or JSON Patch (RFC 6902).
JSON Patch
To update specific values, send a JSON patch (see https://jsonpatch.com/) as HTTP Patch with content-type application/json-patch+json
[{
"op": "replace",
"path": "/redirectToSso",
"value": true
}]
curl -u username:password -X PATCH https://base-url/rest/samlsso-admin/1.0/config -d @patched_json.json --header "Content-Type: application/json-patch+json"
JSON Merge Patch
JSON Merge patch allows to just specify the JSON-fragment that should be changed (see https://datatracker.ietf.org/doc/html/rfc7386). To use this syntax, send the JSON as HTTP Patch with content-type application/merge-patch+json.
{
"redirectToSso" : true
}
curl -u username:password -X PATCH https://base-url/rest/samlsso-admin/1.0/config -d @patched_json.json --header "Content-Type: application/merge-patch+json"