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

Add strict param to enforce RECAP_URLS for gateway #408

Merged
merged 1 commit into from
Oct 20, 2023

Conversation

criccomini
Copy link
Contributor

The gateway has a gaping security hole. It allows users to ls/schema on arbitrary URLs using whatever credentials the gateway host might have. This is dangerous in a cloud environment where the host might be given a service account with access to systems that end users should not have access to. It also is dangerous now that we have a FilesystemClient that allows users to read the local disk.

I've fixed this by forcing the gateway to run ls and schema commands with struct=True. This parmater forces any URLs to be defined in the RECAP_URLS environment variable. Unknown URLs will now fail with a ValueError.

I have left the CLI with strict=False because the users running locally should be able to query whatever they want using the credentials they have on their machine.

The gateway has a gaping security hole. It allows users to ls/schema on
arbitrary URLs using whatever credentials the gateway host might have. This is
dangerous in a cloud environment where the host might be given a service account
with access to systems that end users should not have access to. It also is
dangerous now that we have a FilesystemClient that allows users to read the
local disk.

I've fixed this by forcing the gateway to run `ls` and `schema` commands with
`struct=True`. This parmater forces any URLs to be defined in the RECAP_URLS
environment variable. Unknown URLs will now fail with a ValueError.

I have left the CLI with `strict=False` because the users running locally should
be able to query whatever they want using the credentials they have on their
machine.
@criccomini criccomini merged commit fcab653 into main Oct 20, 2023
3 checks passed
@criccomini criccomini deleted the add-strict-gateway-config branch October 20, 2023 17:21
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