Skip to main content

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 membersip 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('\n3: Role assigned but not required')
print('    is_contained_in:   => {}'.format(required_entitlement.is_contained_in(actual_entitlement)))
print('        (are equal:    => {})'.format(required_entitlement == actual_entitlement))

Installation

pip --user install aarc-g002-entitlement

Note

This code allows on 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 this. 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


Download files

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

Source Distribution

aarc_g002_entitlement-0.1.2.tar.gz (10.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aarc_g002_entitlement-0.1.2-py2.py3-none-any.whl (6.3 kB view details)

Uploaded Python 2Python 3

File details

Details for the file aarc_g002_entitlement-0.1.2.tar.gz.

File metadata

  • Download URL: aarc_g002_entitlement-0.1.2.tar.gz
  • Upload date:
  • Size: 10.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.7.6

File hashes

Hashes for aarc_g002_entitlement-0.1.2.tar.gz
Algorithm Hash digest
SHA256 b9b69d3078f8f99bdd54a7ea12598de22e70716edb771fb9ebb60b85096a356b
MD5 b4a4ce4d46364264a98521f6de817aa7
BLAKE2b-256 f100f0c6f6dc500a78979bf74caf665ee1c1d6c178996c9019874b2d32876c97

See more details on using hashes here.

File details

Details for the file aarc_g002_entitlement-0.1.2-py2.py3-none-any.whl.

File metadata

  • Download URL: aarc_g002_entitlement-0.1.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.7.6

File hashes

Hashes for aarc_g002_entitlement-0.1.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 4d4dee4ed8e23213fac0db5043930ceb7ffb323e5e3459dc374bc08f24695d2d
MD5 5aa738ce2c614d463b2fe4f2466028dc
BLAKE2b-256 3b8c3c3ad8be6284f031ec3b30a12a7b558f463df097ff76149e253892e22e18

See more details on using hashes here.

Supported by

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