REST Catalog 用于从受控 HTTPS 元数据目录同步资产,不采集任意业务 API 数据。
真实企业目录地址、允许域名、凭据和 UAT 仍需外部提供。
~~~
Import ConnectorOperations and register it as the only child component.
- [ ] **Step 5: Recreate metadata/index.vue as a permission-aware wrapper**
~~~vue
元数据管理
外部目录接入
~~~
Compute permissions from this.$store.state.user.userInfo.permissions and return permissions.includes('connectors:read') from canReadConnectors. The v-if must prevent mounting and API loading for unauthorized users.
- [ ] **Step 6: Run GREEN and build**
~~~bash
PYTHONPATH=. .venv/bin/pytest -q tests/test_enterprise_connector_metadata_frontend_contract.py tests/data_research/test_data_research_frontend_contract.py tests/test_phase3_wp03_enterprise_connectors.py tests/test_frontend_rbac_contract.py
npm --prefix frontend run build
~~~
Expected: all pass and build exits 0.
- [ ] **Step 7: Commit**
~~~bash
git add frontend/src/views/dataGovernance/metadata/index.vue frontend/src/views/dataGovernance/metadata/components/metadataManagement.vue frontend/src/views/dataGovernance/metadata/components/externalCatalogAccess.vue tests/test_enterprise_connector_metadata_frontend_contract.py
git commit -m "feat: integrate rest catalog with metadata governance"
~~~
---
### Task 5: Run Affected Regression and Static Gates
**Files:** Verification only unless a failure is proven to be caused by Tasks 1–4.
- [ ] **Step 1: Run the complete affected suite**
~~~bash
PYTHONPATH=. .venv/bin/pytest -q tests/test_postgresql_enterprise_connector.py tests/test_enterprise_connector_metadata_navigation_contract.py tests/test_enterprise_connector_metadata_frontend_contract.py tests/test_phase3_wp03_enterprise_connectors.py tests/data_research/test_data_research_frontend_contract.py tests/test_data_factory_orchestration_navigation_contract.py tests/test_enterprise_identity_menu_filter_contract.py tests/test_frontend_rbac_contract.py tests/test_architecture_artifacts.py
~~~
Expected: all collected tests pass and this change introduces no skips.
- [ ] **Step 2: Run existing real PostgreSQL integration**
~~~bash
PYTHONPATH=. .venv/bin/pytest -q tests/integration/test_phase3_wp03_connectors_postgres.py
~~~
Expected: pass using the repository's documented Docker test database. If the fixture reports the database environment is unavailable, record the exact blocker and do not report this command as passed.
- [ ] **Step 3: Run build, compile, mirror, and diff gates**
~~~bash
npm --prefix frontend run build
.venv/bin/python -m py_compile app/core/connectors/builtin/postgresql.py deployment/app/core/connectors/builtin/postgresql.py tests/test_postgresql_enterprise_connector.py tests/test_enterprise_connector_metadata_navigation_contract.py tests/test_enterprise_connector_metadata_frontend_contract.py
cmp app/core/connectors/builtin/postgresql.py deployment/app/core/connectors/builtin/postgresql.py
cmp app/core/connectors/builtin/__init__.py deployment/app/core/connectors/builtin/__init__.py
git diff --check
git status --short
~~~
Expected: all commands exit 0. Preserve existing untracked architecture assets and do not stage them.
- [ ] **Step 4: Commit only proven gate corrections**
If an affected contract required a real update, stage its exact files and commit:
~~~bash
git commit -m "test: align connector metadata boundary contracts"
~~~
Do not create an empty commit.
---
### Task 6: Deploy and Perform Local UAT
**Files:** No source changes expected.
- [ ] **Step 1: Rebuild local backend and frontend**
~~~bash
docker compose -f deploy/docker/docker-compose.yml up -d --build backend frontend
~~~
Expected: build exits 0 and frontend/backend become healthy.
- [ ] **Step 2: Verify services and deep links**
~~~bash
docker compose -f deploy/docker/docker-compose.yml ps
curl -fsS http://localhost:15500/api/system/health
curl -fsS http://localhost:18183/data-governance/development/enterprise-connectors >/dev/null
curl -fsS http://localhost:18183/data-governance/metadata >/dev/null
~~~
Expected: health reports status=healthy and both SPA links return 200.
- [ ] **Step 3: Perform authenticated browser UAT**
Verify all nine conditions:
1. Data Research no longer lists 企业连接器.
2. Data Factory lists 企业连接器 before 数据生产线投产.
3. Enterprise Connectors shows exactly Oracle, PostgreSQL, and SQL Server.
4. The database-only scope notice is visible.
5. REST Catalog is absent from that page.
6. Metadata shows 元数据管理 and 外部目录接入 for connectors:read.
7. External Catalog Access shows REST Catalog and no database connectors.
8. Both direct links survive refresh.
9. A metadata user without connectors:read retains metadata management and does not mount external-catalog content.
Do not execute a connector against a real external system during this navigation UAT. Compatibility or Dry-run requires a separately approved test endpoint and credential.
- [ ] **Step 4: Run final independent review**
PASS requires zero Critical and zero Important findings. Fix each valid finding with a new RED/GREEN cycle and repeat affected review.
- [ ] **Step 5: Record final branch state**
~~~bash
git log --oneline -8
git status --short
git diff --check
~~~
Expected: feature files committed, unrelated untracked user assets untouched, and no push or production deployment without separate instruction.