2017-09-03 20:22:09 +07:00
|
|
|
<!DOCTYPE>
|
|
|
|
<html>
|
|
|
|
|
|
|
|
<head>
|
|
|
|
<title>Home page</title>
|
|
|
|
<link rel="icon" href="/icon.png" type="image/png" />
|
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
|
|
|
<h1>Access the secret</h1>
|
2019-11-30 23:49:52 +07:00
|
|
|
<span style="font-size: 1.2em; color: red">You need to log in to access the secret!</span><br /><br /> Try to access
|
|
|
|
it using
|
|
|
|
one of the following links to test access control powered by Authelia.<br />
|
2017-09-03 20:22:09 +07:00
|
|
|
<ul>
|
|
|
|
<li>
|
2019-03-25 01:28:32 +07:00
|
|
|
public.example.com <a href="https://public.example.com:8080/"> /</a>
|
2017-09-03 20:22:09 +07:00
|
|
|
</li>
|
|
|
|
<li>
|
2019-03-25 01:28:32 +07:00
|
|
|
secure.example.com <a href="https://secure.example.com:8080/secret.html"> / secret.html</a>
|
2019-03-04 05:51:52 +07:00
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
singlefactor.example.com <a href="https://singlefactor.example.com:8080/secret.html"> / secret.html</a>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
dev.example.com
|
2017-09-03 20:22:09 +07:00
|
|
|
<ul>
|
|
|
|
<li>Groups
|
|
|
|
<ul>
|
|
|
|
<li>
|
2017-11-03 03:34:07 +07:00
|
|
|
<a href="https://dev.example.com:8080/groups/admin/secret.html"> / groups / admins / secret.html</a>
|
2017-09-03 20:22:09 +07:00
|
|
|
</li>
|
|
|
|
<li>
|
2017-11-03 03:34:07 +07:00
|
|
|
<a href="https://dev.example.com:8080/groups/dev/secret.html"> / groups / dev / secret.html</a>
|
2017-09-03 20:22:09 +07:00
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
<li>Users
|
|
|
|
<ul>
|
|
|
|
<li>
|
2017-11-03 03:34:07 +07:00
|
|
|
<a href="https://dev.example.com:8080/users/john/secret.html"> / users / john / secret.html</a>
|
2017-09-03 20:22:09 +07:00
|
|
|
</li>
|
|
|
|
<li>
|
2017-11-03 03:34:07 +07:00
|
|
|
<a href="https://dev.example.com:8080/users/harry/secret.html"> / users / harry / secret.html</a>
|
2017-09-03 20:22:09 +07:00
|
|
|
</li>
|
|
|
|
<li>
|
2017-11-03 03:34:07 +07:00
|
|
|
<a href="https://dev.example.com:8080/users/bob/secret.html"> / users / bob / secret.html</a>
|
2017-09-03 20:22:09 +07:00
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
<li>
|
2017-11-03 03:34:07 +07:00
|
|
|
admin.example.com <a href="https://admin.example.com:8080/secret.html"> / secret.html</a>
|
2017-09-03 20:22:09 +07:00
|
|
|
</li>
|
|
|
|
<li>
|
2017-11-03 03:34:07 +07:00
|
|
|
mx1.main.example.com <a href="https://mx1.mail.example.com:8080/secret.html"> / secret.html</a>
|
2017-09-03 20:22:09 +07:00
|
|
|
</li>
|
|
|
|
<li>
|
2017-11-03 03:34:07 +07:00
|
|
|
mx2.main.example.com <a href="https://mx2.mail.example.com:8080/secret.html"> / secret.html</a>
|
2017-09-03 20:22:09 +07:00
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
2019-11-30 23:49:52 +07:00
|
|
|
You can also log off by visiting the following <a
|
|
|
|
href="https://login.example.com:8080/logout?rd=https://home.example.com:8080/">link</a>.
|
2017-09-03 20:22:09 +07:00
|
|
|
|
|
|
|
<h1>List of users</h1>
|
2019-11-30 23:49:52 +07:00
|
|
|
Here is the list of credentials you can log in with to test access control.<br />
|
|
|
|
<br /> Once first factor is passed, you will need to follow the links to register a secret for the second
|
|
|
|
factor.<br /> Authelia
|
|
|
|
will send you a fictituous email in a <strong>fake webmail</strong> at <a
|
|
|
|
href="http://localhost:8085">http://localhost:8085</a>.<br />
|
2017-10-18 05:48:57 +07:00
|
|
|
It will provide you with the link to complete the registration allowing you to authenticate with 2-factor.
|
2017-09-03 20:22:09 +07:00
|
|
|
|
|
|
|
<ul>
|
|
|
|
<li><strong>john / password</strong>: belongs to <em>admin</em> and <em>dev</em> groups.</li>
|
|
|
|
<li><strong>bob / password</strong>: belongs to <em>dev</em> group only.</li>
|
|
|
|
<li><strong>harry / password</strong>: does not belong to any group.</li>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
<h1>Access control rules</h1>
|
2017-09-25 04:19:03 +07:00
|
|
|
<p></p>These rules are extracted from the configuration file
|
2019-12-24 09:14:52 +07:00
|
|
|
<a href="https://github.com/authelia/authelia/blob/master/config.template.yml">config.template.yml</a>.</p>
|
2017-09-03 20:22:09 +07:00
|
|
|
<pre id="rules" style="border: 1px grey solid; padding: 20px; display: inline-block;">
|
2019-11-03 19:07:02 +07:00
|
|
|
default_policy: deny
|
|
|
|
|
|
|
|
rules:
|
|
|
|
# Rules applied to everyone
|
|
|
|
- domain: public.example.com
|
|
|
|
policy: two_factor
|
|
|
|
- domain: singlefactor.example.com
|
|
|
|
policy: one_factor
|
|
|
|
|
2019-11-30 23:49:52 +07:00
|
|
|
# Rules applied to 'admins' group
|
2019-11-03 19:07:02 +07:00
|
|
|
- domain: 'mx2.mail.example.com'
|
2019-12-04 14:46:49 +07:00
|
|
|
subject: 'group:admins'
|
2019-11-03 19:07:02 +07:00
|
|
|
policy: deny
|
|
|
|
- domain: '*.example.com'
|
2019-12-04 14:46:49 +07:00
|
|
|
subject: 'group:admins'
|
2019-11-03 19:07:02 +07:00
|
|
|
policy: two_factor
|
|
|
|
|
|
|
|
# Rules applied to 'dev' group
|
|
|
|
- domain: dev.example.com
|
|
|
|
resources:
|
|
|
|
- '^/groups/dev/.*$'
|
|
|
|
subject: 'group:dev'
|
|
|
|
policy: two_factor
|
|
|
|
|
|
|
|
# Rules applied to user 'john'
|
|
|
|
- domain: dev.example.com
|
|
|
|
resources:
|
|
|
|
- '^/users/john/.*$'
|
|
|
|
subject: 'user:john'
|
|
|
|
policy: two_factor
|
|
|
|
|
|
|
|
|
|
|
|
# Rules applied to user 'harry'
|
|
|
|
- domain: dev.example.com
|
|
|
|
resources:
|
|
|
|
- '^/users/harry/.*$'
|
|
|
|
subject: 'user:harry'
|
|
|
|
policy: two_factor
|
|
|
|
|
|
|
|
# Rules applied to user 'bob'
|
|
|
|
- domain: '*.mail.example.com'
|
|
|
|
subject: 'user:bob'
|
|
|
|
policy: two_factor
|
|
|
|
- domain: 'dev.example.com'
|
|
|
|
resources:
|
|
|
|
- '^/users/bob/.*$'
|
|
|
|
subject: 'user:bob'
|
|
|
|
policy: two_factor
|
2019-03-04 05:51:52 +07:00
|
|
|
</pre>
|
2017-09-03 20:22:09 +07:00
|
|
|
</body>
|
2017-09-25 04:19:03 +07:00
|
|
|
|
2019-11-30 23:49:52 +07:00
|
|
|
</html>
|