Login Only - Does it actually stop all traffic access without login?

AI-generated summary

agemo asks whether Discourse’s Login Only mode provides a total block against bot traffic, noting that various resources and paths appeared accessible even with the setting enabled. awesomerobot clarifies that Login Only restricts access to the / and /login routes for public entry, but other paths should redirect to login. However, agemo demonstrates that static assets like CSS and JS files could still be pulled directly while in Login Only mode. awesomerobot confirms this is expected behavior because these assets are cached for performance and do not contain sensitive post content.

Concerned about potential DDoS vectors and data leakage via uploaded images, agemo suggests a more robust lockdown. awesomerobot recommends the Secure Uploads feature as a solution. Agemo later notes activating the Prevent anonymous users from downloading attachments setting as a temporary mitigation. AE1020 adds that even the login page itself triggers numerous asset requests (including theme components like voting or reactions), creating a large attack surface. AE1020 questions whether the login page can be made more minimal to reduce the volume of data served to unauthenticated users.

Based on concerns and dealing with issues raised here over time (which from reading is systemic across the web the last few months) and facing new waves of this stuff.

I tested Login Only, but noticed these AI bot waves hitting all kinds of discourse resources/paths, and potentially getting served a page/contents

Can anyone confirm if Login Only is a total block or not?

Also is there another potential entry angle via a Cloudflare cache interplay when, even when purging all caches, post Login Only state or does that solve the potential issue or only mitigate it until the cache is rebuilt?

Which paths specifically? anything that gets hit should redirect to login.

Yes, login only means the only way you can access the site is by logging in. It’s still possible to get some bot traffic to the / or /login routes, because those need to be public to allow humans to log in, but it will be restricted to those routes.

As posted in the linked topic, for e.g.:

...stylesheets/docker_manager_abc123.css

In some simple testing I followed the links various traffic was seeking, and I was able to pull down the css or js files and who knows what else, when discourse was in Login Only mode.

Oh I see, yes that’s expected… those are static assets used to render the app, they are often cached for performance and don’t contain sensitive post information.

Ok I understand the but maybe true lockdown needs to be deeply and quickly considered, for technical reasons I can’t think of other than leaving no threads that can be yanked DDoS level.

I’ve just seen nearly 3K unique URL request targeting specifically uploads/default/original/3X/c/.../...some.jpeg route, all launched from one IP in Singapore, the paths are correct, I sampled a few links and they are to unique specific image files, but Cloudflare was set to block Singapore wholesale.

The way things are going, nothing should be left hanging out that can be used for target practice. Total block.

Maybe https://meta.discourse.org/t/secure-uploads/meta/140017 could help you on this?

Thanks for pointing that out. I was not aware of it, but yea a BIG maybe, I don’t know if I have the time and resources to implement right now.

Searching meta I have discovered the below option here and have activated:

  • Prevent anonymous users from downloading attachments.

Maybe this will block such requests or help to some degree.

For the same reasons, I’ve been forced to a login-only situation on my forum (at least temporarily, while I figure out how to block unwanted traffic). I’ve directed all my Cloudflare-routed traffic that I can to a “CDN” subdomain so it doesn’t use “worker requests”…

In trying to pare down the traffic though, I couldn’t help but notice how many resources get pulled up just for the login page:

:flushed_face:

So forwarding non-logged in users to the login page still serves quite a lot of stuff.

Is there any way the login page could become much more spare, and not need things like “topic voting” or “reactions” or whatever these digested chunks are?