Manage users, groups and services of the ETH Identity and Access Management system (IAM)
Project description
ETHZ IAM Webservice
Manage users, groups and services of the ETH Identity and Access Management system (IAM)
Synopsis
import ethz_iam_webservice
import getpass
e = ethz_iam_webservice.login('admin4iam', getpass.getpass())
########
# Person
########
person = e.get_person('name@example.com')
person = e.get_person('some_username')
person = e.get_person(123456) # npid, the identifer of every person
person.usernames # an array of dicts of usernames
person.data # the whole response
person.firstname
person.familyname
person.email
# etc.
######
# User
######
user = person.new_user('username', 'password', 'description')
user = e.get_user('username')
user.services # returns an array of dicts of services
user.grant_service("LDAPS")
user.grant_service("Active Directory")
user.grant_service("WLAN_VPN")
user.revoke_service("LDAP")
# etc.
user.delete() # Method currently not allowed
user.add_to_group('groupname')
user.remove_from_group('groupname')
#########################
# Group and Group Members
#########################
group = e.get_group('groupname')
group.data # all data received from webservice
group.members # returns array of usernames or group-names
group.gidNumber
...
group.add_members(['some', 'new', 'members'])
group.set_members(['just', 'these'])
group.del_members(['remove', 'these', 'members'])
groups = e.get_groups(agroup='ID SIS')
groups = e.get_groups(name='starts_with*')
groups = e.get_groups(agroup='ID SIS', name='starts_with*')
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file ethz_iam_webservice-0.0.4.tar.gz
.
File metadata
- Download URL: ethz_iam_webservice-0.0.4.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e6eb18704157209a69ae2301a39548ba34244c01c2c4bca59af114f93fcbf2cc |
|
MD5 | cf6ab45110dee5d9093dc06e6e490803 |
|
BLAKE2b-256 | 3aa99e2a0fdd3adef8759d3dadecb25687f4dce650c885ea8931e887f4bbe0e7 |