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

Re: [Handle-info] hsj 8 challenge response "Authentication via Authorization: Handle" via HS_PUBKEY python example.



Hi Robert,

Thanks very much for the example.

Greetings,

Robert Verkerk
> On 03 Feb 2016, at 21:46, Robert R Tupelo-Schneck <schneck@cnri.reston.va.us> wrote:
> 
> First of all, use the hdl-convert-key utility to produce a standard PEM file for the handle private key file.  (That way you can take advantage of key-decoding functionality from a standard library.)
> 
> I've attached a Python example written by my colleague Ben Hadden.  It uses "requests" and "PyCrypto".  It resolves a handle record, changes the data in the handle value at index 1, and updates the handle record.  Change the values in the main() function at the top to reflect your actual situation.
> 
> The updateHandleRecord() function does the work.  It sends an unauthenticated PUT request, parses the WWW-Authenticate: header from the response to that, constructs an Authorization: header, and sends the request again authenticated.
> 
> Let us know if you have any questions!
> 
> Robert
> 
> <example.py>
> 
>> On Feb 2, 2016, at 9:30 AM, Robert Verkerk <robert.verkerk@surfsara.nl> wrote:
>> 
>> Hi,
>> 
>> We want to use the handle rest-full api. But don’t want to use the basic authentication with HS_SECKEY.
>> 
>> Does anybody have an python example of challenge response  "Authentication via Authorization: Handle" using HS_PUBKEY?
>> We would like to generate a private/public keypair with hdl-keygen. The public key is stored in the handle database. The private key is known on the client.
>> 
>> We saw the handle technical manual chapter 14.6.4 and further. This shows the basics. But it is not enough to create a working piece of python code. 
>> 
>> -- 
>> Greetings,
>> 
>> Robert Verkerk
>> 
>> 
>> 
>> 
>> 
>> 
>> _______________________________________________
>> Handle-Info mailing list
>> Handle-Info@cnri.reston.va.us
>> http://www.handle.net/mailman/listinfo/handle-info
> 

Attachment: smime.p7s
Description: S/MIME cryptographic signature

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