Ky

Kysely-access-control (permissions at the query building layer)

Hacker News

Kysely-access-control (permissions at the query building layer)

Hi there! I just published my first (hopefully of many) personal open source project to be used by others. There's 2 packages: - The lower level kysely-access-control ( https://github.com/ben-pr-p/kysely-utils/tree/main/packages/... ), which implements a callback that you can return `Allow/Deny/Omit` + `[Allow, where]` for - A higher level kysely-grants ( https://github.com/ben-pr-p/kysely-utils/tree/main/packages/... ) that implements Postgres like grants on top of kysely The idea grew out of frustration I've had implementing permissions in the past. On some projects, I've implemented it each time data is supposed to be accessed, which has meant the developer implementing the route needs to know about all the permissions considerations accessing that data. On other projects, I've implemented it at the database layer (in Postgres). That's been a generally decent experience, but gets hard to manage when you want the same user to have different permissions depending on the context. Additionally, it restricts how you can access and cache calls to the database, since you need to run (and your cache key depends on) `set_config` calls with the relevant access details on each statement request. After this, I'm planning on writing and publishing an executor for Kysely that can automatically cache database queries. Since this access control plugin modifies the actual Kysely internal operation node, that plugin will properly cache results per user. I'm also hoping to write a plugin that can automatically invalidate the cache from wal2json results. Feedback is super appreciated and sought after! This is my first external facing npm package, and I found the process a bit tricky to execute.

Share card

Actual performance

1points
Did not reach leaderboard

Launch Intel predictions

Analyze your own launch →
Product HuntOn track for Day 1 leaderboard · Strong signals: user, context, open · Missing: mac, agents, macos
84%84% predicted probability of success on Product Hunt, based on ML models trained on real launch data.
best fitHighest predicted score across all platforms for this description.
Indie HackersFits the IH revenue-focused audience · Missing: supports, reddit linkedin, podcasting
82%82% predicted probability of success on Indie Hackers, based on ML models trained on real launch data.
Hacker NewsStrong engagement from HN community · Strong signals: open source, ide, io · Missing: https docs, excited, just released
62%62% predicted probability of success on Hacker News, based on ML models trained on real launch data.
nativeThis product was originally launched on this platform.
AppSumoMay struggle as an AppSumo deal · Strong signals: calls · Missing: plus, platform, intuitive
36%36% predicted probability of success on AppSumo, based on ML models trained on real launch data.
TrustMRRLess likely to generate early MRR · Strong signals: personal · Missing: mobile apps, ios, entrepreneurs
34%34% predicted probability of success on TrustMRR, based on ML models trained on real launch data.
Acquire.comPre-revenue stage for this audience · Missing: arr, mrr, revenue
10%10% predicted probability of success on Acquire.com, based on ML models trained on real launch data.
BetaListMay not resonate with beta-testers · Missing: web3, chat, crypto
0%0% predicted probability of success on BetaList, based on ML models trained on real launch data.

Incorrect prediction on native model

Similar products

Ai
AirQL: An Airtable API with OAuth2 access control and permissions71%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

AirQL: An Airtable API with OAuth2 access control and permissions

Hacker News9
Ea
Easy parametric query building in Rails51%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Easy parametric query building in Rails

Hacker News1
Du
Durin – A Permissions Guardian66%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Durin – A Permissions Guardian

Hacker News1
Permit AI Access Control
Permit AI Access Control67%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Fine-Grained Permissions for AI-Powered Applications

Product Hunt+316SaaS
Access Control System Los Angeles
Access Control System Los Angeles19%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Access Control System San Antonio, Houston, Los Angeles

Indie Hackerscommitment-full-time
Gi
GitHub read access permissions for subfolders61%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

GitHub read access permissions for subfolders

Hacker News1
Mo
Monglorious – Query MongoDB with Strings33%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Monglorious – Query MongoDB with Strings

Hacker News2
Qu
Query the national alcoholic beverage retailing monopoly of Finland43%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Query the national alcoholic beverage retailing monopoly of Finland

Hacker News2
VelocityPack QueryBoost
VelocityPack QueryBoost38%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

MySQL / MariaDB Query Caching and Acceleration for cPanel

Indie Hackersemployees-10-plus
Pe
Permissions Tool for SysPass57%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Permissions Tool for SysPass

Hacker News2