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

feat(portal): Internet resources #6299

Merged
merged 14 commits into from
Aug 27, 2024
Merged

feat(portal): Internet resources #6299

merged 14 commits into from
Aug 27, 2024

Conversation

AndrewDryga
Copy link
Collaborator

@AndrewDryga AndrewDryga commented Aug 14, 2024

They will be sent in the API for connlib 1.3 and above.

I think in future we can make a whole menu section called "Internet Security" which will be a specialized UI for the new resource type (and now show it in Resources list) to improve the user experience around it.

Closes #5852

Copy link

vercel bot commented Aug 14, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
firezone ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 27, 2024 10:51pm

Copy link

github-actions bot commented Aug 14, 2024

Terraform Cloud Plan Output

Plan: 15 to add, 15 to change, 15 to destroy.

Terraform Cloud Plan

Copy link
Member

@jamilbk jamilbk left a comment

Choose a reason for hiding this comment

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

Will test more later. Left some minor wording suggestions.

  • Since this is close to shipping and we're already bumping to 1.2, should we just make >1.2.0 the requirement here? Otherwise we'll bump to 1.2 and then to 1.3 after a few days.
  • Is it possible to delete the Internet Resource via the REST API?
  • On that note, do we need to update REST API docs / schema for it?

:drop -> :drop
end
cond do
resource.type == :internet and Version.match?(client_or_gateway_version, ">= 1.3.0") ->
Copy link
Member

Choose a reason for hiding this comment

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

I think we'll roll this out with the other changes for client 1.2.0 release.

Suggested change
resource.type == :internet and Version.match?(client_or_gateway_version, ">= 1.3.0") ->
resource.type == :internet and Version.match?(client_or_gateway_version, ">= 1.2.0") ->

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We should not do that. 1.2 is for the wildcard. Better we bump the version twice because then we will have a way to develop internet resources and deploy without breaking everything.

Copy link
Member

Choose a reason for hiding this comment

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

K, in that case I think we can release new clients today-ish and deploy prod right away, right?

Copy link
Member

Choose a reason for hiding this comment

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

cc @conectado to confirm.

Copy link
Collaborator

@conectado conectado Aug 20, 2024

Choose a reason for hiding this comment

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

I just realized that after merging this PR #6325 if we send the internet resource to clients currently in main it might break some clients. Since now we send the resource to the clients, some of the clients can't support the deserialization of the internet resource.

Will have a PR asap to fix this.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Fixed in #6381

<fieldset class="mb-2">
<.input
type="checkbox"
label="Allow users to access the internet outside of Firezone"
Copy link
Collaborator

Choose a reason for hiding this comment

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

This comment isn't so much around function, but more around user experience. While I was trying to create a Policy for the Internet Resource, I saw this checkbox and wasn't actually sure what it was trying to convey.

Is this saying that users have the ability to stay signed in to the Firezone client to allow them to access private resources but bypass the Internet resource?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

cc @jamilbk that is what we discussed, this feature is really ambiguous, need much better content around it :(

Copy link
Member

Choose a reason for hiding this comment

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

Hm yeah we may need a longer description and / or rewording here. Or we could keep this enabled behind the scenes for now and expose the option to disable it when we hear that requirement from customers. I'll give it some more thought tomorrow.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'd address disabling when we implement PAM

Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we have any customer feedback around this feature? Has any customer explicitly asked one way or another for the enable/disable feature?

Copy link
Member

@jamilbk jamilbk Aug 20, 2024

Choose a reason for hiding this comment

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

Yeah so far they've just wanted to allow enabling/disabling, but I believe it has been only admins asking for the feature for their technical team (DevOps).

For the broader workforce, discovery calls from longer ago had expressed a need for this for Internet security for their workforce -- connecting from public cafes / coffee shops.

The other complication here is that, depending on the Policy that matches against your actor based which group you're in - you might be shown this flag or might not if you belong to multiple groups the Internet resource is enabled for. The portal would need a deterministic way to select policies (perhaps based on smaller group first).

Based on the above I'm reluctant to expose this option and instead just default it to true for now and hide the UI.

WDYGT?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yeah, I agree. I think setting the default to true and not exposing the option right now is probably the way to go.

Copy link
Member

Choose a reason for hiding this comment

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

github-merge-queue bot pushed a commit that referenced this pull request Aug 20, 2024
github-merge-queue bot pushed a commit that referenced this pull request Aug 21, 2024
[Refs](#6299 (comment))

The problem right now, after #6325 we send the internet resource up to
the clients. The clients expect a certain format for the resources and
panic if it isn't followed.

Particularly, in the case of no `address` or no `name`.

To fix this, we add a name and an address for the internet resource when
it is converted to the callback type.

Setting the `name` at that point actually makes a lot of sense since it
homogenizes the name across all platforms. But the internet resource
having an address makes no sense.

So in a next PR, when I do the last UI changes I plan to make `address`
optional for all resources on the clients and specialize the display of
the internet resource.

For now I wanted to get this in so that we don't ever panic on the
internet resource existing. (This was tested on all platforms and it
works)
github-merge-queue bot pushed a commit that referenced this pull request Aug 22, 2024
…resource (#6396)

In preparation for #6299

---------

Signed-off-by: Gabi <[email protected]>
Co-authored-by: Thomas Eizinger <[email protected]>
@jamilbk
Copy link
Member

jamilbk commented Aug 26, 2024

I think this is essentially ready to go, just waiting on hiding the control preventing users to disable the resource so we can approach it more deliberately later.

@jamilbk
Copy link
Member

jamilbk commented Aug 27, 2024

@AndrewDryga Pushed a small fix for tests and merging to start testing with live Clients.

@jamilbk jamilbk enabled auto-merge August 27, 2024 22:50
@jamilbk jamilbk disabled auto-merge August 27, 2024 23:01
@jamilbk jamilbk added this pull request to the merge queue Aug 27, 2024
Merged via the queue into main with commit 2d08337 Aug 27, 2024
133 checks passed
@jamilbk jamilbk deleted the andrew/internet-resources branch August 27, 2024 23:25
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.

Add internet resource type and related portal updates required for full-route
4 participants