Discussion
Loading...

Post

Log in
  • About
  • Code of conduct
  • Privacy
  • Users
  • Instances
  • About Bonfire
Deborah Pickett
Deborah Pickett
@futzle@old.mermaid.town  ·  activity timestamp 11 hours ago

#Email #Sysadmin #Hivemind, brainstorm with me the best way to achieve per-client passwords with #saslauthd!

The ultimate goal is to replicate Fastmail’s per-app IMAP and SMTP passwords, where the same login user can successfully authenticate with a list of passwords that I’ll manage externally.

I’m already using saslauthd in ldap mode, but LDAP tends to hold as fundamental that a user has only one password. saslauthd also has pam mode, but PAM (and especially the PAM MySQL and Postgres modules) also barf if your database query returns more than one row. getpwent and kerberos modes I can’t see being much use.

What about the rimap mode? Do I want to write a dummy IMAP server that backs onto a database for auth? Yuck, but all the other options seem yucker.

Maloney clause: I’ve done a lot of reading of specs and source already, so you’re unlikely to help if you’re just going to do a web search. Paste chatbot slop at me to get blocked.

  • Copy link
  • Flag this post
  • Block
Jamey Sharp
Jamey Sharp
@jamey@toot.cat replied  ·  activity timestamp 11 hours ago

@futzle Reading the documentation for how to write PAM modules, it looks to me like PAM itself doesn't care how you check the user's password, or even really knows what a "password" is. It looks like an auth module uses the "conversation" callback to ask the application to get a string from the user, and then it can do anything it wants with that string, such as checking it against a list of passwords. Have I missed something? I would think writing a new PAM module would be easier than writing a weird IMAP server.

  • Copy link
  • Flag this comment
  • Block
Jamey Sharp
Jamey Sharp
@jamey@toot.cat replied  ·  activity timestamp 11 hours ago

@futzle And reading through the Linux-PAM source, because I don't know how else to find a list of existing readily available modules, I think you should be able to meet your goals using pam_exec plus writing a small program that does the authentication you want, perhaps as a shell script.

  • Copy link
  • Flag this comment
  • Block

bonfire.cafe

A space for Bonfire maintainers and contributors to communicate

bonfire.cafe: About · Code of conduct · Privacy · Users · Instances
Bonfire social · 1.0.1-beta.35 no JS en
Automatic federation enabled
Log in
  • Explore
  • About
  • Members
  • Code of Conduct