projectdavid-orm 1.10.0__tar.gz → 1.11.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. {projectdavid_orm-1.10.0 → projectdavid_orm-1.11.0}/CHANGELOG.md +7 -0
  2. {projectdavid_orm-1.10.0/src/projectdavid_orm.egg-info → projectdavid_orm-1.11.0}/PKG-INFO +1 -1
  3. {projectdavid_orm-1.10.0 → projectdavid_orm-1.11.0}/pyproject.toml +1 -1
  4. {projectdavid_orm-1.10.0 → projectdavid_orm-1.11.0}/src/projectdavid_orm/projectdavid_orm/models.py +75 -3
  5. {projectdavid_orm-1.10.0 → projectdavid_orm-1.11.0/src/projectdavid_orm.egg-info}/PKG-INFO +1 -1
  6. {projectdavid_orm-1.10.0 → projectdavid_orm-1.11.0}/LICENSE +0 -0
  7. {projectdavid_orm-1.10.0 → projectdavid_orm-1.11.0}/MANIFEST.in +0 -0
  8. {projectdavid_orm-1.10.0 → projectdavid_orm-1.11.0}/README.md +0 -0
  9. {projectdavid_orm-1.10.0 → projectdavid_orm-1.11.0}/setup.cfg +0 -0
  10. {projectdavid_orm-1.10.0 → projectdavid_orm-1.11.0}/src/projectdavid_common.egg-info/PKG-INFO +0 -0
  11. {projectdavid_orm-1.10.0 → projectdavid_orm-1.11.0}/src/projectdavid_common.egg-info/SOURCES.txt +0 -0
  12. {projectdavid_orm-1.10.0 → projectdavid_orm-1.11.0}/src/projectdavid_common.egg-info/dependency_links.txt +0 -0
  13. {projectdavid_orm-1.10.0 → projectdavid_orm-1.11.0}/src/projectdavid_common.egg-info/entry_points.txt +0 -0
  14. {projectdavid_orm-1.10.0 → projectdavid_orm-1.11.0}/src/projectdavid_common.egg-info/requires.txt +0 -0
  15. {projectdavid_orm-1.10.0 → projectdavid_orm-1.11.0}/src/projectdavid_common.egg-info/top_level.txt +0 -0
  16. {projectdavid_orm-1.10.0 → projectdavid_orm-1.11.0}/src/projectdavid_orm/__init__.py +0 -0
  17. {projectdavid_orm-1.10.0 → projectdavid_orm-1.11.0}/src/projectdavid_orm/constants/__init__.py +0 -0
  18. {projectdavid_orm-1.10.0 → projectdavid_orm-1.11.0}/src/projectdavid_orm/ormInterface.py +0 -0
  19. {projectdavid_orm-1.10.0 → projectdavid_orm-1.11.0}/src/projectdavid_orm/projectdavid_orm/__init__.py +0 -0
  20. {projectdavid_orm-1.10.0 → projectdavid_orm-1.11.0}/src/projectdavid_orm/projectdavid_orm/base.py +0 -0
  21. {projectdavid_orm-1.10.0 → projectdavid_orm-1.11.0}/src/projectdavid_orm/utilities/__init__.py +0 -0
  22. {projectdavid_orm-1.10.0 → projectdavid_orm-1.11.0}/src/projectdavid_orm.egg-info/SOURCES.txt +0 -0
  23. {projectdavid_orm-1.10.0 → projectdavid_orm-1.11.0}/src/projectdavid_orm.egg-info/dependency_links.txt +0 -0
  24. {projectdavid_orm-1.10.0 → projectdavid_orm-1.11.0}/src/projectdavid_orm.egg-info/requires.txt +0 -0
  25. {projectdavid_orm-1.10.0 → projectdavid_orm-1.11.0}/src/projectdavid_orm.egg-info/top_level.txt +0 -0
  26. {projectdavid_orm-1.10.0 → projectdavid_orm-1.11.0}/tests/test_clients.py +0 -0
@@ -1,3 +1,10 @@
1
+ # [1.11.0](https://github.com/project-david-ai/projectdavid-orm/compare/v1.10.0...v1.11.0) (2026-09-27)
2
+
3
+
4
+ ### Features
5
+
6
+ * add tenant credential persistence ([d222bc0](https://github.com/project-david-ai/projectdavid-orm/commit/d222bc0764dfb10ced00006b68a06c6a55d1b508))
7
+
1
8
  # [1.10.0](https://github.com/project-david-ai/projectdavid-orm/compare/v1.9.1...v1.10.0) (2026-09-26)
2
9
 
3
10
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: projectdavid-orm
3
- Version: 1.10.0
3
+ Version: 1.11.0
4
4
  Summary: Shared SQLAlchemy ORM models for ProjectDavid services
5
5
  Author-email: "Francis N." <engineering@projectdavid.co.uk>
6
6
  License: PolyForm Noncommercial License 1.0.0
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "projectdavid-orm"
7
- version = "1.10.0"
7
+ version = "1.11.0"
8
8
  description = "Shared SQLAlchemy ORM models for ProjectDavid services"
9
9
  readme = "README.md"
10
10
  authors = [
@@ -180,6 +180,13 @@ class User(Base):
180
180
 
181
181
  audit_logs = relationship("AuditLog", back_populates="user", lazy="dynamic")
182
182
 
183
+ credentials = relationship(
184
+ "Credential",
185
+ back_populates="owner",
186
+ cascade="all, delete-orphan",
187
+ lazy="select",
188
+ )
189
+
183
190
  mcp_server_registrations = relationship(
184
191
  "McpServerRegistration",
185
192
  back_populates="owner",
@@ -504,12 +511,58 @@ class Assistant(Base):
504
511
  )
505
512
 
506
513
 
514
+ class Credential(Base):
515
+ """Tenant-owned encrypted credential material.
516
+
517
+ Plaintext credentials are never persisted. Decryption is owned by
518
+ the application credential service and requires deployment-supplied
519
+ root key material.
520
+ """
521
+
522
+ __tablename__ = "credentials"
523
+
524
+ id = Column(String(64), primary_key=True, index=True)
525
+
526
+ owner_id = Column(
527
+ String(64),
528
+ ForeignKey("users.id", ondelete="CASCADE"),
529
+ nullable=False,
530
+ index=True,
531
+ )
532
+
533
+ kind = Column(String(32), nullable=False)
534
+ encrypted_payload = Column(Text, nullable=False)
535
+ encryption_version = Column(
536
+ Integer,
537
+ nullable=False,
538
+ default=1,
539
+ server_default="1",
540
+ )
541
+
542
+ created_at = Column(DateTime, nullable=False, default=datetime.utcnow)
543
+ updated_at = Column(
544
+ DateTime,
545
+ nullable=False,
546
+ default=datetime.utcnow,
547
+ onupdate=datetime.utcnow,
548
+ )
549
+
550
+ owner = relationship("User", back_populates="credentials")
551
+
552
+ mcp_server_registrations = relationship(
553
+ "McpServerRegistration",
554
+ back_populates="credential",
555
+ lazy="select",
556
+ )
557
+
558
+ __table_args__ = (Index("idx_credentials_owner_kind", "owner_id", "kind"),)
559
+
560
+
507
561
  class McpServerRegistration(Base):
508
562
  """A user-owned remote MCP server registration.
509
563
 
510
- Credentials are intentionally absent. MCP-5A supports unauthenticated
511
- Streamable HTTP registrations only until Project David has a dedicated
512
- reversible secret-reference facility.
564
+ Authentication references generic tenant-owned encrypted credentials.
565
+ Raw credential material is never persisted on the registration itself.
513
566
  """
514
567
 
515
568
  __tablename__ = "mcp_server_registrations"
@@ -544,6 +597,20 @@ class McpServerRegistration(Base):
544
597
  server_default="streamable_http",
545
598
  )
546
599
 
600
+ auth_type = Column(
601
+ String(32),
602
+ nullable=False,
603
+ default="none",
604
+ server_default="none",
605
+ )
606
+
607
+ credential_id = Column(
608
+ String(64),
609
+ ForeignKey("credentials.id", ondelete="RESTRICT"),
610
+ nullable=True,
611
+ index=True,
612
+ )
613
+
547
614
  timeout_seconds = Column(Float, nullable=False, default=30.0, server_default="30")
548
615
 
549
616
  enabled = Column(Boolean, nullable=False, default=True, server_default="1")
@@ -558,6 +625,11 @@ class McpServerRegistration(Base):
558
625
 
559
626
  owner = relationship("User", back_populates="mcp_server_registrations")
560
627
 
628
+ credential = relationship(
629
+ "Credential",
630
+ back_populates="mcp_server_registrations",
631
+ )
632
+
561
633
  assistant_tools = relationship(
562
634
  "AssistantMcpTool",
563
635
  back_populates="registration",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: projectdavid-orm
3
- Version: 1.10.0
3
+ Version: 1.11.0
4
4
  Summary: Shared SQLAlchemy ORM models for ProjectDavid services
5
5
  Author-email: "Francis N." <engineering@projectdavid.co.uk>
6
6
  License: PolyForm Noncommercial License 1.0.0