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

User-List Control for PAM Authentication #326

Merged
merged 4 commits into from
Sep 24, 2024
Merged

Conversation

huangyxi
Copy link
Contributor

In the current implementation, PAM authentication in wsgidav only checks if a user exists on the OS. The new patch introduces a user-list control feature, allowing more granular management of which users can access the WebDAV service.

Key Features

  1. deny_users Option:
    A list[str] that explicitly denies login access to any users listed. This option has the highest priority. If a user is listed in deny_users, they will be blocked from logging in, regardless of other settings.

  2. allow_users Option:
    Can be set as a str or list[str], determining which users are allowed to log in:

    • "all" (default): All users on the OS are permitted.
    • "current": Only the user running the wsgidav program can log in.
    • A specific list of users can also be provided to explicitly allow access.

Compatibility

This user-list control does not change the default behavior, which allows all OS users to log in.

Copy link
Owner

@mar10 mar10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution!
Please also add a line to the changelog and some info here user_guide_configure.rst.

wsgidav/dc/pam_dc.py Outdated Show resolved Hide resolved
wsgidav/dc/pam_dc.py Show resolved Hide resolved
wsgidav/dc/pam_dc.py Outdated Show resolved Hide resolved
wsgidav/dc/pam_dc.py Outdated Show resolved Hide resolved
@mar10 mar10 merged commit d3b1b64 into mar10:master Sep 24, 2024
9 checks passed
@mar10
Copy link
Owner

mar10 commented Sep 24, 2024

Thanks for contributing a great new feature!

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