OXYGENHUB
# c8df33a6829f oxygenhub / templates / trust.html
4.1 KiB · HTML · last changed Pin oxygen main: scoped delegates; the hub needs changes and refs 1 month ago source blame history raw
d23464c0 Andy McCall ↶ 1
{% extends "base.html" %}
2
{% import "repo_tabs.html" as m %}
3
{% block title %}Trust · {{ repo.owner }}/{{ repo.name }}{% endblock %}
4
{% block bodyattrs %} data-repo="{{ repo.url }}"{% endblock %}
5
{% block tabs %}{% call m::tabs(repo, "trust") %}{% endblock %}
6
{% block content %}
7
<div class="head"><h1>Trust <small>who may update what, and what has been verified</small></h1></div>
8
{% if let Some(p) = t.policy %}
9
<section class="panel">
10
  <h2>Policy serial {{ p.serial }} {% if p.expired %}<span class="tag bad">expired {{ p.expires_ms|when }}</span>{% else if p.expires_ms > 0 %}<span class="tag">expires {{ p.expires_ms|when }}</span>{% endif %} <span class="mute small">{{ p.signatures|plural("signature", "signatures") }}, {{ p.history|plural("version", "versions") }}</span></h2>
11
  <h3>Roots <span class="mute small">threshold {{ p.root_threshold }}</span></h3>
12
  <ul class="plain">{% for k in p.roots %}<li><span class="sig sig-valid">◆</span> {% if k.name.is_empty() %}<code>{{ k.short }}</code>{% else %}{{ k.name }} <span class="mute">{{ k.email }}</span> <code class="mute">{{ k.short }}</code>{% endif %}</li>{% endfor %}</ul>
13
  <h3>Rules</h3>
14
  <div class="table"><table>
15
  <tr><th>Pattern</th><th>Keys</th><th>Threshold</th><th>Require</th><th>Conflicts</th></tr>
16
  {% for r in p.rules %}<tr><td class="px">{{ r.pattern }}</td><td>{% for k in r.keys %}{% if k.name.is_empty() %}<code>{{ k.short }}</code>{% else %}{{ k.name }}{% endif %}{% if !loop.last %}, {% endif %}{% endfor %}</td><td>{{ r.threshold }}</td><td>{{ r.require }}</td><td>{% if r.allow_conflicts %}allowed{% else %}refused{% endif %}</td></tr>{% endfor %}
17
  </table></div>
18
  {% if !p.revoked.is_empty() %}<h3>Revoked</h3><ul class="plain">{% for k in p.revoked %}<li><span class="sig sig-revoked">⊘</span> {% if k.name.is_empty() %}<code>{{ k.short }}</code>{% else %}{{ k.name }} <code class="mute">{{ k.short }}</code>{% endif %}</li>{% endfor %}</ul>{% endif %}
19
</section>
20
{% else %}
21
<div class="strip warn">No trust policy: every reference update from anyone who may push is accepted. Create one from a client with <code>oxy policy init</code> and push.</div>
22
{% endif %}
23
<section class="panel">
24
  <h2>Verification <span class="mute small">{{ t.verification.total|plural("change", "changes") }}</span></h2>
25
  <p>
26
    <span class="sig sig-valid">✔</span> {{ t.verification.signed }} signed ·
27
    <span class="sig sig-valid">◈</span> {{ t.verification.sealed }} sealed ·
28
    <span class="sig sig-unsigned">○</span> {{ t.verification.unsigned }} unsigned
29
    {% if t.verification.revoked > 0 %} · <span class="sig sig-revoked">⊘</span> {{ t.verification.revoked }} by revoked keys{% endif %}
30
    {% if !t.verification.invalid.is_empty() %} · <span class="sig sig-invalid">✘</span> <strong>{{ t.verification.invalid.len() }} INVALID</strong>{% endif %}
31
  </p>
32
  {% if !t.verification.invalid.is_empty() %}<ul class="plain">{% for (h, why) in t.verification.invalid %}<li><a class="chip" href="{{ repo.url }}/change/{{ h }}">{{ h|short }}</a> {{ why }}</li>{% endfor %}</ul>{% endif %}
33
</section>
34
<section class="panel">
8f3d2ccf Andy McCall ↶ 35
  <h2>Connecting</h2>
36
  <p class="small">Clone with <code>oxy clone {{ repo.clone_url }}</code>. If this hub uses a self-signed certificate, save <a href="/.well-known/oxyhub-ca.pem">its certificate</a> and point <code>oxy</code> at it with <code>oxy config remote.&lt;name&gt;.ca &lt;file&gt;</code> or <code>OXY_CA</code>.</p>
37
</section>
38
<section class="panel">
d23464c0 Andy McCall ↶ 39
  <h2>Hub delegate key</h2>
b43a9ab0 Andy McCall ↶ 40
  <p class="small">Changes the hub makes for you in the browser (later milestones) are signed with this key on your behalf, once you have run <code>oxy identity delegate add hub.identity --scope changes,refs</code> with the file from <a href="/.well-known/oxyhub-key">/.well-known/oxyhub-key</a>.</p>
d23464c0 Andy McCall ↶ 41
  <p><code class="full">{{ t.hub_key }}</code></p>
42
  {% if t.hub_delegated_by.is_empty() %}<p class="mute small">Nobody in this repository's policy has delegated to it.</p>{% else %}<p class="small">Delegated by: {% for k in t.hub_delegated_by %}{{ k.name }}{% if !loop.last %}, {% endif %}{% endfor %}</p>{% endif %}
43
</section>
44
{% endblock %}