Make initial setup process a bit more clear

This commit is contained in:
Arjan H
2021-12-04 15:29:34 +01:00
parent fcab9f6b2d
commit d7c1cbe118
5 changed files with 20 additions and 6 deletions

View File

@@ -41,6 +41,10 @@ case $txt in
cp /etc/nginx/ssl/labca_cert.pem /usr/local/share/ca-certificates/labca_cert.crt
cp ~labca/admin/data/root-ca.pem /usr/local/share/ca-certificates/root-ca.crt
update-ca-certificates &>>$LOGFILE
echo "Waiting for initial startup of the docker containers..." &>>$LOGFILE
wait_up $PS_MYSQL &>>$LOGFILE
wait_up $PS_LABCA &>>$LOGFILE
wait_up $PS_BOULDER $PS_BOULDER_COUNT &>>$LOGFILE
;;
"docker-restart")
cd /home/labca/boulder

View File

@@ -2,7 +2,7 @@
</div>
<div class="col-md-6 col-sm-12">
{{with .CertificateInfo}}
<h3>{{ if .IsRoot }}Root{{ else }}Issuer (2nd level){{ end }} Certificate</h3>
<h3>{{ if .IsRoot }}<b>Root</b>{{ else }}<b>Issuer</b> (2nd level){{ end }} Certificate</h3>
<ul class="nav nav-tabs">
<li class="{{ if eq .CreateType "generate" }}active{{ end }}">
@@ -19,7 +19,7 @@
<div class="tab-content">
<div class="tab-pane fade {{ if eq .CreateType "generate" }}active in{{ end }}" id="generate">
<br/>
<form role="form" action="{{ .RequestBase }}/setup" enctype="multipart/form-data" method="POST">
<form role="form" class="form-cert" action="{{ .RequestBase }}/setup" enctype="multipart/form-data" method="POST">
<input type="hidden" name="cert" value="{{ if .IsRoot }}root{{ else }}issuer{{ end }}">
<input type="hidden" name="createtype" value="generate">
<div class="form-group">
@@ -73,7 +73,7 @@
<div class="tab-pane fade {{ if eq .CreateType "import" }}active in{{ end }}" id="import">
<br/>
<form role="form" action="{{ .RequestBase }}/setup" enctype="multipart/form-data" method="POST">
<form role="form" class="form-cert" action="{{ .RequestBase }}/setup" enctype="multipart/form-data" method="POST">
<input type="hidden" name="cert" value="{{ if .IsRoot }}root{{ else }}issuer{{ end }}">
<input type="hidden" name="createtype" value="import">
<p>
@@ -101,7 +101,7 @@
<div class="tab-pane fade {{ if eq .CreateType "upload" }}active in{{ end }}" id="upload">
<br/>
<form role="form" action="{{ .RequestBase }}/setup" enctype="multipart/form-data" method="POST">
<form role="form" class="form-cert" action="{{ .RequestBase }}/setup" enctype="multipart/form-data" method="POST">
<input type="hidden" name="cert" value="{{ if .IsRoot }}root{{ else }}issuer{{ end }}">
<input type="hidden" name="createtype" value="upload">
<div class="form-group">
@@ -137,6 +137,8 @@
</form>
</div>
</div>
<p id="processing" class="hidden"><br/>Setting up LabCA and applying configuration. This will take a minute...<br/>
<img id="restart-spinner" src="static/img/spinner.gif" height="36"></p>
{{end}}
{{ template "partials/progress.tmpl" . }}
{{end}}
@@ -149,6 +151,12 @@
$(window).resize();
}, 250);
});
{{ if not .CertificateInfo.IsRoot }}
$(".form-cert").submit(function() {
$("#processing").removeClass("hidden");
});
{{end}}
});
</script>
{{end}}

View File

@@ -3,7 +3,7 @@
<div class="col-md-6 col-sm-12">
<h3>Restart</h3>
<p id="pre-restart-1">
Please install the root certificate in the <b>Trusted Root Certification Authorities</b> store of this machine now.<br/>
Please install the root certificate in the <b>Trusted Root Certification Authorities</b> store of your client machine now.<br/>
<a href="../certs/root-ca.der">Windows (.der) format</a>&nbsp;|&nbsp;<a href="../certs/root-ca.pem">Linux (.pem) format</a>
</p>
<p id="pre-restart-2">Then, <a class="button active" id="restart-button" href="javascript:void();">restart LabCA</a></p>

View File

@@ -2,7 +2,7 @@
</div>
<div class="col-md-6 col-sm-12">
<h3>Restart</h3>
<p>Almost there! Now we will request a certificate for this website and restart one more time...<br/>
<p>Almost there!<br/>Now we will request a certificate for this website and restart one more time...<br/>
<img id="wrapup-spinner" src="static/img/spinner.gif" height="36"></p>
{{ template "partials/progress.tmpl" . }}
{{end}}

View File

@@ -634,6 +634,8 @@ config_boulder() {
sed -i -e "s|http://127.0.0.1:4000/acme/issuer-cert|http://$LABCA_FQDN/certs/ca-int.der|" config/ca-b.json
sed -i -e "s|http://boulder:4430/acme/issuer-cert|http://$LABCA_FQDN/acme/issuer-cert|" config/wfe2.json
sed -i -e "s|http://127.0.0.1:4000/acme/issuer-cert|https://$LABCA_FQDN/acme/issuer-cert|" config/wfe2.json
sed -i -e "s|letsencrypt/boulder|hakwerk/labca|" config/wfe.json
sed -i -e "s|letsencrypt/boulder|hakwerk/labca|" config/wfe2.json
sed -i -e "s|http://127.0.0.1:4002/|http://$LABCA_FQDN/ocsp/|g" config/ca-a.json
sed -i -e "s|http://127.0.0.1:4002/|http://$LABCA_FQDN/ocsp/|g" config/ca-b.json
sed -i -e "s|http://example.com/cps|http://$LABCA_FQDN/cps/|g" config/ca-a.json