Hi All,

I am running examples in the book "Globus Toolkit 4: Programming Java Services".
There is NO problem in examples from chapter 1 to chapter 19.

But when I ran the examples in chapter 20, page 331, there is an authorization 
problem when invoking method 'add' in the FIRST TIME. I mean the addition was 
successful in the SECOND, THIRD invocation and so on.

Here are the steps I did:
Step 0: Create $GLOBUS_LOCATON/etc/gridmapfile
[EMAIL PROTECTED] globus]$ cat $GLOBUS_LOCATION/etc/gridmapfile
"O=Grid,OU=GlobusTest,OU=simpleCA-gnode01.math.hcmuns.edu.vn,OU=math.hcmuns.edu.vn,CN=igrid"
 igrid

Step 1: Compile, Deploy gridmap/MathService, and Run Globus Container

[EMAIL PROTECTED] ~]$ globus-start-container -nosec

Starting SOAP server at: http://192.168.1.101:8080/wsrf/services/
With the following services:

[1]: http://192.168.1.101:8080/wsrf/services/AdminService
[2]: http://192.168.1.101:8080/wsrf/services/AuthzCalloutTestService
[3]: http://192.168.1.101:8080/wsrf/services/CASService
...
// Here is the gridmap/MathService
[66]: 
http://192.168.1.101:8080/wsrf/services/examples/security/gridmap/MathService

....

Step 2: Compile, Run Client_GSISecConv_Encrypt as an grid user called 'igrid'

[EMAIL PROTECTED] gt4book-examples]$ java -classpath 
./build/stubs/classes:$CLASSPATH 
org.globus.examples.clients.MathService_instance_4op.Client_GSISecConv_Encrypt 
http://192.168.1.101:8080/wsrf/services/examples/security/gridmap/MathService

The result is:
[add]      ERROR: 
org.globus.wsrf.impl.security.authorization.exceptions.AuthorizationException: 
"/O=Grid/OU=GlobusTest/OU=simpleCA-gnode01.math.hcmuns.edu.vn/OU=math.hcmuns.edu.vn/CN=igrid"
 is not authorized to use operation: 
{http://www.globus.org/namespaces/examples/MathService_instance_4op}add on this 
service
Subtraction was successful
Multiplication was successful
Division was successful
Current value: -100

Here is the log in server:
2008-02-20 08:30:30,616 WARN  authorization.GridMapAuthorization 
[ServiceThread-13,isPermitted:158] Gridmap authorization failed: peer 
"/O=Grid/OU=GlobusTest/OU=simpleCA-gnode01.math.hcmuns.edu.vn/OU=math.hcmuns.edu.vn/CN=igrid"
 not in gridmap file.
2008-02-20 08:30:30,619 WARN  authorization.ServiceAuthorizationChain 
[ServiceThread-13,authorize:292] 
"/O=Grid/OU=GlobusTest/OU=simpleCA-gnode01.math.hcmuns.edu.vn/OU=math.hcmuns.edu.vn/CN=igrid"
 is not authorized to use operation: 
{http://www.globus.org/namespaces/examples/MathService_instance_4op}add on this 
service
2008-02-20 08:30:30,740 INFO  impl.MathService 
[ServiceThread-12,logSecurityInfo:91] 'subtract' invoked by: 
/O=Grid/OU=GlobusTest/OU=simpleCA-gnode01.math.hcmuns.edu.vn/OU=math.hcmuns.edu.vn/CN=igrid
2008-02-20 08:30:30,742 INFO  impl.MathService 
[ServiceThread-12,logSecurityInfo:93] Mapped to igrid
2008-02-20 08:30:31,069 INFO  impl.MathService 
[ServiceThread-13,logSecurityInfo:91] 'multiply' invoked by: 
/O=Grid/OU=GlobusTest/OU=simpleCA-gnode01.math.hcmuns.edu.vn/OU=math.hcmuns.edu.vn/CN=igrid
2008-02-20 08:30:31,070 INFO  impl.MathService 
[ServiceThread-13,logSecurityInfo:93] Mapped to igrid
2008-02-20 08:30:31,197 INFO  impl.MathService 
[ServiceThread-12,logSecurityInfo:91] 'divide' invoked by: 
/O=Grid/OU=GlobusTest/OU=simpleCA-gnode01.math.hcmuns.edu.vn/OU=math.hcmuns.edu.vn/CN=igrid
2008-02-20 08:30:31,199 INFO  impl.MathService 
[ServiceThread-12,logSecurityInfo:93] Mapped to igrid

Step 3: ReRun Client_GSISecConv_Encrypt again

[EMAIL PROTECTED] gt4book-examples]$ java -classpath 
./build/stubs/classes:$CLASSPATH 
org.globus.examples.clients.MathService_instance_4op.Client_GSISecConv_Encrypt 
http://192.168.1.101:8080/wsrf/services/examples/security/gridmap/MathService
Addition was successful
Subtraction was successful
Multiplication was successful
Division was successful
Current value: -180

// All invocations was successful

What is the reason of this problem and how to solve it?

Many thanks

Son Ng

 Send instant messages to your online friends http://au.messenger.yahoo.com 

Reply via email to