Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Domain server ACME client with custom Web UI. #1540

Merged
merged 65 commits into from
May 31, 2022
Merged
Show file tree
Hide file tree
Changes from 62 commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
d84a811
https://github.com/jmccl/acme-lw copy to track changes off of,
namark Nov 10, 2021
aa4a6a8
WIP rework of acme-lw library
namark Nov 18, 2021
beae9c1
Small fix in DomainServerSettingsManager.
namark Nov 18, 2021
5cbe2fb
Basic skeleton of domain server acme client.
namark Nov 18, 2021
8979c5c
Merge branch 'master' into ssl-acme-client
namark Nov 30, 2021
6764220
Fixes and improvements in acme-lw library,
namark Nov 30, 2021
674f6c6
Forgot to remove curl includes.
namark Nov 30, 2021
6096749
Continued rework of acme-lw library
namark Dec 2, 2021
3ea153f
Forward declaring domain server acme client to speed up re-compilation.
namark Dec 5, 2021
18e1741
Hosting acme http challenges on port 80
namark Dec 5, 2021
0d26f54
Removed unnecessary non-standard include in ACME library.
namark Dec 5, 2021
af9a95f
Replaced time_t with system_clock::time_point in acme library interface.
namark Dec 8, 2021
2955ada
Basic settings and functionality of the acme client.
namark Dec 8, 2021
34985d9
Using ACME client certificate configuration in WebRTC signaling server.
namark Dec 8, 2021
2f37f76
Merge branch 'master' into ssl-acme-client
namark Dec 8, 2021
e7ccd34
Fixed MSVC choking on not keyword.
namark Dec 8, 2021
b577c70
Attempt to fix unique_ptr incomplete type troubles in automated builds.
namark Dec 8, 2021
16dfa99
Giving up on forward declaring WebRTCSignalingServer.
namark Dec 8, 2021
01bda10
Merge branch 'master' into ssl-acme-client
namark Dec 9, 2021
b7d3637
Fixed missing early return in acme library.
namark Dec 12, 2021
cf63958
Made the ACME library a git submodule.
namark Dec 12, 2021
a884139
Checkout ACME submodule in github automated builds.
namark Dec 12, 2021
0105f2a
Merge branch 'master' into ssl-acme-client
namark Dec 14, 2021
0c12bc1
Merge branch 'master' into ssl-acme-client
namark Dec 17, 2021
897d475
Fixed null dereference when acme client is disabled.
namark Dec 18, 2021
aedbd37
HTTP API for checking ACME client status and uploading relevant files.
namark Dec 17, 2021
7535058
Basic html/js skeleton of ACME Client WEB UI,
namark Dec 19, 2021
999f5ff
Acme client external account binding and ZeroSSL support.
namark Dec 26, 2021
e44715c
More challenge handlers for Domain Server ACME client.
namark Dec 27, 2021
74018d0
ACME client custom web UI for domain configuration.
namark Dec 27, 2021
1d32ecb
All remaining ACME client settings in WEB UI.
namark Dec 27, 2021
5a21c8d
ACME client custom web UI file uploads.
namark Dec 28, 2021
3c2d296
ACME client web UI reset file selection after upload.
namark Dec 28, 2021
3333707
ACME client retry next day if certificate generation fails.
namark Dec 28, 2021
692343f
ACME client certificate update signal,
namark Dec 29, 2021
8267a9a
Acme client account creation errors properly set in status json.
namark Dec 29, 2021
a5c06f8
Status JSON textarea in ACME client WEB UI.
namark Dec 29, 2021
16f8ef9
Minor layout changes in ACME client web UI.
namark Dec 30, 2021
0344ada
ACME client support for IP identifiers.
namark Dec 30, 2021
d1b1f2e
Simplified ACME client and added challenge information to status json.
namark Dec 30, 2021
364cc6b
ZeroSSL REST API handling.
namark Dec 31, 2021
1659380
Another forward declaration fix.
namark Jan 1, 2022
2026e3e
Updated acme_lw submodule for ZeroSSL REST API fix.
namark Jan 1, 2022
3a50f0c
Updated amce_lw library for an attempt to fix MSVC build.
namark Jan 1, 2022
ccd997f
Another acme-lw fix for MSVC build.
namark Jan 1, 2022
abba5e7
And another acme_lw fix for MSVC.
namark Jan 1, 2022
49f533b
Multiple definition fix in acme_lw library.
namark Jan 2, 2022
bc63259
Fixed ACME client web UI authentication method dropdown
namark Jan 2, 2022
931948c
Fixed a null dereference in ACME client,
namark Jan 10, 2022
e43519a
Updated ACME submodule for a ZeroSSL REST API fix.
namark Jan 10, 2022
00fcfdb
Various coding style fixes.
namark Jan 11, 2022
3f77511
Fixed another MSVC json assignment ambiguity error in ACME library.
namark Jan 11, 2022
4dcb18c
Fixed default CA logic between acme client and webrtc server.
namark Jan 14, 2022
fd3224c
Fixed ACME client file paths not being created.
namark Jan 14, 2022
d26aadd
Merge branch 'master' into ssl-acme-client
namark Jan 14, 2022
e7fd9d9
Merge branch 'ssl-acme-client' into ssl-acme-client-part2
namark Jan 14, 2022
e40321c
Some more code formatting fixes.
namark Jan 15, 2022
8e59f7b
Updated acme-lw submodule for an improvement in ZeroSSL REST API.
namark Feb 9, 2022
8eff7df
Merge branch 'master' into ssl-acme-client-part2
namark Feb 10, 2022
4a3206e
More ZeroSSL REST API fixes in amce-lw submodule.
namark Feb 11, 2022
51d256f
Another acme library update, increasing ZeroSSL REST API timeouts.
namark Feb 12, 2022
7debbd4
Updated acme-lw submodule to point to vircadia org's fork.
namark Feb 15, 2022
ead0ade
Merge branch 'master' into ssl-acme-client-part2
namark Apr 20, 2022
5ccd144
Coding style and minor typo fixes.
namark Apr 20, 2022
13693cd
Updated some copyright statements.
namark May 18, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/master_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ jobs:
with:
submodules: false
fetch-depth: 1
- name: Checkout ACME submodule
run: git submodule update --init libraries/networking/src/acme

