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

Update bokeh's influxdb queries to use 'bind_params' #15

Open
astrobokonon opened this issue Apr 26, 2019 · 3 comments
Open

Update bokeh's influxdb queries to use 'bind_params' #15

astrobokonon opened this issue Apr 26, 2019 · 3 comments

Comments

@astrobokonon
Copy link
Member

Used to avoid SQL-style injection attacks; I'll need to uproot all of the query construction code to do this, though, so it's a bit messy. Also requires the most up-to-date version of influxdb-python, v5.2.2 or greater.

@astrobokonon astrobokonon self-assigned this Apr 26, 2019
@astrobokonon
Copy link
Member Author

@astrobokonon astrobokonon changed the title Update influxdb queries to use 'bind_params' Update bokehmcbokehface's influxdb queries to use 'bind_params' May 7, 2019
@astrobokonon astrobokonon transferred this issue from LowellObservatory/Camelot Jun 3, 2019
@astrobokonon astrobokonon changed the title Update bokehmcbokehface's influxdb queries to use 'bind_params' Update bokeh's influxdb queries to use 'bind_params' Jun 3, 2019
@astrobokonon
Copy link
Member Author

Looking at this again just now, I'm punting this to much later. It's high priority, but the underlying changes to the influxdb-python client seem to be not done yet.

The current implementation of bind_params is still undocumented (or, minimally documented) and only works in the WHERE clause. I can prepare pre-made/hardcoded queries, but that's a lot of work and I'd rather just wait to let more examples develop before I dive in...especially since my query constructor does still work, and our exposure is pretty minimal.

As a mitigation, I should work on getting the permissions back into the database. That would at least theoretically protect from stupid injection attacks.

@astrobokonon
Copy link
Member Author

See also:

https://medium.com/sekoia-io-blog/avoiding-injections-with-influxdb-bind-parameters-50f67e379abb

As of 20190718, the official docs don't show this update.

@astrobokonon astrobokonon transferred this issue from LowellObservatory/NightShift May 5, 2020
@astrobokonon astrobokonon added this to To do in Data Management Toolkit Development via automation May 5, 2020
@astrobokonon astrobokonon added this to To do in MrFreeze via automation May 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
MrFreeze
  
To do
NightWatch
  
Needs Discussion / Future Work
Development

No branches or pull requests

1 participant