Skip to content

dp - Added canvas encryption to the backend and updated frontend accordingly. - #615

Closed
divyanipunj wants to merge 3 commits into
mainfrom
dp-canvas-token-enc
Closed

dp - Added canvas encryption to the backend and updated frontend accordingly.#615
divyanipunj wants to merge 3 commits into
mainfrom
dp-canvas-token-enc

Conversation

@divyanipunj

@divyanipunj divyanipunj commented Mar 10, 2026

Copy link
Copy Markdown
Contributor

Closes #502

Deployed to: https://frontiers-qa3.dokku-00.cs.ucsb.edu/

This PR:

  • Updates .env.SAMPLE to include APP_SECRET.
  • Updates application.properties to include APP_SECRET
  • Updates Course.java to include canvasTokenLastUpdated and canvasTokenLastFour.
  • Updates CoursesController.java and CoursesControllerTests.java to reflect the encryption service added and new variables from Course.java.
  • Adds TokenEncryptionService.java which adds a service with two methods that encrypt and decrypt canvas1 tokens.
  • Updated CanvasService,java and CanvasServiceTests.java to decrypt the Canvas API token before use, since tokens are now stored encrypted in the database.
  • Updates CanvasApiForm.jsx and CanvasApiForm.test.jsx to reflect the changes made in the backend.
  • Adds db migration file 013-add-canvas-token-last-updated.json given the changes in Course.java.

As discussed, remove canvasTokenLastUpdated and canvasTokenLastFour from Course.java. Also remove db migration file, since it's not necessary anymore. Restore the frontend completely. Update CoursesController (to encrypt and decrypt the token dynamically) and tests accordingly.

@divyanipunj
divyanipunj force-pushed the dp-canvas-token-enc branch from 899dc41 to 66f9c43 Compare March 12, 2026 22:59
@pconrad

pconrad commented May 30, 2026

Copy link
Copy Markdown
Contributor

Closing, replaced by #676

@pconrad pconrad closed this May 30, 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.

Protect Canvas token with encryption

3 participants