Details
-
Type: Improvement
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 5.9.3
-
Fix Version/s: 5.11.0-b1
-
Component/s: Staff Interface
-
Labels:None
Description
The API for Blesta uses http basic auth for authentication. Most web servers nowadays, including those running PHP-FPM, do not support http basic auth out of the box. We should update the API to allow a key based authentication method similar to most modern APIs, where the API key is included in the request headers with each API request.
All API requests should originate over HTTPS. http basic auth was argued in the past to be more secure because the authentication details were not included in every request, this is no longer a real concern. Including the key in the request headers over https is secure.
If the existing API cannot support both http basic auth and this alternative key based auth (preferred moving forward) option, consider implementing a new endpoint for this authentication type. However, the API could look for the request header, and if present, use the API key contained within it, and fall back to http basic auth if it is not present.
Make sure this is added to the documentation.
Note: Use something like:
curl -X POST 'https://yourdomain.com/blesta/api/users/get.json' \
--header 'Authorization: Blesta-API-User [TheAPIUser]' \
--header 'Authorization: Blesta-API-Key [TheAPIKey]' \
...
}'
Activity
Field | Original Value | New Value |
---|---|---|
Summary | Update API to allow an alternative authentication method to http basic auth | Update API to allow key based authentication method in addition to current http basic auth |
Description |
The API for Blesta uses http basic auth for authentication. Most web servers nowadays, including those running PHP-FPM, do not support http basic auth out of the box. We should update the API to allow another authentication method, such as including the API key to be submitted in the request.
All API requests should originate over HTTPS If the API cannot support both http basic auth and this alternative (preferred moving forward) option, consider implementing a new endpoint for the API's new authentication type. Make sure this is added to the documentation. |
The API for Blesta uses http basic auth for authentication. Most web servers nowadays, including those running PHP-FPM, do not support http basic auth out of the box. We should update the API to allow a key based authentication method similar to most modern APIs, where the API key is included with each API request.
All API requests should originate over HTTPS. http basic auth was argued in the past to be more secure because the authentication details were not included in every request. If the existing API cannot support both http basic auth and this alternative key based auth (preferred moving forward) option, consider implementing a new endpoint for this authentication type. Make sure this is added to the documentation. |
Description |
The API for Blesta uses http basic auth for authentication. Most web servers nowadays, including those running PHP-FPM, do not support http basic auth out of the box. We should update the API to allow a key based authentication method similar to most modern APIs, where the API key is included with each API request.
All API requests should originate over HTTPS. http basic auth was argued in the past to be more secure because the authentication details were not included in every request. If the existing API cannot support both http basic auth and this alternative key based auth (preferred moving forward) option, consider implementing a new endpoint for this authentication type. Make sure this is added to the documentation. |
The API for Blesta uses http basic auth for authentication. Most web servers nowadays, including those running PHP-FPM, do not support http basic auth out of the box. We should update the API to allow a key based authentication method similar to most modern APIs, where the API key is included in the request headers with each API request.
All API requests should originate over HTTPS. http basic auth was argued in the past to be more secure because the authentication details were not included in every request, this is no longer a real concern. Including the key in the request headers over https is secure. If the existing API cannot support both http basic auth and this alternative key based auth (preferred moving forward) option, consider implementing a new endpoint for this authentication type. However, the API could look for the request header, and if present, use the API key contained within it, and fall back to http basic auth if it is not present. Make sure this is added to the documentation. |
Description |
The API for Blesta uses http basic auth for authentication. Most web servers nowadays, including those running PHP-FPM, do not support http basic auth out of the box. We should update the API to allow a key based authentication method similar to most modern APIs, where the API key is included in the request headers with each API request.
All API requests should originate over HTTPS. http basic auth was argued in the past to be more secure because the authentication details were not included in every request, this is no longer a real concern. Including the key in the request headers over https is secure. If the existing API cannot support both http basic auth and this alternative key based auth (preferred moving forward) option, consider implementing a new endpoint for this authentication type. However, the API could look for the request header, and if present, use the API key contained within it, and fall back to http basic auth if it is not present. Make sure this is added to the documentation. |
The API for Blesta uses http basic auth for authentication. Most web servers nowadays, including those running PHP-FPM, do not support http basic auth out of the box. We should update the API to allow a key based authentication method similar to most modern APIs, where the API key is included in the request headers with each API request.
All API requests should originate over HTTPS. http basic auth was argued in the past to be more secure because the authentication details were not included in every request, this is no longer a real concern. Including the key in the request headers over https is secure. If the existing API cannot support both http basic auth and this alternative key based auth (preferred moving forward) option, consider implementing a new endpoint for this authentication type. However, the API could look for the request header, and if present, use the API key contained within it, and fall back to http basic auth if it is not present. Make sure this is added to the documentation. Note: Use something like: curl -X POST 'https://yourdomain.com/blesta/api/users/get.json' \ --header 'Authorization: Blesta-API-User [TheAPIUser]' \ --header 'Authorization: Blesta-API-Key [TheAPIKey]' \ ... }' |
Story Points | 5 |
Sprint | 5.11.0 Sprint 5 [ 204 ] |
Rank | Ranked higher |
Rank | Ranked lower |
Assignee | Abdy Franco [ abdy ] |
Remaining Estimate | 0 minutes [ 0 ] | |
Time Spent | 7 hours, 8 minutes [ 25680 ] | |
Worklog Id | 17417 [ 17417 ] |
Status | Open [ 1 ] | In Progress [ 3 ] |
Time Spent | 7 hours, 8 minutes [ 25680 ] | 1 day, 6 hours, 59 minutes [ 53940 ] |
Worklog Id | 17418 [ 17418 ] |
Time Spent | 1 day, 6 hours, 59 minutes [ 53940 ] | 2 days, 5 hours, 29 minutes [ 77340 ] |
Worklog Id | 17419 [ 17419 ] |
Status | In Progress [ 3 ] | In Review [ 5 ] |
Resolution | Fixed [ 1 ] |
Status | In Review [ 5 ] | Closed [ 6 ] |