Open ebroder opened 2 years ago
Yeah I think we envisioned the same thing re: OAuth: -- the server admin configures the OAuth client id/client secret once, and then the creator of each Hunt grants that application access to some resource from e.g. their Google account (granting Drive access to a folder they own) or Discord account (granting the bot permissions to a guild they control).
You mention Discord as high-priority, but I'd personally rank Google Drive even higher here -- it's essential to the jolly-roger experience in a way that Discord is not, and if we were to someday operate a general-purpose jolly-roger instance for the public, I think it's very much preferable that:
Yeah OK I can agree with that. I will call out that I think that makes the "root folder" setting way more critical, probably required - the flow should probably involve the Google Picker API
Right now, external integration configurations are global. If we allow anyone to create a hunt (or even if we expanded hunt edit permissions from admins to operators), this creates a confused deputy risk. Jolly Roger is (e.g.) an admin on the servers it inhabits, which is quite a lot of role-assignment power.
The best way to handle this is to make external integrations a property of the individual hunt. This is most pressing for Discord, and secondarily pressing for mailing list integration (though #495 may have some bearing here).
I'll copy what @zarvox said when I originally proposed this as part of #618:
That said, my intuition is that we shouldn't require people to mint their own OAuth credentials for Google and Discord just to run their own hunts - they're relatively high effort to setup (and, e.g., a bot account is fundamentally tied to a Discord application). Reusing the Google and Discord OAuth clients is definitely more work to manage the permissions right, but I think that's the way to go if we want to make this smooth for folks.