Class to compare and parse entitlements according to the
Project description
AARC G002 Entitlement Parser
Introduction
As part of the AARC Project several recommendations were made. G002 https://aarc-project.eu/guidelines/aarc-g002 describes encoding group membership in entitlements.
This package provides a python Class to parse and compare such entitlements.
Example
from aarc_g002_entitlement import Aarc_g002_entitlement
required_group= 'urn:geant:h-df.de:group:aai-admin'
actual_group = 'urn:geant:h-df.de:group:aai-admin:role=member#backupserver.used.for.developmt.de'
required_entitlement = Aarc_g002_entitlement(required_group, strict=False)
actual_entitlement = Aarc_g002_entitlement(actual_group)
print(' is_contained_in: => {}'.format(required_entitlement.is_contained_in(actual_entitlement)))
print(' (are equal: => {})'.format(required_entitlement == actual_entitlement))
For more examples: ./example.py
Installation
pip --user install aarc-g002-entitlement
Note
This code allows an intentional exception from implementing the standard: AARC-G002 makes the issuing authority mandatory (non-empty-string). However, admins that specify the required entitlement don't care about specifying the authority. Therefore, the code allows a laxer handling, in that it does accept entitlements that don't specify an authority, if the "strict=False" argument is passed.
Funding Notice
The AARC project has received funding from the European Union’s Horizon 2020 research and innovation programme under grant agreement No 653965 and 730941.
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
Built Distribution
Hashes for aarc_g002_entitlement-0.1.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 02cb9cb5adf74eca448c69e8c5aa2c1717606b734c860b791c5400df0116b6fd |
|
MD5 | de58745a83aee71606b7af5bf9ed90bf |
|
BLAKE2b-256 | d6df927c88187b487ed02b0620da1ea084fb1cef84c1bc35294627f3d7962190 |
Hashes for aarc_g002_entitlement-0.1.3-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a428b728ee2e15c803daf272b8d2f705b131ac8558f42b1e5ca16fa1659d0bdd |
|
MD5 | acf8a9ecd2c09a7ca4c75899f66858a2 |
|
BLAKE2b-256 | e20ce5cdb4be2def6b0e5001d856c46aed7c06553ee1e269bbb4267836e8d5d8 |