Skip to content

Support service-authenticated Experience CS project and asset syncs - #973

Draft
abcampo-iry wants to merge 3 commits into
mainfrom
issues/1658
Draft

Support service-authenticated Experience CS project and asset syncs#973
abcampo-iry wants to merge 3 commits into
mainfrom
issues/1658

Conversation

@abcampo-iry

@abcampo-iry abcampo-iry commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Status

Points for consideration

Security

  • Uses a dedicated service key with constant-time comparison.
  • Restricts the service identity to public Scratch projects.
  • Rejects user-owned, school-owned, and non-Scratch projects.
  • Limits asset uploads to public Code Classroom projects.

Performance

  • Checks stored checksums without downloading assets.
  • Serializes writes to prevent conflicting or duplicate uploads.

What’s changed?

  • Added EXPERIENCE_CS_API_KEY configuration.
  • Added authentication through the X-Experience-CS-API-Key header.
  • Allowed Experience CS to create and update public Scratch projects.
  • Allowed global asset uploads for public Code Classroom projects.
  • Made asset uploads idempotent.

Steps to perform after deploying to production

  • Deploy Editor API before enabling the Experience CS synchronization.
  • Configure EXPERIENCE_CS_API_KEY with a secure secret.
  • Configure the same value as EDITOR_API_SYNC_API_KEY in Experience CS.

@cla-bot cla-bot Bot added the cla-signed label Aug 19, 2026
@github-actions

github-actions Bot commented Aug 19, 2026

Copy link
Copy Markdown

Test coverage

93.42% line coverage reported by SimpleCov.
Run: https://github.com/RaspberryPiFoundation/editor-api/actions/runs/32258981638

@abcampo-iry abcampo-iry changed the title Issues/1658 Support service-authenticated Experience CS project and asset syncs Aug 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants