Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
tutorial:adm:how_to_identity_sync [2019/01/24 13:36] kotisovam |
tutorial:adm:how_to_identity_sync [2021/03/03 12:52] (current) soval [Systems - CSV: Source of identities] |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Systems - CSV: Source of identities ====== | ====== Systems - CSV: Source of identities ====== | ||
+ | |||
+ | <note important> | ||
===== Introduction ===== | ===== Introduction ===== | ||
- | This tutorial will show you how to connect csv files as a source of users with CzechIdM. We will use the default | + | This tutorial will show you how to connect csv files as a source of data about users in CzechIdM. We will use the default |
===== Data source ===== | ===== Data source ===== | ||
- | Our sample source file has just three columns | + | Our sample source file has just three columns |
<code csv> | <code csv> | ||
- | login,firstname,lastname | + | LOGIN,FIRSTNAME,LASTNAME |
edwardw, | edwardw, | ||
adaml, | adaml, | ||
</ | </ | ||
- | Move your source file onto the server on which IdM is running. It's a good practice to put CSV files of every project into an " | + | Move your source file onto the server on which IdM is running. It's a good practice to put CSV files of every project into an " |
- | Set permissions so that the CzechIdM server will be able to read this file. **Also, | + | Set permissions so that the CzechIdM server will be able to read this file. **Also, |
+ | We recommend using the column names as upper-case, because the connector is case-sensitive and also it transforms the names of the columns to uppercase automatically. If you don't use upper case, you would have to change the attributes in the Scheme manually (see later). | ||
===== Basic information ===== | ===== Basic information ===== | ||
- | Go to the **Systems** tab in the main menu, then click on the **Add** button, right above the listed current systems. On the first page, just fill the system name, and since you are connecting csv as a source file, you can set the system as **Read-only**. Then save the system settings - to make other options available. | + | Go to the **Systems** tab in the main menu, then click on the **Add** button, right above the listed current systems. On the first page, just fill in the system name, and since you are connecting csv as a source file, you can set the system as **Read-only**. Then save the system settings - to make other options available. |
===== Connector configuration ===== | ===== Connector configuration ===== | ||
- | In the next step, switch to the **Configuration** tab of your new system. First, you need to choose a connector; in this case, it is the **CSV connector**. This will present you with the specific configuration for that choice. | + | In the next step, switch to the **Configuration** tab of your new system. First, you need to choose a connector; in this case, it is the **CSV connector**. This will present you with the specific configuration for this connector. |
- | Fill the important | + | Fill these fields: |
- | * **Source path**: path to your csv file | + | * **Separator**: separator used in the csv file (comma "," |
- | * **File mask**: file name | + | * **Header included**: does the file have a header (it usually does, as in our example; if not, it can be set in the " |
- | * **Key column name**: | + | * **Source path**: path to the csv |
- | * **Column names**: (multi) - All columns of your file including | + | * **Identifier**: the name of the column |
- | * **Ignore header**: true | + | |
- | + | Click Save. | |
- | <note important> | + | |
- | + | ||
- | + | ||
- | + | ||
- | //Sample configuration for our file:// {{: | + | |
===== Scheme ===== | ===== Scheme ===== | ||
Next, go to the **Scheme** menu item of your selected system. | Next, go to the **Scheme** menu item of your selected system. | ||
- | Have CzechIdM generate a scheme for you by clicking on the **Generate scheme** button. | + | Have CzechIdM generate a scheme for you by clicking on the **Generate scheme** button. |
- | Alternately, | + | |
- | * Use the **Add** button to create a new scheme. For users, you need to name it " | + | {{ : |
- | * Add all file columns you want to work with. Instead of the name of your identifier column use the Connid constant " | + | |
- | * Set all attributes as **Able to read** | + | |
- | // | + | If your CSV file contains the header names in lower case and the scheme |
===== Mapping ===== | ===== Mapping ===== | ||
Line 63: | Line 58: | ||
Then map all columns as entity attributes the way you see it in the picture below. Set **\_\_NAME\_\_** | Then map all columns as entity attributes the way you see it in the picture below. Set **\_\_NAME\_\_** | ||
- | //Sample attribute mapping:// | + | {{ : |
===== Synchronization ===== | ===== Synchronization ===== | ||
- | Finally, go to the **Synchronization** tab and add a new one, setting its **Name** and the fields as follows: | + | Finally, go to the **Synchronization** tab and add a new one, setting its **Name** |
* **Allowed: | * **Allowed: | ||
Line 78: | Line 74: | ||
Afterwards, go back to the **Synchronization** menu and run the synchronization you've just created. You can check its result if you click on the **Logs** tab of your synchronization. | Afterwards, go back to the **Synchronization** menu and run the synchronization you've just created. You can check its result if you click on the **Logs** tab of your synchronization. | ||
- | //Sample synchronization results:// | + | {{ : |
- | ===== Frequent errors | + | ===== Common issues |
If the import does not go as expected, these are the things to check out: | If the import does not go as expected, these are the things to check out: | ||
- | * Database | + | * Possible database |
* Permission of the folder with CSV files should be set to reading, writing and execution | * Permission of the folder with CSV files should be set to reading, writing and execution | ||
* Owner of the CSV files and folder, including these files, has to be tomcat: | * Owner of the CSV files and folder, including these files, has to be tomcat: | ||
+ | * '' | ||
+ | * Check if the columns are lower or upper case - they should be upper case in the Scheme attributes, otherwise their values are not correctly loaded into IdM. | ||
- | **Valid CSV:** | + | **Your CSV is not valid:** |
- | * Same count of columns in header and in individual records | + | * The columns in the header and in individual records |
* No duplicates in identifier that you chose in the system configuration as unique | * No duplicates in identifier that you chose in the system configuration as unique | ||
* No missing unique identifiers | * No missing unique identifiers | ||
* No empty columns in the header definition | * No empty columns in the header definition | ||
+ | * The CSV file has UTF-8 encoding and starts with BOM character (< | ||
+ | |||