aws-services-cost-optimization / secrets-manager.html
waw3's picture
design the Secrets Manager section next
f746326 verified
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>OverWatch - Secrets Manager</title>
<link rel="icon" type="image/x-icon" href="/static/favicon.ico">
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vue@3.2.47/dist/vue.global.min.js"></script>
<style>
.sidebar-item.active {
border-left: 4px solid #4f46e5;
background-color: rgba(79, 70, 229, 0.1);
}
.secret-rotation-enabled { color: #10b981; }
.secret-rotation-disabled { color: #6b7280; }
.secret-rotation-pending { color: #f59e0b; }
.secret-status-valid { background-color: #dcfce7; color: #166534; }
.secret-status-expired { background-color: #fee2e2; color: #991b1b; }
.secret-status-warning { background-color: #fef3c7; color: #92400e; }
</style>
</head>
<body class="bg-gray-50 text-gray-800 dark:bg-gray-900 dark:text-gray-200">
<div id="app" class="flex h-screen overflow-hidden">
<!-- Sidebar -->
<div class="hidden md:flex md:flex-shrink-0">
<div class="flex flex-col w-64 border-r border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800">
<div class="flex items-center h-16 px-4 border-b border-gray-200 dark:border-gray-700">
<div class="flex items-center">
<i data-feather="shield" class="text-indigo-600 dark:text-indigo-400"></i>
<span class="ml-2 text-xl font-bold text-indigo-600 dark:text-indigo-400">OverWatch</span>
</div>
</div>
<div class="flex flex-col flex-grow overflow-y-auto">
<nav class="flex-1 px-2 py-4 space-y-1">
<a href="index.html" class="flex items-center px-2 py-2 text-sm font-medium rounded-md group sidebar-item">
<i data-feather="activity" class="mr-3"></i>
Dashboard
</a>
<a href="ecs-clusters.html" class="flex items-center px-2 py-2 text-sm font-medium rounded-md group sidebar-item">
<i data-feather="server" class="mr-3"></i>
ECS Clusters
</a>
<a href="rds-instances.html" class="flex items-center px-2 py-2 text-sm font-medium rounded-md group sidebar-item">
<i data-feather="database" class="mr-3"></i>
RDS Instances
</a>
<a href="sqs-queues.html" class="flex items-center px-2 py-2 text-sm font-medium rounded-md group sidebar-item">
<i data-feather="list" class="mr-3"></i>
SQS Queues
</a>
<a href="ec2-instances.html" class="flex items-center px-2 py-2 text-sm font-medium rounded-md group sidebar-item">
<i data-feather="monitor" class="mr-3"></i>
EC2 Instances
</a>
<a href="alarms.html" class="flex items-center px-2 py-2 text-sm font-medium rounded-md group sidebar-item">
<i data-feather="alert-circle" class="mr-3"></i>
Alarms
</a>
<a href="cloudwatch-logs.html" class="flex items-center px-2 py-2 text-sm font-medium rounded-md group sidebar-item">
<i data-feather="file-text" class="mr-3"></i>
CloudWatch Logs
</a>
<a href="loadbalancers.html" class="flex items-center px-2 py-2 text-sm font-medium rounded-md group sidebar-item">
<i data-feather="loader" class="mr-3"></i>
Load Balancers
</a>
<a href="waf-shield.html" class="flex items-center px-2 py-2 text-sm font-medium rounded-md group sidebar-item">
<i data-feather="shield" class="mr-3"></i>
WAF & Shield
</a>
<a href="secrets-manager.html" class="flex items-center px-2 py-2 text-sm font-medium rounded-md group sidebar-item active">
<i data-feather="key" class="mr-3"></i>
Secrets Manager
</a>
</nav>
</div>
<div class="p-4 border-t border-gray-200 dark:border-gray-700">
<div class="flex items-center">
<img class="w-8 h-8 rounded-full" src="http://static.photos/people/200x200/42" alt="">
<div class="ml-3">
<p class="text-sm font-medium">Admin User</p>
<p class="text-xs text-gray-500 dark:text-gray-400">admin@example.com</p>
</div>
</div>
</div>
</div>
</div>
<!-- Main Content -->
<div class="flex flex-col flex-1 overflow-hidden">
<!-- Top Navigation -->
<div class="flex items-center justify-between h-16 px-4 border-b border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800">
<div class="flex items-center">
<button class="md:hidden">
<i data-feather="menu" class="w-6 h-6"></i>
</button>
<h1 class="ml-2 text-lg font-semibold">Secrets Manager</h1>
</div>
<div class="flex items-center space-x-4">
<div class="relative">
<i data-feather="search" class="absolute top-2.5 left-3 text-gray-400"></i>
<input type="text" placeholder="Search secrets..." class="pl-10 pr-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 dark:bg-gray-700 dark:border-gray-600">
</div>
<button class="px-3 py-1 text-sm rounded bg-green-100 dark:bg-green-900 text-green-800 dark:text-green-200 flex items-center">
<i data-feather="plus" class="w-4 h-4 mr-1"></i>
Create Secret
</button>
</div>
</div>
<!-- Main Content Area -->
<div class="flex-1 overflow-auto p-4">
<!-- Stats Overview -->
<div class="grid grid-cols-1 md:grid-cols-4 gap-4 mb-6">
<div class="bg-white dark:bg-gray-800 rounded-lg shadow p-4">
<div class="flex items-center">
<div class="p-3 rounded-full bg-indigo-100 dark:bg-indigo-900">
<i data-feather="key" class="text-indigo-600 dark:text-indigo-300"></i>
</div>
<div class="ml-4">
<p class="text-sm font-medium text-gray-500 dark:text-gray-400">Total Secrets</p>
<p class="text-2xl font-semibold">18</p>
</div>
</div>
</div>
<div class="bg-white dark:bg-gray-800 rounded-lg shadow p-4">
<div class="flex items-center">
<div class="p-3 rounded-full bg-green-100 dark:bg-green-900">
<i data-feather="refresh-cw" class="text-green-600 dark:text-green-300"></i>
</div>
<div class="ml-4">
<p class="text-sm font-medium text-gray-500 dark:text-gray-400">Rotation Enabled</p>
<p class="text-2xl font-semibold">12</p>
</div>
</div>
</div>
<div class="bg-white dark:bg-gray-800 rounded-lg shadow p-4">
<div class="flex items-center">
<div class="p-3 rounded-full bg-yellow-100 dark:bg-yellow-900">
<i data-feather="alert-triangle" class="text-yellow-600 dark:text-yellow-300"></i>
</div>
<div class="ml-4">
<p class="text-sm font-medium text-gray-500 dark:text-gray-400">Expiring Soon</p>
<p class="text-2xl font-semibold">3</p>
</div>
</div>
</div>
<div class="bg-white dark:bg-gray-800 rounded-lg shadow p-4">
<div class="flex items-center">
<div class="p-3 rounded-full bg-red-100 dark:bg-red-900">
<i data-feather="alert-octagon" class="text-red-600 dark:text-red-300"></i>
</div>
<div class="ml-4">
<p class="text-sm font-medium text-gray-500 dark:text-gray-400">Expired</p>
<p class="text-2xl font-semibold">1</p>
</div>
</div>
</div>
</div>
<!-- Secrets List -->
<div class="bg-white dark:bg-gray-800 rounded-lg shadow overflow-hidden mb-6">
<div class="px-4 py-5 sm:px-6 border-b border-gray-200 dark:border-gray-700">
<div class="flex items-center justify-between">
<h2 class="text-lg font-semibold">Secrets</h2>
<div class="flex space-x-2">
<button class="px-3 py-1 text-xs rounded bg-indigo-100 dark:bg-indigo-900 text-indigo-800 dark:text-indigo-200">
<i data-feather="filter" class="w-3 h-3 mr-1"></i>
Filter
</button>
<button class="px-3 py-1 text-xs rounded bg-gray-100 dark:bg-gray-700">
<i data-feather="download" class="w-3 h-3 mr-1"></i>
Export
</button>
</div>
</div>
</div>
<div class="divide-y divide-gray-200 dark:divide-gray-700">
<!-- Secret 1 -->
<div class="px-4 py-4 hover:bg-gray-50 dark:hover:bg-gray-700">
<div class="flex items-center justify-between">
<div class="flex items-center space-x-4">
<div class="p-2 rounded-full bg-indigo-100 dark:bg-indigo-900">
<i data-feather="key" class="text-indigo-600 dark:text-indigo-300"></i>
</div>
<div>
<div class="flex items-center">
<h3 class="font-medium">prod/database/credentials</h3>
<span class="ml-2 text-xs px-2 py-0.5 rounded-full secret-status-valid">Valid</span>
</div>
<p class="text-sm text-gray-500 dark:text-gray-400">ARN: arn:aws:secretsmanager:us-east-1:123456789012:secret:prod/database/credentials-abc123</p>
<div class="mt-2 flex items-center text-xs text-gray-500 dark:text-gray-400 space-x-4">
<span><i data-feather="calendar" class="w-3 h-3 mr-1 inline"></i> Expires: 2023-07-15</span>
<span class="secret-rotation-enabled"><i data-feather="refresh-cw" class="w-3 h-3 mr-1 inline"></i> Rotation: Enabled</span>
</div>
</div>
</div>
<div class="flex items-center space-x-6">
<div class="text-center">
<p class="text-sm text-gray-500 dark:text-gray-400">Type</p>
<p class="font-medium">RDS Credentials</p>
</div>
<div class="text-center">
<p class="text-sm text-gray-500 dark:text-gray-400">Last Accessed</p>
<p class="font-medium">2 hours ago</p>
</div>
<div class="text-center">
<p class="text-sm text-gray-500 dark:text-gray-400">Last Rotated</p>
<p class="font-medium">30 days ago</p>
</div>
<button class="text-indigo-600 dark:text-indigo-400 hover:text-indigo-900 dark:hover:text-indigo-300">
<i data-feather="chevron-right"></i>
</button>
</div>
</div>
</div>
<!-- Secret 2 -->
<div class="px-4 py-4 hover:bg-gray-50 dark:hover:bg-gray-700">
<div class="flex items-center justify-between">
<div class="flex items-center space-x-4">
<div class="p-2 rounded-full bg-yellow-100 dark:bg-yellow-900">
<i data-feather="key" class="text-yellow-600 dark:text-yellow-300"></i>
</div>
<div>
<div class="flex items-center">
<h3 class="font-medium">prod/api/keys</h3>
<span class="ml-2 text-xs px-2 py-0.5 rounded-full secret-status-warning">Expiring Soon</span>
</div>
<p class="text-sm text-gray-500 dark:text-gray-400">ARN: arn:aws:secretsmanager:us-east-1:123456789012:secret:prod/api/keys-def456</p>
<div class="mt-2 flex items-center text-xs text-gray-500 dark:text-gray-400 space-x-4">
<span><i data-feather="calendar" class="w-3 h-3 mr-1 inline"></i> Expires: 2023-06-01</span>
<span class="secret-rotation-disabled"><i data-feather="refresh-cw" class="w-3 h-3 mr-1 inline"></i> Rotation: Disabled</span>
</div>
</div>
</div>
<div class="flex items-center space-x-6">
<div class="text-center">
<p class="text-sm text-gray-500 dark:text-gray-400">Type</p>
<p class="font-medium">API Keys</p>
</div>
<div class="text-center">
<p class="text-sm text-gray-500 dark:text-gray-400">Last Accessed</p>
<p class="font-medium">1 day ago</p>
</div>
<div class="text-center">
<p class="text-sm text-gray-500 dark:text-gray-400">Last Rotated</p>
<p class="font-medium">Never</p>
</div>
<button class="text-indigo-600 dark:text-indigo-400 hover:text-indigo-900 dark:hover:text-indigo-300">
<i data-feather="chevron-right"></i>
</button>
</div>
</div>
</div>
<!-- Secret 3 -->
<div class="px-4 py-4 hover:bg-gray-50 dark:hover:bg-gray-700">
<div class="flex items-center justify-between">
<div class="flex items-center space-x-4">
<div class="p-2 rounded-full bg-red-100 dark:bg-red-900">
<i data-feather="key" class="text-red-600 dark:text-red-300"></i>
</div>
<div>
<div class="flex items-center">
<h3 class="font-medium">prod/third-party/token</h3>
<span class="ml-2 text-xs px-2 py-0.5 rounded-full secret-status-expired">Expired</span>
</div>
<p class="text-sm text-gray-500 dark:text-gray-400">ARN: arn:aws:secretsmanager:us-east-1:123456789012:secret:prod/third-party/token-ghi789</p>
<div class="mt-2 flex items-center text-xs text-gray-500 dark:text-gray-400 space-x-4">
<span><i data-feather="calendar" class="w-3 h-3 mr-1 inline"></i> Expired: 2023-05-01</span>
<span class="secret-rotation-pending"><i data-feather="refresh-cw" class="w-3 h-3 mr-1 inline"></i> Rotation: Pending</span>
</div>
</div>
</div>
<div class="flex items-center space-x-6">
<div class="text-center">
<p class="text-sm text-gray-500 dark:text-gray-400">Type</p>
<p class="font-medium">OAuth Token</p>
</div>
<div class="text-center">
<p class="text-sm text-gray-500 dark:text-gray-400">Last Accessed</p>
<p class="font-medium">1 week ago</p>
</div>
<div class="text-center">
<p class="text-sm text-gray-500 dark:text-gray-400">Last Rotated</p>
<p class="font-medium">90 days ago</p>
</div>
<button class="text-indigo-600 dark:text-indigo-400 hover:text-indigo-900 dark:hover:text-indigo-300">
<i data-feather="chevron-right"></i>
</button>
</div>
</div>
</div>
</div>
</div>
<!-- Secret Details Panel -->
<div class="grid grid-cols-1 lg:grid-cols-3 gap-6">
<!-- Secret Metadata -->
<div class="bg-white dark:bg-gray-800 rounded-lg shadow overflow-hidden">
<div class="px-4 py-5 sm:px-6 border-b border-gray-200 dark:border-gray-700">
<h3 class="text-lg font-semibold">Secret Details</h3>
</div>
<div class="p-4">
<div class="space-y-4">
<div>
<p class="text-sm font-medium text-gray-500 dark:text-gray-400">Secret Name</p>
<p class="mt-1">prod/database/credentials</p>
</div>
<div>
<p class="text-sm font-medium text-gray-500 dark:text-gray-400">ARN</p>
<p class="mt-1 text-xs">arn:aws:secretsmanager:us-east-1:123456789012:secret:prod/database/credentials-abc123</p>
</div>
<div>
<p class="text-sm font-medium text-gray-500 dark:text-gray-400">Description</p>
<p class="mt-1">Production database credentials for the web application</p>
</div>
<div>
<p class="text-sm font-medium text-gray-500 dark:text-gray-400">Created Date</p>
<p class="mt-1">2022-12-15 14:32:45 UTC</p>
</div>
<div>
<p class="text-sm font-medium text-gray-500 dark:text-gray-400">Rotation Schedule</p>
<p class="mt-1">Every 30 days</p>
</div>
<div>
<p class="text-sm font-medium text-gray-500 dark:text-gray-400">Next Rotation</p>
<p class="mt-1">2023-06-14 14:32:45 UTC</p>
</div>
</div>
</div>
</div>
<!-- Secret Value -->
<div class="bg-white dark:bg-gray-800 rounded-lg shadow overflow-hidden lg:col-span-2">
<div class="px-4 py-5 sm:px-6 border-b border-gray-200 dark:border-gray-700">
<div class="flex items-center justify-between">
<h3 class="text-lg font-semibold">Secret Value</h3>
<div class="flex space-x-2">
<button class="px-3 py-1 text-xs rounded bg-indigo-100 dark:bg-indigo-900 text-indigo-800 dark:text-indigo-200 flex items-center">
<i data-feather="copy" class="w-3 h-3 mr-1"></i>
Copy
</button>
<button class="px-3 py-1 text-xs rounded bg-green-100 dark:bg-green-900 text-green-800 dark:text-green-200 flex items-center">
<i data-feather="rotate-cw" class="w-3 h-3 mr-1"></i>
Rotate Now
</button>
</div>
</div>
</div>
<div class="p-4">
<div class="bg-gray-100 dark:bg-gray-700 p-4 rounded-lg">
<pre class="text-sm font-mono overflow-x-auto">{
"username": "prod_db_user",
"password": "P@ssw0rd!2023",
"engine": "postgres",
"host": "prod-db.123456789012.us-east-1.rds.amazonaws.com",
"port": 5432,
"dbname": "production",
"dbInstanceIdentifier": "prod-db"
}</pre>
</div>
<div class="mt-4">
<p class="text-sm text-gray-500 dark:text-gray-400">
<i data-feather="alert-triangle" class="w-4 h-4 inline mr-1 text-yellow-500 dark:text-yellow-300"></i>
This secret value is sensitive. Be careful when sharing or copying.
</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
const { createApp, ref } = Vue;
createApp({
setup() {
const selectedSecret = ref(null);
return {
selectedSecret
};
}
}).mount('#app');
document.addEventListener('DOMContentLoaded', function() {
feather.replace();
});
</script>
</body>
</html>