public AuthTestAccount(AuthTestExtensionType extensionType, string realm, string account, string password) { this.ExtensionType = extensionType; this.Realm = realm; this.Account = account; this.Password = password; }
public string GetQuery(AuthTestExtensionType type) { switch (type) { case AuthTestExtensionType.File: return(""); case AuthTestExtensionType.Ldap: return(""); case AuthTestExtensionType.Odbc: return("select 0 from Accounts where Realm=$(realm) and Account=$(account) and SHA512=$(sha512-password)"); case AuthTestExtensionType.Radius: return(""); case AuthTestExtensionType.Config: return(""); default: throw new NotImplementedException(); } }
public string GetRealm(AuthTestExtensionType type) { switch (type) { case AuthTestExtensionType.File: return("file.com"); case AuthTestExtensionType.Ldap: return(ADSettings.Domain); case AuthTestExtensionType.Odbc: return("odbc.com"); case AuthTestExtensionType.Radius: return("radius.com"); case AuthTestExtensionType.Config: return("config.com"); default: throw new NotImplementedException(); } }
public string GetType(AuthTestExtensionType type) { switch (type) { case AuthTestExtensionType.File: return("LillTek.Datacenter.Server.FileAuthenticationExtension:LillTek.Datacenter.Server.dll"); #if TEST_AD_LDAP case AuthTestExtensionType.Ldap: return("LillTek.Datacenter.Server.LdapAuthenticationExtension:LillTek.Datacenter.Server.dll"); #else case AuthTestExtensionType.Ldap: return("LillTek.Datacenter.Server.RadiusAuthenticationExtension:LillTek.Datacenter.Server.dll"); #endif case AuthTestExtensionType.Odbc: return("LillTek.Datacenter.Server.OdbcAuthenticationExtension:LillTek.Datacenter.Server.dll"); case AuthTestExtensionType.Radius: return("LillTek.Datacenter.Server.RadiusAuthenticationExtension:LillTek.Datacenter.Server.dll"); case AuthTestExtensionType.Config: return("LillTek.Datacenter.Server.ConfigAuthenticationExtension:LillTek.Datacenter.Server.dll"); default: throw new NotImplementedException(); } }
public string GetArgs(AuthTestExtensionType type) { switch (type) { case AuthTestExtensionType.File: return(string.Format("path={0};reload=yes;maxCacheTime=10m", AuthFilePath)); #if TEST_AD_LDAP case AuthTestExtensionType.Ldap: return(string.Format("servers={0};authtype=Digest;maxCacheTime=55m", ADSettings.GetServerList())); #else case AuthTestExtensionType.Ldap: return(string.Format("servers={0}:RADIUS;portcount=4;secret={1}", ADSettings.Servers[0], ADSettings.NasSecret)); #endif case AuthTestExtensionType.Odbc: return(string.Format("Driver={{SQL Server}};{0};maxCacheTime=55m", DB.ConnectionInfo)); case AuthTestExtensionType.Radius: return(string.Format("servers=localhost:52111;portcount=4;secret={0}", RadiusSecret)); case AuthTestExtensionType.Config: return("key=Accounts;reload=yes;maxCacheTime=10m"); default: throw new NotImplementedException(); } }