Settings

Theme

The API Churn/Security Trade-Off (2016)

intercoolerjs.org

28 points by aaossa 8 months ago · 7 comments

Reader

gz5 8 months ago

We need to be careful on how and where we define our constraints regardless, but we can mitigate against this to some degree for some APIs:

>The problem with these increasingly expressive end points is that you are putting them not just in the hands of your front end developers, but also in the hands of potentially hostile users.

Meaning, let's not expose to 'hostile users' if we can help it.

For example, put the API gateway solely on a private overlay, and gate entrance to that overlay to endpoints with enrolled private key signed certs (+ other factors if you wish).

Puts more burden on the API clients - e.g. PKI enrollment, management, etc. would need to be reliable, automated and abstracted.

So infeasible or too much friction for some APIs, but this would reduce the attack surface for a B2B API with a limited number of consumers...and many of those would take that tradeoff?

Of course, we still wouldn't 'trust' the private network overlay in our API definitions...it would just be one more layer of security if access is gated with modern cryptography.

recursivedoubts 8 months ago

Aaaayyyy yooo, i wrote this a long time ago, but I think it holds up!

TLDR: there is a trade off in how much expressive power you can surface to front-end developers when their logic is written in-browser because anything you give to them, you give to anyone who can open up a console. That makes things a lot more dangerous and is in contrast w/ the back end, where you can give developers access to a full SQL implementation.

  • Etheryte 8 months ago

    At the end of the day, it's still only shuffling around where you define your constraints, because you need them either way. Whether you define a rigid API endpoint for the frontend (named the problem in the article) and handle access control there, or make the API fluid with e.g. GraphQL (the first solution in the article) and define access controls there, it's still the same problem.

    • recursivedoubts 8 months ago

      I don't agree with that.

      You can give a back end developer SQL, because the users of your application don't also get SQL. Not true of GraphQL.

librasteve 8 months ago

intercooler.js is the forerunner of htmx.org - by the same author

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection