Send OpsProof visitors to sign in
This commit is contained in:
parent
822adb76e0
commit
9b3bdc7a12
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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.",
|
||||
|
|
|
|||
|
|
@ -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").
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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?
|
||||
|
||||
|
|
|
|||
|
|
@ -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__":
|
||||
|
|
|
|||
Loading…
Reference in New Issue