Multiple auth not yet supported
- Dominant language
- Lua
- Stars
- 15
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
Given it's possible for endpoints to have multiple forms of security, yet the tool currently doesn't support that and throws the below error. We'll need to eventually support more than 1 form of security however:
error when > 1 security block provided
`openapi2kong ppe-fixing.yaml
/usr/local/openresty/luajit/bin/luajit: ...luarocks/rocks-5.1/openapi2kong/0.1.0-1/bin/openapi2kong:25: Failed converting 'ppe-fixing.yaml': Failed to convert paths: maximum of 1 Security Requirement supported, got 2 (origin: openapi[Roostify PPE (Product & Pricing Engine) Service]:paths:path[/cache/evict]:operation[post])
stack traceback:
[C]: in function 'assert'
...luarocks/rocks-5.1/openapi2kong/0.1.0-1/bin/openapi2kong:25: in main chunk
[C]: at 0x00405120`
This is the original contents of the YAML file showing two:
` security:
- pricing_auth:
- read:service
- api_key: []
`
Current workaround is to remove one of the methods (i.e. just have api_key: [])
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the failure with the ppe-fixing.yaml example using the openapi2kong command, then trace how security requirements are converted for the affected path and operation. Support the two security blocks shown without raising the maximum-of-1 error, and verify that the converted Kong specification preserves both authentication options.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua, openapi
- Domain
- api
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100