From 45c4e3d16619ad0d39a534060d826be17225d6d4 Mon Sep 17 00:00:00 2001 From: Scott Baker Date: Fri, 13 Mar 2009 00:28:27 +0000 Subject: [PATCH] update demo script of slice register --- cmdline/testSfiSliceRegister.sh | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/cmdline/testSfiSliceRegister.sh b/cmdline/testSfiSliceRegister.sh index 33293ef6..56e4aa5b 100644 --- a/cmdline/testSfiSliceRegister.sh +++ b/cmdline/testSfiSliceRegister.sh @@ -11,6 +11,8 @@ export TEST_SLICE_GID=$CWD/testslice.gid export TEST_SLICE_RECORD=$CWD/testslice.record export TEST_SLICE_HRN=$SFI_AUTH.testslice +rm ~/.sfi/*.cred + echo XXXXX ------------------------------------------------------------------- echo XXXXX Removing the test slice. this will cause an error if the slice does echo XXXXX not exist -- this error can be ignored @@ -22,7 +24,7 @@ echo XXXXX ------------------------------------------------------------------- echo XXXXX Creating a record for the test slice echo XXXXX ------------------------------------------------------------------- -python ./editRecord.py --hrn $TEST_SLICE_HRN --gidhrn $TEST_SLICE_HRN --gidkeyfile $TEST_KEY --type slice --addresearcher $SFI_USER --outfile $TEST_SLICE_RECORD +python ./editRecord.py --hrn $TEST_SLICE_HRN --pubkeyfile $TEST_KEY --type slice --addresearcher $SFI_USER --outfile $TEST_SLICE_RECORD echo XXXXX ------------------------------------------------------------------- echo XXXXX Adding the test slice, $TEST_SLICE_HRN @@ -40,7 +42,7 @@ echo XXXXX ------------------------------------------------------------------- echo XXXXX Adding $TEST_USER_2 to the slice researchers echo XXXXX ------------------------------------------------------------------- -python ./editRecord.py --infile $TEST_SLICE_RECORD --outfile $TEST_SLICE_RECORD --addresearcher $TEST_USER_2 --outfile $TEST_SLICE_RECORD +python ./editRecord.py --infile $TEST_SLICE_RECORD --outfile $TEST_SLICE_RECORD --addresearcher $TEST_USER_2 echo XXXXX ------------------------------------------------------------------- echo XXXXX Updating the slice @@ -54,3 +56,29 @@ echo XXXXX ------------------------------------------------------------------- python ./sfi.py show $TEST_SLICE_HRN +echo XXXXX ------------------------------------------------------------------- +echo XXXXX Removing $SFI_USER from the slice researchers +echo XXXXX ------------------------------------------------------------------- + +python ./editRecord.py --infile $TEST_SLICE_RECORD --outfile $TEST_SLICE_RECORD --delresearcher $SFI_USER + +echo XXXXX ------------------------------------------------------------------- +echo XXXXX Updating the slice +echo XXXXX ------------------------------------------------------------------- + +python ./sfi.py update $TEST_SLICE_RECORD + +echo XXXXX ------------------------------------------------------------------- +echo XXXXX The slice record should now have one users: $TEST_USER_2 +echo XXXXX ------------------------------------------------------------------- + +python ./sfi.py show $TEST_SLICE_HRN + +echo XXXXX ------------------------------------------------------------------- +echo XXXXX Updating the slice +echo XXXXX ... this verifies escalation from slice_cred to auth_cred +echo XXXXX ------------------------------------------------------------------- + +rm ~/.sfi/slice_testslice.cred +python ./sfi.py update $TEST_SLICE_RECORD + -- 2.43.0