Skip to content

Conversation

@ottoka
Copy link
Contributor

@ottoka ottoka commented Oct 26, 2022

James supports SMTPS and StartTLS, but currently has no way to programmatically access the resulting SSLSession from SMTP Hooks, POP3 Command Handlers etc. I propose to make the SSLSession accessible through the ProtocolSession.

This way, hooks/handlers can examine the SSL/TLS parameters negotiated with the currently connected client. They can check e.g. TLS version and selected cipher suite to evaluate the security level of the connection. With certificate based client authentication enabled, they can get the provided client certificate, e.g. to check against a permission list. Or a JamesMessageHook could attach it to the Mail object, so this information becomes even available to Mailets after spooling.

Copy link
Contributor

@chibenwa chibenwa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar changes in ImapSession could be nice.

@ottoka
Copy link
Contributor Author

ottoka commented Oct 26, 2022

Latest push includes ImapSession.

@ottoka ottoka merged commit d0813c6 into apache:master Oct 31, 2022
@ottoka ottoka deleted the JAMES-3842 branch October 31, 2022 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants