This is exactly what https://keycontain.com is for! It wraps services to give ultra-fine-grained ACLs. They can be arbitrarily granular, and much more granular than the underlying API.
You can't magically add fine-grained access controls if a service doesn't have them.
This is adding an allow/deny popup on your phone to agent activity based on the interpretation of an LLM as to whether a given command is risky. That's a very different thing from actual access controls which really deny access to certain pathways, it's an attempt to plaster over both the lack of real access controls and the tendency of LLMs to bypass them.
If your agent is sufficiently motivated, it may choose to bypass these controls, by mistake or on purpose and you would never know, it would not be too hard to do.
No, this is absolutely not that. It is a deterministic ACL that you set up, that actualy denies access to certain (most, the only ones it accepts are ones you explicitly allow) pathways, exactly as you're describing. The agent does not do the interpretation, the most it can do is specify the reason for what it's doing.
KeyContain will deterministically look at your request, if it's on the list of built-in services it supports, and tell you what that request is doing in human language. And you can always inspect the raw request.
"intercept" is too strong because we are not at the network layer. Your agent has to choose to use our service. But in practice, the only key in the agent's environment is the keycontain one, so yes, it has no other way to get to any service except through keycontain. And yes we whitelist specific paths/params (completely configurable), and you decide the level of risk you're willing to take.
For low-risk operations, you can just give your agent free access. For high risk ones (as defined by your deterministic acls), you can require it to confirm with you before allowing the request through.
And for any of the built-in services keycontain supports, it will give you a (deterministic) plain English explanation of what the request will do. For anything not built in, you have to manually inspect the raw request.
Well, and you also want it to be able to inject the credentials into the request so that the agent doesn't have direct access to the credentials themselves.
I believe that gondolin (by the same people who make pi) can do this. But it requires quite a bit of effort to configure it for everything.
Gondolin does secret injection, but I don't believe it lets you restrict access to a tighter permission than the underlying key. The problem is that many services give "god mode" API keys so that even if your agent can't access the key, the fact that it has access to the full API surface creates risk of catastrophic loss.
Gondolin does give access to the whole request if required, I believe you can filter more efficiently via just headers+path, but you can get the whole request if required. I’ve seen projects eg filtering certain graphql methods, similar to what it looks like your product does. It is very fiddly though, and I’m never very sure I got it right.
Yes. The painstaking part (even with agents) is getting the plain-english mapping for all the services so that you can easily understand what a request is doing. It supports a generic http mitm but it's usually very difficult to inspect the request yourself.
I'm super paranoid about the level of access AI agents have. At the same time, I want them to take away the tedium of a bunch of tasks I'm required to do, and it sucks to have to micromanage them.
The best solution I've been able to come up is using an ephemeral vm (on an isolated network) per task, using --dangerously-skip-permissions so it doesn't bother me. I couple that with an API proxy that lets me restrict the permissions it has to external services. So e.g. where a quickbooks API key gives the holder "god mode" access, the proxy lets the agent do certain read commands without confirmation, but all write endpoints except uploading receipts require confirmation on my phone before they'll be allowed to hit the quickbooks servers. I no longer need to trust that the agent will interpret my readonly wishes correctly.
Tooting my own horn here, but this setup works incredibly well! I've been able to connect dozens of services safely where I absolutely do not trust giving raw, overpowered credentials or oauth integration to the agent directly. I actually just released the API proxy today at https://keycontain.com
> At the same time, I want them to take away the tedium of a bunch of tasks I'm required to do, and it sucks to have to micromanage them.
Consider reframing. Is the problem really that the task is tedious? Or that it's required? Maybe you should be leaning more on deterministic automations (which the LLM can help set up) rather than LLM-powered ones.
Of course, if it's possible to use deterministic automation, I ask it to set up scripts. But in a lot of cases the task is not deterministic. And even when it is, I still need to safely deal with the credentials. Examples of some tasks I use it for:
- Research and buy me a domain name for xyz product, set up all of its DNS the way I want for this product, set up email, set up app store submissions including screenshots and description, set up firebase notifications, set up my Google cloud project and any apis I need to enable for this app, deal with app store review feedback.
- Do an audit of my books, make sure every transaction has a receipt uploaded, and make sure the receipt matches the journal entry. Pull statements from all my my bank accounts and reconcile against my books. Fix mistaken transactions with my confirmation.
- Freely push to my source control, but only to specific branch prefixes (surprised that GitHub, gitlab, gitea, etc don't have this built in already). Merge with my confirmation.
- Freely read the subject lines in my Gmail and full emails from my accountant, freely search emails (but still can't read them), freely compose drafts, ask me to read full emails other than my accountant's, ask me to send drafts. No way for it to read password reset links, for example.
Not to mention that I only have to have a single key that gives access to all my services. If the key leaks, I just have to rotate one key because the agent never has access to the 30 upstream service keys. If I need to give weaker or stronger keys for a specific agent, I can easily configure that in one place (and I can even request that the agent make that change for me with my confirmation). I don't need to create 20 new keys every time, and I don't need to remember the intricacies of every upstream service's UI for creating new keys.
Edit: forgot to mention one more really convenient thing the API proxy enables: I can ask my agent to just configure things for me e.g. changing CI settings, adding Google workspace users or groups, etc. without having to use the to UI. So now nearly all of the admin configuration for all services is done from a single interface (my agent cli)
I'm skeptical of how "super paranoid" you actually are. This doesn't sound super paranoid.
For instance: that's a ton of surface area. Did you have your AI agent decide which endpoint is destructive or did you manually do this?
For instance: has this classification been wrong?
I ask this because I've used a similar thing before and it failed in the ways I've named.
This setup also permits your agent to exfiltrate enormously sensitive data (website gives the example of QuickBooks invoices and Cloudflare config) without your involvement.
The agent doesn't decide which endpoints are destructive, you do. That's the point. It's not allowed to do anything that you don't explicitly grant permission for.
And yes, it has tried to make bad requests! Which it wasn't able to do because it was either rejected outright or asked me for confirmation and I didn't let it through.
The "surface area" you're talking about is just the coverage of the service APIs, which is there just as a nicety to give a semantic preview of what the request is about to do e.g. we know what a gmail request looks like so we can render a preview of the attachment the agent is sending so you can inspect it. Otherwise you'd have to inspect each http request (which you can always do by using the generic http acl).
I somewhat agree with "exfiltrate enormously sensitive data". The thing I'm paranoid about is catastrophic mistakes that can instantly kill the business e.g. "Oops I sold the domain name". Leaking financials is not great, but also not catastrophic. Deleting all our books would be catastrophic, which the underlying QuickBooks key allows you to do!
But in any case, you can choose your level of paranoia and give exactly the amount of access you're comfortable with. For example, I view read access to emails as catastrophic (must worse than read access to financials), so I don't let it do that.
Working on keycontain.com - I'm trying to use agents to automate various tedious things I'm responsible for, and all the API keys that services give out are way too permissive. KeyContain lets you restrict calls to those API keys down to individual arguments, and lets you declare some requests to require approval.
I'm now using it to safely join together services like dns management, app deployment, accounting and grant-writing, etc. I may be biased, but I think it's great!
By "internal feedback" do you mean feedback when a user is logged into an account?
We allow you to do fine-grained censoring of any DOM element by adding class="do-not-track". So if there's a field, or an entire page, that you do not want captured, you can easily mask all of it.
Passwords fields are always censored, and there's no way to disable that.
We also have limited session lengths (up to 30 days), unless a user leaves feedback or a member of the team explicitly saves a moment.
What prevents somebody from scanning it and reconstructing the position of the metal pieces?
Perhaps a better solution is to create a small chip powered by electric induction. The chip would have an embedded private key and solve challenge-response queries issued by the scanning device.
I'm not sure how that compares in cost though.
Edit: it looks like these already exist and cost less than 10 cents a piece. They are called NFC tags.
It says in the article that the idea behind this implementation is that if the tag is swapped it breaks the authentication since the glue is involved in authenticating. NFC/RFID chips can just be swapped from a real product to a fake one as-is.
>What prevents somebody from scanning it and reconstructing the position of the metal pieces?
You're talking about very, very small pieces of metal whose position/orientation is not deterministic when laying the glue and that information is combined with the tag itself to present some kind of challenge response.
Yeah if I’m understanding the article correctly it’s not that the glue is pre-printed with a specific code but rather the glue has a bunch of particles suspended in it and take on an arbitrary pattern when used. Conceptually similar to https://trmm.net/Glitter/ but at a much smaller scale.
Why is it not possible to embed the NFC tag in a destructible medium? Like those annoying stickers that you cannot peel without ripping?
If you use that, then the only way to move the NFC tag to another item would be to cut it out of the original item (including the original adhesive). But this attack also works against the technique in the article.
Regarding the orientation, I understand that it is nondeterministic in the original, but what prevents an attacker from copying it deterministically? Is it just that technology is not good enough to manipulate such small pieces of metal? How long will this limitation persist?
Yes, like other similar tamperproofing options (glitter, vacuum-sealed colored beads, etc) it's trivial, cheap and fast to get a random pattern, but absolutely impractical to control the pieces to get any specific pattern - perhaps someone like a microsurgeon could manipulate them properly given enough time, but that would take an absurd time (since there are many tiny pieces which each need to be manipulated within a gooey substance where each movement disturbs previous ones as well) and be absurdly expensive, and nobody has a "printing" technology to do it in a cost-efficient way.
Perhaps in future someone could develop an advanced combination of 3d printer and pick&place machines that could do it, but such future potential doesn't disqualify this tech from currently detecting counterfeiting of fancy shoes or something.
Why would you need a 3D printer or pick&place machines? You can just do it photolithographically.
Coat a piece of glass with a thin layer of metal. Put a photoresist on top. Project the desired pattern onto it with UV light. Wash the unhardened photoresist away and etch the unnecessary metal.
Now you've got metal in exact the spots you'd like, of exactly the thickness you'd like. You can get the accuracy down to a few hundred micrometers for cheap today.
That would work only for a planar distribution of material. A 3D distribution would require multiple layers (I guess it might quickly become infeasible if it requires thousands of layers).
In the case of 3D arrangements, I think some substrate materials (and also some properties of the particles) would be very difficult to get using photolithography (or some kind of micro 3D printing).
In the case of 3D arrangements, you don't necessarily need to create all the layers photolithographically. You might be able to flatten N layers into 1 layer, then add a plastic coating equivalent to N-1 layers ontop, then repeat that. You'll have a very similar result to every layer being separate.
Imagine e.g. the "multiple layers of cardboard cutouts" scenery in theater vs it actually being 3D.
I don't know much about photolithography, but doesn't it rely on relatively expensive fixed masks prepared for each layer?
Assuming that doing the process you describe is sufficient, what's the ballpark of what "for cheap" means for you if you needed to print 1000 different fake tags, assuming many layers of "the desired pattern" to print the metal flakes?
> doesn't it rely on relatively expensive fixed masks prepared for each layer
If you need perfectly sharp edges and high precision, sure. But I'm sure in this case that'd be unnecessary.
> Assuming that doing the process you describe is sufficient, what's the ballpark of what "for cheap" means for you if you needed to print 1000 different fake tags, assuming many layers of "the desired pattern" to print the metal flakes?
I described in another comment an additional way to quantize the layers to reduce the repetition steps, which would reduce costs further.
Regarding costs, you could fake a THzID chip for about 500€ per fake. Not cheap enough to do it for household items, but if you're faking designer bags, clothing, sneakers, or electronics, it'd be absolutely worth it.
With the right techniques it's often possible to remove those annoying stickers without ripping them. Some of the techniques involve using a solvent or very thin and slippery blade. They are supposed to be resistant against that, but in practice a lot of time not enough.
NFC tag usually consists of two parts very tiny IC (small piece of silicon the size of sand grain) and antenna (a piece of metal foil in a fancy shape). You could make an NFC tag where attempting to remove it rips antenna, but that wouldn't destroy the IC. It's probably a matter of product price and quantities whether, counterfeiting it by reattaching the NFC chip to a new antenna is economically viable. As the process is not only possible it's performed at the NFC tag factory at very large quantities at very low cost. It might also be possible to repair parts of broken antenna assuming area around IC is undamaged.
So overall you get simplicity and cost of regular tamper resistance stickers, with better resistance against solvent and blade attacks, and security properties closer to what you get from secure NFC chip (except you can't perform more complicated cryptographic operations like signing arbitrary data).
> Is it just that technology is not good enough to manipulate such small pieces of metal? How long will this limitation persist?
I would expect that at any point in future, whatever the best controlled manufacturing technique invented are, it will be possible to create uncontrolled pattern at finer scale, or at least much cheaper. Unless we reach the point where maintaining stable state without deteriorating becomes a problem, or the quantity of data for storing and processing becomes impractical.
Though the re-construction of the pattern is effectively impossible, I think you raise a good point regarding the use of NFC. The article mentioning a cloud database was a red flag for me as it introduces another attack vector. Sure, it's not as simple as replacing the tag as you can with RFID, but we know the counterfeiters will go to impressive lengths to replicate the real deal. If verification can be all-local that's ideal, imo. The issue there, though, is that you then need to trust either the scanned or scanning device with a private key. A private key that, if obtained, could be used to create infinite counterfeits. Either way, I think this glue-based method is a great solution, even if it does rely on a cloud service which is dependent on the company that maintains it.
I don't know if I understood correctly. But it might be that the metal pieces in glues are pure random process, and there are no way to reproduce or re-print it again. The metal pieces are then recorded as a key in central database or some sort of AI, just like human fingerprint or retina how are collected and used for authentication???
We tried for years to do things like this, and in the end an approach using typescript is way, way better than anything else I've seen attempted.
In my latest project[1], we set up the types for the API. The server and client are both bound by those types, meaning that one cannot change without the other. This fixes an entire class of bugs where backend code gets updated without the corresponding front-end code changing or vice-versa. It also has the nice side-effect that all of the possible return values (including errors) are nicely documented in one file, and that the errors are very consistent. On the frontend we have a "typed fetch" which returns typed results from the API.
We are also using this for typed access to localStorage, another source of many bugs in past projects, where random keys end up being scattered and causing nondeterministic behavior on different devices.
You can see how our API type system is implemented here:
[1]: We are working on https://app.presupplied.com, a digital home-schooling curriculum to teach 3-year-olds to read. Planning to expand to math, writing, and programming.
Our approach doesn’t preclude TypeScript! In fact I think it would integrate well with it. If you’re interested in a TS approach could you email me at [email protected] ?
I am skeptical of reports published by the cities. There is incentive for the reports to skew positive, since otherwise individuals can lose elections/jobs/contracts.
So I looked back at the 2014-2016 reports from Flint, Michigan to see if they correctly predicted the water crisis.
Also note that while in the US the lead concentration limit is 15 ppb, Canada has recently reduced its limit from 10 ppb to 5 ppb. Nearly every US city I've looked at exceeds 5 ppb.
Almost every date picker I've used is terrible. If you are reading this and are responsible for adding a datepicker, please, please, please do at least the following:
1. There should be a textbox allowing me to type a human-readable date/time (e.g. "monday 5pm" or "july 7, 2015").
2. The textbox should be selected and ready to type into as soon as the datepicker is opened
3. There should be a short list of previously-typed dates because often, for a given date in the UI, the same date is used multiple times in quick succession
4. There should be a typical month view with days of the week visible, in case I'm on mobile
5. The current date should be highlighted on the month view.
6. I should be able to pick the month and the year in at most two taps each (i.e. dropdown for each), no matter how far back in time I need to go.
Shameless plug: we recently implemented an exceptional date picker on momentcrm.com because of how frustrated we were with the default browser experience.
In my web apps, I make dates text boxes that can handle inputs like “next Thursday”, “Monday at 5p”, etc by running the inputs through https://github.com/mojombo/chronic
I like the idea of inputs being able to make sense of as wide of a variety or formats as possible.
For number inputs I’d like to build into Rails something that can handle basic math expressions. For example, a person can enter “120 / 2” in an input and get 60. This is useful for expense apps where you need to expense half of something.
If folks are interested, I can open source these bits. I’d like to expand them as much as possible to handle an even wider variety of inputs.
That's a cool library. I note that WolframAlpha handles this type of stuff readily. Does anyone ever bundle Wolfram products into theirs to handle natural language type things? I'm not immediately sure of the licensing framework, but it would seem nice to be able to do that.
Edit: It seems that WolframAlpha does have an HTTP API.
Embedding wolframalpha is probably overkill, when all you need is simply a small arithmetic expression parser and to understand expressions like "next month" or "2 days ago", which even tools like GNU date support.
I quite like the iOS time picker, but agree the analogue clock style that I think Android popularised is awful. The iOS one also gives a number keypad if you tap the wheels so you can enter that way if you prefer. It’s a shame they don’t do anything similar for dates.
I've never see the analog style clock one before, wow that is garbage. I'm not a fan of the iOS style time 'reels' either, but like you say, at least it opens a keypad if you click on them.
To break down why this picker is bad, here are several UX snags I immediately ran into.
1) It was not obvious how to set minutes, and I spent several seconds trying to get the hour hand to go in between hours.
2) When I let go and it snapped to minutes, it was not obvious to me how to go back and change the hour I had just input incorrectly. Then after I input minutes I expected it to jump back to hours but it didn’t. This is especially bad if your first interaction is a single touch rather than a press and hold, as it will jump with a wrong input and no obvious way to go back before you can even process how the interface works.
3) I have to look at different areas at the same time to select a time. My finger is trying to scroll a circle (where btw my finger covers the number), but I have to look above to see what the input is.
4) The above was even trickier in the minutes inputs, since there were not markings for sub-5 minutes.
5) It was not obvious that the top bar was clickable as an input area to select am/pm, especially since clicking the top bar would not otherwise allow you to input the time.
6) It’s not obvious with the switch to minutes / seconds that the units have switched. Need some representation of this on the clock face itself.
Some major ticks on all inputs and minor ticks that pop up on the minutes input would help a lot with 1, 4, and 6. Could be subtle markings, but would help quite a bit imo. But really this didn’t need to be anything other than a simple text input.
Those aren't so bad, they're reasonably intuitive to anyone who knows how to read an analog clock, and though they're easily fat fingered, you do one click for hour, one for minute and AM/PM in the non 24h versions. Imagine a scrolling time picker where you couldn't scroll the hours, only the minutes. That's what common date pickers are like.
I'm still perplexed that this isnt how every website works.
The absolute worst are date pickers that grey out unbookable dates to look like past dates and default to one week from now, leading me to believe, if I'm not careful, that Im booking a ticket for today.
Seemingly no website that lets you book things has sensible date UX.
Some of these are really great ideas! But I think they should be relegated to an external library or perhaps a web component. The issue here is this is the HTML datepicker. The picker itself isn't well-defined but things like being able to type in human-readable data/time and having it interpret that would likely conflict with the HTML standards already defined and be extremely difficult to define further. Not to mention you could only really do something like that on desktop and the issues pointed out in the post are dealing with mobile date pickers
Very nice site. I was clicking around trying to find a sample of your date-picker and noticed that the "Free Courses" link is not working properly. I believe it is treated as a relative link as it takes me to:
In my opinion the syntax of layerci is relatively simple as someone coming from docker, and does basically boil down to "give us the commands you use to deploy"
However they also have the advantage that they can run deployments on arbitrary runtimes. It looks like reploy only works if my app fits in the runtimes that were preconfigured by you. Because of that, I can run not just my dev deployment, but something very close to my prod deployment as well (we've had multiple bugs that only show up in prod due to our build process).
And finally, their aggressive docker-like layer caching allows very substantial speedups in not only builds, but tests as well. The speedups are typically in the triple digits compared to a reasonably well-optimized build.
I think the differences are major enough that I wouldn't exactly characterize the end results as similar.
> their aggressive docker-like layer caching allows very substantial speedups in not only builds, but tests as well
Makes sense; Reploy actually won't run your tests (or any other CI-esque things to that note). We're very much focused on only spinning up environments!
Overall, there is definitely overlap here. I'd argue that if someone wants to spin up a frontend, backend, db, etc., it makes a lot more sense to enumerate your `services` rather than try and serve them all in a single runtime (I think this is called a Layerfile?). I'm not sure how a use case like this would work with Layer, but that would be my hesitance in trying to set things up.
Layer seems like a great option for running long jobs to really take care of that speed up.
reply