[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Handle-info] accessing non-public values in client API



Hi,

I've been playing with the handle client API and have created a handle 10378.1/2 which has two HS_ADMIN values (itself and the handle server admin) along with a non-publicly readable value. I am trying to access the hidden value using a ResolutionRequest with public key authentication and the server admin handle, i.e.

byte idHandle[] = Util.encodeString("0.NA/10378.1");

PublicKeyAuthenticationInfo pubKeyAuthInfo = new PublicKeyAuthenticationInfo(idHandle,
300,
<a PrivateKey object>);


ResolutionRequest req = new ResolutionRequest(Util.encodeString("10378.1/2"), null, null, pubKeyAuthInfo);

req.ignoreRestrictedValues = false;

AbstractResponse response = resolver.getResolver().processRequest(req);


The output when trace is set on the resolver is as follows:


Initial request:
sending HDL-UDP request (version=2.1; oc=1; rc=0; snId=0 caCrt auth expires:Fri Oct 17 00:31:19 EST 2008 10378.1/2 [ ] [ ]) to 150.203.59.132:2641


There is then a challenge:
received HDL-UDP response: version=2.1; oc=1; rc=402; snId=6 caCrt auth expires:Fri Oct 17 00:31:20 EST 2008


And the response to the auth challenge using public key auth:
sending HDL-UDP request (version=2.1; oc=200; rc=0; snId=6 caCrt auth expires:Fri Oct 17 00:31:20 EST 2008 / HS_PUBKEY 300:0.NA/10378.1) to 150.203.59.132:2641


But then...
   received HDL-UDP response: Error(400): INVALID ADMIN

Note this error only occurs when the "ignoreRestrictedValues" is set to "false", otherwise I get the two HS_ADMIN values successfully returned (since no authentication is required as hidden values are ignored). The admin details (private key, index. handle) are all as I expect so not sure why it's saying the admin is invalid unless it's talking about something in the actual HS_ADMIN values (although they all display fine and I can encode them into AdminRecords on retrieval).

I get this same behaviour on the admin tool when the ignoreRestrictedValues is unticked.

Can anyone shed some light on what's happening here, it's probably something really obvious but I haven't been able to spot it looking through the logs and server code? Is anyone familiar enough with the code to state what the code is doing to satisfy itself a hidden value can be returned? (I was going to add some debugging to the HandleServer class but there are whole set of jars which don't appear to be part of the source distribution that throw errors when I run an ant build.)


As a secondary question (which could be related to the above problem), can I create a HS_ADMIN value which is self-referential i.e. the handle which the HS_ADMIN value is part of represents an admin-type user who has certain privileges on their own handle? See http://hdl.handle.net/10378.1/2 as an example.


Scott.


_______________________________________________ Handle-Info mailing list Handle-Info@cnri.reston.va.us http://www.handle.net/mailman/listinfo/handle-info