8000 feat(authn): allow authn providers to define a separate schama for API by savonarola · Pull Request #11771 · emqx/emqx · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@savonarola
Copy link
Contributor
@savonarola savonarola commented Oct 16, 2023

Fixes EMQX-11152

In the API, we validate bcrypt salt rounds.

Internally, we separate config schema and API mutation schema for authn providers (this obviously makes sense only when API schema is stricter). We use this separation for mnesia provider: for API we validate bcrypt rounds, but for config we use a converter to be backward compatible.

Summary

🤖 Generated by Copilot at 4042b22

Refactor the schema modules and functions for the built-in database authenticator and the password hashing options to support different schema kinds for configuration, API validation, and internal usage. Add a test case for bcrypt validation and fix a bug in the ACL test suite.

PR Checklist

Please convert it to a draft if any of the following conditions are not met. Reviewers may skip over until all the items are checked:

  • Added tests for the changes
  • [na] Added property-based tests for code which performs user input validation
  • Changed lines covered in coverage report
  • Change log has been added to changes/(ce|ee)/(feat|perf|fix)-<PR-id>.en.md files
  • For internal contributor: there is a jira ticket to track this change
  • Schema changes are backward compatible for the config, and are NOT backward compatible for the API part (this is the task).

@savonarola savonarola force-pushed the 1015-validate-bcrypt-schema-in-api branch 2 times, most recently from 8afd3e9 to 6039a4c Compare October 17, 2023 10:09
@savonarola savonarola changed the title feat(authn): allow authn providers do define a separate schama for API feat(authn): allow authn providers to define a separate schama for API Oct 17, 2023
@savonarola savonarola force-pushed the 1015-validate-bcrypt-schema-in-api branch from 6039a4c to 6354f3b Compare October 17, 2023 10:19
@savonarola savonarola marked this pull request as ready for review October 17, 2023 14:40
@savonarola savonarola requested review from a team and JimMoen as code owners October 17, 2023 14:40
@savonarola savonarola changed the base branch from release-53 to master October 17, 2023 14:43
@savonarola savonarola merged commit 8d82c30 into emqx:master Oct 19, 2023
@savonarola savonarola deleted 724B the 1015-validate-bcrypt-schema-in-api branch April 26, 2024 12:57
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.

2 participants

0