The Registry version 4.x documentation on writing plugins is at https://spaces.at.internet2.edu/display/COmanage/Writing+Registry+Plugins.
Documentation specifically on writing provisioner plugins is at https://spaces.at.internet2.edu/display/COmanage/Provisioner+Plugins.
The Dataverse API Guide for version 6.2 is at https://guides.dataverse.org/en/6.2/api/.
The current version of the plugin targets Dataverse version 6.2.
Manipulating Dataverse people and explicit group objects requires use of the Dataverse API.
The Dataverse API has both a public and admin component. The admin component is blocked from
external access by default, so the Dataverse server should be configured
with :BlockedApiPolicy
set to unblock-key
and :BlockedApiKey
set. See the Dataverse documentation at
https://guides.dataverse.org/en/6.2/installation/config.html#blockedapipolicy. The provisioner refers to this unblock key as the "Admin API Token".
In addition, an API token needs to be generated and linked with a Dataverse user that has permissions to create and view explicit groups in all dataverses that the provisioner will need access to. To generate an API token, see the Dataverse documentation at https://guides.dataverse.org/en/latest/user/account.html#api-token. The provisioner refers to this API token as the "API token"
Dataverse Authenticed User Attribute | CO Person Object | Example | Notes |
---|---|---|---|
identifier | Identifier of configured type | skoranda | Identifier type chosen during plugin configuration. Usually an Extended Type. |
persistentUserId | Identifier of configured type | http://cilogon.org/serverT/users/27326098 | Identifier type chosen during plugin configuration. OIDC sub logical choice. |
id | Identifier of type Provisioning Target | 1:11 | Returned by Dataverse when creating user and saved by plugin after prepending the ID of the provisioner instance. |
authenticationProviderId | None | https://archive-dev.ada.edu.au/ | Part of plugin configuration. Static for all users. Provided by Dataverse administrator. |
firstName | Name (given) | Scott | Name type chosen during plugin configuration (e.g. Official) |
lastName | Name (family) | Koranda | Name type chosen during plugin configuration (e.g. Official) |
displayName | None | Does not seem to be required by Dataverse API and then is automatically generated? | |
EmailAddress of configured Type | [email protected] | EmailAddress type chosen during plugin configuration (e.g. Official) |
Dataverse Explicit Group | CO Group Object | Example | Notes |
---|---|---|---|
displayName | Name | ADA-ANU Poll Dataverse-doi:10.26193/CI4Z2S | The DOI can be exchanged using DOI API for specific Dataverse server citation URL, and then the Dataverse queried to find the owning Dataverse Collection in which to create the group. |
Identifier of configured type | 10.26193/CI4Z2S | Duplicates DOI that is part of Name | |
description | Description | Authorized users for ADA-ANU Poll Dataverse-doi:10.26193/CI4Z2S | |
owning collection identifier | See notes on displayName | anupoll | |
aliasInOwner | authorized_doi:10.26193/CI4Z2S |
For each Dataserver to be provisioned the following Registry objects form a "set" and should use corresponding names and descriptions when they are created and configured:
- An Extended Identifier type that will hold the Dataverse identifier value for a CO Person record. An example
is
adaproddataverse
. - An Automatic Identifier Assignment that automatically creates the Identifier of the Extended Identifier type using a rule
and attaches it to the CO Person record. An example Automatic Identifier Assignment, rule, and value are
ADA PROD Dataverse
(g:1)(f)[2:(#)]
(first character lowercase from given name prepended to lowercase family name and prepended if necessary with a numerical disambiguator that starts with2
)skoranda7
- A Server of Type
HTTP
that holds the URL and API token necessary to invoke the Dataverse server API. An example isADA PROD Dataverse
with URLhttps://dataverse.ada.edu.au
. - A ProvisioningTarget using plugin
DataverseProvisioner
. An example description isADA PROD Dataverse
.
Each instance of the ProvisioningTarget must be configured with a second Server of Type HTTP
that represents
a DOI API server. Multiple ProvisioningTarget instances may be configured to use the same DOI Server.
In Dataverse a role is a set of permissions and a role may be assigned to an explict group. Each member of the explicit group then is given the set of permissions.
Each explicit group is ''owned'' by a dataverse within a Dataverse server and different dataverses
may ''own'' explicit groups that have the same name. For example, the dataverses ANU Poll 2008: Environment
and ANU Poll 2009: Economics
may both own and use distinct explicit groups named ANU Staff
for
managing authorization to the dataverse and the datasets and collections within it. Further, different
Dataverse servers in the community (represented in Registry by unique instantiations of the plugin) and
their dataverses may also use distinct explicit groups with the same names.
Registry, however, at this time only supports a flat CO Group namespace and no two CO Groups may share the same name.
So a naming convention and logic are required to disambiguate and map a CO Group to a specific explicit group owned by a specific dataverse in a specific Dataverse server.
The naming convention for CO Groups is
<dataverse name>-doi:<DOI>
Also note that the convention is that the CO Group has an attached Identifier of the configured DOI type that holds the DOI (value only, no prefix string 'doi').
The logic for mapping the CO Group name to an owner dataverse within a Dataverse server is:
- Find the Identifier attached the CO Group with the configured DOI type and extract the DOI.
- Query the configured DOI server and from the returned metadata extract the Dataverse server.
- Query the Dataverse server with the DOI to obtain the dataverse owner of the explicit group.
Note that for development and testing purposes, when the plugin is so configured the second step above is skipped and the plugin assumes that all CO Groups are mapped to the Dataverse server associated with the plugin.
-
Each instantiation of the plugin targets one and only one Dataverse server instance.
-
The plugin assumes that the Dataverse server is configured with an
unblock-key
(see above discussion) and so configuration (see below) requires both an API token and an Admin API token (used as theunblock-key
). -
The plugin only takes action on the following CO Person record events in Registry:
- CoPersonAdded
- CoPersonPetitionProvisioned
- CoPersonPipelineProvisioned
- CoPersonReprovisionRequested
- CoPersonUpddated
All of those events are treated identitically by the plugin.
Note especially that the Dataverse API does not support deleting a person object and the plugin does not take any action when a CO Person record is expunged or the Status is set to anything other than Active.
-
The plugin only takes action on the following CO Group events in Registry:
- CoGroupAdded
- CoGroupUpdated
- CoGroupReprovisionRequested
All other provisioner events are ignored by the plugin.
-
The plugin will only attempt to create a user in Dataverse when all of the following are true:
- The CO Person record has a Status that is Active.
- The CO Person record has an attached Identifier of the configured Dataverse Identifier type.
- The CO Person record has an attached Identifier of the configured Dataverse Persistent User Identifier type.
- The CO Person record has a Name of the configured Dataverse Name type.
- The CO Person record has an attached EmailAddress of the configured Dataverse Email type.
- The CO Person is a member of at least one authorization group, that is a member of a CO Group with the configured Group Identifier type.
- The CO Person record has not been successfully provisioned previously.
-
Before attempting to create a user in Dataverse the plugin queries the
admin
API at/api/admin/list-users
and query stringsearchTerm
with the value of the EmailAddress attached to the CO Person record. Only when that search returns empty does the plugin attempt to create a user in Dataverse. -
The plugin will fail to create a user in Dataverse when any of the following are true in the Dataverse database:
- A user already exists with the email address.
- A user already exists with the identifier.
- A user already exists with the persistentUserId.
-
The plugin will, however, reconcile an existing user in Dataverse with the same email address and will attempt to edit in Registry the Identifier of the configured Dataverse Identifier type so that it is synchronized with the existing value in Dataverse. Since no two CO Person records may have the same Identifier of the same type with the same value, however, it is possible for the reconcilliation and synchronization for an existing Dataverse user with the same email address to fail. When that happens manual intervention by the Dataverse admin and the Registry CO admin will be required to effectively synchronize the CO Person record with the Dataverse user.
-
The plugin does not support updates for CO Group names or descriptions. Once the explicit group is created in Dataverse it cannot be changed or deleted.
-
The plugin will process CoGroupUpdated events, however, in order to try and create an explicit group after an Identifier with the correct type has been attached to a CO Group. So effectively explicit groups are only created in Dataverse due to a CoGroupUpdated or CoGroupReprovisionRequested operation and not for CoGroupAdded operations, unless the CO Group and Identifier are created in one single transaction (which is usually not the case when creating using the REST API v1).
All plugin configuration must be done as a Registry CO administrator.
Repeat the steps below once for each Dataverse server.
- Browse to
Configuration > Extended Types
. - In the drop-down for
For Attribute
chooseIdentifier (CO Person, Group)
, which is the default. - Click
FILTER
. - Click
Add Extended Type
. - Verify that the
Attribute
field in the form has valueIdentifier (CO Person, Group)
. - In the Name field enter a unique value, for example
dataverseid
. For a second Dataverse server the value might bedataverseid2
, and for the thirddataverseid3
, and so on. - In the
Display Name
field enter a descriptive name. This is usually the name of a Dataverse server such asADA PROD ANU Dataverse
orADA DEV Dataverse
. - For
Status
chooseActive
from the drop-down menu. - Click
ADD
.
Complete the steps below once to create a DOI Identifier type to use with Registry CO Groups.
- Browse to
Configuration > Extended Types
. - In the drop-down for
For Attribute
chooseIdentifier (CO Person, Group)
, which is the default. - Click
FILTER
. - Click
Add Extended Type
. - Verify that the
Attribute
field in the form has valueIdentifier (CO Person, Group)
. - In the Name field enter
doi
. - In the
Display Name
field enterDOI
. - For
Status
chooseActive
from the drop-down menu. - Click
ADD
.
Repeat the steps below once for each Dataverse server.
- Browse to
Configuration > Identifier Assignments
. - Click
Add Identifier Assignment
. - For
Description
enter the name of a Dataverse server, for exampleADA PROD ANU Dataverse
. - For
Status
chooseActive
from the drop-down menu. - For
Context
chooseCO Person
from the drop-down menu. - For
Type
choose the type from the drop-down menu that corresponds to the value entered forDescription
, for exampleADA PROD ANU Dataverse
. - Do not tick the box for
Login
. - Do not enter a value for
Order
. The value will be auto-assigned. - For
Algorithm
selectSequential
from the drop-down menu. - Ignore the
Plugin
field. - For
Format
enter(g:1)(f)[2:(#)]
. This will cause the first character from the users Give Name in lowercase to be prepended to the lowercase Family Name to create the Identifier value. If a value already exists then a digit will be used as a disambiguator, starting with2
and increasing as necessary until the next unique value is found and assigned. - Leave
Minimum Length
empty. - Do not tick
Enable Transliteration
. - For
Permitted Characters
chooseAlphaNumberic Only
from the drop-down menu. - Leave
Minimum Collision Number
empty. - Click
SAVE
.
Repeat the steps below once for each Dataverse server.
- Browse to
Servers > Add a New Server
. - Provide a Description for the Server. This is usually a meaningful name, for example
Production Dataverse (Australian Data Archive)
. - Choose
Active
for the Server Status. - Choose
HTTP
for the Server Type. - Click
ADD
. - For
Server URL
enter the URL for the Dataverse server, for examplehttps://dataverse.ada.edu.au
. - Leave the field
Username
empty. - For
Password or Token
enter a valid API token for the Dataverse server. Do not use anadmin
API token. - For
HTTP Authentication Type
chooseNone
. - Tick the box for
Require certificate verification
. - Tick the box for
Require name verification
. - Click
SAVE
.
- Browse to
Servers > Add a New Server
. - Provide a Description for the Server. This is usually a meaningful name, for example
doi.org API Server
. - Choose
Active
for the Server Status. - Choose
HTTP
for the Server Type. - Click
ADD
. - For
Server URL
enter the URL for the DOI API server, for examplehttps://doi.org
. - Leave the field
Username
empty. - Leave the field
Password or Token
empty. - For
HTTP Authentication Type
chooseNone
. - Tick the box for
Require certificate verification
. - Tick the box for
Require name verification
. - Click
SAVE
.
Multiple DataverseProvisioner instantiations may use the same DOI API server.
Repeat the steps below once for each Dataverse server.
- Browse to
Configuration > Provisioning Targets > Add Provisioning Target
. - Provide a Description for the provisioning target. This is usually a meaningful name, for example
Production Dataverse
. - Choose
DataverseProvisioner
from thePlugin
drop-down menu. - Choose
Automatic Mode
from theStatus
drop-down menu. - Do not choose a
Provisioning Group
. - Do not choose
Skip If Associated With Org Identity Source
. - Leave the field
Order
empty. It will later be auto-assigned. - Click
ADD
. - For
Dataverse Server
choose a Server object from the drop-down menu that represents a Dataverse server. - For
Admin API Token
enter a valid admin API token suitable for unblocking the/api/admin
endpoint. - For
DOI Server API
choose a Server object from the drop-down menu that represents a DOI API server to use when mapping DOI values to Dataverse server. - For
Dataverse Identifier Type
select from the drop-down menu the Identifier of the type configured in the step above "Create Extended Identifier Types". - For
Dataverse Persistent User Identifier Type
selectOIDC sub
from the drop-down menu. - For
Dataverse Name Type
selectOfficial
from the drop-down menu. - For
Dataverse Email Type
selectOfficial
from the drop-down menu. - For
Group Identifier Type
selectDOI
from the drop-down menu. - For
Dataverse Authentication Provider ID
enter the value configured by the Dataverse administrator in the Dataverse server. - If operating in testing mode and a DOI server will not be able to map from the DOI to a Dataverse server
instance then tick the box for
Skip Dataverse Server Mapping
. This will cause each CO Group representing an explicit group owned by a dataverse to be created in each Dataverse server represented by a provisioning target (instance of the plugin). - Click
SAVE
.