diff --git a/elixir/apps/web/lib/web/components/core_components.ex b/elixir/apps/web/lib/web/components/core_components.ex index 7e043147d..7ad3284e9 100644 --- a/elixir/apps/web/lib/web/components/core_components.ex +++ b/elixir/apps/web/lib/web/components/core_components.ex @@ -1134,4 +1134,32 @@ defmodule Web.CoreComponents do """ end + + @doc """ + Renders a logo appropriate for the given provider. + + <.provider_icon adapter={:google_workspace} class="w-5 h-5 mr-2" /> + """ + attr :adapter, :atom, required: false + attr :rest, :global + + def provider_icon(%{adapter: :google_workspace} = assigns) do + ~H""" + Google Workspace Logo + """ + end + + def provider_icon(%{adapter: :openid_connect} = assigns) do + ~H""" + OpenID Connect Logo + """ + end + + def provider_icon(%{adapter: :microsoft_entra} = assigns) do + ~H""" + Microsoft Entra Logo + """ + end + + def provider_icon(assigns), do: ~H"" end diff --git a/elixir/apps/web/lib/web/components/form_components.ex b/elixir/apps/web/lib/web/components/form_components.ex index a90e8366d..0b1edbb8b 100644 --- a/elixir/apps/web/lib/web/components/form_components.ex +++ b/elixir/apps/web/lib/web/components/form_components.ex @@ -211,7 +211,7 @@ defmodule Web.FormComponents do
<.label :if={not is_nil(@label)} for={@id}><%= @label %>
-
<%= @prefix %> -
+ -

As shown in your "Welcome to Firezone" email

+

Your account ID can be found in your welcome email.

<.button class="w-full"> Go to Sign In page diff --git a/elixir/apps/web/lib/web/live/resources/index.ex b/elixir/apps/web/lib/web/live/resources/index.ex index 3a7008daf..8c25c288f 100644 --- a/elixir/apps/web/lib/web/live/resources/index.ex +++ b/elixir/apps/web/lib/web/live/resources/index.ex @@ -38,6 +38,10 @@ defmodule Web.Resources.Index do <:title> Resources + <:help> + Resources define the subnets, hosts, and applications for which you want to manage access. You can manage resources per site + in the <.link navigate={~p"/#{@account}/sites"} class={link_style()}>sites section. + <:action> <.add_button :if={Domain.Config.multi_site_resources_enabled?()} @@ -50,7 +54,7 @@ defmodule Web.Resources.Index do
<.table id="resources" rows={@resources} row_id={&"resource-#{&1.id}"}> <:col :let={resource} label="NAME"> - <.link navigate={~p"/#{@account}/resources/#{resource.id}"} class={[link_style()]}> + <.link navigate={~p"/#{@account}/resources/#{resource.id}"} class={link_style()}> <%= resource.name %> @@ -63,7 +67,7 @@ defmodule Web.Resources.Index do <.link :for={gateway_group <- resource.gateway_groups} navigate={~p"/#{@account}/sites/#{gateway_group}"} - class={[link_style()]} + class={link_style()} > <.badge type="info"> <%= gateway_group.name %> diff --git a/elixir/apps/web/lib/web/live/settings/identity_providers/new.ex b/elixir/apps/web/lib/web/live/settings/identity_providers/new.ex index a930c53d9..c27a7f636 100644 --- a/elixir/apps/web/lib/web/live/settings/identity_providers/new.ex +++ b/elixir/apps/web/lib/web/live/settings/identity_providers/new.ex @@ -75,7 +75,7 @@ defmodule Web.Settings.IdentityProviders.New do adapter={@adapter} account={@account} name="OpenID Connect" - description="Authenticate users with a universal OpenID Connect adapter and synchronize users with just-in-time (JIT) provisioning." + description="Authenticate users with a universal OpenID Connect adapter and manager users and groups manually." /> """ end @@ -103,6 +103,7 @@ defmodule Web.Settings.IdentityProviders.New do class={~w[ w-4 h-4 border-neutral-300 ]} required /> + <.provider_icon adapter={@adapter} class="w-8 h-8 ml-4" /> diff --git a/elixir/apps/web/lib/web/live/sign_in.ex b/elixir/apps/web/lib/web/live/sign_in.ex index dbe0b7b1c..b6c07f2b3 100644 --- a/elixir/apps/web/lib/web/live/sign_in.ex +++ b/elixir/apps/web/lib/web/live/sign_in.ex @@ -51,7 +51,7 @@ defmodule Web.SignIn do

