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

Single firewall rule add/remove #516

Open
1 of 4 tasks
rmustacc opened this issue Jan 9, 2024 · 3 comments
Open
1 of 4 tasks

Single firewall rule add/remove #516

rmustacc opened this issue Jan 9, 2024 · 3 comments
Labels
feature Issue for a new feature that does not break current functionality

Comments

@rmustacc
Copy link

rmustacc commented Jan 9, 2024

Target component

  • CLI
  • SDK
  • Something else
  • Not sure

Overview

In the API, the firewall rules are an all or nothing payload. This is to allow for avoiding the dueling administrators problem and also to make it so if someone wants to transform the set of rules, they don't have to figure out a series of steps that leave things accidentally open (imagine adding an allow and deny rule in the wrong order).

However, as a human trying to consume this, this is a bit easy to screw up. Because you end up writing a replacement for the whole set on the CLI, you end up usually forgetting something and end up removing your allow-ssh rule or similar as an accidental side effect.

While we don't have conditional PUTs in the API yet, it'd be nice if there was a form that basically did the read/modify/write for you. That is, if we said add rule x, the CLI and/or SDK would do a GET, add it to the json blob, and then do a PUT (in the future with an etag).

Implementation details

No response

Anything else you would like to add?

I'm not sure if this should just be a think in the CLI or also an operation in the SDK.

@rmustacc rmustacc added the feature Issue for a new feature that does not break current functionality label Jan 9, 2024
@labbott
Copy link
Contributor

labbott commented Jan 9, 2024

A good example where I wanted this was when I was working on deploying via the SDK and needed to enable a port. I added that firewall rule but then lost my default ssh access. Fixing this via the CLI would be a good first step.

@karencfv
Copy link
Contributor

I am wondering if instead of this feature, we want to have an additional set of APIs that does precisely this.

Not all of our users will be using the CLI 100% of the time, and we expect many(most?) will be writing their own tooling on top of the API. For example, a customer that chooses to generate their own SDK in a language we don't support yet would miss out on this feature.

@ahl
Copy link
Collaborator

ahl commented Jan 11, 2024

That's a good question, @karencfv. The philosophy on the CLI has basically been as a thin wrapper on the API. If this would be useful for the CLI would it be useful for other API consumers?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Issue for a new feature that does not break current functionality
Projects
None yet
Development

No branches or pull requests

4 participants