Hi, I'm trying to work through a few geni-lib examples for making
somewhat more dynamic/scripted profiles.
As a first start, I'm just trying to run either the getads.py sample
script from geni-lib [1] or jacks-context.py [2] scripts to see what
data I can from the advertisements. I've tried specifying individual
sites like ig-utah or ig-wisconsin as well as letting it churn through
all of them.
Trouble is that I keep getting the following exception back from
everything:
[AUTHORIZATION] AUTHORIZATION_ERROR (Client urn:publicid:IDN+
emulab.net+user+bpkroth is not authorized to make API calls.)
My config.py looks like the following currently, where the
cloudlab_geni-lib certification material was obtained from
https://www.cloudlab.us/getcreds.php and split out and decrypted via the
usual openssl commands:
from geni.aggregate import FrameworkRegistry
from geni.aggregate.context import Context
from geni.aggregate.user import User
import os
def buildContext ():
portal = FrameworkRegistry.get("portal")()
#portal = FrameworkRegistry.get("pg")()
portal.cert = os.environ['HOME']+"/private/cloudlab/cloudlab_geni-lib_cert.pem"
portal.key = os.environ['HOME']+"/private/cloudlab/cloudlab_geni-lib_key.pem"
bpkroth = User()
bpkroth.name = "bpkroth"
bpkroth.urn = "urn:publicid:IDN+
emulab.net+user+bpkroth"
bpkroth.addKey(os.environ['HOME']+"/.ssh/id_rsa.pub")
context = Context()
context.addUser(bpkroth, default = True)
context.cf = portal
context.project = "bpk-test"
return context
I grabbed the urn and tried the alternative "pg" FrameworkRegistry based
on stuff I read in the following thread:
https://groups.google.com/forum/#!msg/cloudlab-users/qIbI9PvyRE8/iS27Y5q3i8sJ
The urn also matches what I see in the subjectaltnames field in the cert
itself. The cert/key match, and isn't expired:
# openssl x509 -in $HOME/private/cloudlab/cloudlab_geni-lib_cert.pem -noout -text | grep -B1 -i -e before -e bpkroth
Validity
Not Before: Oct 9 14:59:55 2015 GMT
Not After : Oct 8 14:59:55 2016 GMT
Subject: C=US, ST=Utah, O=Utah Network Testbed, OU=utahemulab.bpkroth, CN=76cab590-5486-11e4-afea-001143e453fe/emailAddress=
bpk...@emulab.net
--
X509v3 Subject Alternative Name:
URI:urn:publicid:IDN+
emulab.net+user+bpkroth,
email:bpk...@emulab.net, URI:urn:uuid:76cab590-5486-11e4-afea-001143e453fe
Any other advice or things to look into?
Thanks,
Brian
[1] <
https://bitbucket.org/barnstorm/geni-lib/src>
[2] <
https://github.com/Jacks-GENI/jacks-context>