cal.com icon indicating copy to clipboard operation
cal.com copied to clipboard

fix: Add CORP and COEP headers to embedded pages

Open hariombalhara opened this issue 1 year ago • 7 comments
trafficstars

What does this PR do?

  • Fixes #14547 (GitHub issue number)

  • Fixes CAL-3732(Linear issue number - should be visible at the bottom of the GitHub issue description)

  • User needs to opt-in to enable these headers in embed(using query param flag.coep)

  • Added the COEP header to /:path*/embed routes making all the resources on those routes to have CORP header.

  • Also, added the COEP header to playground to be able to replicate the issue and henceforth test this scenario.

Mandatory Tasks (DO NOT REMOVE)

  • [x] I have self-reviewed the code (A decent size PR without self-review might be rejected)
  • [x] N/A I have added a Docs issue here if this PR makes changes that would require a documentation change
  • [x] I have added or modified automated tests that prove my fix is effective or that my feature works (PRs might be rejected if logical changes are not properly tested)

How should this be tested?

Simply launch the playground using yarn dev inside packages/embeds/embed-core and see the embed loading

hariombalhara avatar May 31 '24 10:05 hariombalhara

Thank you for following the naming conventions! 🙏 Feel free to join our discord and post your PR link.

github-actions[bot] avatar May 31 '24 10:05 github-actions[bot]

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
ai ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 28, 2024 3:48am
2 Ignored Deployments
Name Status Preview Comments Updated (UTC)
cal ⬜️ Ignored (Inspect) Visit Preview Jun 28, 2024 3:48am
calcom-web-canary ⬜️ Ignored (Inspect) Visit Preview Jun 28, 2024 3:48am

vercel[bot] avatar May 31 '24 10:05 vercel[bot]

  • #15275 Graphite 👈
  • main

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @hariombalhara and the rest of your teammates on Graphite Graphite

hariombalhara avatar May 31 '24 10:05 hariombalhara

Current Playwright Test Results Summary

✅ 326 Passing - ⚠️ 19 Flaky

Run may still be in progress, this comment will be updated as current testing workflow or job completes...

(Last updated on 06/03/2024 03:42:55pm UTC)

Run Details

Running Workflow All checks on Github Actions

Commit: a55b1cd2f974ba0c76f4c9b43184edaf6b166d36

Started: 06/03/2024 03:36:10pm UTC

⚠️ Flakes

📄   apps/web/playwright/teams.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Teams - NonOrg -- future Can create a booking for Round Robin EventType
Retry 1Initial Attempt
2.22% (3) 3 / 135 runs
failed over last 7 days
22.22% (30) 30 / 135 runs
flaked over last 7 days

📄   packages/app-store/routing-forms/playwright/tests/basic.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Routing Forms Seeded Routing Form Test preview should return correct route
Retry 1Initial Attempt
0.72% (1) 1 / 138 run
failed over last 7 days
55.07% (76) 76 / 138 runs
flaked over last 7 days

📄   apps/web/playwright/profile.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Update Profile Newly added secondary email should show as Unverified
Retry 1Initial Attempt
3.65% (5) 5 / 137 runs
failed over last 7 days
29.93% (41) 41 / 137 runs
flaked over last 7 days

📄   apps/web/playwright/login.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Login and logout tests -- future Login flow validations -- future Should warn when user does not exist
Retry 1Initial Attempt
0% (0) 0 / 113 runs
failed over last 7 days
3.54% (4) 4 / 113 runs
flaked over last 7 days

📄   apps/web/playwright/integrations-stripe.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Stripe integration skip true Pending payment booking should not be confirmed by default
Retry 1Initial Attempt
7.20% (9) 9 / 125 runs
failed over last 7 days
16.80% (21) 21 / 125 runs
flaked over last 7 days

📄   apps/web/playwright/insights.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Insights team select filter should have 2 teams and your account option only as member
Retry 1Initial Attempt
0% (0) 0 / 132 runs
failed over last 7 days
0.76% (1) 1 / 132 run
flaked over last 7 days

📄   apps/web/playwright/impersonation.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Users can impersonate App Admin can impersonate users with impersonation enabled
Retry 1Initial Attempt
0.76% (1) 1 / 132 run
failed over last 7 days
14.39% (19) 19 / 132 runs
flaked over last 7 days

