Codit / practical-api-guidelines

Practical guidelines for building & designing APIs with .NET.
MIT License
16 stars 5 forks source link

Provide guidance on security #83

Open MassimoC opened 5 years ago

MassimoC commented 5 years ago

Secure the API access

fgheysels commented 5 years ago

I'm trying to put my 2 cents here, don't shoot if I get it wrong :)

tomkerkhove commented 5 years ago

Those sound like good suggestions if you ask me, but personally would split this item into an issue per type of security and take it piece by piece and determine the maturity level per approach.

Agree on all of the above where api key and identity server would be most important to me

MassimoC commented 5 years ago

Following the proposal of Frederik, can the guideline be something like this?

If you need to limit the access to the API

If you need give access to one or more applications on behalf of users

tomkerkhove commented 5 years ago

This assumes that you have an API gateway, which is not always the case. I personally find IP filtering a more advanced scenario as this is not always possible.

In terms of Shared Access Key & X509 client authentication, I would start with Shared Access Key and if there is a strong requirement and/or a gateway present use X509 client authentication instead.

Tagging Arcus Security issues for observability:

tomkerkhove commented 4 years ago

Attributes are now available btw