block-deletes#94
Closed
TylerPachal wants to merge 2 commits intoabutaha:masterfrom
TylerPachal:block-deletes
Closed
block-deletes#94TylerPachal wants to merge 2 commits intoabutaha:masterfrom TylerPachal:block-deletes
TylerPachal wants to merge 2 commits intoabutaha:masterfrom
TylerPachal:block-deletes
Conversation
TylerPachal
commented
Jul 20, 2021
Comment on lines
+127
to
+128
| -assume string | ||
| Optionally specify role to assume |
Author
There was a problem hiding this comment.
Annotation: I re-ran the proxy with -h and I guess this option had not been documented yet either.
Owner
|
Thanks for submitting this. It's a cool a feature. Let me review it and get it merged the soonest. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Problem
I just accidentally deleted a lot of documents from a remote cluster because I forgot this tunnel was opened 🤦.
The Solution
Add a
-block-deletesflag which will block delete requests from being proxied through to the cluster. I am very rarely wanting to connect to a remote cluster to do delete operations, so from now on I will use this library like so:The default is still to allow requests unless you opt-out using the new flag.
Risks
I am not a heavy ES user so I don't think I've covered all of the possible ways to delete things. From what I saw in the documentation disallowing
DELETErequests is a good starting point. I burned myself with the_delete_by_queryfunctionality so I also added that one. It won't do anything to block deletes that are in a_bulkquery.I know this isn't strictly related to proxying but I think this would be a nice option to have.
Other
go run aws-es-proxy.go -block-deletes -endpoint <my_endpoint>and sent through someDELETErequests and some_delete_by_queryrequests, all of which were blocked with a log indicating what happened: