Index: trunk/sources/HeuristicLab.Services.OKB/3.3/CertificateServiceHost.cs
===================================================================
--- trunk/sources/HeuristicLab.Services.OKB/3.3/CertificateServiceHost.cs	(revision 4283)
+++ 	(revision )
@@ -1,74 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System;
-using System.IO;
-using System.Reflection;
-using System.Security.Cryptography.X509Certificates;
-using System.ServiceModel;
-
-namespace HeuristicLab.Services.OKB {
-
-  /// <summary>
-  /// An alternate implementation of service host that checks client certificates.
-  /// </summary>
-  public class CertificateServiceHost : ServiceHost {
-
-    /// <summary>
-    /// Initializes a new instance of the <see cref="CertificateServiceHost"/> class.
-    /// </summary>
-    /// <param name="serviceType">Type of the service.</param>
-    public CertificateServiceHost(Type serviceType)
-      : base(serviceType) {
-    }
-
-    /// <summary>
-    /// Initializes a new instance of the <see cref="CertificateServiceHost"/> class.
-    /// </summary>
-    /// <param name="serviceType">Type of the service.</param>
-    /// <param name="baseAddresses">The base addresses.</param>
-    public CertificateServiceHost(Type serviceType, Uri[] baseAddresses)
-      : base(serviceType, baseAddresses) {
-    }
-
-    /// <summary>
-    /// Loads the service description information from the configuration file and applies it to the runtime being constructed.
-    /// </summary>
-    /// <exception cref="T:System.InvalidOperationException">The description of the service hosted is null.</exception>
-    protected override void ApplyConfiguration() {
-      base.ApplyConfiguration();
-      Credentials.ServiceCertificate.Certificate = GetCertificateResource("HeuristicLab.OKB.Server.server.pfx");
-      Credentials.ClientCertificate.Authentication.CertificateValidationMode =
-          System.ServiceModel.Security.X509CertificateValidationMode.Custom;
-      Credentials.ClientCertificate.Authentication.CustomCertificateValidator =
-        new CustomCertificateValidator(new[] { GetCertificateResource("HeuristicLab.OKB.Server.client.cer") });
-    }
-
-    private static X509Certificate2 GetCertificateResource(string name) {
-      using (Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(name)) {
-        byte[] bytes;
-        bytes = new byte[(int)stream.Length];
-        stream.Read(bytes, 0, bytes.Length);
-        return new X509Certificate2(bytes);
-      }
-    }
-  }
-}
Index: trunk/sources/HeuristicLab.Services.OKB/3.3/CertificateServiceHostFactory.cs
===================================================================
--- trunk/sources/HeuristicLab.Services.OKB/3.3/CertificateServiceHostFactory.cs	(revision 4283)
+++ 	(revision )
@@ -1,45 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System;
-using System.ServiceModel;
-using System.ServiceModel.Activation;
-
-namespace HeuristicLab.Services.OKB {
-
-  /// <summary>
-  /// A simple factory that knows how to parameterize and create a <see cref="CertificateServiceHost"/>.
-  /// </summary>
-  public class CertificateServiceHostFactory : ServiceHostFactory {
-    /// <summary>
-    /// Creates a <see cref="T:System.ServiceModel.ServiceHost"/> for a specified type of service with a specific base address.
-    /// </summary>
-    /// <param name="serviceType">Specifies the type of service to host.</param>
-    /// <param name="baseAddresses">The <see cref="T:System.Array"/> of type <see cref="T:System.Uri"/> that contains the base addresses for the service hosted.</param>
-    /// <returns>
-    /// A <see cref="T:System.ServiceModel.ServiceHost"/> for the type of service specified with a specific base address.
-    /// </returns>
-    protected override ServiceHost CreateServiceHost(Type serviceType, Uri[] baseAddresses) {
-      return new CertificateServiceHost(serviceType, baseAddresses);
-    }
-  }
-
-}
Index: trunk/sources/HeuristicLab.Services.OKB/3.3/CustomCertificateValidator.cs
===================================================================
--- trunk/sources/HeuristicLab.Services.OKB/3.3/CustomCertificateValidator.cs	(revision 4283)
+++ 	(revision )
@@ -1,53 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System.Collections.Generic;
-using System.IdentityModel.Selectors;
-using System.IdentityModel.Tokens;
-using System.Security.Cryptography.X509Certificates;
-
-namespace HeuristicLab.Services.OKB {
-
-  /// <summary>
-  /// A certificate validator that uses a list of certificates to validate.
-  /// </summary>
-  public class CustomCertificateValidator : X509CertificateValidator {
-
-    private IList<X509Certificate2> validCertificates;
-
-    /// <summary>
-    /// Initializes a new instance of the <see cref="CustomCertificateValidator"/> class.
-    /// </summary>
-    /// <param name="validCertificates">The valid certificates.</param>
-    public CustomCertificateValidator(IEnumerable<X509Certificate2> validCertificates) {
-      this.validCertificates = new List<X509Certificate2>(validCertificates);
-    }
-
-    /// <summary>
-    /// Validates the X.509 certificate using an internal list of valid certifiates.
-    /// </summary>
-    /// <param name="certificate">The <see cref="T:System.Security.Cryptography.X509Certificates.X509Certificate2"/> that represents the X.509 certificate to validate.</param>
-    public override void Validate(X509Certificate2 certificate) {
-      if (!validCertificates.Contains(certificate))
-        throw new SecurityTokenValidationException("certificate has not been registered");
-    }
-  }
-}
Index: trunk/sources/HeuristicLab.Services.OKB/3.3/DataService.cs
===================================================================
--- trunk/sources/HeuristicLab.Services.OKB/3.3/DataService.cs	(revision 4283)
+++ trunk/sources/HeuristicLab.Services.OKB/3.3/DataService.cs	(revision 4298)
@@ -72,32 +72,32 @@
     private byte[] GetData(EntityType type, int id) {
       Log("loading data", type, id);
-      OKBDataContext okb = new OKBDataContext();
-      switch (type) {
-        case EntityType.Algorithm:
-          Algorithm algorithm = okb.Algorithms.Single(a => a.Id == id);
-          if (algorithm.AlgorithmData == null) {
-            algorithm.AlgorithmData = new AlgorithmData() {
-              AlgorithmId = algorithm.Id,
-              Data = new Binary(new byte[0])
-            };
-            okb.SubmitChanges();
-          }
-          return algorithm.AlgorithmData.Data.ToArray();
-          break;
-        case EntityType.Problem:
-          Problem problem = okb.Problems.Single(p => p.Id == id);
-          if (problem.ProblemData == null) {
-            problem.ProblemData = new ProblemData() {
-              ProblemId = problem.Id,
-              Data = new Binary(new byte[0])
-            };
-            okb.SubmitChanges();
-          }
-          return problem.ProblemData.Data.ToArray();
-          break;
-        default:
-          throw new FaultException("Unsupported EntityType");
+      using (OKBDataContext okb = new OKBDataContext()) {
+        switch (type) {
+          case EntityType.Algorithm:
+            Algorithm algorithm = okb.Algorithms.Single(a => a.Id == id);
+            if (algorithm.AlgorithmData == null) {
+              algorithm.AlgorithmData = new AlgorithmData() {
+                AlgorithmId = algorithm.Id,
+                Data = new Binary(new byte[0])
+              };
+              okb.SubmitChanges();
+            }
+            return algorithm.AlgorithmData.Data.ToArray();
+            break;
+          case EntityType.Problem:
+            Problem problem = okb.Problems.Single(p => p.Id == id);
+            if (problem.ProblemData == null) {
+              problem.ProblemData = new ProblemData() {
+                ProblemId = problem.Id,
+                Data = new Binary(new byte[0])
+              };
+              okb.SubmitChanges();
+            }
+            return problem.ProblemData.Data.ToArray();
+            break;
+          default:
+            throw new FaultException("Unsupported EntityType");
+        }
       }
-      okb.Dispose();
     }
 
Index: trunk/sources/HeuristicLab.Services.OKB/3.3/ExperimentKit.cs
===================================================================
--- trunk/sources/HeuristicLab.Services.OKB/3.3/ExperimentKit.cs	(revision 4298)
+++ trunk/sources/HeuristicLab.Services.OKB/3.3/ExperimentKit.cs	(revision 4298)
@@ -0,0 +1,49 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Runtime.Serialization;
+using HeuristicLab.Services.OKB.DataAccess;
+
+namespace HeuristicLab.Services.OKB {
+  /// <summary>
+  /// Contains an <see cref="Algorithm"/> and a <see cref="Problem"/> populated with all
+  /// required data to execute experiments.
+  /// </summary>
+  [DataContract]
+  public class ExperimentKit {
+    /// <summary>
+    /// Gets an <see cref="Algorithm"/> populated with all required data to execute
+    /// experiments.
+    /// </summary>
+    /// <value>An <see cref="Algorithm"/>.</value>
+    [DataMember]
+    public Algorithm Algorithm { get; set; }
+
+    /// <summary>
+    /// Gets a <see cref="Problem"/> populated with all required data to execute
+    /// experiments.
+    /// </summary>
+    /// <value>A <see cref="Problem"/>.</value>
+    [DataMember]
+    public Problem Problem { get; set; }
+  }
+
+}
Index: trunk/sources/HeuristicLab.Services.OKB/3.3/HeuristicLab.Services.OKB-3.3.csproj
===================================================================
--- trunk/sources/HeuristicLab.Services.OKB/3.3/HeuristicLab.Services.OKB-3.3.csproj	(revision 4283)
+++ trunk/sources/HeuristicLab.Services.OKB/3.3/HeuristicLab.Services.OKB-3.3.csproj	(revision 4298)
@@ -120,5 +120,4 @@
       <RequiredTargetFramework>3.0</RequiredTargetFramework>
     </Reference>
-    <Reference Include="System.ServiceModel.Activation" />
     <Reference Include="System.ServiceProcess" />
     <Reference Include="System.Xml.Linq">
@@ -134,8 +133,6 @@
     <Compile Include="AdminService.cs" />
     <Compile Include="AttributeSelector.cs" />
-    <Compile Include="CertificateServiceHostFactory.cs" />
-    <Compile Include="CustomCertificateValidator.cs" />
-    <Compile Include="CertificateServiceHost.cs" />
     <Compile Include="DataService.cs" />
+    <Compile Include="ExperimentKit.cs" />
     <Compile Include="Interfaces\IDataService.cs" />
     <Compile Include="Interfaces\ITableService.cs" />
@@ -157,6 +154,4 @@
   <ItemGroup>
     <None Include="app.config" />
-    <EmbeddedResource Include="client.cer" />
-    <EmbeddedResource Include="server.pfx" />
     <None Include="HeuristicLab.snk" />
   </ItemGroup>
Index: trunk/sources/HeuristicLab.Services.OKB/3.3/Hoster.cs
===================================================================
--- trunk/sources/HeuristicLab.Services.OKB/3.3/Hoster.cs	(revision 4283)
+++ trunk/sources/HeuristicLab.Services.OKB/3.3/Hoster.cs	(revision 4298)
@@ -53,5 +53,5 @@
     }
 
-    static ILog logger = log4net.LogManager.GetLogger("HeuristicLab.OKB.Hoster");
+    static ILog logger = log4net.LogManager.GetLogger("HeuristicLab.Services.OKB.Hoster");
 
     static void UnhandledException(object sender, UnhandledExceptionEventArgs e) {
@@ -64,5 +64,5 @@
 
     private static void StartService(Type type) {
-      ServiceHost host = new CertificateServiceHost(type);
+      ServiceHost host = new ServiceHost(type);
       try {
         host.Open();
Index: trunk/sources/HeuristicLab.Services.OKB/3.3/RunnerService.cs
===================================================================
--- trunk/sources/HeuristicLab.Services.OKB/3.3/RunnerService.cs	(revision 4283)
+++ trunk/sources/HeuristicLab.Services.OKB/3.3/RunnerService.cs	(revision 4298)
@@ -142,14 +142,12 @@
     public void AddRun(Algorithm algorithm, Problem problem, Project project) {
       Log("adding run for {0}@{1}({2})[{3}, {4}]",
-        algorithm.Name, problem.Name, project.Name, authentication.User.Name, authentication.Client.Name);
+        algorithm.Name, problem.Name, project.Name, currentUser.Name, currentClient.Name);
       try {
         using (OKBDataContext okb = new OKBDataContext()) {
-          var user = okb.Users.Single(u => u.Id == authentication.User.Id);
-          var client = okb.Clients.Single(c => c.Id == authentication.Client.Id);
-          Experiment experiment = GetOrCreateExperiment(algorithm, problem, project, authentication.User, okb);
+          Experiment experiment = GetOrCreateExperiment(algorithm, problem, project, currentUser, okb);
           Run run = new Run() {
             Experiment = experiment,
-            UserId = authentication.User.Id,
-            ClientId = authentication.Client.Id,
+            UserId = currentUser.Id,
+            ClientId = currentClient.Id,
             FinishedDate = DateTime.Now,
             ResultValues = algorithm.ResultValues
@@ -175,7 +173,4 @@
         Log("reusing existing experiment");
         Experiment experiment = experimentQuery.First();
-        if (experiment.ExperimentCreators.Where(ec => ec.UserId == user.Id).Count() == 0) {
-          experiment.ExperimentCreators.Add(new ExperimentCreator() { UserId = user.Id });
-        }
         return experiment;
       } else {
@@ -187,5 +182,4 @@
           ParameterValues = algorithm.ParameterValues
         };
-        experiment.ExperimentCreators.Add(new ExperimentCreator() { UserId = user.Id });
         okb.Experiments.InsertOnSubmit(experiment);
         return experiment;
@@ -292,11 +286,12 @@
     /// </summary>
     /// <returns>
-    /// 	<c>true</c> if this instance is connected; otherwise, <c>false</c>.
+    ///   <c>true</c> if this instance is connected; otherwise, <c>false</c>.
     /// </returns>
     public bool IsConnected() {
-      return authentication != null;
-    }
-
-    Authentication authentication = null;
+      return currentUser != null;
+    }
+
+    User currentUser = null;
+    Client currentClient = null;
 
     /// <summary>
@@ -309,5 +304,5 @@
     /// <param name="clientname">The clientname.</param>
     /// <returns>
-    /// 	<c>true</c> if the login was successful; <c>false</c> otherwise.
+    ///   <c>true</c> if the login was successful; <c>false</c> otherwise.
     /// </returns>
     public bool Login(string username, string clientname) {
@@ -320,21 +315,17 @@
       }
       using (OKBDataContext okb = new OKBDataContext()) {
-        authentication = new Authentication() {
-          User = okb.Users.SingleOrDefault(u => u.Name == username),
-          Client = okb.Clients.SingleOrDefault(c => c.Name == clientname)
-        };
-        if (authentication.User == null) {
-          User user = new User() { Name = username, Id = Guid.NewGuid() };
-          okb.Users.InsertOnSubmit(user);
-          authentication.User = user;
+        currentUser = okb.Users.SingleOrDefault(u => u.Name == username);
+        currentClient = okb.Clients.SingleOrDefault(c => c.Name == clientname);
+        if (currentUser == null) {
+          currentUser = new User() { Name = username, Id = Guid.NewGuid() };
+          okb.Users.InsertOnSubmit(currentUser);
           okb.SubmitChanges();
         }
-        if (authentication.Client == null) {
-          Client client = new Client() { Name = clientname, Id = Guid.NewGuid() };
-          okb.Clients.InsertOnSubmit(client);
-          authentication.Client = client;
+        if (currentClient == null) {
+          currentClient = new Client() { Name = clientname, Id = Guid.NewGuid() };
+          okb.Clients.InsertOnSubmit(currentClient);
           okb.SubmitChanges();
         }
-        Log("  auth = {0}", authentication);
+        Log("  user = {0}, client = {1}", currentUser, currentClient);
         return true;
       }
@@ -346,5 +337,6 @@
     public void Logout() {
       Log("Logging out");
-      authentication = null;
+      currentUser = null;
+      currentClient = null;
     }
 
Index: trunk/sources/HeuristicLab.Services.OKB/3.3/TableService.cs
===================================================================
--- trunk/sources/HeuristicLab.Services.OKB/3.3/TableService.cs	(revision 4283)
+++ trunk/sources/HeuristicLab.Services.OKB/3.3/TableService.cs	(revision 4298)
@@ -66,5 +66,5 @@
     public void UpdateDataTable(DataTable updatedRows, string tableName) {
       logger.Info("updating table: " + tableName);
-      Type tableType = Assembly.GetAssembly(typeof(Run)).GetType("HeuristicLab.OKB." + tableName, true);
+      Type tableType = Assembly.GetAssembly(typeof(Run)).GetType("HeuristicLab.Services.OKB.DataAccess." + tableName, true);
       var properties = from p in tableType.GetProperties()
                        where SupportedTypes.Contains(p.PropertyType)
@@ -126,5 +126,5 @@
     public void DeleteTableRows(int[] ids, string tableName) {
       logger.Info("delete rows from table: " + tableName);
-      Type tableType = Assembly.GetAssembly(typeof(Run)).GetType("HeuristicLab.OKB." + tableName, true);
+      Type tableType = Assembly.GetAssembly(typeof(Run)).GetType("HeuristicLab.Services.OKB.DataAccess" + tableName, true);
       OKBDataContext okb = GetDataContext();
       ITable table = okb.GetTable(tableType);
@@ -148,5 +148,5 @@
     public DataTable PrepareDataTable(string tableName, out int count) {
       logger.Info("preparing data table: " + tableName);
-      Type tableType = Assembly.GetAssembly(typeof(Run)).GetType("HeuristicLab.OKB." + tableName, true);
+      Type tableType = Assembly.GetAssembly(typeof(Run)).GetType("HeuristicLab.Services.OKB.DataAccess" + tableName, true);
       properties = from p in tableType.GetProperties()
                    where SupportedTypes.Contains(p.PropertyType)
Index: trunk/sources/HeuristicLab.Services.OKB/3.3/app.config
===================================================================
--- trunk/sources/HeuristicLab.Services.OKB/3.3/app.config	(revision 4283)
+++ trunk/sources/HeuristicLab.Services.OKB/3.3/app.config	(revision 4298)
@@ -1,10 +1,40 @@
 <?xml version="1.0"?>
 <configuration>
+  <connectionStrings>
+    <add name="HeuristicLab.Authentication"
+         connectionString="data source=localhost;Integrated Security=SSPI;Initial Catalog=HeuristicLab.Authentication"/>
+    <add name="HeuristicLab.Services.OKB.DataAccess.Properties.Settings.OKBConnectionString"
+         connectionString="Data Source=localhost;Initial Catalog=HeuristicLab.OKB;Integrated Security=SSPI"
+         providerName="System.Data.SqlClient" />
+  </connectionStrings>
+
+  <system.web>
+    <authentication mode="Forms" />
+    <compilation debug="true" targetFramework="4.0" />
+
+    <membership>
+      <providers>
+        <clear/>
+        <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="HeuristicLab.Authentication"
+             enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false"
+             maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10"
+             applicationName="HeuristicLab.Authentication" />
+      </providers>
+    </membership>
+
+    <roleManager enabled="true">
+      <providers>
+        <clear/>
+        <add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="HeuristicLab.Authentication" applicationName="HeuristicLab.Authentication" />
+      </providers>
+    </roleManager>
+  </system.web>
+
   <system.serviceModel>
     <bindings>
       <netTcpBinding>
         <binding name="LargeMessages" openTimeout="00:00:30" receiveTimeout="00:00:30" sendTimeout="00:00:30" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647">
-          <security mode="Transport">
-            <transport clientCredentialType="Certificate" protectionLevel="EncryptAndSign"/>            
+          <security mode="Message">
+            <message clientCredentialType="UserName"/>
           </security>
           <readerQuotas maxArrayLength="2147483647"/>
@@ -13,5 +43,7 @@
       </netTcpBinding>
     </bindings>
+
     <client/>
+
     <behaviors>
       <serviceBehaviors>
@@ -19,47 +51,80 @@
           <serviceMetadata httpGetEnabled="true" httpGetUrl="http://localhost:8000/OKB/RunnerMex"/>
           <serviceDebug includeExceptionDetailInFaults="true"/>
+          <serviceAuthorization principalPermissionMode="UseAspNetRoles"
+                                roleProviderName="AspNetSqlRoleProvider" />
+          <serviceCredentials>
+            <serviceCertificate findValue="localhost" x509FindType="FindBySubjectName" />
+            <userNameAuthentication userNamePasswordValidationMode="MembershipProvider"
+                                    membershipProviderName="AspNetSqlMembershipProvider"/>
+          </serviceCredentials>
         </behavior>
         <behavior name="AdminServiceBehaviour">
           <serviceMetadata httpGetEnabled="true" httpGetUrl="http://localhost:8000/OKB/AdminMex"/>
           <serviceDebug includeExceptionDetailInFaults="true"/>
+          <serviceAuthorization principalPermissionMode="UseAspNetRoles"
+                                roleProviderName="AspNetSqlRoleProvider" />
+          <serviceCredentials>
+            <serviceCertificate findValue="localhost" x509FindType="FindBySubjectName" />
+            <userNameAuthentication userNamePasswordValidationMode="MembershipProvider"
+                                    membershipProviderName="AspNetSqlMembershipProvider"/>
+          </serviceCredentials>
         </behavior>
         <behavior name="TableServiceBehaviour">
           <serviceMetadata httpGetEnabled="true" httpGetUrl="http://localhost:8000/OKB/TableMex"/>
           <serviceDebug includeExceptionDetailInFaults="true"/>
+          <serviceAuthorization principalPermissionMode="UseAspNetRoles"
+                                roleProviderName="AspNetSqlRoleProvider" />
+          <serviceCredentials>
+            <serviceCertificate findValue="localhost" x509FindType="FindBySubjectName" />
+            <userNameAuthentication userNamePasswordValidationMode="MembershipProvider"
+                                    membershipProviderName="AspNetSqlMembershipProvider"/>
+          </serviceCredentials>
         </behavior>
         <behavior name="QueryServiceBehaviour">
           <serviceMetadata httpGetEnabled="true" httpGetUrl="http://localhost:8000/OKB/QueryMex"/>
           <serviceDebug includeExceptionDetailInFaults="true"/>
+          <serviceAuthorization principalPermissionMode="UseAspNetRoles"
+                                roleProviderName="AspNetSqlRoleProvider" />
+          <serviceCredentials>
+            <serviceCertificate findValue="localhost" x509FindType="FindBySubjectName" />
+            <userNameAuthentication userNamePasswordValidationMode="MembershipProvider"
+                                    membershipProviderName="AspNetSqlMembershipProvider"/>
+          </serviceCredentials>
         </behavior>
         <behavior name="DataServiceBehaviour">
           <serviceMetadata httpGetEnabled="true" httpGetUrl="http://localhost:8000/OKB/DataMex"/>
           <serviceDebug includeExceptionDetailInFaults="true"/>
+          <serviceAuthorization principalPermissionMode="UseAspNetRoles"
+                                roleProviderName="AspNetSqlRoleProvider" />
+          <serviceCredentials>
+            <serviceCertificate findValue="localhost" x509FindType="FindBySubjectName" />
+            <userNameAuthentication userNamePasswordValidationMode="MembershipProvider"
+                                    membershipProviderName="AspNetSqlMembershipProvider"/>
+          </serviceCredentials>
         </behavior>
       </serviceBehaviors>
     </behaviors>
+
     <services>
-      <service behaviorConfiguration="RunnerServiceBehaviour" name="HeuristicLab.OKB.RunnerService">
+      <service behaviorConfiguration="RunnerServiceBehaviour" name="HeuristicLab.Services.OKB.RunnerService">
         <endpoint address="http://localhost:8000/OKB/RunnerMex" binding="mexHttpBinding" contract="IMetadataExchange"/>
-        <endpoint address="net.tcp://localhost:8001/OKB/RunnerService" binding="netTcpBinding" bindingConfiguration="LargeMessages" contract="HeuristicLab.OKB.IRunnerService">
-          <identity>
-            <dns value="HEAL"/>
-          </identity>
+        <endpoint address="net.tcp://localhost:8001/OKB/RunnerService" binding="netTcpBinding" bindingConfiguration="LargeMessages" contract="HeuristicLab.Services.OKB.IRunnerService">
         </endpoint>
       </service>
-      <service behaviorConfiguration="AdminServiceBehaviour" name="HeuristicLab.OKB.AdminService">
+      <service behaviorConfiguration="AdminServiceBehaviour" name="HeuristicLab.Services.OKB.AdminService">
         <endpoint address="http://localhost:8000/OKB/AdminMex" binding="mexHttpBinding" contract="IMetadataExchange"/>
-        <endpoint address="net.tcp://localhost:8001/OKB/AdminService" binding="netTcpBinding" bindingConfiguration="LargeMessages" contract="HeuristicLab.OKB.IAdminService"/>
+        <endpoint address="net.tcp://localhost:8001/OKB/AdminService" binding="netTcpBinding" bindingConfiguration="LargeMessages" contract="HeuristicLab.Services.OKB.IAdminService"/>
       </service>
-      <service behaviorConfiguration="TableServiceBehaviour" name="HeuristicLab.OKB.TableService">
+      <service behaviorConfiguration="TableServiceBehaviour" name="HeuristicLab.Services.OKB.TableService">
         <endpoint address="http://localhost:8000/OKB/TableMex" binding="mexHttpBinding" contract="IMetadataExchange"/>
-        <endpoint address="net.tcp://localhost:8001/OKB/TableService" binding="netTcpBinding" bindingConfiguration="LargeMessages" contract="HeuristicLab.OKB.ITableService"/>
+        <endpoint address="net.tcp://localhost:8001/OKB/TableService" binding="netTcpBinding" bindingConfiguration="LargeMessages" contract="HeuristicLab.Services.OKB.ITableService"/>
       </service>
-      <service behaviorConfiguration="QueryServiceBehaviour" name="HeuristicLab.OKB.QueryService">
+      <service behaviorConfiguration="QueryServiceBehaviour" name="HeuristicLab.Services.OKB.QueryService">
         <endpoint address="http://localhost:8000/OKB/QueryMex" binding="mexHttpBinding" contract="IMetadataExchange"/>
-        <endpoint address="net.tcp://localhost:8001/OKB/QueryService" binding="netTcpBinding" bindingConfiguration="LargeMessages" contract="HeuristicLab.OKB.IQueryService"/>
+        <endpoint address="net.tcp://localhost:8001/OKB/QueryService" binding="netTcpBinding" bindingConfiguration="LargeMessages" contract="HeuristicLab.Services.OKB.IQueryService"/>
       </service>
-      <service behaviorConfiguration="DataServiceBehaviour" name="HeuristicLab.OKB.DataService">
+      <service behaviorConfiguration="DataServiceBehaviour" name="HeuristicLab.Services.OKB.DataService">
         <endpoint address="http://localhost:8000/OKB/DataMex" binding="mexHttpBinding" contract="IMetadataExchange"/>
-        <endpoint address="net.tcp://localhost:8001/OKB/DataService" binding="netTcpBinding" bindingConfiguration="LargeMessages" contract="HeuristicLab.OKB.IDataService"/>
+        <endpoint address="net.tcp://localhost:8001/OKB/DataService" binding="netTcpBinding" bindingConfiguration="LargeMessages" contract="HeuristicLab.Services.OKB.IDataService"/>
       </service>
     </services>
