Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explicit header whitelist in configuration #336

Merged
merged 8 commits into from
May 4, 2018

Conversation

jeffkreeftmeijer
Copy link
Member

@jeffkreeftmeijer jeffkreeftmeijer commented Apr 23, 2018

Adds an explicit header whitelist to the configuration file or environment variables created/suggested by the installer. Closes #317.

TODO

Note: This is a work in progress until we've decided on the final list of default headers.

@jeffkreeftmeijer jeffkreeftmeijer force-pushed the explicit-header-whitelist branch from a416644 to 9d3dd4d Compare April 25, 2018 18:55
@tombruijn
Copy link
Member

Related Ruby PR: appsignal/appsignal-ruby#406

Too much personal data being sent that's not GDPR compliant.
@tombruijn tombruijn force-pushed the explicit-header-whitelist branch from 057af38 to 54ebebb Compare May 3, 2018 11:55
@tombruijn
Copy link
Member

@jeffkreeftmeijer updated the header list. Now ready for review?

@jeffkreeftmeijer jeffkreeftmeijer requested a review from tombruijn May 3, 2018 12:09
@jeffkreeftmeijer
Copy link
Member Author

Yes! PLease do. :)


Please check https://github.com/appsignal/appsignal-elixir/pull/336 for more information on this change.
""")
end
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This warning is also being printed during the installation now, which is kind of weird. I think it's missing the config for the installation task when it sends a demo sample.

Copy link
Member

@tombruijn tombruijn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See previous comment

@jeffkreeftmeijer
Copy link
Member Author

The warning will pop up when AppSignal is already installed without a :request_headers config set. This will also happen when starting the app to send the diagnose command. @tombruijn could you make sure this doesn't happen on a fresh install (you can remove the config from config/appsignal.exs and the import_config "appsignal.exs"-line from config/config.exs in an existing app with AppSignal installed to test this).

@tombruijn
Copy link
Member

tombruijn commented May 4, 2018

@jeffkreeftmeijer I can confirm this still happens when removing the old config. The fix for this is setting the request_headers config option to any value for the install task.

For example:

    config = %{active: true, push_api_key: push_api_key, request_headers: []}

@tombruijn
Copy link
Member

tombruijn commented May 4, 2018

Ah I can confirm it also still happens with the proposed fix if you run the installer again in a project with a config already, but without the request_headers option. Less of a problem and I would suggest it's a non-fix because you wouldn't run the installer again if you've run it already.

This suppresses the warning message about the missing `request_headers`
config option. It's set to an empty list as the config option doesn't
apply to the demo samples that are send later in the installer.
This creates the most minimal config needed in the installer. No need to
set the suggested request_headers here.
@jeffkreeftmeijer jeffkreeftmeijer merged commit 67e08e4 into develop May 4, 2018
@tombruijn tombruijn deleted the explicit-header-whitelist branch May 5, 2018 10:34
end

defp test? do
Mix.env
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jeffkreeftmeijer It seems you've added a runtime dependency to Mix here, this breaks our distillery based releases which don't have Mix at runtime... Just upgraded from 1.5.0 to 1.6.0 and our app no longer boots.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @doughsay , Sorry about that. Please downgrade to 1.5.0 until we've released the fix in PR #346 , which will hopefully be tomorrow!

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks! ;)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job on fixing this so fast 🎉

We have got the same issue as @doughsay with our distillery based deploys, so subscribe me to the next release notification :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lucasmazza @doughsay We've released the 1.6.1 release yesterday that reverses this change. Please upgrade and let us know if you're running into any other issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants