Developer experience

Kafka connector does not support SASL/SCRAM with PLAIN mechanism (Confluent Cloud)
The current Auth mechanismI’m trying to configure Lago with Confluent Cloud as a Kafka broker. Confluent Cloud requires SASL authentication using the PLAIN mechanism. However, in Lago’s Kafka configuration there is no option to specify sasl.mechanism=PLAIN (or equivalent), and the current implementation seems to only support SASL/SCRAM in a way that is not compatible with Confluent Cloud’s PLAIN mechanism. As a result, it is not possible to connect Lago to Confluent Cloud using the recommended/standard SASL configuration. Expected behavior Be able to configure Lago’s Kafka client to connect to Confluent Cloud using: • security.protocol=SASL_SSL • sasl.mechanism=PLAIN • Username/Password (API key / secret from Confluent Cloud) Ideally, Lago should expose configuration options (env vars or config file) to set: • SASL mechanism (PLAIN, SCRAM-SHA-256, SCRAM-SHA-512, etc.) • Security protocol (SASL_SSL / SSL / PLAINTEXT) • Username / password (or API key / secret) Current behavior • There is no way (or it’s not documented) to set sasl.mechanism=PLAIN. • The existing Kafka config in Lago only supports a subset of auth modes and does not work with Confluent Cloud’s default SASL PLAIN configuration. Use case Use Lago with managed Kafka (Confluent Cloud) without having to run and maintain our own Kafka cluster, and still use Lago’s event ingestion over Kafka. only support Scram256 and Scram512 and not Plain Proposed fix I implemented a local fix that adds support for the PLAIN SASL mechanism in the Kafka client configuration. In summary, the changes are: • Allow configuring the SASL mechanism via environment variable (e.g. KAFKA_SASL_MECHANISM), defaulting to the current behavior if not set. • Pass the configured mechanism (including PLAIN) to the Kafka client. • Ensure SASL_SSL works correctly with username/password for Confluent Cloud. Here is a simplified version of the code/config changes( https://github.com/getlago/lago/blob/1f2d36ea563fd22afe739e38b8664e05656aad48/events-processor/config/kafka/kafka.go ): switch serverConfig.ScramAlgorithm { case Scram256: scramOpt = kgo.SASL(scramAuth.AsSha256Mechanism()) case Scram512: scramOpt = kgo.SASL(scramAuth.AsSha512Mechanism()) case ScramPlain: scramOpt = kgo.SASL(plain.Auth{ User: serverConfig.UserName, Pass: serverConfig.Password}.AsMechanism()) }
0
Add Customer Payouts Functionality (Automated and Manual)
I propose adding a customer payouts feature to Lago, supporting both automated and manual payouts to enhance its utility for platforms and marketplaces that need to distribute earnings to users or vendors. This would make Lago a more comprehensive revenue operations solution, complementing its metering, invoicing, and billing capabilities. The feature could be implemented in multiple stages to ensure a smooth rollout and alignment with Lago’s existing infrastructure. Key Details: • Functionality: Enable both automated and manual payouts to customers (e.g., vendors, creators, or partners) based on revenue collected, with configurable rules for splits, fees, or thresholds. Manual payouts would allow for custom adjustments, especially useful for one-off bank transfers. • Integration: Support payout providers like Stripe Connect, PayPal, or direct bank transfers, similar to Lago’s existing Stripe integration for billing. • Use Case: Ideal for marketplaces (e.g., SaaS platforms, e-commerce, or creator economies) where revenue needs to be split between the platform and end users after deducting fees. Manual payouts would be particularly helpful for handling irregular or ad-hoc distributions. • Benefits: Streamlines payout workflows (automated for efficiency, manual for flexibility), reduces reliance on external tools, and aligns with Lago’s focus on flexible, usage-based revenue management. • Example: A marketplace using Lago could collect payments, deduct a 10% fee, and either automatically distribute the remaining balance to vendors weekly via Stripe Connect or manually process a bank transfer for a specific vendor, with payout status tracked in the dashboard. Implementation Stages: 1. Stage 1: Core Payout Framework (Manual Payouts) o Develop a basic payout module allowing manual payout initiation within the Lago dashboard. o Support one-off bank transfers and manual exports (e.g., CSV for bank processing). o Include basic tracking of payout status (e.g., pending, completed) and simple fee/split calculations. o Focus on integrating with a single provider (e.g., Stripe Connect) for manual payouts. 2. Stage 2: Automated Payouts o Build automation for recurring payouts based on configurable rules (e.g., weekly/monthly schedules, minimum thresholds). o Expand integration to additional providers like PayPal. o Add support for automated fee deductions and split calculations tied to Lago’s billing data. 3. Stage 3: Advanced Features and UI Enhancements o Introduce a robust payout dashboard for tracking, filtering, and managing payout history. o Add support for multi-currency payouts and more complex split rules (e.g., tiered commissions). o Enable customer-facing payout reports or notifications (e.g., via API or email). o Incorporate user feedback from earlier stages to refine the feature. This phased approach allows Lago to incrementally build and test the payouts feature, ensuring stability and alignment with user needs while leveraging existing billing and metering capabilities. Thank you for considering this suggestion! I’m happy to discuss further or provide more details.
0
Load More