trailofbits / sinter

A user-mode application authorization system for MacOS written in Swift
https://blog.trailofbits.com/2020/08/12/sinter-new-user-mode-security-enforcement-for-macos/
GNU Affero General Public License v3.0
301 stars 15 forks source link

Sinter should not attempt to connect to a sync server if none configured #59

Open mike-myers-tob opened 4 years ago

mike-myers-tob commented 4 years ago

Why

As a security engineer, I only want Sinter to attempt a connection to a sync server if one is configured so that my logs are not filled with failed attempt messages.

Acceptance Criteria:

mike-myers-tob commented 4 years ago

So in examining how Sinter behaves currently:

  1. If there is a sync-server config but the decision-manager is set to "local": it doesn't matter what's in the sync-server URL, as it is ignored.
  2. If there is a sync-server config, the decision-manager is set to "sync-server" and the URL setting is simply missing, then Sinter outputs an error message about that and quits.
  3. If there is a sync-server config, the decision-manager is set to "sync-server" and the URL setting is a URL where no sync-server is currently running, Sinter attempts to reconnect on an interval, but this is by design. I think you want this.
  4. there is a sync-server config, the decision-manager is set to "sync-server" and the URL setting is "" (an empty string, or some other string that does not constitute a real URL), then Sinter fails to understand that and attempts to connect to that bad URL on the interval. This is probably a bug and it should quit immediately like in case 2.