Programming exercises: Send email notification if https authentication option is used - #13555
Programming exercises: Send email notification if https authentication option is used#13555Lyynnnx wants to merge 36 commits into
Programming exercises: Send email notification if https authentication option is used#13555Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (3)
Included review availability: Your plan provides up to 4 included reviews per hour; 2 remain after this review. Walkthrough
ChangesHTTPS clone guidance
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to The PR adds a once-per-24-hour email tip for users cloning repositories over HTTPS and updates the related translations and template. No actionable merge-blocking risk remains beyond normal checks and review. Sequence Diagram(s)sequenceDiagram
participant LocalVCServletService
participant DistributedDataProvider
participant DistributedMap
participant MailSendingService
LocalVCServletService->>DistributedDataProvider: Get HTTPS_CLONE_EMAIL_CACHE
DistributedDataProvider-->>LocalVCServletService: Return expiring map
LocalVCServletService->>DistributedMap: Check user entry
LocalVCServletService->>MailSendingService: Send localized clone tip email
LocalVCServletService->>DistributedMap: Store user entry for 24 hours
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
End-to-End Test Results
Test Strategy: Two-phase execution
Overall: ✅ E2E tests passed 🔗 Workflow Run · 📊 Test Report Phase 1 · 📊 Test Report Phase 2 |
|
Tested on TS4 (artemis-test4) as a student (artemis_test_user_1), following the Steps for Testing:
One snag worth flagging for anyone else testing this: on Windows, Git Credential Manager silently reuses a cached token for subsequent HTTPS clones to the same host, which will not trigger the notification (since the server sees token auth, not password auth) even though the URL scheme is "https". Had to clone with the password embedded directly in the URL (bypassing GCM) to get a genuine password-authenticated clone. Not a bug in this PR, but easy to get a false negative if you don't notice it. Reverted the test account's email back to default afterward. Didn't need instructor/admin for this -- the prerequisites (1 student, 1 programming exercise) were enough. |
Arnav92
left a comment
There was a problem hiding this comment.
Manually tested the HTTPS-clone email notification flow end to end on TS4 as a student -- see my comment above for the full walkthrough. All three steps behaved as described: no email on Token clone, one email on the first genuine password/HTTPS clone, no duplicate on the immediate follow-up clone. Approving.
Summary
This PR adds a feature where user gets a notification with Artemis tip once in 24 hours if they use
httpsauthentication option byCLONEoperation working with Git repositoriesChecklist
General
Server
Changes affecting Programming Exercises
Motivation and Context
As mentioned in
Contextsection of another nudging PR, theHTTPSoption has security risks and provides negative UX. However, it's still used by many users. Therefore, the nudging techniques are needed that will motivate users to use more secure and user-friendly authentication options (e.g.,TokenorSSH).Such techniques would increase the UX and secure more users.
Description
This PR adds a change in
LocalVCServletServicewhere ifCloneoperation is used withPasswordauthentication option (i.e.,HTTPS) then user gets an email notification suggesting to userTokenorSSHauthentication option instead.To avoid spamming, such notification are sent with at least 24 hour interval. For this, a DistributedDataProvider (i.e., cache) is used where for every user a flag is added for 24 hours if the
ClonewithPasswordare used.Steps for Testing
Prerequisites:
For this exercise an email service is needed. If you do not have one, just use the testing servers.
In case you are using the test servers: since the LDAP is disabled on test servers, there is no password for you TUM account in Artemis, so HTTPS clone method won't work for your account. For this, just use any test user account from here.
Be careful: in this PR you should test the fact that you receive notifications to your mail and by default test account have an arbitrary email, so in order to receive a notification to your mail address, please, change the email address of test account to yours in settings, while you are doing the testing steps.
Please, change the email back to default after you finish the testing steps. Thank you!
TokenTokenauthentication methodHTTPSHTTPSauthentication methodHTTPSmethod again.Exam Mode Testing
Prerequisites:
TokenTokenauthentication methodHTTPSHTTPSauthentication methodHTTPSmethod again.Thank you for testing!
Testserver States
You can manage test servers using Helios. Check environment statuses in the environment list. To deploy to a test server, go to the CI/CD page, find your PR or branch, and trigger the deployment.
Review Progress
Code Review
Manual Tests
Exam Mode Test
Performance Tests
Test Coverage
Server
Last updated: 2026-08-23 23:27:19 UTC
Screenshots
Summary by CodeRabbit
New Features
Bug Fixes