Skip to content

feat(calendar): protect per-user connection creation - #197

Merged
seonghobae merged 5 commits into
mainfrom
feat/calendar-connection-create-authority-v1
Aug 12, 2026
Merged

feat(calendar): protect per-user connection creation#197
seonghobae merged 5 commits into
mainfrom
feat/calendar-connection-create-authority-v1

Conversation

@seonghobae

Copy link
Copy Markdown
Contributor

Buyer/security outcome

Advance #129 with the first authenticated connection-creation application boundary for per-user calendar credentials. Trusted LifeOS workspace/user authority must own the connection; provider callback/body data must never select tenant ownership.

Test-first state

The first branch commit is intentionally RED. calendar-connection-create.test.ts defines the required ordering and compensation contract before production implementation exists: credential material is stored before durable metadata; persistence receives only opaque handles plus trusted workspace/user ownership; returned evidence excludes tokens/secret handles; partial secret-store and metadata failures trigger cleanup; malformed provider results are rejected before credentials are stored.

Bounded implementation target

  • validate opaque UUIDv4 connection identity and bounded provider authorization result;
  • derive workspace/user only from already-authenticated TrustedCalendarUserContext;
  • write access/refresh material through a least-authority secret-store/KMS port and never persist plaintext credentials;
  • persist only opaque secret handles in Calendar-owned persistence;
  • compensate newly written credentials on partial provisioning/persistence failure and fail closed if cleanup cannot be proven;
  • return only credential-free lifecycle evidence.

This slice does not claim a concrete KMS adapter, OAuth state/PKCE, refresh single-flight, provider revocation cleanup, discovery/selection, scoped sync, or retirement of the current deployment-wide provider token. Those remain follow-on #129 work.

Refs #129, #21.

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@seonghobae, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 4 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: bdd1c3ea-d2df-462d-afaa-13eda8da7134

📥 Commits

Reviewing files that changed from the base of the PR and between a56ccbf and 22d314e.

📒 Files selected for processing (4)
  • apps/integration-calendar-service/src/calendar-connection-create-controller.test.ts
  • apps/integration-calendar-service/src/calendar-connection-create.test.ts
  • apps/integration-calendar-service/src/calendar-connection-create.ts
  • apps/integration-calendar-service/src/main.ts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@seonghobae
seonghobae marked this pull request as ready for review August 12, 2026 01:57
@seonghobae
seonghobae merged commit c56da01 into main Aug 12, 2026
38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants