Add built-in POSIXv2 origin backend with native HTTP server#2960
Conversation
bbockelm
left a comment
There was a problem hiding this comment.
Reasonable first attempt. Please address the items I noted.
One important piece: checksums! These are not supported by afero so we'll need to do it on our own. Define an interface for fetching checksums given a filename and an implementation that uses extended attributes to store computed checksums (retrieving them by default; otherwise, recompute & store). Later, we'll develop additional methods for filesystems that don't support extended attributes.
All feedback addressed. Added checksum support with:
Commit 68c0ac6 |
bbockelm
left a comment
There was a problem hiding this comment.
Another round of change requests. Hopefully the last before my final touchups.
Addressed 8 of 16 comments in commit 0a53b53 (visibility, copyright, refactoring, OA4MP placement). Working on remaining comments which involve more complex changes to authorization, checksums, and token handling. Will complete in subsequent commits. |
de1be45 to
3b1cdb4
Compare
1614ac8 to
5dae320
Compare
bbockelm
left a comment
There was a problem hiding this comment.
Many things to do. Will have VS Code agent work on these items.
| } | ||
|
|
||
| // Extract groups from token using configured claim | ||
| if groups, ok := tokenClaims[um.groupsClaim]; ok { |
There was a problem hiding this comment.
Also accept a string of space-separated group names.
- Added checksum support using extended attributes (xattr) - Implemented Checksummer interface with MD5, SHA1, CRC32 support - Added checksum headers to HEAD responses - Updated token extraction to support multiple tokens from headers and query params - Moved user/group extraction into authorize function - Refactored launcher to use boolean flag instead of duplicate function - Added comprehensive authorization tests (SciToken, WLCG, caching, user extraction) - Added request logging at info level - Added test for checksum retrieval in e2e tests Co-authored-by: bbockelm <1093447+bbockelm@users.noreply.github.com>
- Fixed token extraction to use single case-insensitive operation - Fixed exportPrefixMap initialization to use global variable - Fixed typo: initializting -> initializing - Optimized checksum validation to only check mtime when cache exists Co-authored-by: bbockelm <1093447+bbockelm@users.noreply.github.com>
- Updated copyright year to 2026 in filesystem.go - Made structs/functions private (userInfo, getUserInfo, setUserInfo, etc.) - Added logger parameter to filesystem operations and removed log.Debugf calls - Fixed Readdir pagination with state management (dirEntries, dirOffset, mutex) - Moved OA4MP and test file maintenance to non-XRootD section in launcher - Code compiles successfully Co-authored-by: bbockelm <1093447+bbockelm@users.noreply.github.com>
We were going back and forth between breaking and fixing various use cases. This isolates the path manipulation logic for uploads and prevents regressions by adding standalone unnit tests.
cfa3265 to
2f798fa
Compare
|
Alright, here goes nothing... |
Implementation Plan: Built-in POSIX Origin Backend (POSIXv2)
Progress
Addressing second round of feedback. Initial refactoring and visibility changes complete.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.