brave / brave/go-sync

Option to disallow new users?

Open
#309 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
367
Forks
83
Avg merge
3d 8h
Merged PRs (30d)
4

Description

Hi,

I'd like to disallow the "sign up" of new users, while the addition of new devices for existing users should remain allowed. Looking at the [code](https://github.com/brave/go-sync/blob/13e2e13ca1169dea89db840505d6a84fc82b6e51/command/command.go#L41) I figured that the equivalent of a user is probably called a "client" and the equivalent of a device is a "sync entity", correct?

Where would be the best place to cancel a new "sign up"? Assuming the above terminology is correct, one idea would be [here](https://github.com/brave/go-sync/blob/187c8e85432ffac2e1c4fd86fcd330651fca7d2f/command/server_defined_unique_entity.go#L56) which is run for each new client and at that point without having found any nigori details for the `clientID`, so I'd just return an error there. Any better approach?

I reckon this could be a useful feature for almost all decentral sync server instances. Would it be feasible to make this an "official" feature, e.g. controlled by an environment variable?

Thanks!

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with command/command.go and the linked section of command/server_defined_unique_entity.go, then trace how new clients and sync entities are created. Clarify the client-versus-device terminology and configuration requirements first; done should mean that new user sign-ups can be disabled while existing users may still add devices, with the behavior and configuration documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
authentication, backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.