feat: API Key and person UUID based meetecho APIs - #11719
Open
rjsparks wants to merge 6 commits into
Open
Conversation
save_bluesheet() and generate_bluesheet() read request.user.person for the document event author. Take the author as an argument instead, so a caller whose request has no associated person can supply one. Existing callers pass request.user.person, so behavior is unchanged. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Move the chatlog/polls document write and the video URL update into save_session_json_doc() and save_session_video_url(), and rewire api_upload_chatlog, api_upload_polls and api_set_session_video_url onto them. Lets the DRF endpoints that follow share one implementation with these. save_session_video_url() returns an error when the session has no official timeslot rather than raising AttributeError. api_set_session_video_url already answered 400 for that input, because require_api_key catches AttributeError; only the message changes. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…f raising save_bluesheet() dereferenced the session's timeslot without checking for one, raising AttributeError. Return the same error its sibling helpers return. upload_session_bluesheets and finalize turn that into a form error and a user message rather than a 500. api_upload_bluesheet already answered 400, because require_api_key catches AttributeError; only the message changes. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…heet, chatlog and polls Add api_key_endpoint authenticated counterparts of five of the personal API key endpoints, taking JSON and returning JSON with DRF status codes. A token identifies an application rather than a person, so document events are authored by the (System) Person. None of these five carries a person identifier. Bluesheet names and chatlog authors stay free text. Request values are bounded by the columns that store them. The existing endpoints are unchanged. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Identify each attendee by Person UUID rather than by the User pk the existing endpoint takes. Any UUID the datatracker has issued resolves, so one superseded by a merge still works. If any UUID fails to resolve the whole request is rejected and nothing is recorded. The rows and an interim meeting's regenerated bluesheet are written in one transaction. join_time must carry an explicit UTC offset. DateTimeField would otherwise make a naive value aware in the process timezone and shift it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Add a Person UUID keyed counterpart of MeetingsAttendedByEmail, which is keyed by an address the person may stop using. Lift the shared registration query to module level so both endpoints use it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #11719 +/- ##
==========================================
+ Coverage 88.75% 88.81% +0.05%
==========================================
Files 337 337
Lines 45420 45547 +127
==========================================
+ Hits 40311 40451 +140
+ Misses 5109 5096 -13 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a parallel set of DRF endpoints for the session data Meetecho pushes, keyed by
Person UUID and authenticated by service token. The six existing personal-API-key
endpoints keep working, so Meetecho migrates on its own schedule with no coordinated
cutover.
New endpoints
POST /api/meeting/session/{id}/video-url/{"url": ...}POST /api/meeting/session/{id}/recording-name/{"name": ...}POST /api/meeting/session/{id}/bluesheet/{"bluesheet": [{"name", "affiliation"}]}POST /api/meeting/session/{id}/attendees/{"attendees": [{"person_uuid", "join_time"}]}POST /api/meeting/session/{id}/chatlog/{"chatlog": [...]}POST /api/meeting/session/{id}/polls/{"polls": [...]}GET /api/meeting/registration/attended/by-uuid/{uuid}/JSON in, JSON out,
X-Api-Keyviaapi_key_endpoint. Errors use the project'sstandardized error envelope.
Decisions
(
user_id, aUserpk — the OIDCsub); it becomesperson_uuid. Any UUID thedatatracker issued resolves, including one superseded by a merge. Meetecho already
gets these from the
datatracker_uuidOIDC claim. Sessions stay addressed by pk.uploader observed, not person references — Meetecho can't always resolve a room
attendee or chat participant to a Person.
request.userisAnonymousUserand document events are authored by the(System)Person. This alsodrops the Recording Manager role check: authorization is possession of the token.
request; the rows and an interim meeting's bluesheet are written in one transaction. A version
that allows partial success is left as a future exercise.
Deploying
Needs seven
APP_API_TOKENSkeys:ietf.api.meeting.session.{video_url, recording_name,bluesheet,attendees,chatlog,polls}andietf.api.meeting.registration.attended_by_uuid. Separate keys so any one capabilitycan be withdrawn independently; the same token value can serve all seven.
Changes to existing behavior
Commits 1–3 touch code the existing endpoints share. Five of the six are
behavior-identical. The exceptions, both on a session with no official timeslot:
api_set_session_video_urlandapi_upload_bluesheetalready answered 400 for thatinput, because
require_api_keycatchesAttributeError. Only the message changes.upload_session_bluesheetsandfinalizehave no such catch, so they change from a500 to a form error and a user message.
Notes
Reviewed adversarially before merge; the findings are folded into the commits they
belong to. Known and deliberately not fixed here: the legacy recording-name endpoint
still does no length validation against its 64-character column.