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

Re: [Handle-info] HS_SECKEY authentication for REST API



For public/private key authentication, you can---in the present version---use Authorization: Handle, which requires you to write code to correctly encode a cryptographic signature using your private key, or you can use a client-side certificate.

The PyHandle project has some helpful notes on creating a client-side certificate at https://eudat-b2safe.github.io/PYHANDLE/creatingclientcertificates.html .  You will need to look up how to use a client-side certificate with your PHP client.

We can further advise on how to use either a client-side certificate or Authorization: Handle, and you can also find more information in the Handle Technical Manual.

Robert

On Jan 25, 2019, at 3:11 PM, Kun Lin <link@whitman.edu> wrote:

But I thought PUT /api/handles need a HS_SECKEY, right?  I don’t know how to use that admprv.bin in PHP for auth.
Kun

 

From: Robert R Tupelo-Schneck <schneck@cnri.reston.va.us> 
Sent: Friday, January 25, 2019 12:09 PM
To: Kun Lin <link@whitman.edu>
Cc: handle-info@cnri.reston.va.us
Subject: Re: [Handle-info] HS_SECKEY authentication for REST API

 

Yes, PUT /api/handles/{handle} can be used.  The technical manual describes the API.

 

I should add that we generally try to discourage use of HS_SECKEY.  Although HTTP Basic authentication is significantly simpler than the alternatives, HS_SECKEY does not have the security allowed by use of public/private key pairs.

 

Robert


On Jan 25, 2019, at 3:03 PM, Kun Lin <link@whitman.edu> wrote:

 

Is there a way to create a brand new handle via API?
Kun

 

From: Robert R Tupelo-Schneck <schneck@cnri.reston.va.us> 
Sent: Friday, January 25, 2019 12:02 PM
To: Kun Lin <link@whitman.edu>
Cc: handle-info@cnri.reston.va.us
Subject: Re: [Handle-info] HS_SECKEY authentication for REST API

 

Create a handle, and in that handle record create a value of type HS_SECKEY.  By convention the secret or public key is placed at index 300, but this is not necessary.  Also, the HS_SECKEY value should be made not-world-readable (the hdl-admintool client does this for you).

 

After this handle is created with an HS_SECKEY value, that handle can be used with HTTP Basic authentication.

 

Robert
 
On Jan 24, 2019, at 7:53 PM, Kun Lin <link@whitman.edu> wrote:

 

For the purpose of using REST API and Basic Access Authentication. How to set the HS_SECKEY password?  I didn’t remember setting it. I always use admpriv.bin file for auth in clients. 

 

 

----
Kun Lin
Systems and Application Librarian
Whitman College

 

 

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

 

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

 

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

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