Skip to content

Conversation

@devin-ai-integration
Copy link
Contributor

📥 Pull Request

📘 Description

This PR adds support for self-hosted Supabase instances in local development environments. The changes enable AgentOps to connect to local Supabase Docker deployments without SSL certificates and handle JWT token differences between hosted and self-hosted Supabase.

Key Changes:

  • JWT Validation: Made the iss (issuer) field optional in SupabaseUserData model since local Supabase doesn't include it in JWT tokens
  • SSL Configuration: Added SUPABASE_SSLMODE environment variable support with PostgreSQL connection string updates
  • Docker Environment: Added PostgreSQL connection variables to compose.yaml for direct database access
  • Environment Variables: Added SUPABASE_SSLMODE configuration option (defaults to prefer)

🧪 Testing

  • ✅ Verified complete authentication flow (signup → login → dashboard access) with local Supabase
  • ✅ Tested JWT token validation with local Supabase tokens (missing iss field)
  • ✅ Confirmed PostgreSQL connections work with sslmode=disable for local development
  • ✅ Validated AgentOps API and Dashboard services start correctly with new environment variables
  • ✅ Tested Supabase Studio admin interface accessibility

🔍 Review Focus Areas

Security Considerations:

  • JWT Validation: Review making iss field optional - ensure this doesn't weaken authentication security
  • SSL Configuration: Verify SUPABASE_SSLMODE=disable is only used for local development, not production
  • Environment Variables: Check that database credentials in Docker Compose are properly secured

Compatibility:

  • Ensure changes maintain compatibility with hosted Supabase instances
  • Verify environment variable defaults don't break existing setups

Link to Devin run: https://app.devin.ai/sessions/35e0a46063c744bdb9e75bf5d781c749
Requested by: @areibman

- Add SUPABASE_SSLMODE environment variable and disable SSL for local PostgreSQL connections
- Make JWT 'iss' field optional in SupabaseUserData model for local Supabase compatibility
- Update PostgreSQL connection string to include sslmode parameter
- Add PostgreSQL connection environment variables to Docker Compose for API service

This enables AgentOps to work with self-hosted Supabase instances without SSL certificates
and handles differences in JWT token structure between hosted and self-hosted Supabase.

Co-Authored-By: Alex <[email protected]>
@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

areibman and others added 2 commits September 2, 2025 14:03
- Resolve playground mode banner display issue
- Fix network connectivity errors between dashboard and API
- Complete end-to-end authentication flow now working properly

Co-Authored-By: Alex <[email protected]>
@areibman areibman merged commit 9e28960 into main Sep 2, 2025
2 of 9 checks passed
@areibman areibman deleted the devin/1725312916-self-hosted-supabase-setup branch September 2, 2025 21:45
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.

2 participants