carlos / platform Public

Clone
git clone https://amadan.net/carlos/platform

Plain git — no account needed to clone.

Download

Download this file

1{{define "settings"}}{{template "top" .}}
2{{if .Flash}}<p class="banner">{{.Flash}}</p>{{end}}
3{{if .FlashErr}}<p class="banner error">{{.FlashErr}}</p>{{end}}
4<div class="pagehead">
5 <p class="eyebrow">{{.Address}}</p>
6 <h1>Your settings</h1>
7 <p class="lede">Yours across every account — not any one account's.</p>
8</div>
9<h2>Command-line access</h2>
10<p class="small">Every terminal that can act as {{.Address}}.</p>
11{{if .Tokens}}
12<div class="tablewrap">
13<table>
14 <tr><th>Terminal</th><th>From</th><th>Signed in</th><th>Last used</th><th>Expires</th><th></th></tr>
15 {{range .Tokens}}
16 <tr>
17 <td>{{if .IsService}}{{.Name}} <span class="small">(service credential{{if .App}} · {{.App}}{{end}})</span>{{else}}{{emptyOrDash .Label}}{{if .IsApp}} <span class="small">(app token{{if .App}} · {{.App}}{{end}})</span>{{end}}{{end}}</td>
18 <td>{{emptyOrDash .RemoteAddr}}</td>
19 <td>{{fmtTime .CreatedAt}}</td>
20 <td>{{if .LastUsed.IsZero}}—{{else}}{{fmtTime .LastUsed}}{{end}}</td>
21 <td>{{if .NeverExpires}}Never{{else}}{{fmtTime .ExpiresAt}}{{end}}</td>
22 <td>
23 {{if .IsService}}
24 {{$sqid := index $.ServiceAccounts .AccountID}}
25 {{if $sqid}}<span class="small">lives on account <a href="/a/{{$sqid}}/settings">{{$sqid}}</a> — manage there</span>
26 {{else}}<span class="small">managed on its own account</span>{{end}}
27 {{else}}
28 <form method="post" action="/auth/cli/tokens/revoke">
29 <input type="hidden" name="csrf" value="{{$.CSRF}}">
30 <input type="hidden" name="id" value="{{.ID}}">
31 <button class="linkish danger" type="submit">Revoke</button>
32 </form>
33 {{end}}
34 </td>
35 </tr>
36 {{end}}
37</table>
38</div>
39<p class="small">Revoking is immediate: that terminal's next command fails and
40it has to log in again. Terminal tokens expire on their own after {{.Days}}
41days; an app token never expires — it is a credential you minted for an app,
42and revoking it here is how it is rotated. A SERVICE credential is listed here
43because you minted it, but it belongs to its account and is rotated and
44revoked from that account's settings page, not this one. The name and the
45address are what the machine asking told us — if a row here is not a terminal
46you recognise, revoke it.</p>
47{{else}}
48<p>No terminals are signed in as you.</p>
49<pre><code>carlos auth login --console {{.Console}}</code></pre>
50<p class="small">Run that on the machine you want to deploy from. It prints a
51code; you approve it here.</p>
52{{end}}
53{{template "bottom" .}}{{end}}
54