Security

Security schemes and requirements that generated clients cannot authenticate with.

Rule Default Summary
Security/MissingConfiguration info Neither the config nor the document declares root security.
Security/SchemeNotFound warn A referenced security scheme is undefined or has no client option supplying its credential.

Security/MissingConfiguration

Neither the config nor the document declares root security.

Default severity Fix lives in
info Your API description (document)

When it fires

Security schemes are defined, but neither the document nor the configuration declares root security, so generated clients default to unauthenticated requests.

Changing or silencing it

Each finding's suppression key is root.

Re-grade the rule with diagnostics.rules, or silence findings with diagnostics.ignored, matching their suppression key exactly or with * as a wildcard:

{
  "diagnostics": {
    "rules": {
      "Security/MissingConfiguration": "off"
    },
    "ignored": {
      "Security/MissingConfiguration": "<suppression key>"
    }
  }
}

Security/SchemeNotFound

A referenced security scheme is undefined or has no client option supplying its credential.

Default severity Fix lives in
warn Your SDK configuration (config)

When it fires

A security requirement references a scheme that is not defined, a required scheme has no client option supplying its credential, or a client option references a scheme that does not exist.

Changing or silencing it

Each finding's suppression key is the scheme name.

Re-grade the rule with diagnostics.rules, or silence findings with diagnostics.ignored, matching their suppression key exactly or with * as a wildcard:

{
  "diagnostics": {
    "rules": {
      "Security/SchemeNotFound": "info"
    },
    "ignored": {
      "Security/SchemeNotFound": "<suppression key>"
    }
  }
}

See also

What did you think of this content?