End To End API Security
End To End API Security
API Security
A guide to securing your web service APIs
1. Introduction..................................................................................................... 03
4. Conclusion...................................................................................................... 30
Introduction
MarketsandMarkets.
5.1 Billion
1.2 Billion
2018 2023
32.9%
Confronting
the Security
Challenges
of APIs
their use.
According to 1
-
-
igent reader to research secure development processes and practices to ensure privileged data is not
API
Security
Considerations
-
-
sively address API security concerns and prevent misuse.
and devices.
3.2.1 Authentication
CLIENT SERVER
Authorization : Basic
200 OK
Due to the concerns mentioned above, using basic authentication has become a less secure approach
Resource Server
Client Application
Authorization Server
Resource Owner
Resource Server
-
Client Application
The client application is the application requesting access to the resources stored on the resource
Authorization Server
A detailed description of OAuth 2.0 can be found on this website for further reading.
When it comes to OAuth 2.0-based authentication, there are several key components. Those are the
1. Authorization Request
USER
(Resource Owner)
Authorization
APPLICATION 4. Access Token Server
(Client)
5. Access Token
Resource
6. Protected Resource Server
Resource
Owner
Client Authorization
Server
Resource
Server
Resource
Server
1. Client Logon
Client
5. Client-to-Server ticket
Server
1
Authentication
Server
2 JWT
3 JWT
Application
Server
4
(B)
End User User Agent Open ID Provider
(C) Authorization code
(A) (C)
Relying Party
(F) RP validates ID
(F)
Token per specs
API Key
Request Header
{ “api-key”: “9038-20380-9340-98”}
Request
Application
Client Server
API ShoppingCartAPI
Action
Attribute-Based Access Control (ABAC) and evaluation are supported by XACML. These evaluations are
Deny/ Create
Policy Enforcement Permit Policy Decision Policy Administration Policy
Application
Point (PEP) Point (PDP) Point (PAP)
Kubernetes setups.
In OPA, the policy decisions are generated by evaluating the query input and against policies and data.
3.2.2.4 Speedle+
can be used in API management scenarios, cloud-native applications, and legacy applications. This
-
guage, authorization decision service, and a command-line tool. When securing APIs using a role-based
access control (RBAC), Speedle is a good alternative that deserves attention.
To avoid these problems, the best solution is to have a rate-limiting mechanism. The limiting conditions
Web Server
(domain-a.com)
Image
(domain-a.com)
Web document
domain-a.com Cross-origin requests (controlled by CORS)
those becomes vital. These days, it is very hard to trust every request that comes to a particular API,
-
opers can take necessary prevention actions in advance.
-
cation purposes (and nothing more than that).
relies on the credentials (or tokens), the attacker can do anything pretending to be a legitimate consum-
1.
2.
3.
4.
5. Broken Function Level Authorization
6. Mass Assignment
7.
8.
9. Improper Assets Management
10.
To build a secure API ecosystem, preventing these threats becomes key. At the same time, these stan-
The -
product guides to create and manage APIs that are secure by design (in most cases).
Conclusion