- Add sso_clients table (migration 000010) with client_id, redirect_uri, tags (JSON), enabled flag, and audit timestamps - Add SSOClient model struct and audit events - Implement DB CRUD with 10 unit tests - Add REST API: GET/POST/PATCH/DELETE /v1/sso/clients (policy-gated) - Add gRPC SSOClientService with 5 RPCs (admin-only) - Add mciasctl sso list/create/get/update/delete commands - Add web UI admin page at /sso-clients with HTMX create/toggle/delete - Migrate handleSSOAuthorize and handleSSOTokenExchange to use DB - Remove SSOConfig, SSOClient struct, lookup methods from config - Simplify: client_id = service_name for policy evaluation Security: - SSO client CRUD is admin-only (policy-gated REST, requireAdmin gRPC) - redirect_uri must use https:// (validated at DB layer) - Disabled clients are rejected at both authorize and token exchange - All mutations write audit events Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
38 lines
1.4 KiB
HTML
38 lines
1.4 KiB
HTML
{{define "base"}}<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width,initial-scale=1">
|
|
<title>{{block "title" .}}MCIAS{{end}}</title>
|
|
<link rel="stylesheet" href="/static/style.css">
|
|
</head>
|
|
<body hx-headers='{"X-CSRF-Token": "{{.CSRFToken}}"}'>
|
|
<nav>
|
|
<div class="nav-inner">
|
|
<span class="nav-brand">MCIAS</span>
|
|
<ul class="nav-links">
|
|
<li><a href="/dashboard">Dashboard</a></li>
|
|
{{if .IsAdmin}}<li><a href="/accounts">Accounts</a></li>
|
|
<li><a href="/audit">Audit</a></li>
|
|
<li><a href="/policies">Policies</a></li>
|
|
<li><a href="/sso-clients">SSO Clients</a></li>
|
|
<li><a href="/pgcreds">PG Creds</a></li>{{else}}<li><a href="/service-accounts">Service Accounts</a></li>{{end}}
|
|
{{if .ActorName}}<li><a href="/profile">{{.ActorName}}</a></li>{{end}}
|
|
<li><form method="POST" action="/logout" style="margin:0"><button class="btn btn-sm btn-secondary" type="submit">Logout</button></form></li>
|
|
</ul>
|
|
</div>
|
|
</nav>
|
|
<main>
|
|
<div class="container">
|
|
<div id="htmx-error-banner" role="alert" style="display:none"></div>
|
|
{{if .Error}}<div class="alert alert-error" role="alert">{{.Error}}</div>{{end}}
|
|
{{if .Flash}}<div class="alert alert-success" role="status">{{.Flash}}</div>{{end}}
|
|
{{block "content" .}}{{end}}
|
|
</div>
|
|
</main>
|
|
<script src="/static/htmx.min.js"></script>
|
|
<script src="/static/mcias.js"></script>
|
|
</body>
|
|
</html>
|
|
{{end}}
|