apache / apache/openwhisk-apigateway

Loop detection

Open
#361 0 comments 0 reactions 0 assignees View on GitHub
enhancement good first issue
Dominant language
Lua
Stars
65
Forks
43
PR merge metrics
No merged PRs in 30d

Description

Add logic to detect when an API might be calling itself (directly or via another API) in a loop, and terminate the loop.

This can be done through injection of unique headers for every hop through the gateway.

For example:

Client request -> GW: `GET /api1`
GW inject header: `X-ApiGw-Loop: get_api1`
GW request -> GW: `GET /api2`
GW inject header: `X-ApiGw-Loop: get_api1 get_api2`
GW request -> GW: `GET /api1`
GW analyzes `X-ApiGw-Loop` and sees `get_api1` is already present
GW response: `508 Loop detected` (or similar)

Contributor guide

Open the contributing guide

Research direction

Start by tracing how the gateway forwards requests between APIs and how it handles injected headers. Define how the hop header records each API and how repeated entries produce a loop response such as 508. Done means direct and indirect API loops terminate while non-looping requests continue normally.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua
Domain
api, cloud
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.