forked from GENI-NSF/geni-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README-lib.txt
60 lines (42 loc) · 1.47 KB
/
README-lib.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
GCF Geni Library Package
Description
===========
This library includes useful utility functions for use in implementing
GENI AM API compatible services.
Software Dependencies
=====================
Dependencies should be handled by the package install.
On RPM based systems:
python 2.6
m2crypto
xmlsec1-openssl-devel
libxslt-python
python-ZSI
python-lxml
python-setuptools
python-dateutil
Installation
============
python setup.py install
Documentation
=============
This library provides convenience functions on top of the SFA library.
The functions can be found in the modules located in src/gcf/geni/util/.
These include functions for URN creation, secure XML-RPC client
creation, credential creation and verification, and certificate
creation.
Please see the source files themselves for further documentation.
Example usage after installation:
# To create a URN
from gcf.geni.util.urn_util import URN
ch_urn = URN("gcf//gpo//bbn1","authority","sa").urn_string()
am_urn = URN("gcf//gpo//bbn1//am1","authority","am").urn_string()
# To create a certificate:
from gcf.geni.util.urn_util import URN
from gcf.geni.util.cert_util import create_cert
urn = URN("gcf//gpo//bbn1", "user", "alice").urn_string()
alice_cert = create_cert(urn, issuer_key, issuer_certificate).save_to_string()
Further examples can be found in the GENI Control Framework
distribution in the GENI Clearinghouse and GENI Aggregate Manager
implementations. This includes examples of creating and verifying
credentials.