- Sign into <%= @account.name %> + Sign in to <%= @account.name %>

@@ -200,27 +200,23 @@ defmodule Web.SignIn do placeholder="Enter your email" required /> - - <:actions> - <.button phx-disable-with="Sending..." class="w-full"> - Request sign in token - - + <.button phx-disable-with="Sending..." class="w-full" style="info"> + Request sign in token + """ end def openid_connect_button(assigns) do ~H""" - - Sign in with <%= @provider.name %> - + <.button + navigate={~p"/#{@account}/sign_in/providers/#{@provider}/redirect?#{@params}"} + class="w-full space-x-1" + style="info" + > + <.provider_icon adapter={@provider.adapter} class="w-5 h-5 mr-2" /> Sign in with + <%= @provider.name %> + """ end diff --git a/elixir/apps/web/lib/web/live/sign_in/email.ex b/elixir/apps/web/lib/web/live/sign_in/email.ex index 065b2b6f8..364fe5e80 100644 --- a/elixir/apps/web/lib/web/live/sign_in/email.ex +++ b/elixir/apps/web/lib/web/live/sign_in/email.ex @@ -44,8 +44,9 @@ defmodule Web.SignIn.Email do

- Should the provided email be registered, a sign in token has been sent to your email account. - Please copy and paste this into the form below to proceed with your login. + If <%= @provider_identifier %> is registered, a sign in token has + been sent to that email. Please copy and paste this into the form below to proceed + with your login.

<.delete_button phx-click="revoke_all_tokens" - data-confirm="Are you sure you want to revoke all tokens? This will immediately sign the actor out of all clients." + data-confirm="Are you sure you want to revoke all tokens? This will immediately disconnect all gateways in this site." > Revoke All Tokens @@ -139,7 +139,7 @@ defmodule Web.Sites.Show do <:help> - Resources are the endpoints that you want to make available to your clients. + Resources are the subnets, hosts, and applications that you wish to manage access to. <:content>
diff --git a/elixir/apps/web/priv/static/images/entra-logo.svg b/elixir/apps/web/priv/static/images/entra-logo.svg new file mode 100644 index 000000000..15a52b9de --- /dev/null +++ b/elixir/apps/web/priv/static/images/entra-logo.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/elixir/apps/web/priv/static/images/google-logo.svg b/elixir/apps/web/priv/static/images/google-logo.svg new file mode 100644 index 000000000..b372f3248 --- /dev/null +++ b/elixir/apps/web/priv/static/images/google-logo.svg @@ -0,0 +1 @@ + diff --git a/elixir/apps/web/priv/static/images/openid-logo.svg b/elixir/apps/web/priv/static/images/openid-logo.svg new file mode 100644 index 000000000..7cf466ec5 --- /dev/null +++ b/elixir/apps/web/priv/static/images/openid-logo.svg @@ -0,0 +1,4 @@ + + + + diff --git a/elixir/apps/web/test/web/acceptance/auth/openid_connect_test.exs b/elixir/apps/web/test/web/acceptance/auth/openid_connect_test.exs index c2238b462..e413d91a7 100644 --- a/elixir/apps/web/test/web/acceptance/auth/openid_connect_test.exs +++ b/elixir/apps/web/test/web/acceptance/auth/openid_connect_test.exs @@ -13,10 +13,10 @@ defmodule Web.Acceptance.Auth.OpenIDConnectTest do session |> visit(~p"/#{account}") - |> assert_el(Query.text("Sign into #{account.name}")) + |> assert_el(Query.text("Sign in to #{account.name}")) |> click(Query.link("Sign in with Vault")) |> Vault.userpass_flow(oidc_login, oidc_password) - |> assert_el(Query.text("Sign into #{account.name}")) + |> assert_el(Query.text("Sign in to #{account.name}")) |> assert_path(~p"/#{account.id}") |> assert_el(Query.text("You may not authenticate to this account.")) end @@ -41,7 +41,7 @@ defmodule Web.Acceptance.Auth.OpenIDConnectTest do session |> visit(~p"/#{account}") - |> assert_el(Query.text("Sign into #{account.name}")) + |> assert_el(Query.text("Sign in to #{account.name}")) |> click(Query.link("Sign in with Vault")) |> Vault.userpass_flow(oidc_login, oidc_password) |> assert_el(Query.css("#user-menu-button")) @@ -69,7 +69,7 @@ defmodule Web.Acceptance.Auth.OpenIDConnectTest do session |> visit(~p"/#{account}") - |> assert_el(Query.text("Sign into #{account.name}")) + |> assert_el(Query.text("Sign in to #{account.name}")) |> click(Query.link("Sign in with Vault")) |> Vault.userpass_flow(oidc_login, oidc_password) |> assert_el(Query.css("#user-menu-button")) @@ -110,7 +110,7 @@ defmodule Web.Acceptance.Auth.OpenIDConnectTest do session |> visit(~p"/#{account}?#{redirect_params}") - |> assert_el(Query.text("Sign into #{account.name}")) + |> assert_el(Query.text("Sign in to #{account.name}")) |> click(Query.link("Sign in with Vault")) |> Vault.userpass_flow(oidc_login, oidc_password) |> assert_el(Query.text("Client redirected")) @@ -175,7 +175,7 @@ defmodule Web.Acceptance.Auth.OpenIDConnectTest do # Sign In as an portal user session |> visit(~p"/#{account}") - |> assert_el(Query.text("Sign into #{account.name}")) + |> assert_el(Query.text("Sign in to #{account.name}")) |> click(Query.link("Sign in with Vault")) |> Vault.userpass_flow(oidc_login, oidc_password) |> assert_el(Query.css("#user-menu-button")) @@ -185,7 +185,7 @@ defmodule Web.Acceptance.Auth.OpenIDConnectTest do # And then to a client session |> visit(~p"/#{account}?#{redirect_params}") - |> assert_el(Query.text("Sign into #{account.name}")) + |> assert_el(Query.text("Sign in to #{account.name}")) |> click(Query.link("Sign in with Vault")) |> assert_el(Query.text("Client redirected")) |> assert_path(~p"/handle_client_sign_in_callback") @@ -237,7 +237,7 @@ defmodule Web.Acceptance.Auth.OpenIDConnectTest do # And then to a client session |> visit(~p"/#{account}?#{redirect_params}") - |> assert_el(Query.text("Sign into #{account.name}")) + |> assert_el(Query.text("Sign in to #{account.name}")) |> click(Query.link("Sign in with Vault")) |> Vault.userpass_flow(oidc_login, oidc_password) |> assert_el(Query.text("Client redirected")) @@ -246,7 +246,7 @@ defmodule Web.Acceptance.Auth.OpenIDConnectTest do # Sign In as an portal user session |> visit(~p"/#{account}") - |> assert_el(Query.text("Sign into #{account.name}")) + |> assert_el(Query.text("Sign in to #{account.name}")) |> click(Query.link("Sign in with Vault")) |> assert_el(Query.css("#user-menu-button")) |> Auth.assert_authenticated(identity) diff --git a/elixir/apps/web/test/web/acceptance/auth/userpass_test.exs b/elixir/apps/web/test/web/acceptance/auth/userpass_test.exs index 8be5fada5..8542e82a1 100644 --- a/elixir/apps/web/test/web/acceptance/auth/userpass_test.exs +++ b/elixir/apps/web/test/web/acceptance/auth/userpass_test.exs @@ -247,7 +247,7 @@ defmodule Web.Acceptance.Auth.UserPassTest do defp password_login_flow(session, account, username, password, redirect_params \\ %{}) do session |> visit(~p"/#{account}?#{redirect_params}") - |> assert_el(Query.text("Sign into #{account.name}")) + |> assert_el(Query.text("Sign in to #{account.name}")) |> assert_el(Query.text("Sign in with username and password")) |> fill_form(%{ "userpass[provider_identifier]" => username, diff --git a/elixir/apps/web/test/web/acceptance/auth_test.exs b/elixir/apps/web/test/web/acceptance/auth_test.exs index 477430a55..85e636dea 100644 --- a/elixir/apps/web/test/web/acceptance/auth_test.exs +++ b/elixir/apps/web/test/web/acceptance/auth_test.exs @@ -14,7 +14,7 @@ defmodule Web.Acceptance.AuthTest do session |> visit(~p"/#{account}") - |> assert_el(Query.text("Sign into #{account.name}")) + |> assert_el(Query.text("Sign in to #{account.name}")) |> assert_el(Query.link("Sign in with #{openid_connect_provider.name}")) |> assert_el(Query.text("Sign in with username and password")) |> assert_el(Query.text("Sign in with email"))