Settings → Sign-in: roles follow the Core's groups, with a prefix. <prefix>-admins makes an admin, <prefix>-<module> edits a module, <prefix>-<module>-view reads it. Set at each sign-in with the Core; someone in a group joins; the owner never changes; someone in none of them keeps the access set here. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
47 lines
3.9 KiB
HTML
47 lines
3.9 KiB
HTML
{{define "content"}}{{template "settings-start" .}}{{with .Data}}
|
|
<h2>Sign-in</h2>
|
|
<p class="lede">People can sign in with their Federated Core account, through the Core's Authelia (OpenID Connect), as well as, or instead of, a password here.</p>
|
|
{{with .Problem}}<p class="error" role="alert">{{.}}</p>{{end}}
|
|
{{with .Tested}}<p class="flash" role="status">{{.}}</p>{{end}}
|
|
{{if not .Core}}
|
|
<section class="card"><p>First enter the Core's domain under <a href="/settings/core">Core & Hermes</a>.</p></section>
|
|
{{else}}
|
|
<section class="card">
|
|
<h3>1. The client</h3>
|
|
<dl class="facts">
|
|
<dt>Issuer</dt><dd><code>{{.Issuer}}</code></dd>
|
|
<dt>Redirect address</dt><dd><code>{{.Callback}}</code></dd>
|
|
</dl>
|
|
<form method="post" action="/settings/signin/secret" class="row wrap">
|
|
<label class="small">Client ID <input name="client_id" value="{{.C.ClientID}}" size="16"></label>
|
|
<button type="submit" class="secondary" {{if .C.Hash}}data-confirm="Make a new secret? The entry on the Core must then be changed too."{{end}}>{{if .C.Hash}}Make a new secret{{else}}Make the client's secret{{end}}</button>
|
|
</form>
|
|
<p class="help">Supermarket keeps the secret, encrypted; only its hash goes to the Core.</p>
|
|
</section>
|
|
{{with .Block}}
|
|
<section class="card" id="block">
|
|
<h3>2. On the Core</h3>
|
|
<p>The Core's admin adds this entry under <code>identity_providers.oidc.clients</code> in Authelia's <code>idproviders.yml</code>, beside the other services', then restarts Authelia:</p>
|
|
<pre id="client-block">{{.}}</pre>
|
|
<button type="button" class="secondary small" data-copy="client-block">Copy</button>
|
|
</section>
|
|
<section class="card">
|
|
<h3>3. Test, and turn it on</h3>
|
|
<form method="post" action="/settings/signin/test"><button type="submit" class="secondary">Test</button> <span class="help">Reads Authelia's discovery document.</span></form>
|
|
<form method="post" action="/settings/signin/save">
|
|
<label class="small">Issuer, if not <code>https://authelia.{{$.Data.Domain}}</code> <input name="issuer" value="{{$.Data.C.Issuer}}" placeholder="https://authelia.{{$.Data.Domain}}"></label>
|
|
<label class="check"><input type="checkbox" name="enabled" {{if $.Data.C.Enabled}}checked{{end}}> <span>People may sign in with the Core</span></label>
|
|
<label class="check"><input type="checkbox" name="require_core" {{if $.Data.C.RequireCore}}checked{{end}}> <span>Only with the Core: passwords are off, except the owner's (a way in if the Core is down)</span></label>
|
|
<label class="check"><input type="checkbox" name="auto_join" {{if $.Data.C.AutoJoin}}checked{{end}}> <span>Anyone with an address at <strong>{{$.Data.Domain}}</strong> may join, as a member with these modules:</span></label>
|
|
{{template "access-fields" (dict "Role" "member" "Modules" $.Data.C.AutoModules "Grants" $.Data.Grants)}}
|
|
<p class="help">Otherwise only people invited may sign in: matched by their email the first time, then by their account at the Core.</p>
|
|
<label class="check"><input type="checkbox" name="groups" {{if $.Data.C.Groups}}checked{{end}}> <span>Roles follow the Core's groups</span></label>
|
|
<label class="small">Groups' prefix <input name="group_prefix" value="{{$.Data.C.GroupPrefix}}" placeholder="supermarket" size="16"></label>
|
|
<p class="help">In Authelia's users, <code>{{$.Data.Prefix}}-admins</code> makes an admin; <code>{{$.Data.Prefix}}-<em>module</em></code> lets someone edit a module, and <code>{{$.Data.Prefix}}-<em>module</em>-view</code> read it ({{range $i, $g := $.Data.Grants}}{{if $i}}, {{end}}<code>{{$g.ID}}</code>{{end}}). Each time someone signs in with the Core, their role and modules are set from their groups, and someone not yet in the team who is in one joins (if there's a seat free). The owner is never changed; someone in none of these groups keeps the access set here.</p>
|
|
<button type="submit">Save</button>
|
|
</form>
|
|
</section>
|
|
{{end}}
|
|
{{end}}
|
|
{{end}}{{template "settings-end"}}{{end}}
|