source: tests/example_scripts/wiki/attr1.py @ bceef20

abac0-leakabac0-mei
Last change on this file since bceef20 was ec550f7, checked in by Mei <mei@…>, 11 years ago

1) reworked how API doc is generated
2) tweak top level Makefile.am
3) loading issuer principal as side-effect of loading

an attribute credentials

4) add examples of GENI specific attribute credentials

and principal certificates into the regression testing

5) rename examples to tests

  • Property mode set to 100755
File size: 265 bytes
Line 
1#!/usr/bin/env python
2"""
3attr1.py
4"""
5import os
6import ABAC
7
8a = ABAC.ID("A", 24 * 3600 * 365 * 20)
9b = ABAC.ID("B", 24 * 3600 * 365 * 20)
10
11attr = ABAC.Attribute(a, "admin", 24 * 3600 * 365 * 20)
12attr.principal(b.keyid())
13attr.bake()
14
15attr.write_file("attr.xml")
16
Note: See TracBrowser for help on using the repository browser.