IP Library Granted Patent US 12,003,543
Granted Patent B1
US 12,003,543 · App. 17/239,316 · Granted Jun 4, 2024

Method and system for modifying and validating API requests

Inventors: Sayed Asad Ali (Mountain View, CA); Andrew Curtis (San Mateo, CA); Marco Sanvido (Belmont, CA); Timothy L. Hinrichs (Los Altos, CA); Teemu Koponen (San Francisco, CA)
Assignee: STYRA, INC.
H04L63/20H04L63/08H04L63/123
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,003,543
App. No.
17/239,316
Granted
Jun 4, 2024
Kind
B1
Abstract

Some embodiments of the invention provide a method of modifying and validating API requests received at an API server. At a mutating admission controller of the API server, the method intercepts an API request received at the API server. The method invokes a mutating webhook to query a policy agent that includes a set of policies for modifying API requests to determine whether the API request requires modifications. When the policy agent determines that the API request requires modifications based on an identified policy from the set of policies, the method performs the modifications and forwards the modified API request for validation by the API server. After the API server has validated the API request, the method intercepts the API request at a validating admission controller and invokes a validating webhook to query the policy agent to determine whether the API request is valid. When the policy agent determines that the API request is valid, the method forwards the API request to be admitted to a database of the API server.

Claims (38)

1. A method for processing API (application programming interface) requests received at an API server, the method comprising:

at a mutating admission controller of the API server,

intercepting an API request received at the API server;

invoking a mutating webhook to query a policy agent to determine whether the API request requires modifications, wherein the policy agent comprises a set of policies for modifying API requests received at the API server; and

when the policy agent determines that the API request requires modifications based on an identified policy from the set of policies, performing the modifications to the API request according to the identified policy.

2. The method of claim 1 , wherein performing the modifications to the API request according to the identified policy comprises (i) receiving a patch to be applied to the API request from the mutating webhook, and (ii) applying the patch to the API request, wherein the patch comprises the modifications.

3. The method of claim 2 , wherein after performing the modifications, the mutating admission controller sends the modified API request to the API server for validation.

4. The method of claim 1 , wherein

the mutating admission controller is a mutating first admission controller, the mutating webhook is a mutating first webhook, the query is a first query, and the set of policies is a first set of policies,

after the API request is validated by the API server, the API request is sent to a validating second admission controller, and

upon receiving the API request, the validating second admission controller invokes a validating second webhook that sends a second query to the policy agent to determine whether the API request is valid based on a second set of policies for validating API requests.

5. The method of claim 4 , wherein

when the policy agent determines that the API request is valid, the API request is admitted to a storage structure of the API server to complete the request, and

when the policy agent determines that the API request is not valid, the validating second admission control returns the API request to the mutating admission controller to determine whether initial or additional modifications are required to make the API request valid.

6. The method of claim 4 , wherein the second set of policies comprises custom default validation policies.

7. The method of claim 4 , wherein the mutating first webhook is configured to query a first specific document from the policy agent and the validating second webhook is configured to query a second specific document from the policy agent.

8. The method of claim 4 , wherein the first and second admission controllers comprise first and second admission control plugins.

9. The method of claim 1 , wherein when the policy agent determines that the request does not require modifications, the mutating admission controller sends the API request to the API server for verification without performing modifications.

10. The method of claim 1 , wherein the mutating admission controller receives the API request after the API server has authenticated and authorized the API request.

11. A non-transitory machine readable medium storing a program for execution by a set of processing units, the program for processing API (application programming interface) requests received at an API server, the program comprising sets of instructions for:

at a mutating admission controller of the API server,

intercepting an API request received at the API server;

invoking a mutating webhook to query a policy agent to determine whether the API request requires modifications, wherein the policy agent comprises a set of policies for modifying API requests received at the API server; and

when the policy agent determines that the API request requires modifications based on an identified policy from the set of policies, performing the modifications to the API request according to the identified policy.

12. The non-transitory machine readable medium of claim 11 , wherein performing the modifications to the API request according to the identified policy comprises sets of instructions for (i) receiving a patch to be applied to the API request from the mutating webhook, and (ii) applying the patch to the API request, wherein the patch comprises the modifications.

13. The non-transitory machine readable medium of claim 12 , wherein after performing the modifications, the mutating admission controller sends the modified API request to the API server for validation.

14. The non-transitory machine readable medium of claim 11 , wherein

the mutating admission controller is a mutating first admission controller, the mutating webhook is a mutating first webhook, the query is a first query, and the set of policies is a first set of policies,

after the API request is validated by the API server, the API request is sent to a validating second admission controller, and

upon receiving the API request, the validating second admission controller invokes a validating second webhook that sends a second query to the policy agent to determine whether the API request is valid based on a second set of policies for validating API requests.

15. The non-transitory machine readable medium of claim 14 , wherein

when the policy agent determines that the API request is valid, the API request is admitted to a storage structure of the API server, and

when the policy agent determines that the API request is not valid, the validating second admission control returns the API request to the mutating admission controller to determine whether initial or additional modifications are required to make the API request valid.

16. The non-transitory machine readable medium of claim 14 , wherein the second set of policies comprises custom default validation policies.

17. The non-transitory machine readable medium of claim 14 , wherein the mutating first webhook is configured to query a first specific document from the policy agent and the validating second webhook is configured to query a second specific document from the policy agent.

18. The non-transitory machine readable medium of claim 14 , wherein the first and second admission controllers comprise first and second admission control plugins.

19. The non-transitory machine readable medium of claim 11 , wherein when the policy agent determines that the request does not require modifications, the mutating admission controller sends the API request to the API server for verification without performing modifications.

20. The non-transitory machine readable medium of claim 11 , wherein the mutating admission controller receives the API request after the API server has authenticated and authorized the API request.

Assignments (3)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 5, 2025
From: STYRA, INC.
To: APPLE INC.
Reel/Frame 072818/0489 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 19, 2025
From: STYRA, INC.
To: APPLE INC.
Reel/Frame 072522/0568 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 23, 2021
From: ALI, SAYED ASAD; CURTIS, ANDREW; SANVIDO, MARCO; HINRICHS, TIMOTHY L.; KOPONEN, TEEMU
To: STYRA, INC.
Reel/Frame 056028/0054 →
Continuity (1)
Provisional Application 63056522 · Jul 24, 2020
Cited By (6)
US 12,299,472 US 12,401,694 US 12,407,647 US 12,436,939 US 12,676,890 US 12,706,953