aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Data/MySQL/MySQLAuthenticationData.cs3
-rw-r--r--OpenSim/Data/MySQL/Resources/001_AuthStore.sql21
-rw-r--r--OpenSim/Services/AuthenticationService/AuthenticationServiceBase.cs2
-rw-r--r--bin/OpenSim.Server.ini.example15
4 files changed, 40 insertions, 1 deletions
diff --git a/OpenSim/Data/MySQL/MySQLAuthenticationData.cs b/OpenSim/Data/MySQL/MySQLAuthenticationData.cs
index 1ee64ce..afd59bd 100644
--- a/OpenSim/Data/MySQL/MySQLAuthenticationData.cs
+++ b/OpenSim/Data/MySQL/MySQLAuthenticationData.cs
@@ -45,6 +45,9 @@ namespace OpenSim.Data.MySQL
45 : base(connectionString) 45 : base(connectionString)
46 { 46 {
47 m_Realm = realm; 47 m_Realm = realm;
48
49 Migration m = new Migration(m_Connection, GetType().Assembly, "AuthStore");
50 m.Update();
48 } 51 }
49 52
50 public AuthenticationData Get(UUID principalID) 53 public AuthenticationData Get(UUID principalID)
diff --git a/OpenSim/Data/MySQL/Resources/001_AuthStore.sql b/OpenSim/Data/MySQL/Resources/001_AuthStore.sql
new file mode 100644
index 0000000..c7e16fb
--- /dev/null
+++ b/OpenSim/Data/MySQL/Resources/001_AuthStore.sql
@@ -0,0 +1,21 @@
1begin;
2
3CREATE TABLE `auth` (
4 `UUID` char(36) NOT NULL,
5 `passwordHash` char(32) NOT NULL default '',
6 `passwordSalt` char(32) NOT NULL default '',
7 `webLoginKey` varchar(255) NOT NULL default '',
8 PRIMARY KEY (`UUID`)
9) ENGINE=InnoDB;
10
11CREATE TABLE `tokens` (
12 `UUID` char(36) NOT NULL,
13 `token` varchar(255) NOT NULL,
14 `validity` datetime NOT NULL,
15 UNIQUE KEY `uuid_token` (`UUID`,`token`),
16 KEY `UUID` (`UUID`),
17 KEY `token` (`token`),
18 KEY `validity` (`validity`)
19) ENGINE=InnoDB;
20
21commit;
diff --git a/OpenSim/Services/AuthenticationService/AuthenticationServiceBase.cs b/OpenSim/Services/AuthenticationService/AuthenticationServiceBase.cs
index 5056db3..2ed177c 100644
--- a/OpenSim/Services/AuthenticationService/AuthenticationServiceBase.cs
+++ b/OpenSim/Services/AuthenticationService/AuthenticationServiceBase.cs
@@ -53,7 +53,7 @@ namespace OpenSim.Services.AuthenticationService
53 { 53 {
54 string dllName = String.Empty; 54 string dllName = String.Empty;
55 string connString = String.Empty; 55 string connString = String.Empty;
56 string realm = String.Empty; 56 string realm = "auth";
57 57
58 // 58 //
59 // Try reading the [AuthenticationService] section first, if it exists 59 // Try reading the [AuthenticationService] section first, if it exists
diff --git a/bin/OpenSim.Server.ini.example b/bin/OpenSim.Server.ini.example
index aab0566..545d6ce 100644
--- a/bin/OpenSim.Server.ini.example
+++ b/bin/OpenSim.Server.ini.example
@@ -5,6 +5,9 @@
5; * These are the IN connectors the server uses, the in connectors 5; * These are the IN connectors the server uses, the in connectors
6; * read this config file and load the needed OUT and database connectors 6; * read this config file and load the needed OUT and database connectors
7; * 7; *
8; * Add "OpenSim.Server.Handlers.dll:AuthenticationServiceConnector" to
9; * enable the experimental authentication service
10; *
8[Startup] 11[Startup]
9ServiceConnectors = "OpenSim.Server.Handlers.dll:AssetServiceConnector,OpenSim.Server.Handlers.dll:InventoryServiceInConnector,OpenSim.Server.Handlers.dll:FreeswitchServerConnector" 12ServiceConnectors = "OpenSim.Server.Handlers.dll:AssetServiceConnector,OpenSim.Server.Handlers.dll:InventoryServiceInConnector,OpenSim.Server.Handlers.dll:FreeswitchServerConnector"
10 13
@@ -45,3 +48,15 @@ ConnectionString = "Data Source=localhost;Database=grid;User ID=grid;Password=gr
45; * This is the configuration for the freeswitch server in grid mode 48; * This is the configuration for the freeswitch server in grid mode
46[FreeswitchService] 49[FreeswitchService]
47LocalServiceModule = "OpenSim.Services.FreeswitchService.dll:FreeswitchService" 50LocalServiceModule = "OpenSim.Services.FreeswitchService.dll:FreeswitchService"
51
52; * This is the new style authentication service. Currently, only MySQL
53; * is implemented. "Realm" is the table that is used for user lookup.
54; * By setting it to "users", you can use the old style users table
55; * as an authentication source.
56; *
57[AuthenticationService]
58AuthenticationServiceModule = "OpenSim.Services.AuthenticationService.dll:PasswordAuthenticationService"
59StorageProvider = "OpenSim.Data.MySQL.dll"
60ConnectionString = "Data Source=localhost;Database=grid;User ID=grid;Password=grid;"
61; Realm = "auth"
62