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

CLI: Ask users to allow networking capabilities if not set #4975

Merged
merged 11 commits into from
Aug 6, 2024

Conversation

xdoardo
Copy link
Contributor

@xdoardo xdoardo commented Jul 30, 2024

(Closes #4953, fixes RUN-371)

As per title. This patch introduces a mechanism that allows users to recover from not permitted networking accesses with a prompt:

Screenshot 2024-07-30 at 14 18 47

In addition, as implied by the prompt, this patch adds a mechanism to cache the users' choice in response to the prompt above.

@xdoardo xdoardo requested a review from syrusakbary as a code owner July 30, 2024 12:19
@xdoardo xdoardo requested a review from theduke July 30, 2024 12:23
@syrusakbary
Copy link
Member

I believe it will be better for the user to input a single char (y/n/a, as yes/no/always) ). Rather than up/down selectable.

It's way more common for this kind of input

@syrusakbary
Copy link
Member

This is great, I just tried locally. Can we have the following? Have the letter a prefilled in the input (that way is one less keystroke for the user)

@xdoardo
Copy link
Contributor Author

xdoardo commented Jul 30, 2024

42027b0 adds it.

Copy link
Member

@syrusakbary syrusakbary left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried this and it doesn't work. You can't delete the "a" and can't just press enter either (need to add another "a")

@xdoardo xdoardo requested a review from syrusakbary August 1, 2024 06:53
Cargo.toml Outdated Show resolved Hide resolved
lib/cli/src/commands/run/capabilities/mod.rs Show resolved Hide resolved
lib/cli/src/commands/run/capabilities/net.rs Outdated Show resolved Hide resolved
lib/cli/src/commands/run/mod.rs Outdated Show resolved Hide resolved
lib/cli/src/commands/run/mod.rs Outdated Show resolved Hide resolved
lib/cli/src/commands/run/wasi.rs Outdated Show resolved Hide resolved
lib/cli/src/commands/run/wasi.rs Outdated Show resolved Hide resolved
@xdoardo xdoardo merged commit 9ea92d3 into main Aug 6, 2024
62 of 63 checks passed
@xdoardo xdoardo deleted the ask-net-capability branch August 6, 2024 13:03
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.

CLI (wasmer run): Cache permission flags given by the user
3 participants