Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
geni-tools
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
iLab.t
geni-tools
Commits
b92a075b
Commit
b92a075b
authored
14 years ago
by
Josh
Browse files
Options
Downloads
Patches
Plain Diff
updated sfa, changed urns
parent
a69ca45d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/geni/ch.py
+2
-2
2 additions, 2 deletions
src/geni/ch.py
src/geni/omni/omnispec/rspec_gcf.py
+2
-1
2 additions, 1 deletion
src/geni/omni/omnispec/rspec_gcf.py
src/init-ca.py
+6
-7
6 additions, 7 deletions
src/init-ca.py
with
10 additions
and
10 deletions
src/geni/ch.py
+
2
−
2
View file @
b92a075b
...
...
@@ -110,7 +110,7 @@ class Clearinghouse(object):
slice_uuid
=
uuid
.
uuid4
()
# Where was the slice created?
(
ipaddr
,
port
)
=
self
.
_server
.
socket
.
_sock
.
getsockname
()
public_id
=
'
IDN geni.net//gpo
test-ch
slice %s//%s:%d
'
%
(
slice_uuid
.
__str__
()[
4
:
12
],
public_id
=
'
IDN geni.net//gpo
//gcf
slice %s//%s:%d
'
%
(
slice_uuid
.
__str__
()[
4
:
12
],
ipaddr
,
port
)
if
urn_req
:
...
...
@@ -141,7 +141,7 @@ class Clearinghouse(object):
return
False
def
ListAggregates
(
self
):
out
=
[(
'
urn:publicid:IDN+g
cf
+authority+g
eni
'
,
'
http://localhost:8001
'
),
(
'
urn:publicid:IDN+plc:gpotest+authority+gpolabr2
'
,
'
http://myplc2.gpolab.bbn.com:12348
'
),
(
'
urn:publicid:IDN+plc:gpo+authority+site2
'
,
'
http://128.89.81.175:12348
'
)]
out
=
[(
'
urn:publicid:IDN+g
eni.net:gpo
+authority+g
cf
'
,
'
http://localhost:8001
'
),
(
'
urn:publicid:IDN+plc:gpotest+authority+gpolabr2
'
,
'
http://myplc2.gpolab.bbn.com:12348
'
),
(
'
urn:publicid:IDN+plc:gpo+authority+site2
'
,
'
http://128.89.81.175:12348
'
)]
return
out
def
create_slice_gid
(
self
,
subject
,
slice_urn
):
...
...
This diff is collapsed.
Click to expand it.
src/geni/omni/omnispec/rspec_gcf.py
+
2
−
1
View file @
b92a075b
...
...
@@ -3,7 +3,8 @@ import xml.etree.ElementTree as ET
def
can_translate
(
urn
,
rspec
):
if
urn
.
split
(
'
+
'
)[
1
].
lower
().
startswith
(
'
gcf
'
):
print
urn
if
urn
.
split
(
'
+
'
)[
1
].
lower
().
startswith
(
'
geni.net:gpo
'
):
return
True
return
False
...
...
This diff is collapsed.
Click to expand it.
src/init-ca.py
+
6
−
7
View file @
b92a075b
...
...
@@ -52,9 +52,8 @@ CH_KEY_FILE = 'ch-key.pem'
AM_CERT_FILE
=
'
am-cert.pem
'
AM_KEY_FILE
=
'
am-key.pem
'
def
create_cert
(
subject
,
type
,
issuer_key
=
None
,
issuer_cert
=
None
):
publicid
=
'
IDN geni.net//gpo %s %s
'
%
(
type
,
subject
)
urn
=
geni
.
publicid_to_urn
(
publicid
)
def
create_cert
(
subject
,
issuer_key
=
None
,
issuer_cert
=
None
):
urn
=
'
urn:publicid:IDN+%s
'
%
subject
newgid
=
gid
.
GID
(
create
=
True
,
subject
=
subject
,
uuid
=
gid
.
create_uuid
(),
urn
=
urn
)
keys
=
cert
.
Keypair
(
create
=
True
)
...
...
@@ -81,19 +80,19 @@ def create_user_credential(user_gid, issuer_keyfile, issuer_certfile):
def
make_certs
(
dir
):
# Create the CA cert
(
ca_cert
,
ca_key
)
=
create_cert
(
'
g
cf
'
,
'
authority
'
)
(
ca_cert
,
ca_key
)
=
create_cert
(
'
g
eni.net:gpo+
authority
+gcf
'
,
)
ca_cert
.
save_to_file
(
os
.
path
.
join
(
dir
,
CA_CERT_FILE
))
ca_key
.
save_to_file
(
os
.
path
.
join
(
dir
,
CA_KEY_FILE
))
# Make a cert for the clearinghouse
(
ch_gid
,
ch_keys
)
=
create_cert
(
'
g
cf.ch
'
,
'
authority
'
,
ca_key
,
ca_cert
)
(
ch_gid
,
ch_keys
)
=
create_cert
(
'
g
eni.net:gpo:gcf+
authority
+ch
'
,
ca_key
,
ca_cert
)
ch_gid
.
save_to_file
(
os
.
path
.
join
(
dir
,
CH_CERT_FILE
))
ch_keys
.
save_to_file
(
os
.
path
.
join
(
dir
,
CH_KEY_FILE
))
# Make a cert for the aggregate manager
(
am_gid
,
am_keys
)
=
create_cert
(
'
g
cf.am
'
,
'
authority
'
,
ca_key
,
ca_cert
)
(
am_gid
,
am_keys
)
=
create_cert
(
'
g
eni.net:gpo:gcf+
authority
+am
'
,
ca_key
,
ca_cert
)
am_gid
.
save_to_file
(
os
.
path
.
join
(
dir
,
AM_CERT_FILE
))
am_keys
.
save_to_file
(
os
.
path
.
join
(
dir
,
AM_KEY_FILE
))
# Make a GID/Cert for Alice
(
alice_gid
,
alice_keys
)
=
create_cert
(
'
g
cf.alice
'
,
'
user
'
,
ca_key
,
ca_cert
)
(
alice_gid
,
alice_keys
)
=
create_cert
(
'
g
eni.net:gpo+gcf+user+alice
'
,
ca_key
,
ca_cert
)
alice_gid
.
save_to_file
(
os
.
path
.
join
(
dir
,
'
alice-cert.pem
'
))
alice_keys
.
save_to_file
(
os
.
path
.
join
(
dir
,
'
alice-key.pem
'
))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment