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

Implement a blacklisting endpoint (instead of a blacklisting reactor and agent wrapper) #8860

Open

Description

@clokep

See #8821 (comment) for background on this.

Currently to apply an IP range blacklist in Synapse it is necessary to wrap the the reactor with BlacklistingReactorWrapper and then the agent with BlacklistingAgentWrapper. Ideally all of this logic could be encompassed in a custom BlacklistingHostnameEndpoint which would implement similar logic to HostnameEndpoint, but apply the blacklisting logic to it (the necessary logic is almost identical to what is currently in _IPBlacklistingResolver).

This should allow creating an agent with Agent. usingEndpointFactory.

Some things to note:

  • This has to fit in somehow with the ProxyAgent (I suspect it should be an either or sort of thing, but not this should be further investigated).
  • The separation of SimpleHttpClient and MatrixFederationClient makes this a bit more difficult.
  • There's also some use of the RedirectAgent which may or may not be involved here.

Activity

  1. richvdh commented on Jan 13, 2021

    @richvdh
    Member

    This has to fit in somehow with the ProxyAgent (I suspect it should be an either or sort of thing, but not this should be further investigated).

    is this now resolved thanks to #9084?

  2. clokep commented on Jan 13, 2021

    @clokep
    MemberAuthor

    This has to fit in somehow with the ProxyAgent (I suspect it should be an either or sort of thing, but not this should be further investigated).

    is this now resolved thanks to #9084?

    I think so, I think what you would end up doing is using a new BlacklistingEndpoint instead of the HostnameEndpoint when not using the proxy.

  3. clokep commented on Jun 22, 2021

    @clokep
    MemberAuthor

    I had started playing with this briefly, but I don't remember if I even tested it... anyway my WIP was 854ed2a if that's useful to anyone. 😄

  4. added
    T-TaskRefactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.
    and removed on Jun 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-TaskRefactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions