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

feat(pam/nativemodel): Add native PAM interface support #314

Merged
merged 16 commits into from
Jun 27, 2024

Commits on Jun 26, 2024

  1. pam: Use default log handler when pam.Silent is used and logging to file

    In case we're logging to a file, we are not bothering PAM output, so
    let's continue using the default handler
    3v1n0 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    961e028 View commit details
    Browse the repository at this point in the history
  2. pam: Move initialization of options for PAM in headless mode to share…

    …d file
    
    These are used both by tests and actual PAM model, so expose this in a
    single place to be reused without repetitions
    3v1n0 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    8209ce5 View commit details
    Browse the repository at this point in the history
  3. pam/authentication: Request stage change before starting authentication

    We were managing this from model, but this happened also on error, so
    let's instead do the stage change only if authentication has been
    started
    3v1n0 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    24dff3f View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    95e6833 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    dad1a52 View commit details
    Browse the repository at this point in the history
  6. pam/integration-tests: Rename optional pw reset tape to be closer to …

    …what it does
    
    The tape doesn't really reset the password, it only skips the request so
    rename it accordingly, so that we can add an actual test that accepts
    the request
    3v1n0 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    e9ad851 View commit details
    Browse the repository at this point in the history
  7. pam/integration-tests: Rename test to make the outcome clearer

    In this test we were switching to local broker, but that's not something
    that was explicitly stated so do it
    3v1n0 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    9310aa4 View commit details
    Browse the repository at this point in the history
  8. pam/integration-tests: Move CLI tapes to a subfolder

    We're going to add more types, so let's organize them better
    3v1n0 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    1bcf3dc View commit details
    Browse the repository at this point in the history
  9. pam/authentication: Handle new password check logic in a global place

    This makes easier to handle the logic in other UIs without having them
    to keep track of the state or of the previous password themselves
    3v1n0 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    782b82f View commit details
    Browse the repository at this point in the history
  10. pam: Add PAM native model implementation

    It allows to work with any pam client, regardless they're supporting
    authd or not
    3v1n0 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    51ac6ad View commit details
    Browse the repository at this point in the history
  11. pam/main-cli: Allow to enable simple conversation handler

    It allows us to use more complex stacks where normal PAM input is
    required
    3v1n0 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    0a9cb81 View commit details
    Browse the repository at this point in the history
  12. services/permissions/testutils: Only consider the suffix of the user …

    …error message
    
    When replacing the user ID with XXXX's we may not be able to replace the
    content fully when the string is wrapped.
    
    So just consider the final part of the string.
    
    See https://github.com/ubuntu/authd/actions/runs/9588429219/job/26440434186
    3v1n0 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    23a2336 View commit details
    Browse the repository at this point in the history
  13. pam/integration-tests: Add native PAM client integration tests

    Reusing the same test cases of the CLI client, tuned to work with the
    simpler UI that PAM provides
    3v1n0 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    fb81097 View commit details
    Browse the repository at this point in the history
  14. pam/integration-tests: Run passwd_unexisting_user tape with CLI

    We had this tape in the repository, but it wasn't used, so actually use
    it
    3v1n0 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    1c81238 View commit details
    Browse the repository at this point in the history
  15. pam/integration-tests: Add TestNativeChangeAuthTok tests

    Repeat the tests we have for the CLI interface in the PAM native
    interface too
    3v1n0 committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    d02e993 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    09dede8 View commit details
    Browse the repository at this point in the history