[RFC] Strengthen Signature Verification By Adding a Strict Mode #8

Closed
opened 2018-10-23 14:45:57 +00:00 by ZAdamMac · 6 comments
ZAdamMac commented 2018-10-23 14:45:57 +00:00 (Migrated from github.com)

Is your feature request related to a problem? Please describe.
Current state of affairs is that the signature verification process is naive - if the key in question is included in the keyring and trusted, it will be used. This would allow issues where a key is compromised or improperly trusted and unintended keys can be used to sign Tapestry blocks.

Describe the solution you'd like
Currently envisioning adding a "strict signing" mode, passed in config. I'm looking at doing this in one of two ways:

Describe alternatives you've considered

  1. Implement signing certificate pinning - specify a specific certificate which does the signing, and if any other key is used, the program should reject the block. This is useful in single-user contexts but less useful in a distributed sense, such as enterprise.
  2. Dedicated keyring - requires additional persistence on the drive and has security implications I'm uncertain of.

Additional context
N/A

**Is your feature request related to a problem? Please describe.** Current state of affairs is that the signature verification process is naive - if the key in question is included in the keyring and trusted, it will be used. This would allow issues where a key is compromised or improperly trusted and unintended keys can be used to sign Tapestry blocks. **Describe the solution you'd like** Currently envisioning adding a "strict signing" mode, passed in config. I'm looking at doing this in one of two ways: **Describe alternatives you've considered** 1. Implement signing certificate pinning - specify a specific certificate which does the signing, and if any other key is used, the program should reject the block. This is useful in single-user contexts but less useful in a distributed sense, such as enterprise. 2. Dedicated keyring - requires additional persistence on the drive and has security implications I'm uncertain of. **Additional context** N/A
ZAdamMac commented 2018-10-23 14:51:20 +00:00 (Migrated from github.com)

Per the Contributing Guidelines, I'll leave this open for comment until 2018-11-23.

Per the Contributing Guidelines, I'll leave this open for comment until 2018-11-23.
ZAdamMac commented 2018-10-24 03:51:25 +00:00 (Migrated from github.com)

There is a third possibility - allowing the user to set minimum trust levels. Maybe only "fully trusted" keys could be valid signing keys.

It turns out, the "trusted insider" problem is hard.

At some point (far future) if I ever get around to scaling this, I'll have to figure out a way to admin lockout the .cfg file beyond "use the local filesystem/os permissions to do it".

There is a third possibility - allowing the user to set minimum trust levels. Maybe only "fully trusted" keys could be valid signing keys. It turns out, the "trusted insider" problem is hard. At some point (far future) if I ever get around to scaling this, I'll have to figure out a way to admin lockout the .cfg file beyond "use the local filesystem/os permissions to do it".
ZAdamMac commented 2018-11-05 13:58:34 +00:00 (Migrated from github.com)

A suggestion came in from outside that it might be easier to just add a config section which includes a list of acceptable signing key fingerprints. This ultimately wouldn't be any more complex for the user than maintaining a trusted key keyring.

Additionally language should be added during verification to explain the importance of matching both the UID and the fingerprint.

A suggestion came in from outside that it might be easier to just add a config section which includes a list of acceptable signing key fingerprints. This ultimately wouldn't be any more complex for the user than maintaining a trusted key keyring. Additionally language should be added during verification to explain the importance of matching both the UID and the fingerprint.
ZAdamMac commented 2018-11-18 12:54:49 +00:00 (Migrated from github.com)

Latest position:

Since any possible solution I've thought of yet would be just as mutable as the "use strict" setting instead, I believe this issue would be better closed by imporving the behaviour of block verification itself.

We already have every block being verified, so we just need to strengthen the function to require approval for each fingerprint observed.

Latest position: Since any possible solution I've thought of yet would be just as mutable as the "use strict" setting instead, I believe this issue would be better closed by imporving the behaviour of block verification itself. We already have every block being verified, so we just need to strengthen the function to require approval for each fingerprint observed.
ZAdamMac commented 2018-11-23 19:26:26 +00:00 (Migrated from github.com)

Decision

Resolution will be in the following vein:

  • validateBlock() will be amended to check against a list of "approved" fingerprints, which it also displays the trust level of based upon the system's primary gpg instance.
  • validateBlock() will add a fingerprint to its "approved" list only if the user had accepted it.
  • This list is per-run only and lives only in volatile memory.
## Decision Resolution will be in the following vein: - validateBlock() will be amended to check against a list of "approved" fingerprints, which it also displays the trust level of based upon the system's primary gpg instance. - validateBlock() will add a fingerprint to its "approved" list only if the user had accepted it. - This list is per-run only and lives only in volatile memory.
ZAdamMac commented 2019-02-25 00:36:18 +00:00 (Migrated from github.com)

While not released, the solution described above has been implemented for the 2.0 release code which will be moving along to testing shortly, so I am closing this issue.

While not released, the solution described above has been implemented for the 2.0 release code which will be moving along to testing shortly, so I am closing this issue.
This discussion has been locked. Commenting is limited to contributors.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
zadammac/Tapestry#8
No description provided.