View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0001639 | SOGo | Web General | public | 2012-02-17 11:44 | 2013-08-09 15:58 |
| Reporter | dab1818 | Assigned To | |||
| Priority | normal | Severity | major | Reproducibility | always |
| Status | closed | Resolution | won't fix | ||
| Summary | 0001639: in SOGo-Apache proxy configuration private data may be accessed trough http://127.0.0.1:20000/SOGo... | ||||
| Description | using curl, wget & etc... from localhost with manually specified headers x-webobjects-remote-user private user data may be accessed: curl -v -H "x-webobjects-remote-user: bigboss" http://localhost:20000/SOGo/dav/bigboss/Calendar/personal.ics | ||||
| Additional Information | with attached patch SOGo uses SOGoAuthenticationType value as secret and compare it with x-webobjects-auth-secret HTTP-header passed by apache. SOGo configuration (must be accessed by 'sogo' user only): Apache configuration (SOGo-Apache.include must be accessed by 'root' user only): | ||||
| Tags | No tags attached. | ||||
|
2012-02-17 11:44
|
proxy_auth_secret.patch (1,287 bytes)
--- SOGo-1.3.9/SoObjects/SOGo/SOGoProxyAuthenticator.m.orig 2011-10-29 22:31:30.000000000 +0400
+++ SOGo-1.3.9/SoObjects/SOGo/SOGoProxyAuthenticator.m 2011-11-18 15:37:17.000000000 +0400
@@ -32,6 +32,7 @@
#import <NGExtensions/NSObject+Logs.h>
#import "SOGoPermissions.h"
+#import "SOGoSystemDefaults.h"
#import "SOGoUser.h"
#import "SOGoProxyAuthenticator.h"
@@ -59,10 +60,21 @@
- (NSString *) checkCredentialsInContext: (WOContext *) context
{
NSString *remoteUser;
+ NSString *authSecret;
+ SOGoSystemDefaults *sd;
- /* If such a header is not provided by the proxy, SOPE will attempt to
- deduce it from the "Authorization" header. */
- remoteUser = [[context request] headerForKey: @"x-webobjects-remote-user"];
+ sd = [SOGoSystemDefaults sharedSystemDefaults];
+ authSecret = [[context request] headerForKey: @"x-webobjects-auth-secret"];
+ remoteUser = nil;
+
+ if ([[sd authenticationType] isEqualToString: authSecret])
+ {
+ /* If such a header is not provided by the proxy, SOPE will attempt to
+ deduce it from the "Authorization" header. */
+ remoteUser = [[context request] headerForKey: @"x-webobjects-remote-user"];
+ }
+ else
+ [self errorWithFormat: @"invalid x-webobjects-auth-secret value"];
return remoteUser;
}
|
|
What values for SOGoAuthenticationType, SOGoDAVAuthenticationType and SOGoTrustProxyAuthentication were you using BEFORE making that change? If you set SOGoTrustProxyAuthentication to YES, you'll have the issue you mention. Otherwise, it'll just work - see my example: sogo:~/src/SOGo# curl -v -H "x-webobjects-remote-user: lmarcotte" http://localhost:30000/SOGo/dav/lmarcotte/Calendar/personal.ics
|
|
|
That is a loose solution. If your apache or SOGo conf is readable by other users, they will have access to your "auth" secret. If you want to use SOGo with "SOGoTrustProxyAuthentication", you need to take the additional steps to secure your installation. The value says it clearly: you "Trust" any authentication. This is a feature, not a bug. |
|
|
yes. i'm using SOGoTrustProxyAuthentication=YES with x509 certificates on apache SOGo configuration must be accessed by 'sogo' user only (mysql passwords&etc.). on apache side config protected by: |
|
|
I see very little value in this. It complexifies the whole configuration and as mentioned, if SOGo trusts authentication, well it trusts it. |
|
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2012-02-17 11:44 | dab1818 | New Issue | |
| 2012-02-17 11:44 | dab1818 | File Added: proxy_auth_secret.patch | |
| 2012-02-17 16:22 | ludovic | Note Added: 0003456 | |
| 2012-02-17 16:23 |
|
Note Added: 0003457 | |
| 2012-02-20 06:02 | dab1818 | Note Added: 0003463 | |
| 2013-08-09 15:58 | ludovic | Note Added: 0005861 | |
| 2013-08-09 15:58 | ludovic | Status | new => closed |
| 2013-08-09 15:58 | ludovic | Resolution | open => won't fix |