Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I secure password parameters in RESTful web service URIs?

Tags:

rest

security

i'm a newbie to server-side programming, so please forgive me if this gets messy. i've been contracted to create a web service to allow authenticated users to access a database. users have to enter a login and password. been reading and reading about REST vs SOAP, and i thought i'd settled on a RESTful design when i came across this statement: "Data that needs to be secure should not be sent as parameters in URIs." this seems like a major demerit against a RESTful approach. i'm aware that with https the password would be encrypted to prevent man-in-the-middle interception, but that leaves the server logs and client history as possible exposure points. is there a RESTful solution out there for this problem, or do i need to go SOAPy? any advice appreciated.

like image 469
adam Avatar asked Apr 26 '10 17:04

adam


1 Answers

Use POST-type requests to transmit the necessary data and include the sensitive portion as a posted field so that it is part of the request body instead of a parameter within the URI.

like image 173
Amber Avatar answered Nov 15 '22 09:11

Amber