User management at the CLI

Initial setup

ARVADOS_API_HOST=pirca.arvadosapi.com
ARVADOS_API_TOKEN=1234567890qwertyuiopasdfghjklzxcvbnm1234567890zzzz

In these examples, x1u39-tpzed-3kz0nwtjehhl0u4 is the sample user account. Replace with the uuid of the user you wish to manipulate.

See user management for an overview of how to use these commands.

Setup a user

This creates a default git repository and VM login. Enables user to self-activate using Workbench.

arv user setup --uuid x1u39-tpzed-3kz0nwtjehhl0u4

Deactivate user

arv user unsetup --uuid x1u39-tpzed-3kz0nwtjehhl0u4

When deactivating a user, you may also want to reassign ownership of their data .

Directly activate user

arv user update --uuid "x1u39-tpzed-3kz0nwtjehhl0u4" --user '{"is_active":true}'

Note this bypasses user agreements checks, and does not set up the user with a default git repository or VM login.

Permissions

VM login

Give $user_uuid permission to log in to $vm_uuid as $target_username

user_uuid=xxxxxxxchangeme
vm_uuid=xxxxxxxchangeme
target_username=xxxxxxxchangeme

read -rd $'\000' newlink <<EOF; arv link create --link "$newlink"
{
"tail_uuid":"$user_uuid",
"head_uuid":"$vm_uuid",
"link_class":"permission",
"name":"can_login",
"properties":{"username":"$target_username"}
}
EOF

Git repository

Give $user_uuid permission to commit to $repo_uuid as $repo_username

user_uuid=xxxxxxxchangeme
repo_uuid=xxxxxxxchangeme
repo_username=xxxxxxxchangeme

read -rd $'\000' newlink <<EOF; arv link create --link "$newlink"
{
"tail_uuid":"$user_uuid",
"head_uuid":"$repo_uuid",
"link_class":"permission",
"name":"can_write",
"properties":{"username":"$repo_username"}
}
EOF

Previous: Upgrading to Containers API

The content of this documentation is licensed under the Creative Commons Attribution-Share Alike 3.0 United States licence.
Code samples in this documentation are licensed under the Apache License, Version 2.0.