rust-lang / rust-lang/team

Don't add `rust-lang-owner` to private streams

Open
#1,892 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
363
Forks
369
Avg merge
1d 54m
Merged PRs (30d)
59

Description

Current status

At the moment, to manage private streams automatically within this repo, we add the rust-lang-owner user to the stream.

See:

https://github.com/rust-lang/team/blob/353e7639fb0bee37798daf28556e302742e6a422/sync-team/src/zulip/mod.rs#L33

This isn't great because users with access to the rust-lang-owner user credentials (i.e. the members of the infra-admins team) can log in with that user and read private conversations.

Proposed change

As noted in #t-infra > zulip Moderator vs mods @ 💬, there's a setting in zulip channels that allow to specify users that can add other people to the channel while not being part of the channel.

Image

This means that rust-lang-owner could add people from the channel without being part of it. There's also the field "who can unsubscribe anyone from this channel", which would allow rust-lang-owner to also remove people from the channel.

Proof
  1. I created a test channel that only has me
  2. I added rust-lang in that setting field
  3. As you can see from the following picture, rust-lang-owner isn't present in the channel members:

Image

How to

People who created the private stream could add rust-lang-owner to both those fields, so that from that point on, the stream can be managed in this repo.

Alternative

An alternative useful for streams that need to be created from scratch, is that:

  1. rust-lang-owner creates the stream, setting itself as a stream administrator
  2. adds all the members to the stream
  3. removes itself from the stream members, leaving itself as stream administrator

More context

The only private stream configured through this repo we have at the moment is t-compiler/contrib-private:

https://github.com/rust-lang/team/blob/353e7639fb0bee37798daf28556e302742e6a422/teams/compiler.toml#L141

This is just a mitigation

Note that people with access to rust-lang-owner can still add themselves or rust-lang-owner to private streams and read the messages, but when doing so, at least they would leave a trace.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with sync-team/src/zulip/mod.rs at the referenced line and inspect the private stream configuration in teams/compiler.toml. Review the linked Zulip discussion and verify how channel administrators or moderator fields can support the existing management flow. Done means the configured private stream can be managed without rust-lang-owner being a member, while membership changes remain traceable.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend, security
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.