Open
Conversation
…nections Previous configuration would use the address and port provided in connection query params to proxy to the correct server. This was subject to manipulation, however, as someone could put whatever values they wanted in there. This would generally only result in getting back something else, but it could be used by a malicious actor to have someone follow an otherwise-genuine engine link that would redirect to a malicious link via the address param. Now, the nginx server-snippet uses a fork of lua-rest-mysql to look up the instance via the instanceID passed as part of the websocket. If it's a valid instance, then it will get the ipAddress from the instance record and proxy to that; otherwise it will terminate the connection attempt. Users cannot make that request proxy to any link they want to any more. This required making an initContainer on the nginx server that installs the and mounts the forked lua-resty-mysql plugin, as it is not included in the core ingress-nginx image. The SQL server connection values must be configured as environment variables here, and a new main-snippet makes them available for nginx to read, as normally nginx does not have access to any ENV_VARs. Resolves IR-5570
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.
No description provided.