Enhance worker connection security (#1641)
This stores worker connection nonces within the database to ensure uniqueness of connections. Prior the connection required any attacker to be able to decrypt the incoming encrypted authentication message in order to replay (and if the attacker has access to the KMS you have bigger problems), but with this change even if an attacker does have access to the KMS key, they cannot reuse the same message. (If they're able to encrypt against the KMS key, they can still act as a worker with a new message, so this only really helps if they only have decryption capabilities.)
This commit is contained in:
1 parent
a679300b50
commit
1782f6a4e4
23 files changed
+426
-63
No files matched your search
@@ -57,8 +57,9 @@ TLS establishment is performed as follows:
|
||||
encrypted value.
|
||||
|
||||
5. The Controller decrypts this value via the shared KMS. If successful, the
|
||||
Controller validates that the nonce is not known, to ensure that this is not a
|
||||
replay.
|
||||
Controller validates that the nonce is not known to ensure that this is not a
|
||||
replay. The nonce value is checked against and stored into the database,
|
||||
ensuring that nonce replay cannot occur across controllers.
|
||||
|
||||
6. The Controller uses the decrypted parameters to configures its TLS stack with
|
||||
the same certificate and key.
|
||||
@@ -67,11 +68,6 @@ TLS establishment is performed as follows:
|
||||
self-signed CA certificate that was securely transmitted is configured as a
|
||||
valid root CA for validation checking.
|
||||
|
||||
8. If successful, the nonce is stored in the database along with an expiration
|
||||
time set several minutes past the actual expiration time of the certificate
|
||||
itself. This ensures that any replay attempt that occurs is detected and
|
||||
rejected until after the certificate is otherwise invalid.
|
||||
|
||||
## Client-to-Worker TLS
|
||||
|
||||
Workers do not require any configuration for their client-facing listeners to
|
||||
|
||||
Reference in new issue
Block a user