-
-
Notifications
You must be signed in to change notification settings - Fork 197
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
Allow for subdomains when determining if to allow messages to appear on a thread set to authority_only #6293
Comments
+1 - The University of Edinburgh aren't the only public body to do this, and it can be a nuisance both to admins and to public bodies themselves. Conversely however, there is a possible risk that this would allow for spoofing (e.g. some Universities provide student email on a sub-domain), but the risk of nefarious usage is perhaps unlikely and could be handled on a case-by-case basis. |
I too considered this, however in these cases the threads have previously been open to accept responses from anyone. This closure to "authority only" is a spam reduction / spam incident mitigation measure, not the primary way we assure responses are from a public body and not spoofed. The secret part of the request address is one of the key ways spoofing is prevented. An extreme way to resolve this ticket would be to always let .ac.uk and .gov.uk responses through when threads are set to authority_only. Perhaps that would be OK if we could use other means to prevent spoofing by spammers eg. if we had a DKIM / SPF authenticated .gov.uk or .ac.uk email we could let that through? |
I think the solution here is to create an association on Then in the diff --git a/app/models/info_request/response_gatekeeper/authority_only.rb b/app/models/info_request/response_gatekeeper/authority_only.rb
index 27d3b8e78..44e1b8293 100644
--- a/app/models/info_request/response_gatekeeper/authority_only.rb
+++ b/app/models/info_request/response_gatekeeper/authority_only.rb
@@ -27,6 +27,11 @@ def calculate_allow_reason(info_request, email)
end
end
+ if info_request.public_body.authority_domain?(sender_domain)
+ allow = true
+ reason = nil
+ end
+
[allow, reason]
end
end This would mean that there'd be no change in behaviour for authorities by default, but where we get notified of an edge case like this, we take human action to work around it if necessary and limit the risk of impersonation. To make this a quicker change we could opt not to include an admin interface, unless we find ourselves needing to use the functionality repeatedly. Perhaps we'd want to at least render out any manually added allowed domains so that it's clear that they're in operation, but skip the editing forms to save a bit of time. |
I like this idea - it allows us to make a change (relatively) quickly where it is required, but it also provides us with adequate reassurance that we can protect against misuse in scenarios where an 'all or nothing' approach would be unsuitable.
It'd certainly be desirable if it was configurable via the admin console - and that it supported multiple locales; for example: we might wish to enable a body such as the Senedd to use both the English and Welsh variations of their domain simultaneously when setting an allowed sub-domain. That's another edge case perhaps, but it may help for internationalisation. |
I don't think the authority_only setting is related to preventing impersonation. Requests set to authority_only will have previously open to responses from anyone (anyone with the request address). My understanding is:
|
No, but allowing e.g. all |
There have been a couple of requests recently, where it would be helpful to allowlist 1 domains used by orgs using case management systems, as the replies are issued off the vendor's domain / subdomain. In this setup, the message typically takes the format of:
… meaning that we match This isn't great, as it causes friction for the user, and extra admin for support teams 2. Ideally, being able to configure this at authority level would be preferable; but, I suppose a hacky interim solution of sorts could be to use a list similar to the Related:
Footnotes
|
We do have this capability of sorts, in that (at least as documented!) we allow responses from any domain that has already replied to a thread when "anybody" was allowed to reply: What's happened in these cases? They were so late in responding that we'd moved to
I think we could do this in a patched way (and is preferable before we build it into a fully fleshed out admin UI, so that we can battle-test it and judge how frequely we find we want to do it)… something like: # Aliases mapped to ID of PublicBody record
PUBLIC_BODY_DOMAIN_ALIASES = {
# Department for Foobar
1234 => %w[
orgname.vendor.tld
cy-orgname.vendor.tld
]
# Department for Humpadinking
987 => %w[
other.tld
]
}
# our hacky method that patches something
# I think InfoRequest#who_can_followup_to is probably what we want…
def who_can_followup_to
super
# Find relevant domains: PUBLIC_BODY_DOMAIN_ALIASES[public_body.id]
# Add them to the return array
end
# The gotcha here is that currently `InfoRequest#who_can_followup_to` is returning full
# email addresses, and then the `InfoRequest::ResponseGatekeeper::AuthorityOnly` is
# doing the work to find the domain. This might be fine as is, if
# `PublicBody.extract_domain_from_email` works fine if given a domain. If not there'd
# be a bit more work to clean some of this up. |
This issue has been automatically closed due to a lack of discussion or resolution for over 12 months. |
Requests to the University of Edinburgh on WhatDoTheyKnow are sent to an email address at the domain
The University of Edinburgh sends responses from a domain:
currently when a thread is set to authority_only responses don't get through.
The text was updated successfully, but these errors were encountered: