Project

General

Profile

Bug #6086

Updated by Matt Jones about 11 years ago

I was trying to issue a DOI for Sarah Olson's data set tonight via curl on the KNB using the KNB node certificate as my identity.    Doing this pointed out two issues, the second of which is definitely a bug.   

 First error 
 --------- 
 I ran this: 

 <pre> 
 # curl -X PUT -E /var/metacat/certs/urn_node_KNB.pem http://knb.ecoinformatics.org/knb/d1/mn/v1/publish/solson.11.5 
 <?xml version="1.0" encoding="UTF-8"?> 
 <error detailCode="1210" errorCode="401" name="InvalidToken"> 
     <description>No session has been provided</description> 
 </error> 
 </pre> 

 That error is traced back to the beginning of MNodeService.update() where sessions are checked.    Looking at ezid, I can see that the DOI was reserved successfully, but then the publish fails doing the update() on the object.    I had thought that passing in the client cert was sufficient to identify myself and set up a session, but apparently not.    Any thoughts on why this didn't work, and what is needed to successfully log in via curl?    There The may not be a bug here, but rather me using curl incorrectly.    Or maybe it should work. 

 Second error 
 ----------- 
 Also, it seems that the EZID mint() call worked even though I wasn't authenticated on metacat, so I tried the same call again without a certificate at all: 

 <pre> 
 # curl -X PUT http://knb.ecoinformatics.org/knb/d1/mn/v1/publish/solson.11.5 
 </pre> 

 and I got the same error.    The new DOI is still reserved on the EZID system despite not being authenticated in Metacat, so there seems to be a bug here in not checking the session before contacting EZID to mint() the identifier. 

Back