Send OpsProof visitors to sign in
Homelab Main / validate (push) Has been cancelled Details
Homelab Main / running-update (push) Has been cancelled Details
Homelab Main / debian-ops (push) Has been cancelled Details

This commit is contained in:
juvenal.diaz 2026-12-05 08:32:46 -06:00
parent 822adb76e0
commit 9b3bdc7a12
6 changed files with 12 additions and 14 deletions

View File

@ -108,9 +108,10 @@ as a successful repair.
sanitized fixture. It does not construct a Jeannie client and has no approval
or execution controls. The canonical application URL is
`https://opsproof.lab2025.duckdns.org/`; unauthenticated root requests redirect
to the fixture. The OCI edge publishes only the fixture, build assets, and the
explicit Dex/operator route families. Incident data and mutations still require
both a valid Dex session and current operator allowlist membership.
to the sign-in page, while `/demo` remains the explicit public fixture. The OCI
edge publishes only the fixture, build assets, and the explicit Dex/operator
route families. Incident data and mutations still require both a valid Dex
session and current operator allowlist membership.
## Security boundary

View File

@ -23,7 +23,7 @@ type overview struct {
func Show(request *web.Request) *web.Response {
if models.CurrentUser(request) == nil {
return web.Redirect("/demo")
return web.Redirect("/login")
}
status := overview{
Message: "Jeannie status is temporarily unavailable.",

View File

@ -13,7 +13,7 @@ func TestPublicDemoUsesSanitizedFixtureWithoutAuthentication(t *testing.T) {
"OPSPROOF_JEANNIE_URL": "http://127.0.0.1:1",
"OPSPROOF_JEANNIE_TOKEN": "must-not-be-used",
}))
client.WithoutRedirects().Get("/").AssertRedirect("/demo")
client.WithoutRedirects().Get("/").AssertRedirect("/login")
client.Get("/demo").AssertOK().AssertInertia("Demo").
AssertProp("demo.scope", "opi5").
AssertProp("demo.target", "k3s-storage").

View File

@ -8,7 +8,5 @@ import (
func TestTheWelcomePageRenders(t *testing.T) {
client := tests.New(t)
client.Get("/").AssertOK().AssertInertia("Demo").
AssertProp("demo.target", "k3s-storage").
AssertProp("demo.outcome", "validated")
client.WithoutRedirects().Get("/").AssertRedirect("/login")
}

View File

@ -85,9 +85,9 @@ confirmed by deterministic validation.
outcome rather than inferring success from the execution status alone.
- Keep the unauthenticated portfolio route fixture-only. The OCI edge proxies
`/demo`, `/build/`, and explicit login/operator route families. Root redirects
anonymous users to the fixture; live evidence and mutations remain behind
Dex authentication and the server-side operator allowlist. Unknown routes
return 404.
anonymous users to sign-in and `/demo` remains an explicit public fixture;
live evidence and mutations remain behind Dex authentication and the
server-side operator allowlist. Unknown routes return 404.
## Why not Laravel Rust now?

View File

@ -233,14 +233,13 @@ class OpsProofPipelineTests(unittest.TestCase):
ROOT / "apps/opsproof/overlay/handlers/welcome/welcome.go"
).read_text(encoding="utf-8")
self.assertIn("models.CurrentUser(request) == nil", welcome)
self.assertIn('web.Redirect("/demo")', welcome)
self.assertIn('web.Redirect("/login")', welcome)
welcome_test = (
ROOT / "apps/opsproof/overlay/tests/feature/welcome_test.go"
).read_text(encoding="utf-8")
self.assertIn("TestTheWelcomePageRenders", welcome_test)
self.assertIn('AssertInertia("Demo")', welcome_test)
self.assertIn('AssertProp("demo.target", "k3s-storage")', welcome_test)
self.assertIn('AssertRedirect("/login")', welcome_test)
if __name__ == "__main__":