Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Back out ill-advised notary server hackery #6657

Merged
merged 5 commits into from Jan 8, 2020
Merged

Conversation

@richvdh
Copy link
Member

richvdh commented Jan 7, 2020

This reverts much of #6620. As the commit comment says:

This was ill-advised. We can't modify verify_keys here, because the
response object has already been signed by the requested key.

Furthermore, it's somewhat unnecessary because existing versions of Synapse
(which get upset that the notary key isn't present in verify_keys) will
fall back to a direct fetch via /key/v2/server.

Also, add some tests that our key fetcher can actually talk to our notary impl.

richvdh added 3 commits Jan 7, 2020
This was ill-advised. We can't modify verify_keys here, because the response
object has already been signed by the requested key.

Furthermore, it's somewhat unnecessary because existing versions of Synapse
(which get upset that the notary key isn't present in verify_keys) will fall
back to a direct fetch via `/key/v2/server`.
it would be nice if we actually tested when our fetcher can't talk to our
notary impl.
@richvdh

This comment has been minimized.

Copy link
Member Author

richvdh commented Jan 7, 2020

This should fix #6596 (comment).

@richvdh richvdh requested a review from matrix-org/synapse-core Jan 7, 2020

def test_get_key(self):
"""Fetch a key belonging to a random server"""
self.make_second_homeserver()

This comment has been minimized.

Copy link
@erikjohnston

erikjohnston Jan 8, 2020

Member

Why not call this in a setup step?

testkey = signedjson.key.generate_signing_key("abc")

# we expect hs2 to make a perspectives request, which we will forward to hs1
self.expect_outgoing_perspectives_request()

This comment has been minimized.

Copy link
@erikjohnston

erikjohnston Jan 8, 2020

Member

And this? And can we change the name to not expect_* as its not actually asserting anything?

This comment has been minimized.

Copy link
@richvdh

richvdh Jan 8, 2020

Author Member

any suggestions?

This comment has been minimized.

Copy link
@erikjohnston

erikjohnston Jan 8, 2020

Member

setup_outgoing_perspectives_request_intercept or something?

This comment has been minimized.

Copy link
@richvdh

richvdh Jan 8, 2020

Author Member

actually I've just rolled it into prepare

@richvdh richvdh merged commit 573fee7 into release-v1.8.0 Jan 8, 2020
22 checks passed
22 checks passed
buildkite/synapse Build #6387 passed (16 minutes, 51 seconds)
Details
buildkite/synapse/check-sample-config Passed (1 minute, 28 seconds)
Details
buildkite/synapse/check-style Passed (1 minute, 37 seconds)
Details
buildkite/synapse/isort Passed (17 seconds)
Details
buildkite/synapse/mypy Passed (29 seconds)
Details
buildkite/synapse/newspaper-newsfile Passed (13 seconds)
Details
buildkite/synapse/packaging Passed (19 seconds)
Details
buildkite/synapse/pipeline Passed (3 seconds)
Details
buildkite/synapse/python-3-dot-5-slash-postgres-9-dot-5 Passed (10 minutes, 23 seconds)
Details
buildkite/synapse/python-3-dot-5-slash-sqlite Passed (6 minutes, 3 seconds)
Details
buildkite/synapse/python-3-dot-5-slash-sqlite-slash-old-deps Passed (7 minutes, 46 seconds)
Details
buildkite/synapse/python-3-dot-6-slash-sqlite Passed (5 minutes, 55 seconds)
Details
buildkite/synapse/python-3-dot-7-slash-postgres-11 Passed (10 minutes, 38 seconds)
Details
buildkite/synapse/python-3-dot-7-slash-postgres-9-dot-5 Passed (10 minutes, 43 seconds)
Details
buildkite/synapse/python-3-dot-7-slash-sqlite Passed (6 minutes, 58 seconds)
Details
buildkite/synapse/synapse-port-db-slash-python-3-dot-5-slash-postgres-9-dot-5 Passed (1 minute, 28 seconds)
Details
buildkite/synapse/synapse-port-db-slash-python-3-dot-7-slash-postgres-11 Passed (1 minute, 34 seconds)
Details
buildkite/synapse/sytest-python-3-dot-5-slash-postgres-9-dot-6-slash-monolith Passed (13 minutes, 1 second)
Details
buildkite/synapse/sytest-python-3-dot-5-slash-postgres-9-dot-6-slash-workers Passed (14 minutes, 46 seconds)
Details
buildkite/synapse/sytest-python-3-dot-5-slash-sqlite-slash-monolith Passed (11 minutes, 51 seconds)
Details
buildkite/synapse/sytest-python-3-dot-7-slash-postgres-11-slash-monolith Passed (11 minutes, 48 seconds)
Details
buildkite/synapse/sytest-python-3-dot-7-slash-postgres-11-slash-workers Passed (11 minutes, 35 seconds)
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.