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

Ir 5570 nginx instanceserver proxy security #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

barankyle
Copy link
Contributor

No description provided.

…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant