Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Perspective key server matrix.org returns keys multiple times for some entries #15424

Open
reivilibre opened this issue Apr 12, 2023 · 0 comments
Labels
O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Minor Blocks non-critical functionality, workarounds exist. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues.

Comments

@reivilibre
Copy link
Contributor

This is an offshoot of #12736.

rei@lithium ~$ curl https://matrix.org/_matrix/key/v2/query -d '{"server_keys": {"matrix.arsenm.dev": {"ed25519:a_TzAM": {}, "ed25519:ads3pX": {}}}}' | jq .

{
  "server_keys": [
    {
      "old_verify_keys": {},
      "server_name": "matrix.arsenm.dev",
      "signatures": {
        "matrix.arsenm.dev": {
          "ed25519:a_TzAM": "oQgYwB7VF/PAc0Y/VeNBKIAeNGxGnKKdamacfqpmQLfm3IGjAUSDBwlamlZRgAT7Cp9yb1dqVPxQcfB2akWqBg"
        },
        "matrix.org": {
          "ed25519:auto": "WMwuXWnDJuNbzCA3Pdc0ZfBgg0azw3SYl6SsksUrQXyKtu6uGAuiAOIjjXcuQP6hFB14ftgN6I8vkAd4sWqXDQ"
        }
      },
      "tls_fingerprints": [],
      "valid_until_ts": 1627273239740,
      "verify_keys": {
        "ed25519:a_TzAM": {
          "key": "4FvovoVi9G7MIQuLtf415BM2ZkZoyR7XR7wpBHXSL9w"
        }
      }
    },
    {
      "old_verify_keys": {
        "ed25519:a_TzAM": {
          "expired_ts": 1601024554498,
          "key": "4FvovoVi9G7MIQuLtf415BM2ZkZoyR7XR7wpBHXSL9w"
        }
      },
      "server_name": "matrix.arsenm.dev",
      "signatures": {
        "matrix.arsenm.dev": {
          "ed25519:ads3pX": "TIwJM/GR0MOjIgLozTB0KexowbuMG8DRGu9DAQbMcVDAgUNwWVglce/9LPTrfq+g7qj73Ml3mAaUj9MBD6cmDQ"
        },
        "matrix.org": {
          "ed25519:auto": "xuIzHyUzHqz7NL5t34GTCXSSh/rxhVOxktzJxT+LLRxY+9FlHQOJoRUPZJnBY2QjzgHmhWW3+JAoKOcoIlZQBw"
        }
      },
      "valid_until_ts": 1627788036360,
      "verify_keys": {
        "ed25519:ads3pX": {
          "key": "TGOiZYXHMEWCD6rgqiJhdrg7O4nN488jDPcj/V9b0xI"
        }
      }
    }
  ]
}

ed25519:a_TzAM appears multiple times. There are multiple array entries for the same server name.

I'm not clear on how this is meant to work, but it seems suspicious and in any case it was causing #12736 (CardinalityViolation errors due to the keys being duplicated).

We should investigate to see whether this is unwanted and whether we should fix the perspective server to not return these duplicates.

@reivilibre reivilibre added S-Minor Blocks non-critical functionality, workarounds exist. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues. O-Uncommon Most users are unlikely to come across this or unexpected workflow labels Apr 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Minor Blocks non-critical functionality, workarounds exist. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues.
Projects
None yet
Development

No branches or pull requests

1 participant