Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
9b8e1367
Commit
9b8e1367
authored
Mar 09, 2010
by
Srikanth
Browse files
handling admin credentials.
parent
c0cec97b
Changes
2
Hide whitespace changes
Inline
Side-by-side
protogeni/lib/GeniCMV2.pm.in
View file @
9b8e1367
...
...
@@ -587,6 +587,20 @@ sub SliverAction($$$$$)
#
For
now
,
only
allow
top
level
aggregate
or
the
slice
#
my
($
slice
,
$
aggregate
)
=
Credential2SliceAggregate
($
credential
);
#
find
out
the
component
manager
URN
.
my
$
cm_urn
=
GeniHRN
::
Generate
($
OURDOMAIN
,
"authority"
,
"cm"
);
if
(
(
!defined($slice)) && ($credential->target_urn() =~ /\+authority\+cm$/)) { # administrative credentials are presented.
if
($
cm_urn
!= $credential->target_urn()) {
return
GeniResponse
->
Create
(
GENIRESPONSE_FORBIDDEN
(),
undef
,
"Credential target does not match CM URN"
);
}
if
(
!defined($slice_urn)){
return
GeniResponse
->
MalformedArgsResponse
(
"Missing arguments"
);
}
$
slice
=
GeniSlice
->
Lookup
($
slice_urn
);
$
aggregate
=
GeniAggregate
->
SliceAggregate
($
slice
);
}
if
(
! (defined($slice) && defined($aggregate))) {
return
GeniResponse
->
Create
(
GENIRESPONSE_BADARGS
,
undef
,
"No slice or aggregate here"
);
...
...
protogeni/test/sliveraction.py
View file @
9b8e1367
...
...
@@ -54,7 +54,7 @@ myslice = resolve_slice( SLICENAME, mycredential )
print
"Found the slice, asking for a credential ..."
if
admincredentialfile
:
f
=
open
(
slice
credentialfile
)
f
=
open
(
admin
credentialfile
)
slivercred
=
f
.
read
()
f
.
close
()
else
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment