Add 'sdk/java-v2/' from commit '55f103e336ca9fb8bf1720d2ef4ee8dd4e221118'
[arvados.git] / doc / user / topics / arvados-sync-groups.html.textile.liquid
1 ---
2 layout: default
3 navsection: admin
4 title: "Synchronizing external groups"
5 ...
6 {% comment %}
7 Copyright (C) The Arvados Authors. All rights reserved.
8
9 SPDX-License-Identifier: CC-BY-SA-3.0
10 {% endcomment %}
11
12 The @arvados-sync-groups@ tool allows to synchronize groups in Arvados from an external source.
13
14 h1. Using arvados-sync-groups
15
16 This tool reads a CSV (comma-separated values) file having information about external groups and their members. When running it for the first time, it'll create a special group named 'Externally synchronized groups' meant to be the parent of all the remote groups.
17
18 Every line on the file should have 2 values: a group name and a local user identifier, meaning that the named user is a member of the group. The tool will create the group if it doesn't exist, and add the user to it. If group member is not present on the input file, the account will be removed from the group.
19
20 Users can be identified by their email address or username: the tool will check if every user exist on the system, and report back when not found. Groups on the other hand, are identified by their name.
21
22 This tool is designed to be run periodically reading a file created by a remote auth system (ie: LDAP) dump script, applying what's included on the file as the source of truth.
23
24
25 bq. NOTE: @arvados-sync-groups@ needs to perform several administrative tasks on Arvados, so must be run using a superuser token
26
27 h2. Options
28
29 The following command line options are supported:
30
31 table(table table-bordered table-condensed).
32 |_. Option |_. Description |
33 |==--help==|             This list of options|
34 |==--parent-group-uuid==|   UUID of group to own all the externally synchronized groups|
35 |==--user-id== |            Identifier to use in looking up user. One of 'email' or 'username' (Default: 'email')|
36 |==--verbose==|             Log informational messages (Default: False)|
37 |==--version==|             Print version and exit|
38
39 h2. Examples
40
41 To sync groups using the username to identify every account, reading from some @external_groups.csv@ file, the command should be called as follows:
42
43 <notextile>
44 <pre><code>~$ <span class="userinput">arvados-sync-groups --user-id username /path/to/external_groups.csv </span>
45 </code></pre>
46 </notextile>
47
48 If you want to use a specific preexisting group as the parent of all the remote groups, you can do it this way:
49
50 <notextile>
51 <pre><code>~$ <span class="userinput">arvados-sync-groups --parent-group-uuid &lt;preexisting group UUID&gt; --user-id username /path/to/external_groups.csv </span>
52 </code></pre>
53 </notextile>