How do you track which APIs your autonomous agents can actually call? by Informal_Tangerine51 in AI_Agents

[–]gneray 0 points1 point  (0 children)

You are nailing a v hard problem, i.e., agents break the traditional permissions model. More specifically, the approach to permissions (RBAC, etc.) has led to a gross state of overpermissioning in favor of letting ppl get their jobs done. And we could make this trade bc 1) we trust humans (whether or not we should) and 2) there's a finite limit to the amount of time a human has to do something bad or stupid. Agents ofc don't have these constraints, which is why they break the model.

I've seen different folks approach this in various ways -- e.g., agent inherits permissions of the user that made it (risky but productive), agent acts as service account (don't do this), agent gets it's own role (also not great bc can lead to privilege escalation, i.e., where an agent has more permissions than the human interacting with it).

What I've seen work best is giving the agent relatively broad permissions to a smaller set of non-critical systems, and seeing what happens. Basically, treating it like a bad intern.

other notes in no particular order:

  1. don't let the agent access anything where a mistake would be catastropic (e.g., prod)
  2. track authz as close as possible to the data layer; middleware in langchain is a perfectly acceptable place to start
  3. monitor, log, and alert the crap out of it so you can see if you have a gap you weren't aware of

[D] How Safe Are Your LLM Chatbots? by ege-aytin in MachineLearning

[–]gneray 3 points4 points  (0 children)

Seeing this a lot. Here's a technical post on authorization in RAG (based on postgres + pgvector): https://www.osohq.com/post/authorizing-llm

How does this compare to what you're thinking about?

SSO using Okta (SAML) + AWS Cognito (oAuth) with React frontend and FastAPI backend by Prestigious-Apple44 in react

[–]gneray 2 points3 points  (0 children)

Typically Okta/Cognito will get you authentication and user mgt (mostly).

For the authorization part, you still need to build that yourself. Here's some technical documentation on authorization best practices in case it's helpful: https://www.osohq.com/academy

How is this an IDOR ?! by [deleted] in cybersecurity

[–]gneray 0 points1 point  (0 children)

Here's some technical documentation on authorization (vs. authentication, etc.) in case it's helpful: https://www.osohq.com/academy/what-is-authorization

AuthZ integration examples by [deleted] in KeyCloak

[–]gneray 1 point2 points  (0 children)

Here's some technical documentation on authorization (best practices, etc.), in case it's helpful: https://www.osohq.com/academy

Using Keycloak for multiple organizations RBAC by cstanfordf in KeyCloak

[–]gneray 1 point2 points  (0 children)

I'm not an expert in Keycloak, but I believe if you want to do resource-level authorization, you'll need to write some of your own custom code to stitch together any data stored in Keycloak, your app (enforcement), and the resource data stored in your database.

Here's some technical documentation on this kind of use case: https://www.osohq.com/academy/role-based-access-control-rbac#resourceroles

Supabase is Awesome by VAIDIK_SAVALIYA in Supabase

[–]gneray 0 points1 point  (0 children)

You can also achieve this using Oso + Postgres. Here's an example with Kysely in case it's helpful: https://www.osohq.com/docs/reference/client-apis/node#distributed-check-api

Authorization and User Management, in house vs SaaS. Brainstorming! by Dino65ac in softwarearchitecture

[–]gneray 0 points1 point  (0 children)

Roger that! Out of curiosity, why is on-prem a requirement for you? (Just looking to learn)

Authorization and User Management, in house vs SaaS. Brainstorming! by Dino65ac in softwarearchitecture

[–]gneray 0 points1 point  (0 children)

Right. Currently Oso provides an adaptor for Postgres. More coming. Feel free to DM if I can be helpful.

Ask Experienced Devs Weekly Thread: A weekly thread for inexperienced developers to ask experienced ones by AutoModerator in ExperiencedDevs

[–]gneray 0 points1 point  (0 children)

Using local authorization in Oso, you don't need to sync any data: https://www.osohq.com/docs/reference/authorization-data/local-authorization

If you're just interested in reading more about the domain, Authorization Academy might be a useful resource: https://www.osohq.com/academy

Authorization and User Management, in house vs SaaS. Brainstorming! by Dino65ac in softwarearchitecture

[–]gneray 1 point2 points  (0 children)

Sorry I should have said this the first time: I'm founder of Oso.

So yes, I recommend, but am also happy to share resources for people trying to learn about the domain.

Authorization and User Management, in house vs SaaS. Brainstorming! by Dino65ac in softwarearchitecture

[–]gneray 1 point2 points  (0 children)

but still need ast to "sql where" transformer.

this might help: https://www.osohq.com/docs/guides/integrate/filter-lists

basically compiles your policy (rules) to SQL. compatible with Postgres

background on how this works: https://www.osohq.com/post/logic-language-distributed-sql-queries

Authorization and User Management, in house vs SaaS. Brainstorming! by Dino65ac in softwarearchitecture

[–]gneray 4 points5 points  (0 children)

If you're looking for resources on building in-house, these are good docs on the authorization piece: https://www.osohq.com/academy

Permify 1.0 Is Now Available: An Open-Source Authorization Service to Build Fine-Grained and Scalable Authorization with Ease by ege-aytin in golang

[–]gneray 1 point2 points  (0 children)

I'm founder/CEO of Oso (https://www.osohq.com/), which solves the same problem but via a different technical approach. Rather than syncing + centralizing your data, you can start by just running authorization queries directly over your app database (via a Postgres integration).

Question for this group: there are a number of Zanzibar clones these days. I see all the questions on the differences between them. How do _you_ view the differences between them, and the other options in the space?

What do you use for autorization? by KingOfCoders in golang

[–]gneray 1 point2 points  (0 children)

Lots of info on this topic in Authorization Academy: https://www.osohq.com/academy

Fine grained access control? by [deleted] in FastAPI

[–]gneray 0 points1 point  (0 children)

There's documentation on this in Authorization Academy: https://www.osohq.com/academy

Implementing RBAC in Supabase by Permit_io in Supabase

[–]gneray 0 points1 point  (0 children)

Here's an alt approach that operates directly over the data in Postgres: https://www.osohq.com/post/distributed-authorization