Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Billing #2667

Open
wants to merge 21 commits into
base: multi_tenant_vespa
Choose a base branch
from
Open

Billing #2667

wants to merge 21 commits into from

Conversation

pablodanswer
Copy link
Contributor

@pablodanswer pablodanswer commented Oct 3, 2024

  1. JWT-based authentication:

    • Uses SECRET_JWT_KEY for encrypting user/tenant context
    • Employs JWT_ALGORITHM (HS256) for token signing
  2. Inter-service communication security:

    • DATA_PLANE_SECRET secures control plane and data plane communication
    • Short-lived tokens generated with specific scopes and expiration times
  3. API access control:

    • EXPECTED_API_KEY required in headers for control plane API access
    • Dependency checks for valid API key and JWT in request headers
  4. Stripe integration for secure billing:

    • Stripe API key used for subscription management
    • Tenant IDs stored in Stripe metadata for correlation

Copy link

vercel bot commented Oct 3, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
internal-search ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 10, 2024 10:42pm

@pablodanswer pablodanswer marked this pull request as ready for review October 5, 2024 21:03
Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

This PR introduces comprehensive billing functionality and multi-tenant support to the DAnswer system, integrating Stripe for payment processing and enhancing user management capabilities.

  • Implemented Stripe integration for subscription management in backend/ee/danswer/server/tenants/api.py and web/src/app/ee/admin/cloud-settings/BillingInformationPage.tsx
  • Added new Cloud Settings admin page in web/src/app/ee/admin/cloud-settings/page.tsx for managing billing information
  • Modified PostgreSQL port from 5432 to 5433 in Docker Compose files and backend/danswer/configs/app_configs.py
  • Enhanced multi-tenant support with new functions in backend/danswer/auth/users.py and backend/danswer/server/manage/users.py
  • Hardcoded CLOUD_ENABLED to true in web/src/lib/constants.ts, potentially affecting cloud-related features

22 file(s) reviewed, 9 comment(s)
Edit PR Review Bot Settings

backend/ee/danswer/server/tenants/api.py Outdated Show resolved Hide resolved
backend/ee/danswer/server/tenants/api.py Outdated Show resolved Hide resolved
backend/ee/danswer/server/tenants/models.py Outdated Show resolved Hide resolved
backend/ee/danswer/server/tenants/models.py Outdated Show resolved Hide resolved
backend/ee/danswer/server/tenants/utils.py Outdated Show resolved Hide resolved
web/src/app/ee/admin/cloud-settings/page.tsx Outdated Show resolved Hide resolved
web/src/app/ee/admin/cloud-settings/utils.ts Outdated Show resolved Hide resolved
web/src/lib/constants.ts Outdated Show resolved Hide resolved
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