Skip to content

discuss: fail safe protection #12626

Description

@juzhiyuan

Current Behavior

In Standalone mode, APISIX can start successfully when plugins are not enabled in the config.yaml file but are used in Route/Service resources. However, the plugins will not take effect.

Image Image

Expected Behavior

  1. If a plugin is not enabled in config.yaml, an error should be shown/thrown when that plugin is used in resources such as Routes or Services.
  2. Whether or not to allow APISIX to start should be discussed.

Error Logs

No response

Steps to Reproduce

  1. Run APISIX in Standalone mode (https://docs.api7.ai/apisix/production/deployment-modes#standalone-mode)
  2. Use Standalone File-Driven mode
  3. Remove/Disable key-auth plugin (as an example)
  4. Enable key-auth plugin in apisix.yaml file
routes:
-
  uri: /hello
  plugins:
    key-auth:
  upstream:
    nodes:
      "10.244.1.5:1980": 1
    type: roundrobin
#END
  1. Start APISIX successfully

Why

If a developer believes the Auth plugin is enabled but it actually fails to work, this could create potential security issues based on current behaviour.

Environment

  • APISIX version (run apisix version): 3.13

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status
    ✅ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions