source: examples/python_tests/basic_id/setup.py @ b4b0d0a

mei_rt2
Last change on this file since b4b0d0a was 2e9455f, checked in by Mei <mei@…>, 11 years ago

1) added namespace
2) tweak ?This,
3) allowing linking role/oset as constraining conditions
4) adding access_tests regression testing that uses GENI's access policy
5) added couple multi contexts regression tests
6) add compression/uncompression calls to abac_encode_string/abac_decode_string
(libstrongwan only allows 512 char for attribute rule storage)
7) add attribute_now option to creddy that takes a whole char string for attribute
rule

  • Property mode set to 100755
File size: 717 bytes
Line 
1#!/usr/bin/env python
2
3"""
4See README for the semantics.  This creates principals
5using ID and write out the credential file pair, cert/privkey
6"""
7import os
8import ABAC
9
10ctxt = ABAC.Context()
11
12jackID=ABAC.ID("Jack", 0)
13jackID.id_write_cert("Jack_ID.pem")
14jackID.id_write_privkey("Jack_private.pem")
15
16bobID=ABAC.ID("Bob", 0)
17bobID.id_write_cert("Bob_ID.pem")
18bobID.id_write_privkey("Bob_private.pem")
19
20markID=ABAC.ID("Mark2", 0)
21markID.id_write_privkey("Mark2_IDKEY.pem")
22markID.id_write_cert("Mark2_IDKEY.pem")
23
24johnID=ABAC.ID("John2", 0)
25johnID.id_write_cert("John2_other.pem")
26
27tomID=ABAC.ID("Tom2", 0)
28tomID.id_write_privkey("Tom2_IDKEY.pem")
29
30loriID=ABAC.ID("Lori2", 0)
31loriID.id_write_cert("Lori2_IDKEY.pem")
32
33
Note: See TracBrowser for help on using the repository browser.