📄   apps/web/playwright/organization/organization-invitation.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Organization Email matching orgAutoAcceptEmail and a Verified Organization with DNS Setup Done existing user migrated to an organization
Retry 1Initial Attempt
0.75% (1) 1 / 134 run
failed over last 7 days
9.70% (13) 13 / 134 runs
flaked over last 7 days

📄   apps/web/playwright/managed-event-types.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Managed Event Types Can create managed event type
Retry 1Initial Attempt
13.14% (18) 18 / 137 runs
failed over last 7 days
43.80% (60) 60 / 137 runs
flaked over last 7 days

📄   packages/embeds/embed-core/playwright/tests/action-based.e2e.ts • 9 Flakes

Top 1 Common Error Messages

null

9 Test Cases Affected

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Popup Tests should open embed iframe on click - Configured with light theme
Retry 1Initial Attempt
-17.39% (-24) -24 / 138 runs
failed over last 7 days
71.01% (98) 98 / 138 runs
flaked over last 7 days
Popup Tests should be able to reschedule
Retry 1Initial Attempt
-100% (-63) -63 / 63 runs
failed over last 7 days
109.52% (69) 69 / 63 runs
flaked over last 7 days
Popup Tests Floating Button Popup Pro User - Configured in App with default setting of system theme should open embed iframe according to system theme when no theme is configured through Embed API
Retry 1Initial Attempt
-115.79% (-66) -66 / 57 runs
failed over last 7 days
119.30% (68) 68 / 57 runs
flaked over last 7 days
Popup Tests should open Routing Forms embed on click
Retry 1Initial Attempt
-121.05% (-69) -69 / 57 runs
failed over last 7 days
121.05% (69) 69 / 57 runs
flaked over last 7 days
Popup Tests Floating Button Popup Pro User - Configured in App with default setting of system theme should open embed iframe according to system theme when configured with 'auto' theme using Embed API
Retry 1Initial Attempt
-123.64% (-68) -68 / 55 runs
failed over last 7 days
123.64% (68) 68 / 55 runs
flaked over last 7 days
Popup Tests Floating Button Popup Pro User - Configured in App with default setting of system theme should open embed iframe(Event Booking Page) with dark theme when configured with dark theme using Embed API
Retry 1Initial Attempt
-123.64% (-68) -68 / 55 runs
failed over last 7 days
123.64% (68) 68 / 55 runs
flaked over last 7 days
Popup Tests Floating Button Popup Pro User - Configured in App with default setting of system theme should open embed iframe(Booker Profile Page) with dark theme when configured with dark theme using Embed API
Retry 1Initial Attempt
-123.64% (-68) -68 / 55 runs
failed over last 7 days
123.64% (68) 68 / 55 runs
flaked over last 7 days
Popup Tests should open on clicking child element
Retry 1Initial Attempt
-120% (-66) -66 / 55 runs
failed over last 7 days
120% (66) 66 / 55 runs
flaked over last 7 days
Popup Tests prendered embed should be loaded and apply the config given to it
Retry 1Initial Attempt
-120% (-66) -66 / 55 runs
failed over last 7 days
120% (66) 66 / 55 runs
flaked over last 7 days

📄   apps/web/playwright/organization/booking.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Bookings Team Event Can create a booking for Round Robin EventType
Retry 1Initial Attempt
10.95% (15) 15 / 137 runs
failed over last 7 days
18.25% (25) 25 / 137 runs
flaked over last 7 days

View Detailed Build Results


deploysentinel[bot] avatar Jun 03 '24 12:06 deploysentinel[bot]

Graphite Automations

"Add consumer team as reviewer" took an action on this PR • (06/03/24)

1 reviewer was added to this PR based on Keith Williams's automation.

graphite-app[bot] avatar Jun 03 '24 15:06 graphite-app[bot]

This PR is being marked as stale due to inactivity.

github-actions[bot] avatar Jun 26 '24 00:06 github-actions[bot]

This PR is being marked as stale due to inactivity.

github-actions[bot] avatar Jul 13 '24 00:07 github-actions[bot]

@Amit91848 @anikdhabal can one of you review and test this please?

keithwillcode avatar Jul 24 '24 22:07 keithwillcode