Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change: don't expose public API by default & remove plugin interceptor #6196

Merged
merged 37 commits into from
Jan 27, 2022

Conversation

bzp2010
Copy link
Contributor

@bzp2010 bzp2010 commented Jan 25, 2022

What this PR does / why we need it:

Tweak the public-api plugin to no longer expose the public API by default, while removing the skip global rules feature and configuration.

Pre-submission checklist:

  • Did you explain what problem does this PR solve? Or what new features have been added?
  • Have you added corresponding test cases?
  • Have you modified the corresponding document?
  • Is this PR backward compatible? If it is not backward compatible, please discuss on the mailing list first

@bzp2010 bzp2010 self-assigned this Jan 25, 2022
@bzp2010 bzp2010 marked this pull request as ready for review January 27, 2022 01:28
@bzp2010
Copy link
Contributor Author

bzp2010 commented Jan 27, 2022

Review guide

There is a lot of content in this PR revision, so I am providing a modifications list here.

Modified content

  1. Core modifications: apisix/admin/plugin_metadata.lua, apisix/api_router.lua, apisix/init.lua
    Remove the public API match in the access phase and remove the plugin interceptor.

  2. Plugin modification: apisix/plugins/public-api.lua
    Remove the skip global rule, it will now be executed unconditionally (since the public API is now also managed by the normal HTTP request router)

  3. Tests based on Test::Nginx: Several files in *.t
    Add a pre-step for creating public API routes (those provide public API).
    Modify the default settings for partial GET /t and no_error_log.

  4. CLI tests: t/cli/test_admin.sh, t/cli/test_prometheus.sh
    Add a pre-step for creating public API routes (node-status and prometheus plugin)

  5. Chaos tests
    Add a pre-step for creating public API routes (prometheus plugin)

Other

This PR does not contain documentation for the public API and changes to its documentation involving plugin interceptors and plugin development.

@spacewander spacewander changed the title feat: tweak public-api plugin change: don't expose public API by default & remove plugin interceptor Jan 27, 2022
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.

3 participants