View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0005130 | SOGo | Web General | public | 2020-08-21 16:00 | 2025-01-22 21:15 |
| Reporter | qseb | Assigned To | |||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | new | Resolution | open | ||
| Platform | debian buster | ||||
| Product Version | 5.0.0 | ||||
| Summary | 0005130: linking CAS login with SMTP auth? | ||||
| Description | My sogo installation is based on CAS authentication, and is workong fine for IMAP transactions. Now I need to send mails with CAS ticket...
We can see first, an IMAP request, then 2 smtp auth request failing (pam_cas + ldap), because smtp password is wrong...
Note 2 : I manually succeed too to authenticate on dovecot (via postfix) with LDAP cred:
So I presume that SMTP auth sends the wrong password when SOGo login is based on a CAS ticket? For the moment I have to disable PLAIN auth and let postfix to trust sogo... Did I miss something? | ||||
| Tags | authentication, PLAIN, SASL, SMTP | ||||
|
As additional information, I disabled CAS login on sogo and enabled again smtp auth PLAIN. I log in sogo with my LDAP credentials. |
|
|
typo: |
|
|
Still investigating why wrong password (given password: 5F-5F3F9F80-F-6C2F9800) is sent to postfix when CAS authentication is enabled... memccat --servers=localhost cas-id:5F-5F3F9F80-F-6C2F9800 => memccat --servers=localhost cas-ticket:ST-de62fe9c14c97b7eb57aad1b5fc6a03d5c4e23c4c0ea29d2a29ea3af55ddf14a => This last dump shows that "identifier" key is sent to postfix, instead of proxyTickets for "imaps:\/\/dovecot" service. Sogo should send "PT-243d95c8f625f0dcafcf16d6aafc3d23506b9e2b235c0bdd2431cc380cb37e01" as password! |
|
|
I patched SoObjects/SOGo/SOGoMailer.m with some hardcoded lines, since I'm not a developer :( on top of file, add:
I replaced line 225:
with:
and appended:
Now the code after:
At this step password is an identifier (ie: 68577-5F48FC00-1-1FBC5B60)
I can now login with CAS on sogo and postfix!!! Other routing case should be added to detect if auth should be CAS/SAML/whatever... |
|
|
any news for developing this feature? |
|
|
small bump 2 years later... |
|
|
We were hit by the same problem installing sogo here, I took your patch in the meantime, but a better solution may happen soon ;) |
|
|
This is what we use now (thank you !)… CAS-Submission.m.diff (2,038 bytes)
--- SoObjects/SOGo/SOGoMailer.m.orig 2024-10-15 14:26:45 UTC
+++ SoObjects/SOGo/SOGoMailer.m
@@ -35,6 +35,7 @@
#import "SOGoUser.h"
#import "SOGoUserManager.h"
#import "SOGoMailer.h"
+#import "SOGoCASSession.h"
//
// Useful extension that comes from Pantomime which is also
@@ -265,7 +266,7 @@ - (NSException *) _smtpSendData: (NSData *) mailData
inContext: (WOContext *) woContext
systemMessage: (BOOL) isSystemMessage
{
- NSString *currentTo, *login, *password;
+ NSString *currentTo, *login, *password, *service, *scheme, *serverhost, *authType;
NSDictionary *currentAcount;
NSMutableArray *toErrors;
NSEnumerator *addresses;
@@ -273,6 +274,8 @@ - (NSException *) _smtpSendData: (NSData *) mailData
NSException *result;
NSURL * smtpUrl;
SOGoUser* user;
+ SOGoSystemDefaults *sd;
+ SOGoCASSession *session;
BOOL doSmtpAuth;
result = nil;
@@ -315,7 +318,22 @@ - (NSException *) _smtpSendData: (NSData *) mailData
getExternalLoginForUID: [[authenticator userInContext: woContext] loginInDomain]
inDomain: [[authenticator userInContext: woContext] domain]];
+ sd = [SOGoSystemDefaults sharedSystemDefaults];
+ authType = [sd authenticationType];
password = [authenticator passwordInContext: woContext];
+ if ([authType isEqualToString: @"cas"])
+ {
+ // hardcoded scheme
+ // scheme = @"imap";
+ // serverhost = @"sogo";
+ // service = [NSString stringWithFormat: @"%@://%@", scheme, serverhost];
+ session = [SOGoCASSession CASSessionWithIdentifier: password
+ fromProxy: NO];
+ service = @"imap://sogo";
+ password = [session ticketForService: service];
+ if ([password length])
+ [session updateCache];
+ }
}
|
|
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2020-08-21 16:00 | qseb | New Issue | |
| 2020-08-23 14:43 | qseb | Tag Attached: SASL | |
| 2020-08-23 14:43 | qseb | Tag Attached: authentication | |
| 2020-08-23 14:43 | qseb | Tag Attached: SMTP | |
| 2020-08-23 14:43 | qseb | Tag Attached: PLAIN | |
| 2020-08-23 16:08 | qseb | Note Added: 0014715 | |
| 2020-08-23 16:09 | qseb | Note Added: 0014716 | |
| 2020-08-26 21:17 | qseb | Note Added: 0014730 | |
| 2020-08-28 13:04 | qseb | Note Added: 0014732 | |
| 2020-09-08 15:34 | francis | Note Edited: 0014732 | |
| 2021-03-31 17:14 | qseb | Note Added: 0015174 | |
| 2022-01-12 19:37 | francis | Description Updated | |
| 2023-02-18 19:07 | qseb | Note Added: 0016662 | |
| 2025-01-22 21:13 | dgeo | Note Added: 0018034 | |
| 2025-01-22 21:15 | dgeo | Note Added: 0018035 | |
| 2025-01-22 21:15 | dgeo | File Added: CAS-Submission.m.diff |