Skip to content
Snippets Groups Projects
Verified Commit 128f0d79 authored by Heiko Reese's avatar Heiko Reese :dizzy_face:
Browse files

fix: changed all placeholder variables to UPPERCASE to stop the plugin from complaining about it…

parent ef1c137b
Branches
Tags v80.0.0-alpha.55
No related merge requests found
!!! note "Zertifikat konfigurieren"
Bitte geben Sie den Hostnamen an, für den Sie ein Zertifikat beantragen müssen:
<input data-input-for="CSR_Server_CN">
<input data-input-for="CSR_SERVER_CN">
Verfahren und Schlüsselgröße/-typ auswählen:
<input data-input-for="GNUTLS_Key_Type">
<input data-input-for="GNUTLS_KEY_TYPE">
Mit [GnuTLS](http://www.gnutls.org/){:target="_blank"} können Schlüssel und Antragsdatei über die Kommandozeile generiert werden.
`FQHN` ist der [vollqualifizierte Hostname](http://de.wikipedia.org/wiki/Fully-Qualified_Host_Name){:target="_blank"}.
......@@ -12,11 +12,11 @@ Verwenden Sie folgenden Befehl, um den privaten Schlüssel zu generieren:
```
certtool --generate-privkey \
xGNUTLS_Key_Typex \
--outfile xCSR_Server_Keyfilex
xGNUTLS_KEY_TYPEx \
--outfile xCSR_SERVER_KEYFILEx
```
Legen Sie eine Template-Datei namens `xCSR_Server_Templatefilex` mit folgendem Inhalt:
Legen Sie eine Template-Datei namens `xCSR_SERVER_TEMPLATEFILEx` mit folgendem Inhalt:
```
organization = "Karlsruhe Institute of Technology"
......@@ -24,11 +24,11 @@ locality = "Karlsruhe"
state = "Baden-Wuerttemberg"
country = DE
# CN; bitte einen vollqualifizierten Hostnamen verwenden
cn = "xCSR_Server_CNx"
dns_name = "xCSR_Server_CNx"
cn = "xCSR_SERVER_CNx"
dns_name = "xCSR_SERVER_CNx"
```
Um [Subject Alternative Names (SANs)](http://en.wikipedia.org/wiki/SubjectAltName){:target="_blank"} zu setzen, fügen Sie diese als `dns_name` der zuvor angelegten Datei `xCSR_Server_Templatefilex` an:
Um [Subject Alternative Names (SANs)](http://en.wikipedia.org/wiki/SubjectAltName){:target="_blank"} zu setzen, fügen Sie diese als `dns_name` der zuvor angelegten Datei `xCSR_SERVER_TEMPLATEFILEx` an:
```
dns_name = "weiterer-hostname.ifmb.kit.edu"
......@@ -39,8 +39,8 @@ Erzeugen Sie nun die Antragsdatei:
```
certtool --generate-request --hash SHA256 --no-text \
--load-privkey xCSR_Server_Keyfilex \
--template xCSR_Server_Templatefilex \
--outfile xCSR_Server_Reqfilex
--load-privkey xCSR_SERVER_KEYFILEx \
--template xCSR_SERVER_TEMPLATEFILEx \
--outfile xCSR_SERVER_REQFILEx
```
!!! note "Zertifikat konfigurieren"
Bitte geben Sie den Hostnamen an, für den Sie ein Zertifikat beantragen müssen:
<input data-input-for="CSR_Server_CN">
<input data-input-for="CSR_SERVER_CN">
Verfahren und Schlüsselgröße/-typ auswählen:
<input data-input-for="JavaCertTool_Key_Type">
<input data-input-for="JAVACERTTOOL_KEY_TYPE">
Zunächst muss ein Schlüsselpaar aus privatem und öffentlichem Schlüssel generiert werden.
Dies kann mit folgendem Befehl über die Kommandozeile erfolgen:
```
keytool -genkey \
-alias xCSR_Server_CNx \
-dname "CN=xCSR_Server_CNx" \
xJavaCertTool_Key_Typex \
-keystore xCSR_Server_Keystorex
-alias xCSR_SERVER_CNx \
-dname "CN=xCSR_SERVER_CNx" \
xJAVACERTTOOL_KEY_TYPEx \
-keystore xCSR_SERVER_KEYSTOREx
```
Aus diesem Schlüsselpaar kann jetzt der Zertifikatsantrag generiert werden:
```
keytool -certreq \
-alias xCSR_Server_CNx \
-file xCSR_Server_Reqfilex \
-keystore xCSR_Server_Keystorex
-alias xCSR_SERVER_CNx \
-file xCSR_SERVER_REQFILEx \
-keystore xCSR_SERVER_KEYSTOREx
```
\ No newline at end of file
!!! note "Zertifikat konfigurieren"
Bitte geben Sie den Hostnamen an, für den Sie ein Zertifikat beantragen müssen:
<input data-input-for="CSR_Server_CN">
<input data-input-for="CSR_SERVER_CN">
Verfahren und Schlüsselgröße/-typ auswählen:
<input data-input-for="OpenSSL_Key_Type">
<input data-input-for="OPENSSL_KEY_TYPE">
<!--Privaten Schlüssel verschlüsseln (nur Anschalten wenn nötig): <input data-input-for="CSR_PKey_Encrypted">-->
<!--Privaten Schlüssel verschlüsseln (nur Anschalten wenn nötig): <input data-input-for="CSR_PKEY_ENCRYPTED">-->
Mit [OpenSSL](https://www.openssl.org/){:target="_blank"} (Version 3.x nötig) können Schlüssel und Antragsdatei über die Kommandozeile generiert werden.
`FQHN` ist der [vollqualifizierte Hostname](http://de.wikipedia.org/wiki/Fully-Qualified_Host_Name){:target="_blank"}.
```
openssl req dOpenSSL_Key_Typed dCSR_PKey_Encryptedd \
-out xCSR_Server_Reqfilex \
-keyout xCSR_Server_Keyfilex \
-subj '/CN=xCSR_Server_CNx'
openssl req dOPENSSL_KEY_TYPEd dCSR_PKEY_ENCRYPTEDd \
-out xCSR_SERVER_REQFILEx \
-keyout xCSR_SERVER_KEYFILEx \
-subj '/CN=xCSR_SERVER_CNx'
```
Der Parameter `-noenc` sorgt dafür, dass der geheime Schlüssel unverschlüsselt gespeichert wird.
......@@ -26,9 +26,9 @@ Dabei nicht vergessen, die tatsächlichen Hostnamen zu ersetzen.
Jedem Hostname muss `DNS:` vorangestellt werden, mehrere Einträge sind mit `,` zu separieren.
```
openssl req dOpenSSL_Key_Typed dCSR_PKey_Encryptedd \
-out xCSR_Server_Reqfilex \
-keyout xCSR_Server_Keyfilex \
-subj '/CN=xCSR_Server_CNx' \
openssl req dOPENSSL_KEY_TYPEd dCSR_PKEY_ENCRYPTEDd \
-out xCSR_SERVER_REQFILEx \
-keyout xCSR_SERVER_KEYFILEx \
-subj '/CN=xCSR_SERVER_CNx' \
-addext 'subjectAltName = DNS:weiterer-hostname.ifmb.kit.edu,DNS:noch-ein-hostname.ifmb.kit.edu'
```
!!! note "Zertifikat konfigurieren"
Bitte geben Sie den Hostnamen an, für den Sie ein Zertifikat beantragen müssen:
<input data-input-for="CSR_Server_CN">
<input data-input-for="CSR_SERVER_CN">
Verfahren und Schlüsselgröße/-typ auswählen:
<input data-input-for="CertReq_Key_Type">
<input data-input-for="CERTREQ_KEY_TYPE">
!!! info
Niemand bei der KIT-CA benutzt diesen Weg, wir haben also nur sehr begrenzt Erfahrung damit.
Bei Problemen hilft potenziell ein Blick in die offizielle Dokumentation ([certreq.exe](https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/certreq_1), [certutil.exe](https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/certutil){:target="_blank"}).
Antragsdateien können unter Windows auch auf der Kommandozeile erstellt werden.
Hierfür muss zunächst eine Datei **xCSR_Server_Templatefilex** mit folgendem Inhalt erstellt werden:
Hierfür muss zunächst eine Datei **xCSR_SERVER_TEMPLATEFILEx** mit folgendem Inhalt erstellt werden:
```
[NewRequest]
Exportable = TRUE
xCertReq_Key_Typex
xCERTREQ_KEY_TYPEx
HashAlgorithm = sha256
MachineKeySet = TRUE
Subject = "CN=xCSR_Server_CNx"
Subject = "CN=xCSR_SERVER_CNx"
RequestType = PKCS10
UserProtected = FALSE
```
Um [Subject Alternative Names (SANs)](http://en.wikipedia.org/wiki/SubjectAltName){:target="_blank"} zu setzen, fügen Sie eine neue Sektion `[Extensions]` in die zuvor erstellte Datei `xCSR_Server_Templatefilex` mit den gewünschten Hostnamen (zwischen `_continue_ = "DNS=` und `&"`) ein:
Um [Subject Alternative Names (SANs)](http://en.wikipedia.org/wiki/SubjectAltName){:target="_blank"} zu setzen, fügen Sie eine neue Sektion `[Extensions]` in die zuvor erstellte Datei `xCSR_SERVER_TEMPLATEFILEx` mit den gewünschten Hostnamen (zwischen `_continue_ = "DNS=` und `&"`) ein:
```
[Extensions]
......@@ -33,14 +33,14 @@ _continue_ = "DNS=noch-ein-hostname.ifmb.kit.edu&"
```
Die eigentliche Antragsdatei kann danach mit dem folgenden Aufruf erstellt werden.
Hierbei wird die Datei `xCSR_Server_Reqfilex` mit der neu generierten Antragsdatei überschrieben.
Hierbei wird die Datei `xCSR_SERVER_REQFILEx` mit der neu generierten Antragsdatei überschrieben.
```
certreq -new xCSR_Server_Templatefilex xCSR_Server_Reqfilex
certreq -new xCSR_SERVER_TEMPLATEFILEx xCSR_SERVER_REQFILEx
```
Details Ihres Zertifikatsantrages können Sie mit folgendem Befehl ansehen:
```
certutil -dump xCSR_Server_Reqfilex
certutil -dump xCSR_SERVER_REQFILEx
```
!!! note "Configure Certificate"
Please enter the hostname for which you want to request a certificate:
<input data-input-for="CSR_Server_CN">
<input data-input-for="CSR_SERVER_CN">
Select algorithm and key strength for private key:
<input data-input-for="GNUTLS_Key_Type">
<input data-input-for="GNUTLS_KEY_TYPE">
With [GnuTLS](http://www.gnutls.org/){:target="_blank"}, you can generate a key and the related CSR using the command line.
`FQHN` is the [Fully Qualified Host Name](http://de.wikipedia.org/wiki/Fully-Qualified_Host_Name){:target="_blank"}.
......@@ -12,22 +12,22 @@ Use the following command in order to generate the private key:
```
certtool --generate-privkey \
xGNUTLS_Key_Typex \
--outfile xCSR_Server_Keyfilex
xGNUTLS_KEY_TYPEx \
--outfile xCSR_SERVER_KEYFILEx
```
Create a template file named `xCSR_Server_Templatefilex` containing the following content:
Create a template file named `xCSR_SERVER_TEMPLATEFILEx` containing the following content:
```
organization = "Karlsruhe Institute of Technology"
locality = "Karlsruhe"
state = "Baden-Wuerttemberg"
country = DE
cn = "xCSR_Server_CNx"
dns_name = "xCSR_Server_CNx"
cn = "xCSR_SERVER_CNx"
dns_name = "xCSR_SERVER_CNx"
```
In order to add [Subject Alternative Names (SANs)](http://en.wikipedia.org/wiki/SubjectAltName){:target="_blank"}, add additional `dns_name` lines to the previously created template file `xCSR_Server_Templatefilex`:
In order to add [Subject Alternative Names (SANs)](http://en.wikipedia.org/wiki/SubjectAltName){:target="_blank"}, add additional `dns_name` lines to the previously created template file `xCSR_SERVER_TEMPLATEFILEx`:
```
dns_name = "additional-hostname.ifmb.kit.edu"
......@@ -38,8 +38,8 @@ You can now create the CSR:
```
certtool --generate-request --hash SHA256 --no-text \
--load-privkey xCSR_Server_Keyfilex \
--template xCSR_Server_Templatefilex \
--outfile xCSR_Server_Reqfilex
--load-privkey xCSR_SERVER_KEYFILEx \
--template xCSR_SERVER_TEMPLATEFILEx \
--outfile xCSR_SERVER_REQFILEx
```
!!! note "Configure Certificate"
Please enter the hostname for which you want to request a certificate:
<input data-input-for="CSR_Server_CN">
<input data-input-for="CSR_SERVER_CN">
Select algorithm and key strength for private key:
<input data-input-for="JavaCertTool_Key_Type">
<input data-input-for="JAVACERTTOOL_KEY_TYPE">
First, you need to generate a key pair (private and public key).
This is done with the following command:
```
keytool -genkey \
-alias xCSR_Server_CNx \
-dname "CN=xCSR_Server_CNx" \
xJavaCertTool_Key_Typex \
-keystore xCSR_Server_Keystorex
-alias xCSR_SERVER_CNx \
-dname "CN=xCSR_SERVER_CNx" \
xJAVACERTTOOL_KEY_TYPEx \
-keystore xCSR_SERVER_KEYSTOREx
```
Using this keypair, you can now create the CSR:
```
keytool -certreq \
-alias xCSR_Server_CNx \
-file xCSR_Server_Reqfilex \
-keystore xCSR_Server_Keystorex
-alias xCSR_SERVER_CNx \
-file xCSR_SERVER_REQFILEx \
-keystore xCSR_SERVER_KEYSTOREx
```
\ No newline at end of file
!!! note "Configure Certificate"
Please enter the hostname for which you want to request a certificate:
<input data-input-for="CSR_Server_CN">
<input data-input-for="CSR_SERVER_CN">
Select algorithm and key strength for private key:
<input data-input-for="OpenSSL_Key_Type">
<input data-input-for="OPENSSL_KEY_TYPE">
<!--Encrypt private key (only enable if really necessary): <input data-input-for="CSR_PKey_Encrypted">-->
<!--Encrypt private key (only enable if really necessary): <input data-input-for="CSR_PKEY_ENCRYPTED">-->
Using [OpenSSL](https://www.openssl.org/){:target="_blank"} (version 3.x required), you can generate a key and the related CSR using the command line.
`FQHN` is the [Fully Qualified Host Name](http://de.wikipedia.org/wiki/Fully-Qualified_Host_Name){:target="_blank"}.
```
openssl req dOpenSSL_Key_Typed dCSR_PKey_Encryptedd \
-out xCSR_Server_Reqfilex \
-keyout xCSR_Server_Keyfilex \
-subj '/CN=xCSR_Server_CNx'
openssl req dOPENSSL_KEY_TYPEd dCSR_PKEY_ENCRYPTEDd \
-out xCSR_SERVER_REQFILEx \
-keyout xCSR_SERVER_KEYFILEx \
-subj '/CN=xCSR_SERVER_CNx'
```
The parameter `-noenc` is used in order to save the private key without encryption.
......@@ -29,9 +29,9 @@ Make sure to change the hostnames to the ones you actually need.
Every hostname must be prefixed with `DNS:`, multiple entries must be seperated by a `,`.
```
openssl req dOpenSSL_Key_Typed dCSR_PKey_Encryptedd \
-out xCSR_Server_Reqfilex \
-keyout xCSR_Server_Keyfilex \
-subj '/CN=xCSR_Server_CNx' \
openssl req dOPENSSL_KEY_TYPEd dCSR_PKEY_ENCRYPTEDd \
-out xCSR_SERVER_REQFILEx \
-keyout xCSR_SERVER_KEYFILEx \
-subj '/CN=xCSR_SERVER_CNx' \
-addext 'subjectAltName = DNS:additional-hostname.ifmb.kit.edu,DNS:another-hostname.ifmb.kit.edu'
```
!!! note "Configure Certificate"
Please enter the hostname for which you want to request a certificate:
<input data-input-for="CSR_Server_CN">
<input data-input-for="CSR_SERVER_CN">
Select algorithm and key strength for private key:
<input data-input-for="CertReq_Key_Type">
<input data-input-for="CERTREQ_KEY_TYPE">
!!! info
Nobody at KIT-CA uses this way of CSR generation, therefore we have next to no experience with it.
If there are any problems, it might help to check out the official documentation ([certreq.exe](https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/certreq_1), [certutil.exe](https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/certutil){:target="_blank"}).
On Windows, you can also create CSRs using the command line.
In order to do so, you first need to create a file named **xCSR_Server_Templatefilex** with the following content:
In order to do so, you first need to create a file named **xCSR_SERVER_TEMPLATEFILEx** with the following content:
```
[NewRequest]
Exportable = TRUE
xCertReq_Key_Typex
xCERTREQ_KEY_TYPEx
HashAlgorithm = sha256
MachineKeySet = TRUE
Subject = "CN=xCSR_Server_CNx"
Subject = "CN=xCSR_SERVER_CNx"
RequestType = PKCS10
UserProtected = FALSE
```
In order to add [Subject Alternative Names (SANs)](http://en.wikipedia.org/wiki/SubjectAltName){:target="_blank"}, add an additional section `[Extensions]` to the previously created `xCSR_Server_Templatefilex` with the required hostnames (each between `_continue_ = "DNS=` und `&"`):
In order to add [Subject Alternative Names (SANs)](http://en.wikipedia.org/wiki/SubjectAltName){:target="_blank"}, add an additional section `[Extensions]` to the previously created `xCSR_SERVER_TEMPLATEFILEx` with the required hostnames (each between `_continue_ = "DNS=` und `&"`):
```
[Extensions]
......@@ -33,14 +33,14 @@ _continue_ = "DNS=och-ein-hostname.ifmb.kit.edu&"
```
The CSR can now be generated with the following command.
This overrides and previously existing file named `xCSR_Server_Reqfilex` with the new file.
This overrides and previously existing file named `xCSR_SERVER_REQFILEx` with the new file.
```
certreq -new xCSR_Server_Templatefilex xCSR_Server_Reqfilex
certreq -new xCSR_SERVER_TEMPLATEFILEx xCSR_SERVER_REQFILEx
```
You can look at the generated CSR using:
```
certutil -dump xCSR_Server_Reqfilex
certutil -dump xCSR_SERVER_REQFILEx
```
placeholders:
NAME: John Doe
CSR_Server_CN: FQHN
CSR_Server_Templatefile:
default: xCSR_Server_CNx.txt
CSR_SERVER_CN: FQHN
CSR_SERVER_TEMPLATEFILE:
default: xCSR_SERVER_CNx.txt
allow_nested: true
CSR_Server_Keyfile:
default: xCSR_Server_CNx.key
CSR_SERVER_KEYFILE:
default: xCSR_SERVER_CNx.key
allow_nested: true
CSR_Server_Reqfile:
default: xCSR_Server_CNx.req
CSR_SERVER_REQFILE:
default: xCSR_SERVER_CNx.req
allow_nested: true
CSR_Server_Keystore:
default: xCSR_Server_CNx.keystore
CSR_SERVER_KEYSTORE:
default: xCSR_SERVER_CNx.keystore
allow_nested: true
CSR_PKey_Encrypted:
CSR_PKEY_ENCRYPTED:
description: Encrypt private key?
default: unchecked
read_only: true
values:
unchecked: "-noenc"
checked: ""
OpenSSL_Key_Type:
OPENSSL_KEY_TYPE:
description: Key Type and Key Size
default: "ECDSA P-384 curve"
values:
......@@ -28,7 +28,7 @@ placeholders:
"RSA 4096 bits": "-newkey rsa:4096"
"ECDSA P-256 curve": "-newkey EC -pkeyopt ec_paramgen_curve:P-256 -pkeyopt ec_param_enc:named_curve"
"ECDSA P-384 curve": "-newkey EC -pkeyopt ec_paramgen_curve:P-384 -pkeyopt ec_param_enc:named_curve"
GNUTLS_Key_Type:
GNUTLS_KEY_TYPE:
description: Key Type and Key Size
default: "ECDSA P-384 curve"
values:
......@@ -36,7 +36,7 @@ placeholders:
"RSA 4096 bits": "--key-type=rsa --bits=4096"
"ECDSA P-256 curve": "--key-type=ecdsa --curve=secp256r1"
"ECDSA P-384 curve": "--key-type=ecdsa --curve=secp384r1"
JavaCertTool_Key_Type:
JAVACERTTOOL_KEY_TYPE:
description: Key Type and Key Size
default: "ECDSA P-384 curve"
values:
......@@ -44,7 +44,7 @@ placeholders:
"RSA 4096 bits": "-keyalg RSA -keysize 4096"
"ECDSA P-256 curve": "-keyalg EC -groupname secp256r1"
"ECDSA P-384 curve": "-keyalg EC -groupname secp384r1"
CertReq_Key_Type:
CERTREQ_KEY_TYPE:
description: Key Type and Key Size
default: "ECDSA P-384 curve"
values:
......
placeholders:
NAME: John Doe
CSR_Server_CN: FQHN
CSR_Server_Templatefile:
default: xCSR_Server_CNx.txt
CSR_SERVER_CN: FQHN
CSR_SERVER_TEMPLATEFILE:
default: xCSR_SERVER_CNx.txt
allow_nested: true
CSR_Server_Keyfile:
default: xCSR_Server_CNx.key
CSR_SERVER_KEYFILE:
default: xCSR_SERVER_CNx.key
allow_nested: true
CSR_Server_Reqfile:
default: xCSR_Server_CNx.req
CSR_SERVER_REQFILE:
default: xCSR_SERVER_CNx.req
allow_nested: true
CSR_Server_Keystore:
default: xCSR_Server_CNx.keystore
CSR_SERVER_KEYSTORE:
default: xCSR_SERVER_CNx.keystore
allow_nested: true
settings:
auto_placeholder_tables: false
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment