Skip to content

Prevent AUTHENTICATE without matching AUTH=#{mechanism} capability #48

Closed

Description

@nevans

e.g. most servers disallow AUTH=PLAIN unless TLS is established. See also #32 for LOGINDISABLED.

We can provide an opt-out via kwarg to authenticate.

Depends on:

Activity

  1. changed the title [-]honor server capabilities (many servers disallow unless TLS is established)[/-] [+]honor LOGINDISABLED and AUTH=mechanism capabilities[/+] on Nov 23, 2021
  2. changed the title [-]honor LOGINDISABLED and AUTH=mechanism capabilities[/-] [+]honor AUTH=mechanism capabilities[/+] on Nov 23, 2021
  3. changed the title [-]honor AUTH=mechanism capabilities[/-] [+]Prevent `SASL` mechanisms that aren't listed in server's AUTH= capabilities[/+] on Nov 23, 2021
  4. added
    SASL 🔒Authentication and authentication mechanisms
    IMAP4rev1Requirement for IMAP4rev1, RFC3501
    on Feb 12, 2023
  5. changed the title [-]Prevent `SASL` mechanisms that aren't listed in server's AUTH= capabilities[/-] [+]Prevent `AUTHENTICATE` without matching `AUTH={mechanism}` capability[/+] on Feb 17, 2023
  6. changed the title [-]Prevent `AUTHENTICATE` without matching `AUTH={mechanism}` capability[/-] [+]Prevent `AUTHENTICATE` without matching `AUTH=#{mechanism}` capability[/+] on Feb 17, 2023
  7. nevans commented on Sep 25, 2023

    @nevans
    CollaboratorAuthor

    While working on SASL-IR, I looked more closely at the RFCs. And the specs do not treat AUTH={mechanism} as identical to LOGINDISABLED:

    • LOGINDISABLED is a negative requirement on the client (MUST NOT login)
    • AUTH={mechanism} is a positive suggestion to the server (SHOULD advertise allowed mechanisms).

    SASL has an important benefit over login: we can ask server if it's okay to proceed prior to sending any sensitive data. As such, I made the decision in #90 to still support calling authenticate with any mechanism without any warnings, however this has the important caveat that the initial response is only sent when the mechanism is advertised.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    IMAP4rev1Requirement for IMAP4rev1, RFC3501SASL 🔒Authentication and authentication mechanisms

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions