Skip to main content

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

password = getpass.getpass()

e = ethz_iam_webservice.login('admin4iam', password)

########
# 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 = e.get_user('username')
person = user.get_person()
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
group.members
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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ethz_iam_webservice-0.0.2.tar.gz (4.2 kB view details)

Uploaded Source

File details

Details for the file ethz_iam_webservice-0.0.2.tar.gz.

File metadata

  • Download URL: ethz_iam_webservice-0.0.2.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

Hashes for ethz_iam_webservice-0.0.2.tar.gz
Algorithm Hash digest
SHA256 6b390d8359c87a68b3fc9c50dadc5c9aa7b1b00845fdd33e6dbbcf3cb7e01eb3
MD5 2e23dff9c3c165a81854b51c3e2d4a57
BLAKE2b-256 30821870c2dd252e8377ebbf5c888a2a2bbe7df5ec0a3152cec0f165081aa8b2

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page