- name: Install dependencies
shell: bash
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/pr_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ jobs:
with:
submodules: false
fetch-depth: 1
- name: Checkout ACME submodule
run: git submodule update --init libraries/networking/src/acme

- name: Install dependencies
shell: bash
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "libraries/networking/src/acme"]
path = libraries/networking/src/acme
url = https://github.com/vircadia/acme-lw
112 changes: 112 additions & 0 deletions domain-server/resources/describe-settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,118 @@
}
]
},
{
"name": "acme",
"label": "SSL ACME Client",
"settings": [
{
"name": "enable_client",
"label": "Enable ACME client",
"help": "Enables ACME client that will manage the SSL certificates.",
"default": false,
"type": "checkbox",
"advanced": true
},
{
"name": "directory_endpoint",
"label": "ACME Directory Endpoint",
"help": "URL of the certificate issuer ACME directory endpoint.",
"default": "https://acme-v02.api.letsencrypt.org/directory",
"advanced": true
},
{
"name": "zerossl_rest_api",
"label": "ZeroSSL REST API",
"help": "Use ZeroSSL Rest API Instead of ACME protocol.",
"default": false,
"type": "checkbox",
"advanced": true
},
{
"name": "account_key_path",
"label": "Account Key",
"help": "Path to private key used to communicate with certificate issuer.",
"default": "",
"placeholder": "<Application Data Path>/acme_account_key.pem",
"advanced": true
},
{
"name": "zerossl_api_key",
"label": "ZeroSSL API Key",
"help": "API key to use for ZeroSSL REST API requests",
namark marked this conversation as resolved.
Show resolved Hide resolved
"advanced": true
},
{
"name": "eab_kid",
"label": "External Account Binding KID",
"advanced": true
},
{
"name": "eab_mac",
"label": "External Account Binding MAC",
"advanced": true
},
{
"name": "certificate_directory",
"label": "Certificate Directory",
"help": "Certificate files will be stored in this directory.",
"default": "",
"placeholder": "Application Data Path",
"advanced": true
},
{
"name": "certificate_filename",
"label": "Certificate Filename",
"help": "Certificate will be stored with this filename in Certificate Directory.",
"default": "vircadia-cert.crt",
"advanced": true
},
{
"name": "certificate_key_filename",
"label": "Certificate Key Filename",
"help": "Certificate private key will be stored with this filename in Certificate Directory.",
"default": "vircadia-cert.key",
"advanced": true
},
{
"name": "certificate_authority_filename",
"label": "Certificate Authority Filename",
"help": "Trusted certificate authority list will be stored with this filename in Certificate Directory. If unspecified system default CAs will be used.",
"default": "",
"placeholder": "System Default",
"advanced": true
},
{
"name": "challenge_handler_type",
"label": "Type of HTTP challenge handler.",
"help": "This settings determines how the client will attempt to complete the server's HTTP challenges. Possible Values are: server - client will attempt to host the challenges on port 80, files - client will attempt to save challenges as files in the directories associated with specified domains, manual - client will wait for a few minutes for the challenges to be completed.",
"default": "server",
"advanced": true
},
{
"name": "certificate_domains",
"label": "Domains Names",
"type": "table",
"can_add_new_rows": true,
"help": "The domains names or IP addresses to generate the certificate for.",
"numbered": false,
"advanced": true,
"columns": [
{
"name": "domain",
"label": "Domain name or IP address",
"can_set": true
},
{
"name": "directory",
"label": "Domain root directory",
"placeholder": "Current directory",
"can_set": true
}
]
}
]
},
{
"label": "Monitoring",
"name": "monitoring",
Expand Down
1 change: 1 addition & 0 deletions domain-server/resources/web/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
<ul class="nav navbar-nav">
<li><a href="/">Nodes</a></li>
<li><a href="/assignment">Assignment</a></li>
<li><a href="/ssl-acme-client">SSL/ACME Configuration</a></li>

<li class="dropdown dropdown-on-hover">
<a href="/content/" class="hidden-xs">Content <span class="content-settings-badge badge"></span> <span class="caret"></span></a>
Expand Down
114 changes: 114 additions & 0 deletions domain-server/resources/web/ssl-acme-client/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
<!DOCTYPE html>
<html>
<head>
<title>SSL/ACME Configuration</title>
<meta charset="utf-8">
</head>
<body>
<a id="back-link" href="/"> Back to settings panel </a>
namark marked this conversation as resolved.
Show resolved Hide resolved

<h4>Automatic Management</h4>

<div id="enable-container">
<label>Enable</label>
<input id="enable" type="checkbox"/>
namark marked this conversation as resolved.
Show resolved Hide resolved
</div>

<div id="enable-content">

<div id="directory-container">
namark marked this conversation as resolved.
Show resolved Hide resolved
<label>CA directory</label>
<select id="directory-url-select">
<option value="https://acme-v02.api.letsencrypt.org/directory">Let's Encrypt v2 Production</option>
<option value="https://acme-staging-v02.api.letsencrypt.org/directory">Let's Encrypt v2 Staging</option>
<option value="https://acme.zerossl.com/v2/DV90">ZeroSSL ACME v2</option>
<option value="zerossl-rest-api">ZeroSSL REST</option>
<option value="custom">Custom URL</option>
</select>
<a href="" id="terms-of-service">Terms of Service</a>
<input id="directory-url" type="text"/>
namark marked this conversation as resolved.
Show resolved Hide resolved
</div>

<div id="auth-container">
<label>Authentication method</label>
<select id="auth-select">
<option value="account-key-only">Account Key</option>
<option class="eab-option zero-ssl-auth-option zero-ssl-auth-option-default" value="zero-ssl-email">ZeroSLL Email</option>
<option class="eab-option zero-ssl-auth-option" value="zero-ssl-api-key">ZeroSSL API Key</option>
<option class="eab-option" value="id-mac">ID and MAC key</option>
</select>
<input id="zero-ssl-auth-input" placeholder="ZeroSSL Email" type="text" />
<input id="eab-kid-input" placeholder="KID" type="text" />
<input id="eab-mac-input" placeholder="MAC" type="text" />
</div>

<div id="other-settings-container">
<label>Challenge completion method</label>
<select id="challenge-select">
<option value="server">HTTP Server</option>
<option value="files">Files</option>
<option value="manual">Manual</option>
</select>
<br />
<label>Account Key</label>
<input id="account-key-path" type="text" placeholder="<Application Data Path>/acme_account_key.pem" />
<input id="account-key-upload" type="file" />
<br />
<input id="account-key-reset" type="button" value="Reset Account Key" />
</div>
<br />

<div id="domains-container">
<label>Domains</label>
<div id="domain-inputs">
<div class="domain-input-container">
<input type="text" class="domain-name-input" placeholder="Domain Name" />
<input type="text" class="domain-dir-input" placeholder="Domain Directory" />
<input type="button" class="remove-domain-button" value="Remove" />
namark marked this conversation as resolved.
Show resolved Hide resolved
</div>
</div>
<input id="add-domain-button" type="button" value="Add Domain" />
</div>

</div>

<h4>Certificate Paths</h4>

<div id="paths-container">
<label>Certificate Directory</label>
<input id="cert-dir" type="text" placeholder="Application Data Path" />
<br />
<label>Certificate</label>
<input id="cert-name" type="text"/>
<input id="cert-upload" type="file" />
<br />
<label>Key</label>
<input id="cert-key-name" type="text" />
<input id="cert-key-upload" type="file" />
<br />
<label>CA list</label>
<input id="cert-ca-name" type="text" placeholder="System Default" />
<input id="cert-authorities-upload" type="file" />
<br />
<input id="cert-reset" type="button" value="Reset Certificate" />
</div>


<hr />
namark marked this conversation as resolved.
Show resolved Hide resolved
<div id="control-button-container">
<input id="save-button" type="button" value="Save Settings" />
<input id="restart-button" type="button" value="Restart Client" />
</div>

<hr />

<div>
<label>Status<label>
<input id="status-view-enable" type="checkbox"/>
namark marked this conversation as resolved.
Show resolved Hide resolved
<br />
<textarea hidden=true disabled=true id="status-view" style="width:100%; height:250px;"></textarea>
</div>

<script type='module' src='js/acme-settings.js'></script>
</body>
</html>
Loading