using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace GB5Shared.DTO.Framework.ServerConfig { public class ServerConfigDTO { private int serverconfigid; private int serverid; private string connectionname; private string servername; private string serverip; private string databasename; private string databaseuserid; private string databaseusername; private string databasepassword; private string databaseport; private byte dbtype; private byte dbnature; private long sessionid; //private ISessionFactory nhibernatesession; private string systemdatabaseconnectionname; private string referaldatabaseconnectionname; private string archiveddatabaseconnectionname; private int typeofdb;//Production,system,referal archived private string userconnection;//Production,system,referal archived private int clientid; //Added by Vikash on 08 Apr 2013 private int offset; //Offset private int maxvalue; //Client private int clientsiteid; //CLIENSITEID private byte dbinstancetype; private int parentserverconfigid; private string parentserverconfigconnectionname; private string parentserverconfigdatabasename; private string serverconfigfcmconfig; public int ServerConfigId { get { return serverconfigid; } set { serverconfigid = value; } } public int ServerId { get { return serverid; } set { serverid = value; } } public string ConnectionName { get { return connectionname; } set { connectionname = value; } } public string ServerName { get { return servername; } set { servername = value; } } public string ServerIP { get { return serverip; } set { serverip = value; } } public string DatabaseName { get { return databasename; } set { databasename = value; } } public string DatabaseUserId { get { return databaseuserid; } set { databaseuserid = value; } } public string DatabasePassword { get { return databasepassword; } set { databasepassword = value; } } public string DatabasePort { get { return databaseport; } set { databaseport = value; } } public byte DbType { get { return dbtype; } set { dbtype = value; } } public byte DbNaturte { get { return dbnature; } set { dbnature = value; } } public long SessionId { get { return sessionid; } set { sessionid = value; } } //public ISessionFactory NhibernateSession //{ // get { return nhibernatesession; } // set { nhibernatesession = value; } //} public string SystemDataBaseConnectionName { get { return systemdatabaseconnectionname; } set { systemdatabaseconnectionname = value; } } public string ReferalDataBaseConnectionName { get { return referaldatabaseconnectionname; } set { referaldatabaseconnectionname = value; } } public string ArchivedDataBaseConnectionName { get { return archiveddatabaseconnectionname; } set { archiveddatabaseconnectionname = value; } } public int TypeOfDb { get { return typeofdb; } set { typeofdb = value; } } public string UserConnection { get { return userconnection; } set { userconnection = value; } } public int ClientId { get { return clientid; } set { clientid = value; } } public int Offset { get { return offset; } set { offset = value; } } public int MaxValue { get { return maxvalue; } set { maxvalue = value; } } public int ClientsiteId { get { return clientsiteid; } set { clientsiteid = value; } } public string DatabaseUserName { get { return databaseusername; } set { databaseusername = value; } } public byte DbInstanceType { get { return dbinstancetype; } set { dbinstancetype = value; } } public int ParentServerConfigId { get { return parentserverconfigid; } set { parentserverconfigid = value; } } public string ParentServerConfigConnectionName { get { return parentserverconfigconnectionname; } set { parentserverconfigconnectionname = value; } } public string ParentServerConfigDatabaseName { get { return parentserverconfigdatabasename; } set { parentserverconfigdatabasename = value; } } public string ServerConfigFCMConfig { get { return serverconfigfcmconfig; } set { serverconfigfcmconfig = value; } } #region Added by Vikash for Digest private string servermachinename; private string uniquedetails; public string ServerMachineName { get { return servermachinename; } set { servermachinename = value; } } public string UniqueDetails { get { return uniquedetails; } set { uniquedetails = value; } } #endregion #region Added by Vikash on 07th March 2019 For making scheduler as one Instance private string applicationusercode; private string applicationuserpassword; public string ApplicationUserCode { get { return applicationusercode; } set { applicationusercode = value; } } public string ApplicationUserPassword { get { return applicationuserpassword; } set { applicationuserpassword = value; } } #endregion #region Added 08 Sep 2026 — multi-tenant Keycloak auth resolution (MSERVERCONFIG.AUTHMODE etc.) // AuthMode: 0=Native (default — trusted-header/self-issued-token path, unchanged from // today) 1=Keycloak (validate Bearer tokens against KeycloakHost/KeycloakRealm below). // KeycloakHost/KeycloakRealm/KeycloakAdminVaultPath are only meaningful when AuthMode=1 — // left unset for Native rows, including every BYOC/on-prem tenant that never adopts // Keycloak. KeycloakAdminVaultPath is per-row (not a single global path) because a BYOC // customer's own Keycloak instance has its own admin credential. private byte authmode; private string keycloakhost; private string keycloakrealm; private string keycloakadminvaultpath; private string vaultaddress; public byte AuthMode { get { return authmode; } set { authmode = value; } } public string KeycloakHost { get { return keycloakhost; } set { keycloakhost = value; } } public string KeycloakRealm { get { return keycloakrealm; } set { keycloakrealm = value; } } public string KeycloakAdminVaultPath { get { return keycloakadminvaultpath; } set { keycloakadminvaultpath = value; } } // General-purpose, NOT Keycloak-specific: NULL (every existing row) = use the GB5 host's // own local/central Vault for ALL of this tenant's secrets. A real address = this tenant // (on-prem/BYOC) runs its own separate Vault server entirely — every secret lookup for // that tenant (Keycloak admin credential via KeycloakAdminVaultPath, and any future // secret type) goes there instead. Vault deployment is per-physical-installation, exactly // like Keycloak itself, but the Vault SERVER a tenant points at is general-purpose — only // the PATH within it is per-secret-type. public string VaultAddress { get { return vaultaddress; } set { vaultaddress = value; } } #endregion } }