http://qs1969.pair.com?node_id=11137450

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks,

How Akamai authentication can be implemented using IMAP::Client (maybe) which would authentication both IMAP creds and Akamai creds (two-factor authentication),so that mails would be processed as expected.
Currently we have $imap->user and $imap->password methods used to authenticate user, how to add additional layer of authentication ?

Any help regarding this would be appreciated.
Thank you.

Replies are listed 'Best First'.
Re: Akamai authentication for IMAP.
by Corion (Patriarch) on Oct 13, 2021 at 07:28 UTC

    I don't know what "Akamai authentication" is - do you have additional documentation by Akamai on that? Maybe it is OAuth2 authentication, much like how Gmail wants clients to authenticate?

      Hi Corion, Thank you for the reply.
      below is the link of the akamai technologies which provides cyber security to the organisation so that their application can be accessed safely
      https://www.akamai.com/why-akamai
      What is the scenario:
      Organization is using akamaai service which sits between their office 365 and the mailboxes, whenever customer login using email id to office 365 it routes to the certain akamai page to authenticate where user id and password needs to be provided in order to proceed to access the mailbox, this is how it works from the UI.
      The same needs to be implemented in the application using IMAP::Client(maybe before we provided username and password to the imap object).
      How this can be achieved, i hope this is clear now. thank you.

        IMAP is not a protocol that goes via HTTP, so the authentication needs a different approach than HTTP for Office 365 does.

        A reply falls below the community's threshold of quality. You may see it by logging in.
      A reply falls below the community's threshold of quality. You may see it by logging in.
Re: Akamai authentication for IMAP.
by NERDVANA (Deacon) on Oct 13, 2021 at 03:00 UTC
    Does your server have a 2-factor option already? In Thunderbird (mozilla imap client) the options are “Normal Password”, “Encrypted Password”, “Kerberos/GSSAPI”, “NTLM”, “TLS Certificate” and “OAuth2”. None of those sound like 2-factor, but OAuth can probably be set up to require a second factor before it completes?

    Your post kind of sounds like you want to create a new custom extension to the IMAP protocol to exchange two passwords. This seems like an odd choice, because no other IMAP client would support it. I think it would be much better to look at what IMAP already supports with OAuth2.