As application developers, we must ensure that sensitive data stored in applications are not accidentally delivered to another party.
Many techniques are available to store customer data securely, and many are highly complex and challenging to implement. One could secure all customer data in a single database - keeping the feature's design simple and secure.
Row-level security (RLS) is the ability to secure and control access to specific rows of data inside a database table. It is a powerful tool that allows you to store all your customer data in a single database without concern about data leakage across accounts. However, correctly implementing RLS can be tricky to combine login details with your database permissions.
Neon Authorize streamlines this process by automatically integrating authentication from your OAuth provider with your PostgreSQL database. Neon Authorize utilises your existing authentication layer to identify every logged-in user and associates all the data in your database with their login credentials. This ensures that the data stored in the database can only be accessed by logged-in users—and that only logged-in users can see their data.
We have created a tutorial to walk you through how to build a Remix app using Clerk as an authentication layer. Clerk is a popular user authentication and management tool. You’ll use Neon Postgres as your data layer and leverage Neon Authorize to secure all the data for each logged-in customer. Each row in the table will designate a userID, which Clerk provides. Only those authenticated with the userID can interact with data in the row.
Check out the full tutorial here: https://devmar.short.gy/protect-sensitive-data
Top comments (0)