-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(landscape): Implement support for SSL certificates in Landscape …
…connection (#320) Three changes in this PR: - Up until now, the landscape `computer_name` override took place in the agent, when creating the task. This is now moved to the WSL Pro Service. - On top of overriding the `computer_name`, the WSL Pro Service will now also rewrite `ssl_public_key` so that it is converted from Windows path to WSL path. This step is skipped if this key is not present. - The Windows Agent will now read the landscape config and use the `ssl_public_key` when available. This key will be used to secure the connection to the Hostagent server. UDENG-1544
- Loading branch information
Showing
30 changed files
with
426 additions
and
156 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
...gent/internal/proservices/landscape/testdata/TestConnect/certificates/bad-certificate.pem
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
This is not a valid certificate |
32 changes: 32 additions & 0 deletions
32
windows-agent/internal/proservices/landscape/testdata/TestConnect/certificates/cert.pem
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
-----BEGIN CERTIFICATE----- | ||
MIIFdDCCA1ygAwIBAgIUQ2XcjKTRgC0xuZMtwMAa0OvDxRswDQYJKoZIhvcNAQEL | ||
BQAwQTELMAkGA1UEBhMCVV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UA | ||
onELhcOl0sZfHnTLTZNkKzmaMA8GA1UdEwEB/wQFMAMBAf8wDwYDVR0RBAgwBocE | ||
fwAAATANBgkqhkiG9w0BAQsFAAOCAgEAbmUCtPUY9KoEucjLcf3bMmk4asWKTJIr | ||
5kkJL/s7E1WaMudNHovunk4Zx3X62FzJHR6Z04zJjdWxhmdDbE+bO2LrkwsXJNxX | ||
NBbdP7qkSgRUvgigSTu2kc7nAQgDS7dIxyCZyQTC1opaj8t0uuxzqHpG82zzrmQ1 | ||
8Guz1sWpBeBKgwyBM+okFvo4OcZV905hR1+sHzE1aLhoOnpX3uNwFgGh8z8jXc7p | ||
e5FrgoEzaHYZfriioU+Lqf+92nAmtdFtNTP/g2OWunuOhEvYUI+EfPpjqSB19hvi | ||
vD5qnV/euuWbP9mnoGVXmRcg5ZWVqgm6Yh+syRXYDEf8zwkpjod5DOKHVA0oK4hy | ||
1zp5ufVwVETB/rdfUUS8cPXx8HqqtZienHauH/BO5OZTwSNmLrie7l/v1WUgvXBP | ||
5k8p8wxtvXf0JNdTtNFPL82Q5W0f/4GE6PGAet4TxjNVLs9DolnTdBN7isntm9iI | ||
d6BuuQLzNcd9J2p+7qm0Uu8gh7TeNbnBgaJnJiwCtogYMsOGFiimrF3ce3vJz/Qq | ||
tN/od94ffjun+hWgCGQUIPZNFNNOAx7oUQmjQi0ubm/XiCEvNJHBNkvSImTidrrn | ||
sHTu/FLkntCWzHTA8MfA3eZmqsNNUojQvVcSxs01Bwy/UKgYhcpuijRve5HsloSz | ||
IT0QVhzpIdM= | ||
-----END CERTIFICATE----- |
13 changes: 13 additions & 0 deletions
13
.../internal/proservices/landscape/testdata/TestConnect/certificates/generate-certificate.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/bash | ||
|
||
openssl req \ | ||
-x509 \ | ||
-newkey rsa:4096 \ | ||
-keyout key.pem \ | ||
-out cert.pem \ | ||
-sha256 \ | ||
-nodes \ | ||
-addext 'subjectAltName = IP:127.0.0.1' \ | ||
-subj "/C=US/O=Canonical/CN=CanonicalGroupLimited" | ||
|
||
echo This is not a valid certificate > bad-certificate.pem |
Oops, something went wrong.