ZKAC/demo/static/index.html
2026-04-15 11:32:01 +02:00

34 lines
1.4 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>ZKAC demo</title>
<style>
body { font-family: system-ui, sans-serif; max-width: 42rem; margin: 2rem auto; padding: 0 1rem; line-height: 1.5; }
code { background: #f0f0f0; padding: 0.1em 0.35em; border-radius: 4px; }
pre { background: #1e1e1e; color: #eee; padding: 1rem; overflow: auto; border-radius: 6px; }
</style>
</head>
<body>
<h1>ZKAC demo</h1>
<p>
This page is served over normal HTTP. Role-based <strong>/api</strong> data is <strong>not</strong> on this port:
it is exposed only after a <strong>ZKAC session</strong> on the separate TCP port (BBS+ credential + encrypted transport).
</p>
<h2>1. Generate credentials</h2>
<pre>python setup_demo.py</pre>
<p>Creates <code>creds/</code> with issuer keys, server transport keys, and two members: <code>analyst</code> and <code>operator</code>.</p>
<h2>2. Start the server</h2>
<pre>python server.py</pre>
<p>HTTP (this page) defaults to <code>127.0.0.1:8765</code>. ZKAC TCP defaults to <code>127.0.0.1:9876</code>.</p>
<h2>3. CLI client</h2>
<pre>python client_cli.py --member creds/member_analyst.json
python client_cli.py --member creds/member_operator.json</pre>
<p>Each command runs a full handshake and requests <code>{"path":"/api"}</code>. The JSON response lists datasets allowed for that role.</p>
</body>
</html>