SShortSingh.
Back to feed

Missing WHERE Clause in B2B SaaS Can Leak One Customer's Data to Another

0
·103 views

A single missing WHERE clause in a database query can expose one tenant's private data to another in multi-tenant B2B SaaS applications, even when users are properly authenticated. A developer building a platform called BootSaaS outlined how authentication alone does not guarantee tenant isolation, since a valid logged-in user can still receive another organization's records. To address this, the developer chose a schema-per-tenant architecture using Spring Boot, PostgreSQL, and Liquibase, keeping each customer's business data in separate tables. This approach avoids relying on every query remembering a tenant filter, which is the core vulnerability in shared-table designs. The article also contrasts three isolation strategies — shared tables with row-level filtering, schema-per-tenant, and database-per-tenant — noting that database-per-tenant introduces significant operational overhead, especially around connection pool management at scale.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Borsa Veri Analizi İçin Serdar'ın Seçtiği 8 Kritik Python Kütüphanesi

Borsa verisiyle çalışırken dağınık kaynaklardan veri toplamanın zorluğu, bir yazarın kendi araç setini oluşturmasına yol açmış. Yazar, yfinance, requests ve pandas gibi kütüphaneleri farklı sorunları çözmek için kullandığını anlatıyor. Makalede her paketin kullanım amacı ve sürüm bilgisi ile birlikte, veri kaynağı değişiklikleri, bellek yönetimi ve istek limitleri gibi tipik tuzaklara dikkat çekiliyor. Yazar, iş akışını hızlandırmak için bu araçların önemini vurguluyor. Metin, teknik analiz göstergeleri hesaplayan ta kütüphanesi gibi diğer araçları da kapsıyor.

0
ProgrammingDEV Community ·

Connected components beat projection for estimating text height before OCR

A pre-OCR check that decides whether to upscale a screenshot needs an estimate of text height in pixels, and two simple OpenCV methods were compared. On clean Chinese text both stayed within about 2 px of the true height up to 30 px, but above that projection ran slightly high, while on English projection measured the full line, around 1.37 times the cap height. On a bordered table screenshot projection returned 559 px against 23 px for connected components. Accuracy of two OCR recognizers falls sharply below roughly 12 px, so an estimator a few pixels off near that threshold can misclassify an image. These results come from deliberately clean, single-font samples on one Mac and do not cover compression, noise, or complex layouts.

0
ProgrammingDEV Community ·

Claude से osFoundry knowledge base पर आधारित जवाब और citation कैसे पाएं

यह गाइड बताती है कि Claude, चाहे claude.ai connector के ज़रिए या Claude Code में, किसी osFoundry knowledge base से सवालों के जवाब कैसे दे सकता है। हर दावे के साथ उस article की ID और उसके आखिरी update का समय दिया जाता है, जिससे जवाब की जांच संभव होती है। Claude sequence-based events से बदलावों को भी ट्रैक कर सकता है और बताता है कि कौन से पुराने जवाब बदले हुए article पर निर्भर हैं। Article में सुधार केवल उसी version पर, और केवल उपयोगकर्ता की अनुमति से, किया जा सकता है। Setup में connection बनाना, server URL जोड़ना, project से knowledge base जोड़ना और article publish करना शामिल है, और draft articles Claude की पहुंच से बाहर रहते हैं।

0
ProgrammingDEV Community ·

Why ChatGPT Couldn't Read a Blog: A Server-Level 403 Block Hidden Behind robots.txt

A blogger tested whether ChatGPT could access their website after noticing it never cited their posts. When asked to open a page, ChatGPT reported a 403 Forbidden error, indicating the site was blocking it. Checking robots.txt revealed no restrictions, so the author used curl with different user agents to test the server directly. Results showed that Google and Bingbot were allowed while OpenAI's crawlers, Claude, and Perplexity, along with some SEO tools, received 403 responses. The author concluded that a server-level rule, rather than robots.txt, was responsible for turning these bots away.