Uploaded image for project: 'James Server'
  1. James Server
  2. JAMES-3643

VirtualHosting: using both bob@domain.tld and bob as a connection identifier

    XMLWordPrintableJSON

Details

    Description

      Following this message: https://www.mail-archive.com/server-dev@james.apache.org/msg70640.html

      This is a problem I had during the last deployments I did carry over: explaining people their credentials were bob@domain.com and not bob as they had the habit of. (A I turn on virtual hosting then I do need to have the domain name for usernames)

      Recently I and my team at Linagora had been tasked to support both bob and bob@domain.com connection identifiers for the POP3 protocol, which we did implement in a private (tailor-made) project.

      However, we strongly believes this would also benefit the Apache project as well (removes some barriers for the initial migration), thus would propose adoption here too.

      Design

      • UsersDAO class can list username with a given localpart
      • UsersReposiotry::getUserByName could then attempt a resolution when virtualhosting is enabled but the username is only a local part:
      • The list of user with that local part is empty -> not found
      • The list of user with that local part have one item -> return it
      • The list of user with that local par several items -> fail (ambiguous)
      • We then adapt SessionProvider to rely on that code path

      Local part resolution for JPA and Memory is trivial, requires one projection with Cassandra, requires one more configuration field (uid) for LDAP.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              btellier Benoit Tellier
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 20m
                  1h 20m