aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Addons/Groups/Remote/GroupsServiceRemoteConnector.cs
diff options
context:
space:
mode:
authorDiva Canto2014-05-03 17:13:53 -0700
committerDiva Canto2014-05-03 17:13:53 -0700
commit5a10da3ee89934e366c1d69833b81605dbc35017 (patch)
tree051ee28028598bc8e37e0008bd824cc6689a659b /OpenSim/Addons/Groups/Remote/GroupsServiceRemoteConnector.cs
parentMantis 7144 missing ATTACH_AVATAR_CENTER constant (diff)
downloadopensim-SC_OLD-5a10da3ee89934e366c1d69833b81605dbc35017.zip
opensim-SC_OLD-5a10da3ee89934e366c1d69833b81605dbc35017.tar.gz
opensim-SC_OLD-5a10da3ee89934e366c1d69833b81605dbc35017.tar.bz2
opensim-SC_OLD-5a10da3ee89934e366c1d69833b81605dbc35017.tar.xz
Added a optional key between the group remote connectors, sim and service. This allows for more secure group services, to be used by collections of mutually-trusting grids.
Diffstat (limited to 'OpenSim/Addons/Groups/Remote/GroupsServiceRemoteConnector.cs')
-rw-r--r--OpenSim/Addons/Groups/Remote/GroupsServiceRemoteConnector.cs8
1 files changed, 6 insertions, 2 deletions
diff --git a/OpenSim/Addons/Groups/Remote/GroupsServiceRemoteConnector.cs b/OpenSim/Addons/Groups/Remote/GroupsServiceRemoteConnector.cs
index 67402a2..1425a23 100644
--- a/OpenSim/Addons/Groups/Remote/GroupsServiceRemoteConnector.cs
+++ b/OpenSim/Addons/Groups/Remote/GroupsServiceRemoteConnector.cs
@@ -44,15 +44,17 @@ namespace OpenSim.Groups
44 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 44 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
45 45
46 private string m_ServerURI; 46 private string m_ServerURI;
47 private string m_SecretKey;
47 private object m_Lock = new object(); 48 private object m_Lock = new object();
48 49
49 public GroupsServiceRemoteConnector(string url) 50 public GroupsServiceRemoteConnector(string url, string secret)
50 { 51 {
51 m_ServerURI = url; 52 m_ServerURI = url;
52 if (!m_ServerURI.EndsWith("/")) 53 if (!m_ServerURI.EndsWith("/"))
53 m_ServerURI += "/"; 54 m_ServerURI += "/";
54 55
55 m_log.DebugFormat("[Groups.RemoteConnector]: Groups server at {0}", m_ServerURI); 56 m_SecretKey = secret;
57 m_log.DebugFormat("[Groups.RemoteConnector]: Groups server at {0}, secret key {1}", m_ServerURI, m_SecretKey);
56 } 58 }
57 59
58 public ExtendedGroupRecord CreateGroup(string RequestingAgentID, string name, string charter, bool showInList, UUID insigniaID, int membershipFee, bool openEnrollment, 60 public ExtendedGroupRecord CreateGroup(string RequestingAgentID, string name, string charter, bool showInList, UUID insigniaID, int membershipFee, bool openEnrollment,
@@ -654,6 +656,8 @@ namespace OpenSim.Groups
654 private Dictionary<string, object> MakeRequest(string method, Dictionary<string, object> sendData) 656 private Dictionary<string, object> MakeRequest(string method, Dictionary<string, object> sendData)
655 { 657 {
656 sendData["METHOD"] = method; 658 sendData["METHOD"] = method;
659 if (m_SecretKey != string.Empty)
660 sendData["KEY"] = m_SecretKey;
657 661
658 string reply = string.Empty; 662 string reply = string.Empty;
659 lock (m_Lock) 663 lock (m_Lock)