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

Section-based auth config #3446

Merged
merged 10 commits into from
Dec 17, 2021
Merged

Section-based auth config #3446

merged 10 commits into from
Dec 17, 2021

Commits on Dec 16, 2021

  1. Require auth sections for all enabed methods

    Now the auth mthods are declared by including the section(s)
    instead of listing the methods.
    The list of methods is optional and used to specify method order.
    
    Motivation:
    - Required method options were enforced only if the relevant section
      was present, but the section could be omitted even though the method
      was enabled.
    - The possibility to specify default values for method options without
      always including all subsections for unused methods.
    - Simplicity: in most cases only one method is enabled and the list of
      methods can be omitted.
    chrzaszcz committed Dec 16, 2021
    Configuration menu
    Copy the full SHA
    0a40f39 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c7bd0d8 View commit details
    Browse the repository at this point in the history
  3. Update tests with the new required auth config sections

    Also:
    - Test auth methods with real names as the mocked modules were
    invalid. Using real names is easier than mocking helper functions
    inside mongoose_config_spec.
    - Test missing modules in a separate simple test case.
    chrzaszcz committed Dec 16, 2021
    Configuration menu
    Copy the full SHA
    c8f900b View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    f6b679f View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    ed6b8d0 View commit details
    Browse the repository at this point in the history
  6. Check for unsupported auth methods and modules with 'process'

    Use the callback for the root element for the check.
    Main motivation is to keep error handling consistent and simplify testing.
    chrzaszcz committed Dec 16, 2021
    Configuration menu
    Copy the full SHA
    c613e09 View commit details
    Browse the repository at this point in the history
  7. Unify tests for unsupported auth methods and modules

    Errors are generated the same way for all types of issues,
    so the same code can be reused.
    
    Also:
    - Module names changed to real ones in the file test
    - assert_error logic is updated to handle more detailed tests with
    checking the reason and other attributes
    chrzaszcz committed Dec 16, 2021
    Configuration menu
    Copy the full SHA
    35f510d View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    d618735 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    96c0701 View commit details
    Browse the repository at this point in the history
  10. Add migration information for the section-based auth config

    Also: add missing information about the changed host_config.
    chrzaszcz committed Dec 16, 2021
    Configuration menu
    Copy the full SHA
    33f2837 View commit details
    Browse the repository at this point in the history