[ https://issues.apache.org/jira/browse/JAMES-4091?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Benoit Tellier closed JAMES-4091. --------------------------------- Resolution: Fixed > Listing connected users > ----------------------- > > Key: JAMES-4091 > URL: https://issues.apache.org/jira/browse/JAMES-4091 > Project: James Server > Issue Type: New Feature > Components: IMAPServer, JMAP, SMTPServer > Reporter: Benoit Tellier > Assignee: Antoine Duprat > Priority: Major > Labels: security > > h3. Why? > This could be a usefull administrative feature, for instance offered by > Dovecot: > (credits chatgpt) > {code:java} > Dovecot: Provides robust administrative tools, including the doveadm who > command, > which lists all currently connected users. This functionality is exposed via > the Dovecot > Admin socket rather than an HTTP API. > {code} > Given JAMES-4090 we already track opened channels, exposing the users would > thus be doable easily. > Ref https://manpages.ubuntu.com/manpages/focal/man1/doveadm-who.1.html > This is useful for diagnostic purposes. > h2. API proposal > {code:java} > curl -XGET /servers/channels/btell...@apache.org > {code} > Would return all channels belonging to `btell...@apache.org`: > {code:java} > [ > { > "protocol": "IMAP", > "endpoint": "imap-ssl", > "encrypted": true, // SSLHandler part of the pipeline > "connectionDate": "2024-11-20T16:00:00Z", // Tracked via an attribute > to set upon connection > "remoteAddress": "12.23.45.43:4378", > "isActive": true, > "username": "btell...@apache.org", > "protocolSpecificInformation": { > "compressed": "true", // CompressHandler part of the pipeline > "userAgent": "outlook", // Record then read this in the > IMAPSession > "selectedMailbox": "INBOX", // Read the IMAPSession > "isIdling": "true", // Inspect behavious in protocol overrides > "requestCount": "1234" // channel attribute to be incremented > on channelRead > } > }, > { > "protocol": "SMTP", > "endpoint": "smtp-server-global", > "encrypted": true, // SSLHandler part of the pipeline > "connectionDate": "2024-11-20T16:00:00Z", // Tracked via an attribute > to set upon connection > "remoteAddress": "12.23.45.43:4378", > "isActive": true, > "username": "btell...@apache.org", > "protocolSpecificInformation": { } > }, > ... > ] > {code} -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org