aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDiva Canto2015-09-06 10:00:20 -0700
committerDiva Canto2015-09-06 10:00:20 -0700
commit82ea4179da7ea32ea2efbd1cb209c77d5871b3fd (patch)
tree8365dadb8e02955f378e0baadad125a49118f0a7
parentRelated to previous commits: fixed namespace. (diff)
downloadopensim-SC_OLD-82ea4179da7ea32ea2efbd1cb209c77d5871b3fd.zip
opensim-SC_OLD-82ea4179da7ea32ea2efbd1cb209c77d5871b3fd.tar.gz
opensim-SC_OLD-82ea4179da7ea32ea2efbd1cb209c77d5871b3fd.tar.bz2
opensim-SC_OLD-82ea4179da7ea32ea2efbd1cb209c77d5871b3fd.tar.xz
Clean up viewer-based access control specifications.
-rwxr-xr-xOpenSim/Region/Framework/Scenes/Scene.cs10
-rw-r--r--OpenSim/Services/HypergridService/GatekeeperService.cs7
-rw-r--r--OpenSim/Services/LLLoginService/LLLoginService.cs8
-rw-r--r--bin/OpenSim.ini.example7
-rw-r--r--bin/OpenSimDefaults.ini8
-rw-r--r--bin/Robust.HG.ini.example54
-rw-r--r--bin/Robust.ini.example38
7 files changed, 71 insertions, 61 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 8c2f45e..dce2247 100755
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -1051,11 +1051,11 @@ namespace OpenSim.Region.Framework.Scenes
1051 } 1051 }
1052 } 1052 }
1053 1053
1054 string[] possibleAccessControlConfigSections = new string[] { "AccessControl", "Startup" }; 1054 string[] possibleAccessControlConfigSections = new string[] { "Startup", "AccessControl"};
1055 1055
1056 string grant 1056 string grant
1057 = Util.GetConfigVarFromSections<string>( 1057 = Util.GetConfigVarFromSections<string>(
1058 config, "AllowedClients", possibleAccessControlConfigSections, ""); 1058 config, "AllowedClients", possibleAccessControlConfigSections, string.Empty);
1059 1059
1060 if (grant.Length > 0) 1060 if (grant.Length > 0)
1061 { 1061 {
@@ -1067,7 +1067,11 @@ namespace OpenSim.Region.Framework.Scenes
1067 1067
1068 grant 1068 grant
1069 = Util.GetConfigVarFromSections<string>( 1069 = Util.GetConfigVarFromSections<string>(
1070 config, "BannedClients", possibleAccessControlConfigSections, ""); 1070 config, "DeniedClients", possibleAccessControlConfigSections, String.Empty);
1071 // Deal with the mess of someone having used a different word at some point
1072 if (grant == String.Empty)
1073 grant = Util.GetConfigVarFromSections<string>(
1074 config, "BannedClients", possibleAccessControlConfigSections, String.Empty);
1071 1075
1072 if (grant.Length > 0) 1076 if (grant.Length > 0)
1073 { 1077 {
diff --git a/OpenSim/Services/HypergridService/GatekeeperService.cs b/OpenSim/Services/HypergridService/GatekeeperService.cs
index 44b26d5..87c6810 100644
--- a/OpenSim/Services/HypergridService/GatekeeperService.cs
+++ b/OpenSim/Services/HypergridService/GatekeeperService.cs
@@ -131,8 +131,11 @@ namespace OpenSim.Services.HypergridService
131 else if (simulationService != string.Empty) 131 else if (simulationService != string.Empty)
132 m_SimulationService = ServerUtils.LoadPlugin<ISimulationService>(simulationService, args); 132 m_SimulationService = ServerUtils.LoadPlugin<ISimulationService>(simulationService, args);
133 133
134 m_AllowedClients = serverConfig.GetString("AllowedClients", string.Empty); 134 string[] possibleAccessControlConfigSections = new string[] { "AccessControl", "GatekeeperService" };
135 m_DeniedClients = serverConfig.GetString("DeniedClients", string.Empty); 135 m_AllowedClients = Util.GetConfigVarFromSections<string>(
136 config, "AllowedClients", possibleAccessControlConfigSections, string.Empty);
137 m_DeniedClients = Util.GetConfigVarFromSections<string>(
138 config, "DeniedClients", possibleAccessControlConfigSections, string.Empty);
136 m_ForeignAgentsAllowed = serverConfig.GetBoolean("ForeignAgentsAllowed", true); 139 m_ForeignAgentsAllowed = serverConfig.GetBoolean("ForeignAgentsAllowed", true);
137 140
138 LoadDomainExceptionsFromConfig(serverConfig, "AllowExcept", m_ForeignsAllowedExceptions); 141 LoadDomainExceptionsFromConfig(serverConfig, "AllowExcept", m_ForeignsAllowedExceptions);
diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs
index d67bc4d..10c2e8c 100644
--- a/OpenSim/Services/LLLoginService/LLLoginService.cs
+++ b/OpenSim/Services/LLLoginService/LLLoginService.cs
@@ -123,8 +123,12 @@ namespace OpenSim.Services.LLLoginService
123 m_DestinationGuide = m_LoginServerConfig.GetString ("DestinationGuide", string.Empty); 123 m_DestinationGuide = m_LoginServerConfig.GetString ("DestinationGuide", string.Empty);
124 m_AvatarPicker = m_LoginServerConfig.GetString ("AvatarPicker", string.Empty); 124 m_AvatarPicker = m_LoginServerConfig.GetString ("AvatarPicker", string.Empty);
125 125
126 m_AllowedClients = m_LoginServerConfig.GetString("AllowedClients", string.Empty); 126 string[] possibleAccessControlConfigSections = new string[] { "AccessControl", "LoginService" };
127 m_DeniedClients = m_LoginServerConfig.GetString("DeniedClients", string.Empty); 127 m_AllowedClients = Util.GetConfigVarFromSections<string>(
128 config, "AllowedClients", possibleAccessControlConfigSections, string.Empty);
129 m_DeniedClients = Util.GetConfigVarFromSections<string>(
130 config, "DeniedClients", possibleAccessControlConfigSections, string.Empty);
131
128 m_MessageUrl = m_LoginServerConfig.GetString("MessageUrl", string.Empty); 132 m_MessageUrl = m_LoginServerConfig.GetString("MessageUrl", string.Empty);
129 m_DSTZone = m_LoginServerConfig.GetString("DSTZone", "America/Los_Angeles;Pacific Standard Time"); 133 m_DSTZone = m_LoginServerConfig.GetString("DSTZone", "America/Los_Angeles;Pacific Standard Time");
130 134
diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example
index 71e76db..f5268bd 100644
--- a/bin/OpenSim.ini.example
+++ b/bin/OpenSim.ini.example
@@ -308,9 +308,9 @@
308 ;; - "Imprudence" has access 308 ;; - "Imprudence" has access
309 ;; - "Imprudence 1.3" has access 309 ;; - "Imprudence 1.3" has access
310 ;; - "Imprudence 1.3.1" has no access 310 ;; - "Imprudence 1.3.1" has no access
311 ; AllowedClients = 311 ; AllowedClients = ""
312 312
313 ;# {BannedClients} {} {Bar (|) separated list of banned clients} {} 313 ;# {DeniedClients} {} {Bar (|) separated list of denied clients} {}
314 ;; Bar (|) separated list of viewers which may not gain access to the regions. 314 ;; Bar (|) separated list of viewers which may not gain access to the regions.
315 ;; One can use a Substring of the viewer name to disable only certain 315 ;; One can use a Substring of the viewer name to disable only certain
316 ;; versions 316 ;; versions
@@ -318,7 +318,8 @@
318 ;; - "Imprudence" has no access 318 ;; - "Imprudence" has no access
319 ;; - "Imprudence 1.3" has no access 319 ;; - "Imprudence 1.3" has no access
320 ;; - "Imprudence 1.3.1" has access 320 ;; - "Imprudence 1.3.1" has access
321 ; BannedClients = 321 ;;
322 ; DeniedClients = ""
322 323
323 324
324[Map] 325[Map]
diff --git a/bin/OpenSimDefaults.ini b/bin/OpenSimDefaults.ini
index c0c8134..963eeff 100644
--- a/bin/OpenSimDefaults.ini
+++ b/bin/OpenSimDefaults.ini
@@ -531,6 +531,14 @@
531 ; many simultaneous requests, default is 30 and is currently applied only to assets 531 ; many simultaneous requests, default is 30 and is currently applied only to assets
532 ;MaxRequestConcurrency = 30 532 ;MaxRequestConcurrency = 30
533 533
534[AccessControl]
535 ; Viewer-based access control. |-separated list of allowed viewers.
536 ; AllowedClients = ""
537
538 ; Viewer-based access control. |-separated list of denied viewers.
539 ; No restrictions by default.
540 ; DeniedClients = ""
541
534 542
535[ClientStack.LindenUDP] 543[ClientStack.LindenUDP]
536 ; Set this to true to process incoming packets asynchronously. Networking is 544 ; Set this to true to process incoming packets asynchronously. Networking is
diff --git a/bin/Robust.HG.ini.example b/bin/Robust.HG.ini.example
index 36025d5..82eaf1f 100644
--- a/bin/Robust.HG.ini.example
+++ b/bin/Robust.HG.ini.example
@@ -184,6 +184,26 @@
184 ;; This is a default that can be overwritten in some sections. 184 ;; This is a default that can be overwritten in some sections.
185 ; GatekeeperURI = "${Const|BaseURL}:${Const|PublicPort}" 185 ; GatekeeperURI = "${Const|BaseURL}:${Const|PublicPort}"
186 186
187[AccessControl]
188 ;# {AllowedClients} {} {Bar (|) separated list of allowed clients} {}
189 ;; Bar (|) separated list of viewers which may gain access to the regions.
190 ;; One can use a substring of the viewer name to enable only certain
191 ;; versions
192 ;; Example: Agent uses the viewer "Imprudence 1.3.2.0"
193 ;; - "Imprudence" has access
194 ;; - "Imprudence 1.3" has access
195 ;; - "Imprudence 1.3.1" has no access
196 ; AllowedClients = ""
197
198 ;# {DeniedClients} {} {Bar (|) separated list of denied clients} {}
199 ;; Bar (|) separated list of viewers which may not gain access to the regions.
200 ;; One can use a Substring of the viewer name to disable only certain
201 ;; versions
202 ;; Example: Agent uses the viewer "Imprudence 1.3.2.0"
203 ;; - "Imprudence" has no access
204 ;; - "Imprudence 1.3" has no access
205 ;; - "Imprudence 1.3.1" has access
206 ; DeniedClients = ""
187 207
188[DatabaseService] 208[DatabaseService]
189 ; PGSQL 209 ; PGSQL
@@ -482,23 +502,6 @@
482 SRV_IMServerURI = "${Const|BaseURL}:${Const|PublicPort}" 502 SRV_IMServerURI = "${Const|BaseURL}:${Const|PublicPort}"
483 SRV_GroupsServerURI = "${Const|BaseURL}:${Const|PublicPort}" 503 SRV_GroupsServerURI = "${Const|BaseURL}:${Const|PublicPort}"
484 504
485 ;; Regular expressions for controlling which client versions are accepted/denied.
486 ;; An empty string means nothing is checked.
487 ;;
488 ;; Example 1: allow only these 3 types of clients (any version of them)
489 ;; AllowedClients = "Imprudence|Hippo|Second Life"
490 ;;
491 ;; Example 2: allow all clients except these
492 ;; DeniedClients = "Twisted|Crawler|Cryolife|FuckLife|StreetLife|GreenLife|AntiLife|KORE-Phaze|Synlyfe|Purple Second Life|SecondLi |Emerald"
493 ;;
494 ;; Note that these are regular expressions, so every character counts.
495 ;; Also note that this is very weak security and should not be trusted as a reliable means
496 ;; for keeping bad clients out; modified clients can fake their identifiers.
497 ;;
498 ;;
499 ;AllowedClients = ""
500 ;DeniedClients = ""
501
502 ;# {DSTZone} {} {Override Daylight Saving Time rules} {* none local} "America/Los_Angeles;Pacific Standard Time" 505 ;# {DSTZone} {} {Override Daylight Saving Time rules} {* none local} "America/Los_Angeles;Pacific Standard Time"
503 ;; Viewers do not receive timezone information from the server - almost all (?) default to Pacific Standard Time 506 ;; Viewers do not receive timezone information from the server - almost all (?) default to Pacific Standard Time
504 ;; However, they do rely on the server to tell them whether it's Daylight Saving Time or not. 507 ;; However, they do rely on the server to tell them whether it's Daylight Saving Time or not.
@@ -595,23 +598,6 @@
595 ; If you run this gatekeeper server behind a proxy, set this to true 598 ; If you run this gatekeeper server behind a proxy, set this to true
596 ; HasProxy = false 599 ; HasProxy = false
597 600
598 ;; Regular expressions for controlling which client versions are accepted/denied.
599 ;; An empty string means nothing is checked.
600 ;;
601 ;; Example 1: allow only these 3 types of clients (any version of them)
602 ;; AllowedClients = "Imprudence|Hippo|Second Life"
603 ;;
604 ;; Example 2: allow all clients except these
605 ;; DeniedClients = "Twisted|Crawler|Cryolife|FuckLife|StreetLife|GreenLife|AntiLife|KORE-Phaze|Synlyfe|Purple Second Life|SecondLi |Emerald"
606 ;;
607 ;; Note that these are regular expressions, so every character counts.
608 ;; Also note that this is very weak security and should not be trusted as a reliable means
609 ;; for keeping bad clients out; modified clients can fake their identifiers.
610 ;;
611 ;;
612 ;AllowedClients = ""
613 ;DeniedClients = ""
614
615 ;; Are foreign visitors allowed? 601 ;; Are foreign visitors allowed?
616 ;ForeignAgentsAllowed = true 602 ;ForeignAgentsAllowed = true
617 ;; 603 ;;
diff --git a/bin/Robust.ini.example b/bin/Robust.ini.example
index 284e969..8d6496d 100644
--- a/bin/Robust.ini.example
+++ b/bin/Robust.ini.example
@@ -145,6 +145,27 @@
145 ;ConsolePass = secret 145 ;ConsolePass = secret
146 ;ConsolePort = 0 146 ;ConsolePort = 0
147 147
148[AccessControl]
149 ;# {AllowedClients} {} {Bar (|) separated list of allowed clients} {}
150 ;; Bar (|) separated list of viewers which may gain access to the regions.
151 ;; One can use a substring of the viewer name to enable only certain
152 ;; versions
153 ;; Example: Agent uses the viewer "Imprudence 1.3.2.0"
154 ;; - "Imprudence" has access
155 ;; - "Imprudence 1.3" has access
156 ;; - "Imprudence 1.3.1" has no access
157 ; AllowedClients = ""
158
159 ;# {DeniedClients} {} {Bar (|) separated list of denied clients} {}
160 ;; Bar (|) separated list of viewers which may not gain access to the regions.
161 ;; One can use a Substring of the viewer name to disable only certain
162 ;; versions
163 ;; Example: Agent uses the viewer "Imprudence 1.3.2.0"
164 ;; - "Imprudence" has no access
165 ;; - "Imprudence 1.3" has no access
166 ;; - "Imprudence 1.3.1" has access
167 ; DeniedClients = ""
168
148 169
149[DatabaseService] 170[DatabaseService]
150 ; PGSQL 171 ; PGSQL
@@ -431,23 +452,6 @@
431 ; If you run this login server behind a proxy, set this to true 452 ; If you run this login server behind a proxy, set this to true
432 ; HasProxy = false 453 ; HasProxy = false
433 454
434 ;; Regular expressions for controlling which client versions are accepted/denied.
435 ;; An empty string means nothing is checked.
436 ;;
437 ;; Example 1: allow only these 3 types of clients (any version of them)
438 ;; AllowedClients = "Imprudence|Hippo|Second Life"
439 ;;
440 ;; Example 2: allow all clients except these
441 ;; DeniedClients = "Twisted|Crawler|Cryolife|FuckLife|StreetLife|GreenLife|AntiLife|KORE-Phaze|Synlyfe|Purple Second Life|SecondLi |Emerald"
442 ;;
443 ;; Note that these are regular expressions, so every character counts.
444 ;; Also note that this is very weak security and should not be trusted as a reliable means
445 ;; for keeping bad clients out; modified clients can fake their identifiers.
446 ;;
447 ;;
448 ;AllowedClients = ""
449 ;DeniedClients = ""
450
451 ;# {DSTZone} {} {Override Daylight Saving Time rules} {* none local} "America/Los_Angeles;Pacific Standard Time" 455 ;# {DSTZone} {} {Override Daylight Saving Time rules} {* none local} "America/Los_Angeles;Pacific Standard Time"
452 ;; Viewers do not listen to timezone sent by the server. They use Pacific Standard Time instead, 456 ;; Viewers do not listen to timezone sent by the server. They use Pacific Standard Time instead,
453 ;; but rely on the server to calculate Daylight Saving Time. Sending another DST than US Pacific 457 ;; but rely on the server to calculate Daylight Saving Time. Sending another DST than US Pacific