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

Outbound connectivity to databases is allow-all by default #897

Closed
mikkelhegn opened this issue Nov 11, 2022 · 5 comments
Closed

Outbound connectivity to databases is allow-all by default #897

mikkelhegn opened this issue Nov 11, 2022 · 5 comments
Assignees
Labels

Comments

@mikkelhegn
Copy link
Member

The rust, go and .net SDKs support outbound connections to Redis and Postgres (not go).

Unlike outbound http connections, these are allow-all by default, e.g. you can call any host from the component using this feature.

We should stick to deny-all and implement the functionality similar to http-outbound, where the configuration need to specify which hosts you're allowed to call.

@itowlson itowlson added the enhancement New feature or request label Nov 13, 2022
@itowlson
Copy link
Contributor

We need to define how this is going to work though. The set of allowed HTTP hosts is currently fixed in the spin.toml file. For databases, we want the allowed databases to resolve based on the environment/channel - a production deployment will want access to the production database but a test deployment should have access only to the test database.

This may be moot right now when we don't have a full concept of channels, but I don't want to casually bake this into spin.toml; and then find we need to unpick it. Let's try to make a reasonable plan for what our test-staging-production story might look like, and see if we can design to that today, or if we have to adopt an interim solution.

(There were some good discussions a while back around decoupling policy - set by operators - from application building. Might be time to reassess the roadmap on that.)

@lann
Copy link
Collaborator

lann commented Oct 11, 2023

(There were some good discussions a while back around decoupling policy - set by operators - from application building. Might be time to reassess the roadmap on that.)

Yes, I think this is a better long-term approach ("labels" + runtime config), though we'll still need to support existing non-labels interfaces for the time being.

@rylev rylev self-assigned this Oct 26, 2023
@rylev
Copy link
Collaborator

rylev commented Oct 26, 2023

We need this for:

We also need to consider moving to the unified allowed_outbound_hosts for http as well.

@vdice
Copy link
Member

vdice commented Oct 31, 2023

@rylev is this considered done with #1959?

@rylev
Copy link
Collaborator

rylev commented Oct 31, 2023

Yes it would be!

@vdice vdice closed this as completed Oct 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Status: Done
Development

No branches or pull requests

5 participants