diff --git a/lib/towerops_web/components/layouts.ex b/lib/towerops_web/components/layouts.ex
index b7c40a66..aaf58193 100644
--- a/lib/towerops_web/components/layouts.ex
+++ b/lib/towerops_web/components/layouts.ex
@@ -711,6 +711,12 @@ defmodule ToweropsWeb.Layouts do
>
Organizations
+ <.link
+ navigate={~p"/admin/security"}
+ class="inline-flex items-center px-1 pt-1 pb-4 text-sm font-medium text-gray-700 hover:text-gray-900 dark:text-gray-300 dark:hover:text-white"
+ >
+ IP Allowlist
+
@@ -735,6 +741,9 @@ defmodule ToweropsWeb.Layouts do
<.mobile_nav_link navigate={~p"/admin/organizations"} active={false}>
<.icon name="hero-building-office-2" class="size-5" /> Organizations
+ <.mobile_nav_link navigate={~p"/admin/security"} active={false}>
+ <.icon name="hero-shield-check" class="size-5" /> IP Allowlist
+
diff --git a/lib/towerops_web/live/admin/security_live/index.ex b/lib/towerops_web/live/admin/security_live/index.ex
index 9862e880..9b1e383c 100644
--- a/lib/towerops_web/live/admin/security_live/index.ex
+++ b/lib/towerops_web/live/admin/security_live/index.ex
@@ -3,8 +3,8 @@ defmodule ToweropsWeb.Admin.SecurityLive.Index do
Admin page for managing IP-based brute force protection.
Provides two main functions:
- 1. Whitelist management - Add/remove IPs and CIDR ranges that bypass protection
- 2. Block management - View and manually unblock banned IPs
+ 1. Allowlist management - Add/remove IPs and CIDR ranges that bypass protection
+ 2. Denylist management - View and manually unblock banned IPs
"""
use ToweropsWeb, :live_view
@@ -19,7 +19,7 @@ defmodule ToweropsWeb.Admin.SecurityLive.Index do
{:ok,
socket
- |> assign(:page_title, "Security - Brute Force Protection")
+ |> assign(:page_title, "Security - IP Access Control")
|> assign(:current_tab, "whitelist")}
end
@@ -64,7 +64,7 @@ defmodule ToweropsWeb.Admin.SecurityLive.Index do
{:ok, _entry} ->
{:noreply,
socket
- |> put_flash(:info, "IP/CIDR added to whitelist")
+ |> put_flash(:info, "IP/CIDR added to allowlist")
|> assign(:show_whitelist_form, false)
|> load_data()}
@@ -72,7 +72,7 @@ defmodule ToweropsWeb.Admin.SecurityLive.Index do
{:noreply,
socket
|> assign(:whitelist_form, to_form(Map.put(changeset, :action, :validate)))
- |> put_flash(:error, "Failed to add to whitelist")}
+ |> put_flash(:error, "Failed to add to allowlist")}
end
end
@@ -81,11 +81,11 @@ defmodule ToweropsWeb.Admin.SecurityLive.Index do
:ok ->
{:noreply,
socket
- |> put_flash(:info, "Removed from whitelist")
+ |> put_flash(:info, "Removed from allowlist")
|> load_data()}
{:error, _} ->
- {:noreply, put_flash(socket, :error, "Failed to remove from whitelist")}
+ {:noreply, put_flash(socket, :error, "Failed to remove from allowlist")}
end
end
diff --git a/lib/towerops_web/live/admin/security_live/index.html.heex b/lib/towerops_web/live/admin/security_live/index.html.heex
index 96693342..f1499498 100644
--- a/lib/towerops_web/live/admin/security_live/index.html.heex
+++ b/lib/towerops_web/live/admin/security_live/index.html.heex
@@ -1,9 +1,9 @@
-
Brute Force Protection
+
IP Access Control
- Manage IP whitelist and view blocked IPs
+ Manage IP allowlist and view denied IPs
@@ -22,7 +22,7 @@
)
]}
>
- Whitelist
+ Allowlist
@@ -47,10 +47,10 @@
- Whitelisted IPs and CIDR Ranges
+ Allowed IPs and CIDR Ranges
<.button phx-click="show_whitelist_form">
- <.icon name="hero-plus" class="w-4 h-4 mr-1" /> Add to Whitelist
+ <.icon name="hero-plus" class="w-4 h-4 mr-1" /> Add to Allowlist
@@ -79,7 +79,7 @@
- <.button type="submit">Add to Whitelist
+ <.button type="submit">Add to Allowlist
<.button type="button" phx-click="hide_whitelist_form">
Cancel
@@ -91,7 +91,7 @@
<%= if Enum.empty?(@whitelist) do %>
- No whitelisted IPs or CIDR ranges
+ No allowed IPs or CIDR ranges
<% else %>
<.table id="whitelist" rows={@whitelist}>
@@ -111,7 +111,7 @@