The discussion revolves around a security question regarding JSON data in Discourse. Jim.Morrison inquired about the purpose of including user IDs in JSON for categories and the potential security risks of metadata leaking if a topic is delisted. david responded that user IDs are not considered secret and are regularly included in JSON data. He also explained that unlisting a topic will remove it from topic lists and JSON payloads for unprivileged accounts, but noted that topics can still be accessed if someone has the direct link. Jim.Morrison found david’s explanation helpful in alleviating the security team’s concerns.
Talking with our Security team they were curious why the userid is in the json for the categories and exactly are these json are there for?
Their primary concern about is for example, if we decide to delist a topic due to security reasons (which we have done before), could this metadata somehow leak them?
I’m not sure I understand the question exactly, can you elaborate a little more?
We use JSON to send all information between the server and the client in Discourse. User IDs are included regularly, and are not considered secret.
Unlisting a topic will remove it from any topic lists. This is done server-side, so yes they will disappear from the JSON payload for unprivileged accounts.
Of course, if someone already has the link for the topic, then they could still view the unlisted topic. If you need to completely secure a topic, then it’s best to convert it to a PM.