I'd like to add this proposal to the discussion on...
# proj-agent-canvas
c
I'd like to add this proposal to the discussion on securing backends: TL;DR: People log in. Agents use keys. 😅 Proposal: Login with GitHub for local and remote agent-servers Note: my agent and I tried to keep it simple. It proposes to just log you in, one click or two, so no plaintext passwords to paste around for accessing the backend on a new device, phone or tablet. It doesn't involve accounts, database, roles, broker or any hosted OpenHands service, JWTs, signing keys, callbacks, client secrets, etc etc. The login requests zero permissions and the token is thrown away after one GET /user.
h
I don't personally like the idea of using another services auth is the answer. You can already put an auth layer in front of openhands. If it was part of the code that would be hardcoded in as github
c
It would be Github/Gitlab/BB/Forgejo like we already have in the codebase, and API key would remain in. You can put an auth, which is not as smooth, AND you still have to deal with the annoyance and lack of security in pasting keys.
w
These two things are separable right? We can have the currently scoped key-based roles, AND GitHub-based login?
the token is thrown away after one GET /user
🤔 i'm not sure what the point is then? would there be an env var like ALLOWED_USER=enyst?
c
Yes, a config file. App asks at install for the Github id
w
wouldn't the user need to provision a GitHub app, with a client_id and secret?
The agent-server requests a device code from GitHub using a public client ID
c
I do see the benefit in securing user login and, then, giving agents/automations API keys, though I feel pretty strongly against some other of the ideas in the RBAC proposal, starting with… the name RBAC 😅 RBAC stands for role-based access control, after all, not access suggestions 🫠
Two options: • a default app that sits there and can do it, if people want to use it • they can provision their own. It's simple enough, it doesn't need perms, scopes, stuff
h
I was envisioning something like
not complete role based access control but provding an access and identity layer
c
I recently made an email address for my agent. First-time experience went like this: • I logged in with google • I made an inbox • got an API key (with read/write/create) • gave it to my agent. This is the experience I’m talking about: different product, but they got it, IMHO: Humans log in, agents are given API keys.
Now, nobody is stopping humans from using API keys, but comparatively, it’s a bad experience to paste plaintext keys, to go on a plane and button on your phone and say “ugh I forgot to mess around with keys for this browser so I can’t access my OpenHands”
h
I'm mostly focused on people having access. So if you are a small team using a canvas you could provision keys to a few folks to access the same instance with the ability to distinguish between them. With a bit of permissions in there as well.
Hmm, yea I can see that pain point. Keys can be a pain. But that is what password managers are for?
c
I think we’re mixing different things here, Devin. I understand… but I think it’s worth it to step back and look from the point of view of people who see OpenHands agent-canvas as the main interface for themselves, first
w
RBAC stands for role-based access control, after all, not access suggestions
wdym? do you think we can't enforce read-only?
if we can't enforce that's definitely an issue
c
We can’t enforce read-only? It’s the agent’s box, it can do stuff, even if the REST API had a key
The trickiest thing here is that this is actually, to my mind, about securing access for the human who stood up an OpenHands agent-canvas on a machine. Let me bluntly honest about what I fear: I fear that in a week or three after we’d implement this “RBAC” proposal - sorry for the scare quotes -, then people will rewrite the docs. There’s a page with a comparison table between OpenHands and
enterprise
. I’m pretty sure that page says “multi-user” and “RBAC” in the
enterprise
column. Then when rewriting it… I fear that it will tell everyone in the world: “yes, the OSS has RBAC, but it’s not secure, if you want actual access control you buy the commercial product”
It's possible to define good products by drawing the line at single user (or single-ish) / multi-user. I worry that it’s not a good direction to draw it at security…
This is current PR on “accessing OpenHands on another browser”
It looks terribly insecure to me. Giving people plaintext keys in 2026, when Claude tells me that OAuth first showed up in 2007 😅 It seems to me like telling them that OpenHands can be secure too, alright, but not for them. I’m sorry.
Can we consider a Login with GitHub, as an optional ability, minimal, totally minimal, just enough to click twice on iPad instead of messing with plaintext keys? The key would remain an option, agents need keys
h
but it’s not secure, if you want actual access control you buy the commercial product
I definitely don't want that! My intention is to provide shared canvas usage where you need a base level of access control and identity. Enterprise RBAC is a whole different story imo
w
nod yes there are two totally separable things here: • We need a way to programmatically manage keys that provision read and admin access to the canvas instance. These keys would be given to systems and people outside of the canvas instance/machine so they can access its APIs ◦ We are going to need this internally for the enterprise product ◦ end users can use this e.g. to offer read-only access to an agent canvas instance ◦ we are even considering making the Agent Canvas instance that runs our OSS repos publicly visible--which means we'll really need to be certain about read-only security • Separately, we should try and come up with a better auth mechanism than a hard-coded admin key ◦ log in with github is a great possibility
c
Re: Devin. I know. I’m sorry if it sounded differently, I didn’t mean to imply anything on you. I understand that. As I said, we’re mixing very different things here. I understand you’re trying to solve a symptom of a different root problem.
w
Engel, I think we should seriously consider your proposal, but I don't think it should replace the RBAC in canvas initiative We acknowledge it moves the line between OSS and commercial, by putting more functionality into OSS. We will indeed change the docs there The line we'll continue to hold is that there's no concept of ownership inside the OSS. Anyone with a read key can see _everything_; anyone with an admin key can write everything
c
Why are you going to need this for the enterprise product?
w
We have dreams of managing long-lived canvas instances inside the enterprise product
as well as inheriting agent canvas instances people have already invested in
e.g. you could give Enterprise a read-only key to all your existing canvas instances, and it can aggregate usage statistics across them. or an admin key, and it can enforce certain LLMs to be used, or disallow certain MCPs
c
I'm not sure I understand… you mean like, actual users would have read/admin but they’re not users inside canvas - aha, something like that 🤔
w
yeah you could imagine: • Alice and Bob are both registered Enterprise users • They run an agent canvas that does code review • Alice gets write/admin access since she's a manager • Bob gets read access so he can see what's happening in his code reviews • Enterprise provisions tokens just-in-time so that they can access the instance with the appropriate level
c
Not saying this doesn’t make some sense, just want to note, TBH Bob doesn’t need exactly to access canvas for that, they need the trajectories, and in enterprise trajectories/events are not only inside canvas. (Same goes for everyone else in the world, yes, for the executions of pr-reviews on the Open Source repositories.)
I mean, the minimal way to give read access to automations execution seems to be this: instead of a link to 401, a trajectory download. Or a mirror. Or a HF link… right?
I think UI is nice, though I… am not sure about the complexity it brings. When this ^ was executing as a workflow in GitHub Actions, the trajectory was under the shape of a log. It was, well, okay - and agents can read them/download them. Read for the world. 😇
Robert, I welcome your explanations, but I think I’m… a bit more confused than I was when we started this discussion, and that’s saying something. 😅 The rule you present here surely doesn’t seem to me what the RBAC proposal says… 🤔 • “no ownership” vs. “user identity” • “anyone with a read key can read everything” vs. “restrict workspaces to admin-configured trusted roots” • “anyone with a read key can read everything” vs. “keep arbitrary paths admin-only” or “route enforcement” • “no ownership” vs. “short lived tokens” I think maybe this comes from `Run[automations]`: I mean, you’re saying only
read
and
admin/write
.
Read
on everything should be achievable thinky spin But in the RBAC proposal there is also
Run[automations]
, which means the agent’s ability. Maybe that’s what confuses me: running automations, specially interactive ones like Slack, seems difficult to limit, involves quite a lot of complexity, and if successful, then I think the cost is kneecapping the agent. (maybe Slack shouldn’t be conceptualized as an “automation”) On the other hand, if we add
Run
, and it doesn’t do what the doc says it does, then I’m sorry, my concern is the false sense of security; it’s precisely that people will hear something and get something else.
l
Sorry I’m behind on this, will try to catch up on the thread but have a ton of things to do this week 😅
❤️ 1
w
Yes I don't think
read
should be allowed to prompt or trigger the agent at all. it should just be able to see conversations and watch the agent work
letting
read
do anything that could cause a change in server state would be misleading
I'm not sure where
Run[automations]
is coming from
I do think we eventually want a
run
role, which can have conversations and trigger automations, but not e.g. modify secrets but right now (IIUC) there's no way to start a conversation without reading secrets (which is terrible and we should fix)
I'm not sure what "Restrict workspaces to administrator-configured, symlink-aware trusted roots." is, that seems like maybe AI trying to be helpful
I guess maybe preventing a
read
token from being able to view every file on the machine?
c
Yes, I think it aims to prevent
read
and/or
run
from accessing outside its working directory
The secrets issue seems different than this, and I think maybe it works now to receive automatically at start only secrets configured in the Agent Profile
Or if you meant something else, how should a conversation work without reading secrets?
Yes, I think it aims to prevent
read
and/or
run
from accessing outside its working directory
IIRC in the past, we concluded this was not really enforceable for the agent, as long as it has bash
w
Or if you meant something else, how should a conversation work without reading secrets?
IIRC the workflow is something like, frontend calls
GET /secrets
to retrieve the decrypted secrets and then posts them back up in
POST /conversation
😱 I could be (and hope I am) wrong
I think the frontend does a lot of
execute_bash
too, which we'd want to prevent for
run
users
although I guess they could just tell the agent
execute this bash
so maybe that one isn't important