Skip to content

Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.

🔥 Remove the per-provider conferencing allowlists

Luke Vella29cdb995412a
diff --git a/apps/docs/self-hosting/conferencing.mdx b/apps/docs/self-hosting/conferencing.mdx
index ce3629f87..ac0c8a1a9 100644
--- a/apps/docs/self-hosting/conferencing.mdx
+++ b/apps/docs/self-hosting/conferencing.mdx
@@ -20,7 +20,7 @@ Each provider needs an OAuth app that you register with the provider yourself. R
Add `CONFERENCING_ENABLED=true` and the provider's variables to your `.env`.
</Step>
<Step title="Restart">
- Run `./rallly.sh restart`. **Conferencing** appears in **Settings** for every user who has at least one provider available.
+ Run `./rallly.sh restart`. **Conferencing** appears in **Settings** for every user.
</Step>
</Steps>
@@ -65,7 +65,7 @@ Keep the existing `/api/auth/callback/google` URI if you use Google sign in.
## Zoom
<Accordion title="Setup">
-1. Sign in to the [Zoom App Marketplace](https://marketplace.zoom.us/) and choose **Develop** > **Build App**. Create a **General App** that is **User managed**.
+1. Sign in to the [Zoom App Marketplace](https://marketplace.zoom.us/) with an account on your organization's Zoom account and choose **Develop** > **Build App**. Create a **General App** that is **User managed**. Building the app here does not list it on the Marketplace.
2. Under **Basic Information**, set the **OAuth Redirect URL** and add the same address to the **OAuth Allow List**:
@@ -77,7 +77,7 @@ https://<YOUR_DOMAIN>/api/integrations/callback/zoom
4. Copy the **Client ID** and **Client Secret** from **Basic Information**.
-Until the app is published on the Marketplace, Zoom only lets users of the Zoom account that created it authorize it. If organizers use other Zoom accounts, submit the app for publication or add them as users of that account.
+You do not need to publish the app. An unpublished app stays private to the Zoom account it was built on, and every user on that account can connect it, which covers an organization on a single Zoom account. Organizers on other Zoom accounts cannot connect it unless the app is published, which requires Zoom's review.
</Accordion>
<Accordion title="Deauthorization notices (optional)">
@@ -162,33 +162,11 @@ https://<YOUR_DOMAIN>/api/integrations/callback/webex
The client secret of your Webex integration.
</ParamField>
-## Limiting a provider to some users
-
-While an OAuth app is waiting for review, or to try a provider before opening it to everyone, you can offer it to listed accounts only. Each variable takes a comma separated list of email addresses, matched exactly and case insensitively.
-
-Leaving a variable unset offers the provider to everyone. Setting it to an empty value offers it to nobody.
-
-<ParamField path="GOOGLE_MEET_ALLOWED_EMAILS">
- Accounts that are offered Google Meet.
-</ParamField>
-
-<ParamField path="ZOOM_ALLOWED_EMAILS">
- Accounts that are offered Zoom.
-</ParamField>
-
-<ParamField path="MICROSOFT_TEAMS_ALLOWED_EMAILS">
- Accounts that are offered Microsoft Teams. Approving the app for an organization through the admin consent link is not limited.
-</ParamField>
-
-<ParamField path="WEBEX_ALLOWED_EMAILS">
- Accounts that are offered Webex.
-</ParamField>
-
## Troubleshooting
**Rallly does not start after enabling conferencing.** `CONFERENCING_ENABLED` is `true` but no provider is configured, or only one of `ZOOM_CLIENT_ID` and `ZOOM_CLIENT_SECRET` (or the Webex pair) is set. Run `./rallly.sh logs web` to see which.
-**Conferencing does not appear in Settings.** `CONFERENCING_ENABLED` is not `true`, no provider's variables are set, or an allowlist above excludes the signed in account. Restart after editing `.env`.
+**Conferencing does not appear in Settings.** `CONFERENCING_ENABLED` is not `true`, or no provider's variables are set. Restart after editing `.env`.
**The provider says the redirect URI does not match** (`redirect_uri_mismatch` on Google). The URI registered with the provider differs from the one Rallly sends. Compare it character by character with the URI above, including `https`, your exact domain and the provider name at the end.
diff --git a/apps/web/src/app/[locale]/(optional-space)/new/page.tsx b/apps/web/src/app/[locale]/(optional-space)/new/page.tsx
index 43f61676d..856105c98 100644
--- a/apps/web/src/app/[locale]/(optional-space)/new/page.tsx
+++ b/apps/web/src/app/[locale]/(optional-space)/new/page.tsx
@@ -33,10 +33,7 @@ export default async function Page() {
}
const [conferencing, openPollUsage] = await Promise.all([
- loadConferencingOptions({
- userId,
- email: user?.email ?? null,
- }),
+ loadConferencingOptions({ userId }),
loadOptionalOpenPollUsage(),
]);
diff --git a/apps/web/src/app/[locale]/(space)/settings/conferencing/page.tsx b/apps/web/src/app/[locale]/(space)/settings/conferencing/page.tsx
index 5732cebb0..bc084d21c 100644
--- a/apps/web/src/app/[locale]/(space)/settings/conferencing/page.tsx
+++ b/apps/web/src/app/[locale]/(space)/settings/conferencing/page.tsx
@@ -23,7 +23,7 @@ import { Trans } from "@/i18n/client";
import { getTranslation } from "@/i18n/server";
import { isFeatureEnabled } from "@/lib/feature-flags/server";
-// The page exists for a user only while some provider is offered to them.
+// The page exists only while the instance offers some provider.
async function AvailabilityGate() {
const providers = await loadAvailableConferencingProviders();
if (providers.length === 0) {
diff --git a/apps/web/src/app/api/integrations/[...connection]/route.ts b/apps/web/src/app/api/integrations/[...connection]/route.ts
index ef705df25..93c283331 100644
--- a/apps/web/src/app/api/integrations/[...connection]/route.ts
+++ b/apps/web/src/app/api/integrations/[...connection]/route.ts
@@ -5,12 +5,10 @@ import {
} from "@/features/calendars/mutations";
import {
isConferencingEnabled,
- isConferencingProviderAllowedFor,
MICROSOFT_TEAMS_SCOPES,
WEBEX_SCOPES,
} from "@/features/conferencing/constants";
import { createConferencingConnection } from "@/features/conferencing/mutations";
-import type { ConferencingProvider } from "@/features/conferencing/schema";
import { checkTeamsCanHostMeetings } from "@/features/conferencing/service";
import { getMicrosoftTeamsAuthority } from "@/features/conferencing/utils";
import { saveOAuthCredentials } from "@/features/credentials/mutations";
@@ -39,14 +37,6 @@ async function requireSessionUserId() {
return session.user.id;
}
-async function isAllowedForSession(provider: ConferencingProvider) {
- const session = await getSession();
- return isConferencingProviderAllowedFor({
- provider,
- email: session?.user.email ?? null,
- });
-}
-
function conferencingOnConnect({
integrationId,
displayName,
@@ -78,7 +68,7 @@ function conferencingOnConnect({
const { handler } = OAuthIntegration<Integration>({
basePath: "/api/integrations",
- getIntegration: async ({ integrationId, callbackUrl, flow }) => {
+ getIntegration: async ({ integrationId, callbackUrl }) => {
switch (integrationId) {
case "google-calendar": {
if (!env.GOOGLE_CLIENT_ID || !env.GOOGLE_CLIENT_SECRET) {
@@ -129,8 +119,7 @@ const { handler } = OAuthIntegration<Integration>({
if (
!isConferencingEnabled ||
!env.GOOGLE_CLIENT_ID ||
- !env.GOOGLE_CLIENT_SECRET ||
- !(await isAllowedForSession("meet"))
+ !env.GOOGLE_CLIENT_SECRET
) {
return null;
}
@@ -153,8 +142,7 @@ const { handler } = OAuthIntegration<Integration>({
if (
!isConferencingEnabled ||
!env.ZOOM_CLIENT_ID ||
- !env.ZOOM_CLIENT_SECRET ||
- !(await isAllowedForSession("zoom"))
+ !env.ZOOM_CLIENT_SECRET
) {
return null;
}
@@ -173,8 +161,7 @@ const { handler } = OAuthIntegration<Integration>({
if (
!isConferencingEnabled ||
!env.WEBEX_CLIENT_ID ||
- !env.WEBEX_CLIENT_SECRET ||
- !(await isAllowedForSession("webex"))
+ !env.WEBEX_CLIENT_SECRET
) {
return null;
}
@@ -193,11 +180,7 @@ const { handler } = OAuthIntegration<Integration>({
if (
!isConferencingEnabled ||
!env.MICROSOFT_CLIENT_ID ||
- !env.MICROSOFT_CLIENT_SECRET ||
- // The rollout allowlist limits who connects. Approving the app for
- // an organization connects no one, and the administrator doing it
- // is rarely on the list or signed in to Rallly.
- (flow === "connect" && !(await isAllowedForSession("teams")))
+ !env.MICROSOFT_CLIENT_SECRET
) {
return null;
}
diff --git a/apps/web/src/env.ts b/apps/web/src/env.ts
index 0f7149642..598e18564 100644
--- a/apps/web/src/env.ts
+++ b/apps/web/src/env.ts
@@ -126,12 +126,6 @@ export const env = createEnv({
ZOOM_WEBHOOK_SECRET_TOKEN: z.string().optional(),
WEBEX_CLIENT_ID: z.string().optional(),
WEBEX_CLIENT_SECRET: z.string().optional(),
- // Comma separated. While set, only these accounts are offered the
- // provider: an unpublished or unverified OAuth app authorizes no one else.
- GOOGLE_MEET_ALLOWED_EMAILS: z.string().optional(),
- ZOOM_ALLOWED_EMAILS: z.string().optional(),
- MICROSOFT_TEAMS_ALLOWED_EMAILS: z.string().optional(),
- WEBEX_ALLOWED_EMAILS: z.string().optional(),
/**
* Microsoft app registration, shared by sign in and Microsoft Teams.
@@ -322,12 +316,8 @@ export const env = createEnv({
ZOOM_CLIENT_ID: process.env.ZOOM_CLIENT_ID,
ZOOM_CLIENT_SECRET: process.env.ZOOM_CLIENT_SECRET,
ZOOM_WEBHOOK_SECRET_TOKEN: process.env.ZOOM_WEBHOOK_SECRET_TOKEN,
- ZOOM_ALLOWED_EMAILS: process.env.ZOOM_ALLOWED_EMAILS,
WEBEX_CLIENT_ID: process.env.WEBEX_CLIENT_ID,
WEBEX_CLIENT_SECRET: process.env.WEBEX_CLIENT_SECRET,
- WEBEX_ALLOWED_EMAILS: process.env.WEBEX_ALLOWED_EMAILS,
- GOOGLE_MEET_ALLOWED_EMAILS: process.env.GOOGLE_MEET_ALLOWED_EMAILS,
- MICROSOFT_TEAMS_ALLOWED_EMAILS: process.env.MICROSOFT_TEAMS_ALLOWED_EMAILS,
MICROSOFT_TENANT_ID: process.env.MICROSOFT_TENANT_ID,
MICROSOFT_CLIENT_ID: process.env.MICROSOFT_CLIENT_ID,
MICROSOFT_CLIENT_SECRET: process.env.MICROSOFT_CLIENT_SECRET,
diff --git a/apps/web/src/features/conferencing/constants.ts b/apps/web/src/features/conferencing/constants.ts
index 58b825fd3..81f4d1265 100644
--- a/apps/web/src/features/conferencing/constants.ts
+++ b/apps/web/src/features/conferencing/constants.ts
@@ -1,5 +1,4 @@
import type { ConferencingProvider } from "./schema";
-import { isEmailAllowlisted } from "./utils";
export const isConferencingEnabled =
process.env.CONFERENCING_ENABLED === "true";
@@ -27,40 +26,6 @@ export function getAvailableConferencingProviders(): ConferencingProvider[] {
return providers;
}
-// While a provider's allowlist is set, only the listed accounts are offered
-// it, for a provider whose OAuth app is not yet published or verified and so
-// authorizes nobody else. Only an unset variable opens the provider to
-// everyone; a set but empty list lets nobody in.
-const providerAllowlists: Record<ConferencingProvider, string | undefined> = {
- meet: process.env.GOOGLE_MEET_ALLOWED_EMAILS,
- zoom: process.env.ZOOM_ALLOWED_EMAILS,
- teams: process.env.MICROSOFT_TEAMS_ALLOWED_EMAILS,
- webex: process.env.WEBEX_ALLOWED_EMAILS,
-};
-
-export function isConferencingProviderAllowedFor({
- provider,
- email,
-}: {
- provider: ConferencingProvider;
- email: string | null;
-}) {
- const allowlist = providerAllowlists[provider];
- return allowlist === undefined || isEmailAllowlisted({ email, allowlist });
-}
-
-// What this user is offered. Conferencing settings exist for a user only
-// while this is non empty.
-export function getAvailableConferencingProvidersFor({
- email,
-}: {
- email: string | null;
-}) {
- return getAvailableConferencingProviders().filter((provider) =>
- isConferencingProviderAllowedFor({ provider, email }),
- );
-}
-
// `offline_access` is what makes Microsoft issue a refresh token.
export const MICROSOFT_TEAMS_SCOPES = [
"openid",
diff --git a/apps/web/src/features/conferencing/loaders.ts b/apps/web/src/features/conferencing/loaders.ts
index df796bf67..af037807b 100644
--- a/apps/web/src/features/conferencing/loaders.ts
+++ b/apps/web/src/features/conferencing/loaders.ts
@@ -2,15 +2,15 @@ import "server-only";
import { cache } from "react";
import { loadUser } from "@/features/user/loaders";
-import { getAvailableConferencingProvidersFor } from "./constants";
+import { getAvailableConferencingProviders } from "./constants";
import {
getConferencingConnections,
getConnectedConferencingProviders,
} from "./data";
export const loadAvailableConferencingProviders = cache(async () => {
- const user = await loadUser();
- return getAvailableConferencingProvidersFor({ email: user.email });
+ await loadUser();
+ return getAvailableConferencingProviders();
});
export const loadConferencingConnections = cache(async () => {
@@ -22,15 +22,10 @@ export const loadConferencingConnections = cache(async () => {
// the organizer has already linked. Guests have nothing to link; a pasted
// link needs no provider, so the options always exist.
export const loadConferencingOptions = cache(
- async ({
- userId,
- email,
- }: {
- userId: string | null;
- email: string | null;
- }) => {
- const available = getAvailableConferencingProvidersFor({ email });
- // A provider the user linked before it was gated is not offered either.
+ async ({ userId }: { userId: string | null }) => {
+ const available = getAvailableConferencingProviders();
+ // A provider the user linked before the instance stopped offering it is
+ // not offered either.
const connected = userId
? (await getConnectedConferencingProviders(userId)).filter((provider) =>
available.includes(provider),
diff --git a/apps/web/src/features/conferencing/utils.test.ts b/apps/web/src/features/conferencing/utils.test.ts
index a12ee9f9e..6768471ac 100644
--- a/apps/web/src/features/conferencing/utils.test.ts
+++ b/apps/web/src/features/conferencing/utils.test.ts
@@ -7,7 +7,6 @@ import {
getConferencingUri,
getMicrosoftTeamsAuthority,
getWebexMeetingWindow,
- isEmailAllowlisted,
isTeamsMeetingRefusal,
meetSpaceResponseSchema,
meetSpaceToConferencing,
@@ -359,26 +358,3 @@ describe("createZoomUrlValidationResponse", () => {
});
});
});
-
-describe("isEmailAllowlisted", () => {
- const allowlist = "[email protected], [email protected]";
-
- it("matches a listed address regardless of case and spacing", () => {
- expect(isEmailAllowlisted({ email: "[email protected]", allowlist })).toBe(
- true,
- );
- expect(
- isEmailAllowlisted({ email: "[email protected]", allowlist }),
- ).toBe(true);
- });
-
- it("rejects an address that is not listed", () => {
- expect(
- isEmailAllowlisted({ email: "[email protected]", allowlist }),
- ).toBe(false);
- });
-
- it("rejects a missing address", () => {
- expect(isEmailAllowlisted({ email: null, allowlist })).toBe(false);
- });
-});
diff --git a/apps/web/src/features/conferencing/utils.ts b/apps/web/src/features/conferencing/utils.ts
index 143bdc809..60f67b9ce 100644
--- a/apps/web/src/features/conferencing/utils.ts
+++ b/apps/web/src/features/conferencing/utils.ts
@@ -321,20 +321,3 @@ export async function createZoomUrlValidationResponse({
);
return { plainToken, encryptedToken };
}
-
-// A comma separated list of addresses, matched case insensitively.
-export function isEmailAllowlisted({
- email,
- allowlist,
-}: {
- email: string | null;
- allowlist: string;
-}) {
- if (!email) {
- return false;
- }
- const normalized = email.trim().toLowerCase();
- return allowlist
- .split(",")
- .some((entry) => entry.trim().toLowerCase() === normalized);
-}
diff --git a/apps/web/src/features/poll/loaders.ts b/apps/web/src/features/poll/loaders.ts
index b0b59039e..513b9cc11 100644
--- a/apps/web/src/features/poll/loaders.ts
+++ b/apps/web/src/features/poll/loaders.ts
@@ -246,8 +246,5 @@ export const loadPollConferencingOptions = cache(async (pollId: string) => {
const { poll } = await loadAdminPoll(pollId);
const owner = poll.userId ? await getUser(poll.userId) : null;
const host = owner && !owner.isGuest ? owner : null;
- return loadConferencingOptions({
- userId: host?.id ?? null,
- email: host?.email ?? null,
- });
+ return loadConferencingOptions({ userId: host?.id ?? null });
});