Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

14
  • 3
    How exactly are you proposing to control access to your database if you're not going through an API? Commented Sep 19, 2023 at 10:46
  • Currently, the Web application (which I inherited) has queries in the code, used with EF. Commented Sep 19, 2023 at 10:47
  • That's not access control. Commented Sep 19, 2023 at 10:48
  • 1
    @guillaume31: If it is server-side rendered, then how does the server access the database without using an API? Commented Sep 19, 2023 at 13:10
  • 1
    "but having one to just access databases seems overkill to me" it isn't. For you see, APIs are about policy, and databases only give you very coarse-grained ways to control and implement policy. I'm struggling to think of a non-trivial CRUD app I've built in the last 10 years we're e.g. postgres' access controls were sufficient to the task. Not to mention the security risk of having not hard-coded queries run against your db.... Commented Sep 19, 2023 at 14:39