Closed
Bug 1411016
Opened 8 years ago
Closed 6 years ago
Add request signing to elasticsearch requests
Categories
(bugzilla.mozilla.org :: General, enhancement)
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: dylan, Unassigned, Mentored)
Details
(Keywords: good-first-bug)
1. Bugzilla::Elastic::Role::HasClient is modified to change the 'cxn' class used by the Search::Elasticsearch->new() constructor. https://metacpan.org/pod/Search::Elasticsearch#cxn
2. subclass Search::Elasticsearch::Cxn::LWP providing a new implementation of _build_handle(). Some small amount of copy/paste here is fine.
3. new _build_handle() should return a an instance of a subclass of LWP::UserAgent, which provides a new implementation of request().
4. new request() receives an HTTP::Request object, modifies it with Net::Amazon::Signature::V4 (detailed below).
Using Net::Amazon::Signature::V4 requires adding new credentials to localconfig. Localconfig settings go into Bugzilla/Install/Localconfig.pm.
Parameters added there are available as Bugzilla->localconfig->{variable}.
The parameters for signing are $access_key_id, $secret, $endpoint, $service.
For those, only $access_key_id and $secret should go into localconfig. The others are constants in the LWP::UserAgent subclass.
Some suggested naming for the two subclasses:
Bugzilla::Elastic::Cxn::LWP extends Search::Elasticsearch::Cxn::LWP.
Bugzilla::UserAgent::SigV4 extends LWP::UserAgent.
| Reporter | ||
Comment 1•8 years ago
|
||
Signing is just passing the request object to the sign method of Net::Amazon::Signature::V4,
as in https://metacpan.org/pod/Net::Amazon::Signature::V4#SYNOPSIS.
| Reporter | ||
Comment 2•8 years ago
|
||
We don't know if we need to do this yet, pending a question sent to ulfr 2017-10-20.
Status: NEW → UNCONFIRMED
Ever confirmed: false
Comment 3•6 years ago
|
||
As per dylan, Elasticsearch is no more.
Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•