You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some of the IEX endpoints use the secret token and it will be logged if you've enabled the logger for Faraday (config.logger is set or passed in when you create an instance of the IEX::Api::Client).
in order to filter out the secret key. I'm not sure if this software is intended to be this opinionated so another option is to enable it to be configurable. Is there a recommended approach? My first instinct to ensure backward compatibility is to allow the config logger to be either a logger instance or hash or with keys in %i[instance options proc]. Then that code could be changed to:
This is really an issue for IEX to help solve, we need to take the token out of the query string and into an HTTP header. Have you tried contacting them about it?
I think for the purposes of this library I am A-OK with the first proposal as long as someone can restore the old behavior by assigning a logger or doing something else in the configuration. Want to try a PR?
I added a request for sending tokens via HTTP header to https://iexcloud.io/console/roadmap but I was unable to see the issue after submission. Perhaps it needs to be accepted but if I find our more I'll post a link here.
Added the approach I suggested in #87. I think the test might be a little brittle but I also anticipate Faraday and its logger middleware changing less frequently than this project.
Some of the IEX endpoints use the secret token and it will be logged if you've enabled the logger for Faraday (
config.logger
is set or passed in when you create an instance of theIEX::Api::Client
).I'd like to filter these tokens out of the logs which can be done with a hard code change to https://github.com/dblock/iex-ruby-client/blob/ca706ff/lib/iex/cloud/connection.rb#L33 to something like:
in order to filter out the secret key. I'm not sure if this software is intended to be this opinionated so another option is to enable it to be configurable. Is there a recommended approach? My first instinct to ensure backward compatibility is to allow the config
logger
to be either a logger instance or hash or with keys in%i[instance options proc]
. Then that code could be changed to:Perhaps there's a better solution where we can expose the logger but I'm not sure.
For my usage in a Rails app I am able to work around this with the following:
Faraday information from docs
The text was updated successfully, but these errors were encountered: