定制 labor-digital/factory-multitenant-api 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

labor-digital/factory-multitenant-api

最新稳定版本:0.1.2

Composer 安装命令:

composer require labor-digital/factory-multitenant-api

包简介

HTTP API for the LABOR.digital Factory shared-tenant TYPO3 — create tenants, update capabilities live, and report deployed factory-core version. Opt-in: only install on shared-tenant deployments. Off-by-default at runtime.

README 文档

README

HTTP API for the LABOR.digital Factory shared-tenant TYPO3. Wraps factory-core's tenant primitives so the pipeline-app (and other tooling) can create tenants and update their capabilities without a redeploy.

Opt-in. Single-tenant Factory installs should NOT install this extension. It exposes shared-tenant operations that don't apply to dedicated stacks.

Endpoints

All routes live under /api/multitenant. JSON in, JSON out. Bearer auth.

Method Path Description
GET /version Deployed factory_core + factory_multitenant_api + TYPO3 versions plus the supported seed-schema range.
GET /tenants List all tenants (anything with a config/sites/<slug>/factory.json).
GET /tenants/{slug} One tenant.
POST /tenants Create a tenant. Wraps factory:tenant:provision.
PATCH /tenants/{slug} Update capabilities (active_components, active_record_types, settings). Atomic rewrite of factory.json + cache invalidate; takes effect immediately on the worker handling the PATCH.

Activation

The middleware is off by default. To turn the API on, set both:

FACTORY_MULTITENANT_API_ENABLED=true
FACTORY_MULTITENANT_API_TOKEN=<random-32+-char-secret>

Without both env vars, every /api/multitenant/* request returns 404. With them set, requests must present Authorization: Bearer <token>.

The deploy repo (labor-factory-multitenant) injects both via AWS Secrets Manager. See its private docs for the exact wiring.

Hardening checklist (production)

  1. ALB rule for /api/multitenant/* restricted to a CIDR allowlist (LABOR offices + Bitbucket Pipelines egress).
  2. Bearer token rotated quarterly.
  3. CloudWatch log filter on factory_multitenant_api rejected → ops alert.
  4. FACTORY_MULTITENANT_API_ENABLED left unset on any non-shared-tenant deploy.

See also

  • Design Log #013 — Multitenant API & Live Capability Updates
  • Design Log #011 — Multi-Tenant TYPO3
  • labor-digital/factory-core — the underlying tenant primitives

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-2.0-or-later
  • 更新时间: 2026-05-08

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固