Skip to content

--ignore-security-errors should not ignore all security plugins when enabled#295

Open
sean-walter wants to merge 1 commit into
Kong:mainfrom
sean-walter:fix/ignore-security-errors-should-only-ignore-errors
Open

--ignore-security-errors should not ignore all security plugins when enabled#295
sean-walter wants to merge 1 commit into
Kong:mainfrom
sean-walter:fix/ignore-security-errors-should-only-ignore-errors

Conversation

@sean-walter

Copy link
Copy Markdown

currently if the --ignore-security-errors flag is enabled on the deck file openapi2kong command, it will just ignore creating any security plugins instead of what its name and description suggest which is to ignore errors.
Should ideally resolve Kong/deck#1829 as well

…nore-security-errors flag, it should only ignore errors
@CLAassistant

CLAassistant commented Jun 1, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f07a3dda4b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +205 to +206
if ignoreSecurityErrors {
return inherited, nil

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Do not inherit OIDC for ignored operation overrides

When a document-level OIDC scheme is valid but an operation overrides security with an unsupported scheme such as apiKey, Convert calls getOIDCdefaults(operation.Security, doc, docOIDCdefaults, true). This branch returns the inherited document OIDC config, so the later string comparison treats the operation as unchanged and leaves the service-level openid-connect plugin applying to that route, even though OpenAPI operation security overrides the document-level requirement and --ignore-security-errors should skip the unsupported operation security rather than reapply the parent.

Useful? React with 👍 / 👎.

@Prashansa-K Prashansa-K self-assigned this Jun 4, 2026
@Prashansa-K

Copy link
Copy Markdown
Contributor

Holding this PR due to test failures.
We will continue working on the main issue filed here: Kong/deck#2101

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

openapi2kong: No openid-connect plugin configuration is generated when '--ignore-security-errors' option is specified

3 participants