application-research / autoretrieve

A server to make GraphSync data accessible on IPFS
22 stars 7 forks source link

Support auth header for event recorder #107

Closed hannahhoward closed 2 years ago

hannahhoward commented 2 years ago

Goals

Simple PR to support setting an auth header for the publish URL, which we will need for our setup with the other side

rvagg commented 2 years ago

needs wiring up in the event recorder constructor, autoretrieve.go line 182 needs:

            retriever.RegisterListener(eventrecorder.NewEventRecorder(cfg.InstanceId, cfg.EventRecorderEndpointURL, cfg. EventRecorderEndpointAuthorization))

otherwise lgtm

hannahhoward commented 2 years ago

I updated this to include the change requested (I had put it in already but I guess I didn't save) and also to move the endpoint auth out of the main config file and into a seperate file in the data directory. The reason for this is that it works better in a kubernetes deploy to keep your secret values seperate.

codecov-commenter commented 2 years ago

Codecov Report

Merging #107 (d4ff8a0) into master (01a3307) will increase coverage by 0.09%. The diff coverage is 30.00%.

@@            Coverage Diff             @@
##           master     #107      +/-   ##
==========================================
+ Coverage   12.14%   12.24%   +0.09%     
==========================================
  Files          16       16              
  Lines        2116     2132      +16     
==========================================
+ Hits          257      261       +4     
- Misses       1845     1857      +12     
  Partials       14       14              
Impacted Files Coverage Δ
autoretrieve.go 0.00% <0.00%> (ø)
filecoin/eventrecorder/eventrecorder.go 74.46% <100.00%> (+2.37%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 01a3307...d4ff8a0. Read the comment docs.