mirror of
https://github.com/LogicLabs-OU/OpenArchiver.git
synced 2026-04-06 00:31:57 +02:00
Migrate to DB users, implement IAM & add PST/EML importers #307
Closed
opened 2026-04-05 16:17:21 +02:00 by MrUnknownDE
·
0 comments
No Branch/Tag Specified
main
gh-pages
v0.5.1-dev
v0.4.3-release
ee-legalhold
ee-retention
v0.4.3-dev
wayneshn-patch-1
v0.4.3-pre
v0.4.2-fix
v0.4.2-dev
v0.4.1-dev
mailbox-processing-opt
v0.4.0-fix
ee-init
docs-ocr
v0.3.x-fixes
issue-templates
security-update
create-funding-yml
display-versions
attachment-ocr
docs
user-api-key
demo-mode
v0.3.0
system-settings
wip
CLA-v2
role-based-access
dev
v0.5.0
v0.4.2
v0.4.1
v0.4.0
v0.3.4
v0.3.3
v0.3.2
v0.3.1
v0.3.0
v0.2.1
v0.2.0
v0.1.2
v0.1.1
v0.1.0
Labels
Clear labels
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
documentation
documentation
duplicate
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
good first issue
help wanted
help wanted
help wanted
help wanted
improvement
improvement
question
question
No Label
Milestone
No items
No Milestone
Projects
Clear projects
No project
Assignees
MrUnknownDE
Clear assignees
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: github/OpenArchiver#307
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @wayneshn on 8/11/2025
This PR refactors the core authentication and authorization system, replacing the static
.envadmin user with a database-backed user model. It also introduces a granular, AWS-style IAM policy engine for permissions.Additionally, it expands data ingestion capabilities by adding connectors for PST and EML files.
Technical Changes:
Authentication Overhaul
ADMIN_EMAILandADMIN_PASSWORDvariables have been deprecated and removed from the environment configuration.setupflow is introduced. The backendstatusendpoint now checks if any users exist in the database. If not, the frontend redirects to a setup page where the initial admin user is created. This operation is restricted and can only run if theuserstable is empty.AdminUserServicehas been replaced with a persistentUserServicethat interacts with the PostgreSQL database via Drizzle ORM.users,roles, andsessionshave been added to the database schema to support multi-user authentication and role-based access control. #23IAM Policy Engine
PolicyValidatorhas been implemented to ensure that all policies adhere to the definediam-definitions.tsbefore being saved, preventing malformed policies.archive:*) and resources (e.g.,ingestion-source/*).PST & EML Ingestion
pst_importandeml_importhave been added. #24 Add Chinese Translation Support (#22).pstand.zip(for EMLs) files./uploadendpoint has been created to handle file streaming withbusboy, temporarily storing the file and returning its path for the ingestion job.PSTConnectorandEMLConnector, usepst-extractorandyauzlrespectively to parse the uploaded files and extract email objects.Core Improvements
archived_emailstable now includespathandtagscolumns to preserve the original folder structure and labels from the source mailbox. The ingestion connectors for IMAP, Google Workspace, and Microsoft 365 have been updated to populate this metadata.SYNC_FREQUENCYenvironment variable.