Skip to content

feat: Lakebase deployment, auth improvements, and PBI model routing#48

Open
MrBlack1995 wants to merge 38 commits intodatabrickslabs:feature/flowfrom
MrBlack1995:feature/flow
Open

feat: Lakebase deployment, auth improvements, and PBI model routing#48
MrBlack1995 wants to merge 38 commits intodatabrickslabs:feature/flowfrom
MrBlack1995:feature/flow

Conversation

@MrBlack1995
Copy link
Contributor

Summary

  • Lakebase deployment docs: Added src/docs/lakebase-deployment.md — full guide covering SQLite quick-start (no Lakebase) and production Lakebase setup with Databricks Secrets, what to change in src/app.yaml before deploying to a new workspace, PAT→OAuth token exchange flow, and credential rotation
  • Auth: X-forward authentication improvements
  • PBI model routing: Support for alternative routes for model fetching outside Fabric

Changes

  • src/docs/lakebase-deployment.md — new deployment guide (SQLite + Lakebase paths)
  • src/app.yaml — Lakebase PostgreSQL configuration with Databricks Secrets
  • src/backend/src/config/settings.py — settings updates
  • src/backend/src/db/session.py — automatic PAT→OAuth token refresh on every connection
  • src/entrypoint.py--db-type flag and token exchange on startup

Test plan

  • Deploy with SQLite: python3 src/deploy.py --app-name kasal-dev --user-name <email> — verify app starts with no DB env vars
  • Deploy with Lakebase: follow src/docs/lakebase-deployment.md steps, verify data persists across restarts
  • Verify PAT→OAuth exchange on startup (check logs for token refresh)
  • Verify OAuth token auto-refresh after ~1 hour

🤖 Generated with Claude Code

MrBlack1995 and others added 13 commits February 26, 2026 17:14
Resolved conflict in main.py: kept colleague's ASGI class-based
LocalDevAuthMiddleware, preserving settings.LOCAL_DEV_USER_EMAIL
fallback instead of hardcoded admin@admin.com.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ce docs

Phase 4 — Runtime output scanning & excessive agency:
- Secret leak detection (10 credential pattern families) in agent output
- Flow trust boundary scanning between crews in multi-crew flows
- Memory poisoning defense (scan task output before persistence)
- Tool output scanning in step callbacks
- Excessive agency detection (PERFORMS_DESTRUCTIVE_OPERATIONS flag)

Phase 5 — Optimizations:
- Unified SecurityScannerPipeline singleton with audit logging
- False-positive reduction (tightened MEDIUM regex patterns)
- LLM guardrail SHA-256 LRU caching (skip redundant calls on retries)
- Secret detector expansion (GitHub, GCP, Azure, DSA/encrypted PEM)

Documentation:
- Updated README_SECURITY_COMPLIANCE.md with Areas 9-16 and overdelivery table
- Updated README_SECURITY_GUARDRAILS_TESTGUIDE.md to cover Phases 1-5

Tests: ~107 new tests across 7 test files (252 total security tests)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gitguardian
Copy link

gitguardian bot commented Mar 9, 2026

️✅ There are no secrets present in this pull request anymore.

If these secrets were true positive and are still valid, we highly recommend you to revoke them.
While these secrets were previously flagged, we no longer have a reference to the
specific commits where they were detected. Once a secret has been leaked into a git
repository, you should consider it compromised, even if it was deleted immediately.
Find here more information about risks.


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant