From a30440d4ba83b914c551180e9e53073b397d3e63 Mon Sep 17 00:00:00 2001 From: Benjamin Bohard Date: Tue, 13 Aug 2019 17:47:45 +0200 Subject: [PATCH 1/2] Import sql dump --- tmpl/syspass-create-database.sql | 7 - tmpl/syspass-db.sql | 1003 ++++++++++++++++++++++++++++++ 2 files changed, 1003 insertions(+), 7 deletions(-) delete mode 100644 tmpl/syspass-create-database.sql create mode 100644 tmpl/syspass-db.sql diff --git a/tmpl/syspass-create-database.sql b/tmpl/syspass-create-database.sql deleted file mode 100644 index a6f73cb..0000000 --- a/tmpl/syspass-create-database.sql +++ /dev/null @@ -1,7 +0,0 @@ -CREATE DATABASE syspass; -GRANT ALL PRIVILEGES ON syspass.* to 'syspass'@'%%adresse_ip_web' identified by 'syspass'; -%if %%mode_conteneur_actif != "non" -GRANT ALL PRIVILEGES ON syspass.* to 'syspass'@'%%adresse_ip_br0' identified by 'syspass'; -%end if -FLUSH PRIVILEGES; - diff --git a/tmpl/syspass-db.sql b/tmpl/syspass-db.sql new file mode 100644 index 0000000..6542921 --- /dev/null +++ b/tmpl/syspass-db.sql @@ -0,0 +1,1003 @@ +-- MySQL dump 10.13 Distrib 5.7.27, for Linux (x86_64) +-- +-- Host: localhost Database: syspasstmp +-- ------------------------------------------------------ +-- Server version 5.7.27-0ubuntu0.18.04.1 + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +-- +-- Table structure for table `Account` +-- + +DROP TABLE IF EXISTS `Account`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `Account` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `userGroupId` smallint(5) unsigned NOT NULL, + `userId` smallint(5) unsigned NOT NULL, + `userEditId` smallint(5) unsigned NOT NULL, + `clientId` mediumint(8) unsigned NOT NULL, + `name` varchar(100) COLLATE utf8_unicode_ci NOT NULL, + `categoryId` mediumint(8) unsigned NOT NULL, + `login` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, + `url` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `pass` varbinary(2000) NOT NULL, + `key` varbinary(2000) NOT NULL, + `notes` text COLLATE utf8_unicode_ci, + `countView` int(10) unsigned NOT NULL DEFAULT '0', + `countDecrypt` int(10) unsigned NOT NULL DEFAULT '0', + `dateAdd` datetime NOT NULL, + `dateEdit` datetime DEFAULT NULL, + `otherUserGroupEdit` tinyint(1) DEFAULT '0', + `otherUserEdit` tinyint(1) DEFAULT '0', + `isPrivate` tinyint(1) DEFAULT '0', + `isPrivateGroup` tinyint(1) DEFAULT '0', + `passDate` int(11) unsigned DEFAULT NULL, + `passDateChange` int(11) unsigned DEFAULT NULL, + `parentId` mediumint(8) unsigned DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `idx_Account_01` (`categoryId`), + KEY `idx_Account_02` (`userGroupId`,`userId`), + KEY `idx_Account_03` (`clientId`), + KEY `idx_Account_04` (`parentId`), + KEY `fk_Account_userId` (`userId`), + KEY `fk_Account_userEditId` (`userEditId`), + CONSTRAINT `fk_Account_categoryId` FOREIGN KEY (`categoryId`) REFERENCES `Category` (`id`), + CONSTRAINT `fk_Account_clientId` FOREIGN KEY (`clientId`) REFERENCES `Client` (`id`), + CONSTRAINT `fk_Account_userEditId` FOREIGN KEY (`userEditId`) REFERENCES `User` (`id`), + CONSTRAINT `fk_Account_userGroupId` FOREIGN KEY (`userGroupId`) REFERENCES `UserGroup` (`id`), + CONSTRAINT `fk_Account_userId` FOREIGN KEY (`userId`) REFERENCES `User` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `Account` +-- + +LOCK TABLES `Account` WRITE; +/*!40000 ALTER TABLE `Account` DISABLE KEYS */; +/*!40000 ALTER TABLE `Account` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `AccountFile` +-- + +DROP TABLE IF EXISTS `AccountFile`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `AccountFile` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `accountId` mediumint(5) unsigned NOT NULL, + `name` varchar(100) COLLATE utf8_unicode_ci NOT NULL, + `type` varchar(100) COLLATE utf8_unicode_ci NOT NULL, + `size` int(11) NOT NULL, + `content` mediumblob NOT NULL, + `extension` varchar(10) COLLATE utf8_unicode_ci NOT NULL, + `thumb` mediumblob, + PRIMARY KEY (`id`), + KEY `idx_AccountFile_01` (`accountId`), + CONSTRAINT `fk_AccountFile_accountId` FOREIGN KEY (`accountId`) REFERENCES `Account` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `AccountFile` +-- + +LOCK TABLES `AccountFile` WRITE; +/*!40000 ALTER TABLE `AccountFile` DISABLE KEYS */; +/*!40000 ALTER TABLE `AccountFile` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `AccountHistory` +-- + +DROP TABLE IF EXISTS `AccountHistory`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `AccountHistory` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `accountId` mediumint(8) unsigned NOT NULL, + `userGroupId` smallint(5) unsigned NOT NULL, + `userId` smallint(5) unsigned NOT NULL, + `userEditId` smallint(5) unsigned NOT NULL, + `clientId` mediumint(8) unsigned NOT NULL, + `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `categoryId` mediumint(8) unsigned NOT NULL, + `login` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, + `url` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `pass` varbinary(2000) NOT NULL, + `key` varbinary(2000) NOT NULL, + `notes` text COLLATE utf8_unicode_ci NOT NULL, + `countView` int(10) unsigned NOT NULL DEFAULT '0', + `countDecrypt` int(10) unsigned NOT NULL DEFAULT '0', + `dateAdd` datetime NOT NULL, + `dateEdit` datetime DEFAULT NULL, + `isModify` tinyint(1) DEFAULT '0', + `isDeleted` tinyint(1) DEFAULT '0', + `mPassHash` varbinary(255) NOT NULL, + `otherUserEdit` tinyint(1) DEFAULT '0', + `otherUserGroupEdit` tinyint(1) DEFAULT '0', + `passDate` int(10) unsigned DEFAULT NULL, + `passDateChange` int(10) unsigned DEFAULT NULL, + `parentId` mediumint(8) unsigned DEFAULT NULL, + `isPrivate` tinyint(1) DEFAULT '0', + `isPrivateGroup` tinyint(1) DEFAULT '0', + PRIMARY KEY (`id`), + KEY `idx_AccountHistory_01` (`accountId`), + KEY `idx_AccountHistory_02` (`parentId`), + KEY `fk_AccountHistory_userGroupId` (`userGroupId`), + KEY `fk_AccountHistory_userId` (`userId`), + KEY `fk_AccountHistory_userEditId` (`userEditId`), + KEY `fk_AccountHistory_clientId` (`clientId`), + KEY `fk_AccountHistory_categoryId` (`categoryId`), + CONSTRAINT `fk_AccountHistory_categoryId` FOREIGN KEY (`categoryId`) REFERENCES `Category` (`id`), + CONSTRAINT `fk_AccountHistory_clientId` FOREIGN KEY (`clientId`) REFERENCES `Client` (`id`), + CONSTRAINT `fk_AccountHistory_userEditId` FOREIGN KEY (`userEditId`) REFERENCES `User` (`id`), + CONSTRAINT `fk_AccountHistory_userGroupId` FOREIGN KEY (`userGroupId`) REFERENCES `UserGroup` (`id`), + CONSTRAINT `fk_AccountHistory_userId` FOREIGN KEY (`userId`) REFERENCES `User` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `AccountHistory` +-- + +LOCK TABLES `AccountHistory` WRITE; +/*!40000 ALTER TABLE `AccountHistory` DISABLE KEYS */; +/*!40000 ALTER TABLE `AccountHistory` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `AccountToFavorite` +-- + +DROP TABLE IF EXISTS `AccountToFavorite`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `AccountToFavorite` ( + `accountId` mediumint(8) unsigned NOT NULL, + `userId` smallint(5) unsigned NOT NULL, + PRIMARY KEY (`accountId`,`userId`), + KEY `idx_AccountToFavorite_01` (`accountId`,`userId`), + KEY `fk_AccountToFavorite_userId` (`userId`), + CONSTRAINT `fk_AccountToFavorite_accountId` FOREIGN KEY (`accountId`) REFERENCES `Account` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_AccountToFavorite_userId` FOREIGN KEY (`userId`) REFERENCES `User` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `AccountToFavorite` +-- + +LOCK TABLES `AccountToFavorite` WRITE; +/*!40000 ALTER TABLE `AccountToFavorite` DISABLE KEYS */; +/*!40000 ALTER TABLE `AccountToFavorite` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `AccountToTag` +-- + +DROP TABLE IF EXISTS `AccountToTag`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `AccountToTag` ( + `accountId` mediumint(8) unsigned NOT NULL, + `tagId` int(10) unsigned NOT NULL, + PRIMARY KEY (`accountId`,`tagId`), + KEY `fk_AccountToTag_accountId` (`accountId`), + KEY `fk_AccountToTag_tagId` (`tagId`), + CONSTRAINT `fk_AccountToTag_accountId` FOREIGN KEY (`accountId`) REFERENCES `Account` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_AccountToTag_tagId` FOREIGN KEY (`tagId`) REFERENCES `Tag` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `AccountToTag` +-- + +LOCK TABLES `AccountToTag` WRITE; +/*!40000 ALTER TABLE `AccountToTag` DISABLE KEYS */; +/*!40000 ALTER TABLE `AccountToTag` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `AccountToUser` +-- + +DROP TABLE IF EXISTS `AccountToUser`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `AccountToUser` ( + `accountId` mediumint(8) unsigned NOT NULL, + `userId` smallint(5) unsigned NOT NULL, + `isEdit` tinyint(1) unsigned DEFAULT '0', + PRIMARY KEY (`accountId`,`userId`), + KEY `idx_AccountToUser_01` (`accountId`), + KEY `fk_AccountToUser_userId` (`userId`), + CONSTRAINT `fk_AccountToUser_accountId` FOREIGN KEY (`accountId`) REFERENCES `Account` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_AccountToUser_userId` FOREIGN KEY (`userId`) REFERENCES `User` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `AccountToUser` +-- + +LOCK TABLES `AccountToUser` WRITE; +/*!40000 ALTER TABLE `AccountToUser` DISABLE KEYS */; +/*!40000 ALTER TABLE `AccountToUser` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `AccountToUserGroup` +-- + +DROP TABLE IF EXISTS `AccountToUserGroup`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `AccountToUserGroup` ( + `accountId` mediumint(8) unsigned NOT NULL, + `userGroupId` smallint(5) unsigned NOT NULL, + `isEdit` tinyint(1) unsigned DEFAULT '0', + PRIMARY KEY (`accountId`,`userGroupId`), + KEY `idx_AccountToUserGroup_01` (`accountId`), + KEY `fk_AccountToUserGroup_userGroupId` (`userGroupId`), + CONSTRAINT `fk_AccountToUserGroup_accountId` FOREIGN KEY (`accountId`) REFERENCES `Account` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_AccountToUserGroup_userGroupId` FOREIGN KEY (`userGroupId`) REFERENCES `UserGroup` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `AccountToUserGroup` +-- + +LOCK TABLES `AccountToUserGroup` WRITE; +/*!40000 ALTER TABLE `AccountToUserGroup` DISABLE KEYS */; +/*!40000 ALTER TABLE `AccountToUserGroup` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `AuthToken` +-- + +DROP TABLE IF EXISTS `AuthToken`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `AuthToken` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `userId` smallint(5) unsigned NOT NULL, + `token` varbinary(255) NOT NULL, + `actionId` smallint(5) unsigned NOT NULL, + `createdBy` smallint(5) unsigned NOT NULL, + `startDate` int(10) unsigned NOT NULL, + `vault` varbinary(2000) DEFAULT NULL, + `hash` varbinary(500) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `uk_AuthToken_01` (`token`,`actionId`), + KEY `idx_AuthToken_01` (`userId`,`actionId`,`token`), + KEY `fk_AuthToken_actionId` (`actionId`), + CONSTRAINT `fk_AuthToken_userId` FOREIGN KEY (`userId`) REFERENCES `User` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `AuthToken` +-- + +LOCK TABLES `AuthToken` WRITE; +/*!40000 ALTER TABLE `AuthToken` DISABLE KEYS */; +/*!40000 ALTER TABLE `AuthToken` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `Category` +-- + +DROP TABLE IF EXISTS `Category`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `Category` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(50) COLLATE utf8_unicode_ci NOT NULL, + `description` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `hash` varbinary(40) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `uk_Category_01` (`hash`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `Category` +-- + +LOCK TABLES `Category` WRITE; +/*!40000 ALTER TABLE `Category` DISABLE KEYS */; +/*!40000 ALTER TABLE `Category` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `Client` +-- + +DROP TABLE IF EXISTS `Client`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `Client` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(100) COLLATE utf8_unicode_ci NOT NULL, + `hash` varbinary(40) NOT NULL, + `description` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `isGlobal` tinyint(1) DEFAULT '0', + PRIMARY KEY (`id`), + KEY `uk_Client_01` (`hash`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `Client` +-- + +LOCK TABLES `Client` WRITE; +/*!40000 ALTER TABLE `Client` DISABLE KEYS */; +/*!40000 ALTER TABLE `Client` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `Config` +-- + +DROP TABLE IF EXISTS `Config`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `Config` ( + `parameter` varchar(50) COLLATE utf8_unicode_ci NOT NULL, + `value` varchar(4000) COLLATE utf8_unicode_ci DEFAULT NULL, + PRIMARY KEY (`parameter`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `Config` +-- + +LOCK TABLES `Config` WRITE; +/*!40000 ALTER TABLE `Config` DISABLE KEYS */; +INSERT INTO `Config` VALUES ('config_backup','789c95585b6fdb3618ed6f31f6d8a5a464dd1ce421cda52d9666419c165b3120a0284a224c8b1a4925f682fef791929c387248a92ff205e7901fbfdbf9a83f171e58cc9637ff9cf12aa745ff718e149a2d127ff12417beb798bd7b0bf0aea90b8132f207d9ce8eaf8f3532b22133be6a1ee98a5e542865249b1dd30530047f8cf04db099066a13679336d0f88f48927dce7c942389f825c20d92729f908c11aed19ac81ae15776c53616cb507d4e72d430f549f0a636de829a310713183782e794911dc77e985af0cd76723c5af4928887d7ae824efc0d17ca2c1d83188ca3876118597b1003ab37eb2665b45ac9af68f39d9247690cf29db9b4c7b8a3ebd69521009328437f5abd8f30e64da5cecca38d95e7747f0fbfd27b8c47169704afbed51952449f369d82aeb8a2780f6d2d79dc7efd8c6439eb3312a628f7a3046539823e4e62fd2385fe7c1ee40027fa09334c62944083f7ac51cad2cf5c2a83d1c5c43846acec7ffbd6accfd225c72ba2bae6e35adbd49f590beab5e45657a2946a5d8f59b44b31182e6669f1d1bbaaffba78faedb6f9c1c32f63dc5d321baeacef832cf0b230ce02e2857874dfbe6c7c1f84066a6f7a246d0a13b3915e4ad67c9898d6ed4df390a78cf147925d6cd4b41adb277da5eb696d6e9fb4a4ff752d0b787367b6b6a4bdc3b873bb603c456c4990c0e533dada5768251562edc27d19381bee4e67a05e909f14bc79788f4f72e196909648ab6c971f9e26e3ea4410ada3e2fd2f2fb34bd140a7192f71b422346694c53f38918806b8a4fae353d9047f23f32d5c21529409a2558128a811897999b63b05ae9d6ede6acfd674338ce708758ef4ac0a69c0a7997cce4ba7c7efb635190fa341f6baf962adb5a119f48bae419dade69fc5870f30f18e60181f0547d1c80abc181cd7619bc63e90ca9415d2b63dfd7489ca1a5176daa8924c1569431816bad5a1067c29f87adf4b4ef05071dde0be8779819109ab3f0cf496fcdb10a9a66ba7212d096e0455db4931ee08c3d9c569ff30db43f70930ad6917d689e6ecb260423d6978a5740e54667c4c477c63a4ed918b6c8958ab9ea15e3e84c8cf21f6c3204f4090c61003986b71c1208a2210e5c48bb464cff32c08fc34f03d04731c7a499e85b9e73ebc20528f9cf2549e21b157c456bc2452525e99a98a379dc60177964aaac815aa8ab6c92d66b9b8bfbc754f87867157925ef0b557d77a0e1214b1df53d61077b3eba69bef44182b5bbe0ea20fc1114c40e40100dd8145753dc6b56bb97ea45a51c616b0a6c95bd72baba5067c49999ad8d2bb4b4f419ad7b731ab1f0dbe53dd016364aed45fbb061f84410441109bf9676e25eda6ee2f6b6ddbe4ab4c8af0aaa9efcb7e861d3d3cd9d4ba991de0ad25582a55cba122585da5c7d14301b137cc0e7eab273a757062ab451de9b0035a1ddb11763d3c8073e7edb3bf9c187db8e36d2cc683d0c57b897a8bb47b50b6a695bbdd900a8b6dad965d177976d6d825ebb261ac1d084eb1bee3c8f1191869d1d5d31dc5c3b058abf799a1f59a5ff18256c30418a79e73d3e927bded90920f5f1000e78b8817c2defb01e02caede79179b9a8a8354b36ef48ab5bb3d43e08731006e6d68073c76300558f1bad9328a91d299d0be24ba3efef93f6cb41c2c'),('config_backup_date','1565710668'),('lastupdatempass','1565709968'),('masterPwd','$2y$10$Rmw6ev7gLeN1mNMgzijwG.AaELVryBfh2ed3DCSDZetGZdQ6n3lGa'),('version','310.19072001'); +/*!40000 ALTER TABLE `Config` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `CustomFieldData` +-- + +DROP TABLE IF EXISTS `CustomFieldData`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `CustomFieldData` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `moduleId` smallint(5) unsigned NOT NULL, + `itemId` int(10) unsigned NOT NULL, + `definitionId` int(10) unsigned NOT NULL, + `data` longblob, + `key` varbinary(2000) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `idx_CustomFieldData_01` (`definitionId`), + KEY `idx_CustomFieldData_02` (`itemId`,`moduleId`), + KEY `idx_CustomFieldData_03` (`moduleId`), + KEY `uk_CustomFieldData_01` (`moduleId`,`itemId`,`definitionId`), + CONSTRAINT `fk_CustomFieldData_definitionId` FOREIGN KEY (`definitionId`) REFERENCES `CustomFieldDefinition` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `CustomFieldData` +-- + +LOCK TABLES `CustomFieldData` WRITE; +/*!40000 ALTER TABLE `CustomFieldData` DISABLE KEYS */; +/*!40000 ALTER TABLE `CustomFieldData` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `CustomFieldDefinition` +-- + +DROP TABLE IF EXISTS `CustomFieldDefinition`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `CustomFieldDefinition` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(100) COLLATE utf8_unicode_ci NOT NULL, + `moduleId` smallint(5) unsigned NOT NULL, + `required` tinyint(1) unsigned DEFAULT NULL, + `help` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `showInList` tinyint(1) unsigned DEFAULT NULL, + `typeId` tinyint(3) unsigned NOT NULL, + `isEncrypted` tinyint(1) unsigned DEFAULT '1', + PRIMARY KEY (`id`), + KEY `fk_CustomFieldDefinition_typeId` (`typeId`), + CONSTRAINT `fk_CustomFieldDefinition_typeId` FOREIGN KEY (`typeId`) REFERENCES `CustomFieldType` (`id`) ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `CustomFieldDefinition` +-- + +LOCK TABLES `CustomFieldDefinition` WRITE; +/*!40000 ALTER TABLE `CustomFieldDefinition` DISABLE KEYS */; +/*!40000 ALTER TABLE `CustomFieldDefinition` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `CustomFieldType` +-- + +DROP TABLE IF EXISTS `CustomFieldType`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `CustomFieldType` ( + `id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(50) COLLATE utf8_unicode_ci NOT NULL, + `text` varchar(50) COLLATE utf8_unicode_ci NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `uk_CustomFieldType_01` (`name`) +) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `CustomFieldType` +-- + +LOCK TABLES `CustomFieldType` WRITE; +/*!40000 ALTER TABLE `CustomFieldType` DISABLE KEYS */; +INSERT INTO `CustomFieldType` VALUES (1,'text','Text'),(2,'password','Password'),(3,'date','Date'),(4,'number','Number'),(5,'email','Email'),(6,'telephone','Phone'),(7,'url','URL'),(8,'color','Color'),(9,'wiki','Wiki'),(10,'textarea','Text Area'); +/*!40000 ALTER TABLE `CustomFieldType` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `EventLog` +-- + +DROP TABLE IF EXISTS `EventLog`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `EventLog` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `date` int(10) unsigned NOT NULL, + `login` varchar(25) COLLATE utf8_unicode_ci DEFAULT NULL, + `userId` smallint(5) unsigned DEFAULT NULL, + `ipAddress` varchar(45) COLLATE utf8_unicode_ci NOT NULL, + `action` varchar(50) COLLATE utf8_unicode_ci NOT NULL, + `description` text COLLATE utf8_unicode_ci, + `level` varchar(20) COLLATE utf8_unicode_ci NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `EventLog` +-- + +LOCK TABLES `EventLog` WRITE; +/*!40000 ALTER TABLE `EventLog` DISABLE KEYS */; +INSERT INTO `EventLog` VALUES (1,1565710075,'admin',1,'192.168.122.1','save.config.general','','INFO'),(2,1565710538,'admin',1,'192.168.122.1','save.config.ldap','','INFO'),(3,1565710586,'admin',1,'192.168.122.1','save.config.ldap','','INFO'),(4,1565710668,'admin',1,'192.168.122.1','save.config.ldap','','INFO'),(5,1565710791,'admin',1,'192.168.122.1','show.authToken.create',NULL,'INFO'); +/*!40000 ALTER TABLE `EventLog` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `ItemPreset` +-- + +DROP TABLE IF EXISTS `ItemPreset`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ItemPreset` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `type` varchar(25) COLLATE utf8_unicode_ci NOT NULL, + `userId` smallint(5) unsigned DEFAULT NULL, + `userGroupId` smallint(5) unsigned DEFAULT NULL, + `userProfileId` smallint(5) unsigned DEFAULT NULL, + `fixed` tinyint(1) unsigned NOT NULL DEFAULT '0', + `priority` tinyint(3) unsigned NOT NULL DEFAULT '0', + `data` blob, + `hash` varbinary(40) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `uk_ItemPreset_01` (`hash`), + KEY `fk_ItemPreset_userId` (`userId`), + KEY `fk_ItemPreset_userGroupId` (`userGroupId`), + KEY `fk_ItemPreset_userProfileId` (`userProfileId`), + CONSTRAINT `fk_ItemPreset_userGroupId` FOREIGN KEY (`userGroupId`) REFERENCES `UserGroup` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_ItemPreset_userId` FOREIGN KEY (`userId`) REFERENCES `User` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_ItemPreset_userProfileId` FOREIGN KEY (`userProfileId`) REFERENCES `UserProfile` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `ItemPreset` +-- + +LOCK TABLES `ItemPreset` WRITE; +/*!40000 ALTER TABLE `ItemPreset` DISABLE KEYS */; +/*!40000 ALTER TABLE `ItemPreset` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `Notification` +-- + +DROP TABLE IF EXISTS `Notification`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `Notification` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `type` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL, + `component` varchar(100) COLLATE utf8_unicode_ci NOT NULL, + `description` text COLLATE utf8_unicode_ci NOT NULL, + `date` int(10) unsigned NOT NULL, + `checked` tinyint(1) DEFAULT '0', + `userId` smallint(5) unsigned DEFAULT NULL, + `sticky` tinyint(1) DEFAULT '0', + `onlyAdmin` tinyint(1) DEFAULT '0', + PRIMARY KEY (`id`), + KEY `idx_Notification_01` (`userId`,`checked`,`date`), + KEY `idx_Notification_02` (`component`,`date`,`checked`,`userId`), + KEY `fk_Notification_userId` (`userId`), + CONSTRAINT `fk_Notification_userId` FOREIGN KEY (`userId`) REFERENCES `User` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `Notification` +-- + +LOCK TABLES `Notification` WRITE; +/*!40000 ALTER TABLE `Notification` DISABLE KEYS */; +/*!40000 ALTER TABLE `Notification` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `Plugin` +-- + +DROP TABLE IF EXISTS `Plugin`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `Plugin` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(100) COLLATE utf8_unicode_ci NOT NULL, + `data` mediumblob, + `enabled` tinyint(1) NOT NULL DEFAULT '0', + `available` tinyint(1) DEFAULT '0', + `versionLevel` varchar(15) COLLATE utf8_unicode_ci DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `uk_Plugin_01` (`name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `Plugin` +-- + +LOCK TABLES `Plugin` WRITE; +/*!40000 ALTER TABLE `Plugin` DISABLE KEYS */; +/*!40000 ALTER TABLE `Plugin` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `PluginData` +-- + +DROP TABLE IF EXISTS `PluginData`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `PluginData` ( + `name` varchar(100) COLLATE utf8_unicode_ci NOT NULL, + `itemId` int(11) NOT NULL, + `data` blob NOT NULL, + `key` varbinary(2000) NOT NULL, + PRIMARY KEY (`name`,`itemId`), + CONSTRAINT `fk_PluginData_name` FOREIGN KEY (`name`) REFERENCES `Plugin` (`name`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `PluginData` +-- + +LOCK TABLES `PluginData` WRITE; +/*!40000 ALTER TABLE `PluginData` DISABLE KEYS */; +/*!40000 ALTER TABLE `PluginData` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `PublicLink` +-- + +DROP TABLE IF EXISTS `PublicLink`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `PublicLink` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `itemId` int(10) unsigned NOT NULL, + `hash` varbinary(100) NOT NULL, + `data` mediumblob, + `userId` smallint(5) unsigned NOT NULL, + `typeId` int(10) unsigned NOT NULL, + `notify` tinyint(1) DEFAULT '0', + `dateAdd` int(10) unsigned NOT NULL, + `dateExpire` int(10) unsigned NOT NULL, + `dateUpdate` int(10) unsigned DEFAULT '0', + `countViews` smallint(5) unsigned DEFAULT '0', + `totalCountViews` mediumint(8) unsigned DEFAULT '0', + `maxCountViews` smallint(5) unsigned NOT NULL DEFAULT '0', + `useinfo` blob, + PRIMARY KEY (`id`), + UNIQUE KEY `uk_PublicLink_01` (`hash`), + UNIQUE KEY `uk_PublicLink_02` (`itemId`), + KEY `fk_PublicLink_userId` (`userId`), + CONSTRAINT `fk_PublicLink_userId` FOREIGN KEY (`userId`) REFERENCES `User` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `PublicLink` +-- + +LOCK TABLES `PublicLink` WRITE; +/*!40000 ALTER TABLE `PublicLink` DISABLE KEYS */; +/*!40000 ALTER TABLE `PublicLink` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `Tag` +-- + +DROP TABLE IF EXISTS `Tag`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `Tag` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(45) COLLATE utf8_unicode_ci NOT NULL, + `hash` varbinary(40) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `uk_Tag_01` (`hash`), + KEY `idx_Tag_01` (`name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `Tag` +-- + +LOCK TABLES `Tag` WRITE; +/*!40000 ALTER TABLE `Tag` DISABLE KEYS */; +/*!40000 ALTER TABLE `Tag` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `Track` +-- + +DROP TABLE IF EXISTS `Track`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `Track` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `userId` smallint(5) unsigned DEFAULT NULL, + `source` varchar(100) COLLATE utf8_unicode_ci NOT NULL, + `time` int(10) unsigned NOT NULL, + `timeUnlock` int(10) unsigned DEFAULT NULL, + `ipv4` binary(4) DEFAULT NULL, + `ipv6` binary(16) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `idx_Track_01` (`userId`), + KEY `idx_Track_02` (`time`,`ipv4`,`ipv6`,`source`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `Track` +-- + +LOCK TABLES `Track` WRITE; +/*!40000 ALTER TABLE `Track` DISABLE KEYS */; +/*!40000 ALTER TABLE `Track` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `User` +-- + +DROP TABLE IF EXISTS `User`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `User` ( + `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(80) COLLATE utf8_unicode_ci NOT NULL, + `userGroupId` smallint(5) unsigned NOT NULL, + `login` varchar(50) COLLATE utf8_unicode_ci NOT NULL, + `ssoLogin` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL, + `pass` varbinary(500) NOT NULL, + `mPass` varbinary(2000) DEFAULT NULL, + `mKey` varbinary(2000) DEFAULT NULL, + `email` varchar(80) COLLATE utf8_unicode_ci DEFAULT NULL, + `notes` text COLLATE utf8_unicode_ci, + `loginCount` int(10) unsigned NOT NULL DEFAULT '0', + `userProfileId` smallint(5) unsigned NOT NULL, + `lastLogin` datetime DEFAULT NULL, + `lastUpdate` datetime DEFAULT NULL, + `lastUpdateMPass` int(11) unsigned NOT NULL DEFAULT '0', + `isAdminApp` tinyint(1) DEFAULT '0', + `isAdminAcc` tinyint(1) DEFAULT '0', + `isLdap` tinyint(1) DEFAULT '0', + `isDisabled` tinyint(1) DEFAULT '0', + `hashSalt` varbinary(255) NOT NULL, + `isMigrate` tinyint(1) DEFAULT '0', + `isChangePass` tinyint(1) DEFAULT '0', + `isChangedPass` tinyint(1) DEFAULT '0', + `preferences` blob, + PRIMARY KEY (`id`), + UNIQUE KEY `uk_User_01` (`login`,`ssoLogin`), + KEY `idx_User_01` (`pass`), + KEY `fk_User_userGroupId` (`userGroupId`), + KEY `fk_User_userProfileId` (`userProfileId`), + CONSTRAINT `fk_User_userGroupId` FOREIGN KEY (`userGroupId`) REFERENCES `UserGroup` (`id`), + CONSTRAINT `fk_User_userProfileId` FOREIGN KEY (`userProfileId`) REFERENCES `UserProfile` (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `User` +-- + +LOCK TABLES `User` WRITE; +/*!40000 ALTER TABLE `User` DISABLE KEYS */; +INSERT INTO `User` VALUES (1,'sysPass Admin',1,'admin',NULL,_binary '$2y$10$U/9taXi98cQJ3NWsJLvbi.9QlENO471.kl89wBGog2fbW7nbeURlq',_binary 'def50200358152864353d3ccd1cb1ba6a9ead3b573908ebd059b5384b94cd7c9446bc513a169c92878211d59010930a79736ba92c5913d54a33aab77b0f35efcb6f0e826643337a2b3402a7f584ea4b6d9c19f141b5e82b46989bec6977662d7',_binary 'def10000def502005a92dafd2fb8665c497948c5f47ea6cc69b1f1eb002c385d8f037ef1dcc9bfc221812e8ca93552ba3999d1db4d9ebee5588fd79224dc8df815c6d0a19a8be1278b748c794d46230feff99e442b6d17008b4d84ae939b05d95beae2ba2b5de82c7bcaa4bef2dcd8787fdb6b88810f343db43da12878a704e18f11efe67ec28066d8f2e51ed99971682a567595933a917eb3436ad98d9d0fecac944351152a5b035cc5f95ab304911cb13a895c0406a372f0514437c8792f2d4cdab779fe02510b17bc44214802d620ebc9212ff746b20862523203b33073b1e2c1b0aca551f6d7954da61813493f50a388c0a1f0f37ed0e8f900db35b1cfe4',NULL,NULL,4,1,'2019-08-13 17:34:19',NULL,1565709969,1,0,0,0,'',0,0,0,NULL); +/*!40000 ALTER TABLE `User` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `UserGroup` +-- + +DROP TABLE IF EXISTS `UserGroup`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `UserGroup` ( + `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(50) COLLATE utf8_unicode_ci NOT NULL, + `description` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `UserGroup` +-- + +LOCK TABLES `UserGroup` WRITE; +/*!40000 ALTER TABLE `UserGroup` DISABLE KEYS */; +INSERT INTO `UserGroup` VALUES (1,'Admins','sysPass Admins'),(2,'Utilisateurs','Utilisateurs non affiliés à un groupe'); +/*!40000 ALTER TABLE `UserGroup` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `UserPassRecover` +-- + +DROP TABLE IF EXISTS `UserPassRecover`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `UserPassRecover` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `userId` smallint(5) unsigned NOT NULL, + `hash` varbinary(255) NOT NULL, + `date` int(10) unsigned NOT NULL, + `used` tinyint(1) DEFAULT '0', + PRIMARY KEY (`id`), + KEY `idx_UserPassRecover_01` (`userId`,`date`), + CONSTRAINT `fk_UserPassRecover_userId` FOREIGN KEY (`userId`) REFERENCES `User` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `UserPassRecover` +-- + +LOCK TABLES `UserPassRecover` WRITE; +/*!40000 ALTER TABLE `UserPassRecover` DISABLE KEYS */; +/*!40000 ALTER TABLE `UserPassRecover` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `UserProfile` +-- + +DROP TABLE IF EXISTS `UserProfile`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `UserProfile` ( + `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(45) COLLATE utf8_unicode_ci NOT NULL, + `profile` blob NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `UserProfile` +-- + +LOCK TABLES `UserProfile` WRITE; +/*!40000 ALTER TABLE `UserProfile` DISABLE KEYS */; +INSERT INTO `UserProfile` VALUES (1,'Admin',_binary 'O:24:\"SP\\DataModel\\ProfileData\":30:{s:10:\"\0*\0accView\";b:0;s:14:\"\0*\0accViewPass\";b:0;s:17:\"\0*\0accViewHistory\";b:0;s:10:\"\0*\0accEdit\";b:0;s:14:\"\0*\0accEditPass\";b:0;s:9:\"\0*\0accAdd\";b:0;s:12:\"\0*\0accDelete\";b:0;s:11:\"\0*\0accFiles\";b:0;s:13:\"\0*\0accPrivate\";b:0;s:18:\"\0*\0accPrivateGroup\";b:0;s:16:\"\0*\0accPermission\";b:0;s:17:\"\0*\0accPublicLinks\";b:0;s:18:\"\0*\0accGlobalSearch\";b:0;s:16:\"\0*\0configGeneral\";b:0;s:19:\"\0*\0configEncryption\";b:0;s:15:\"\0*\0configBackup\";b:0;s:15:\"\0*\0configImport\";b:0;s:11:\"\0*\0mgmUsers\";b:0;s:12:\"\0*\0mgmGroups\";b:0;s:14:\"\0*\0mgmProfiles\";b:0;s:16:\"\0*\0mgmCategories\";b:0;s:15:\"\0*\0mgmCustomers\";b:0;s:15:\"\0*\0mgmApiTokens\";b:0;s:17:\"\0*\0mgmPublicLinks\";b:0;s:14:\"\0*\0mgmAccounts\";b:0;s:10:\"\0*\0mgmTags\";b:0;s:11:\"\0*\0mgmFiles\";b:0;s:17:\"\0*\0mgmItemsPreset\";b:0;s:6:\"\0*\0evl\";b:0;s:18:\"\0*\0mgmCustomFields\";b:0;}'); +/*!40000 ALTER TABLE `UserProfile` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `UserToUserGroup` +-- + +DROP TABLE IF EXISTS `UserToUserGroup`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `UserToUserGroup` ( + `userId` smallint(5) unsigned NOT NULL, + `userGroupId` smallint(5) unsigned NOT NULL, + UNIQUE KEY `uk_UserToUserGroup_01` (`userId`,`userGroupId`), + KEY `idx_UserToUserGroup_01` (`userId`), + KEY `fk_UserToGroup_userGroupId` (`userGroupId`), + CONSTRAINT `fk_UserToGroup_userGroupId` FOREIGN KEY (`userGroupId`) REFERENCES `UserGroup` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_UserToGroup_userId` FOREIGN KEY (`userId`) REFERENCES `User` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `UserToUserGroup` +-- + +LOCK TABLES `UserToUserGroup` WRITE; +/*!40000 ALTER TABLE `UserToUserGroup` DISABLE KEYS */; +/*!40000 ALTER TABLE `UserToUserGroup` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Temporary table structure for view `account_data_v` +-- + +DROP TABLE IF EXISTS `account_data_v`; +/*!50001 DROP VIEW IF EXISTS `account_data_v`*/; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE VIEW `account_data_v` AS SELECT + 1 AS `id`, + 1 AS `name`, + 1 AS `categoryId`, + 1 AS `userId`, + 1 AS `clientId`, + 1 AS `userGroupId`, + 1 AS `userEditId`, + 1 AS `login`, + 1 AS `url`, + 1 AS `notes`, + 1 AS `countView`, + 1 AS `countDecrypt`, + 1 AS `dateAdd`, + 1 AS `dateEdit`, + 1 AS `otherUserEdit`, + 1 AS `otherUserGroupEdit`, + 1 AS `isPrivate`, + 1 AS `isPrivateGroup`, + 1 AS `passDate`, + 1 AS `passDateChange`, + 1 AS `parentId`, + 1 AS `categoryName`, + 1 AS `clientName`, + 1 AS `userGroupName`, + 1 AS `userName`, + 1 AS `userLogin`, + 1 AS `userEditName`, + 1 AS `userEditLogin`, + 1 AS `publicLinkHash`*/; +SET character_set_client = @saved_cs_client; + +-- +-- Temporary table structure for view `account_search_v` +-- + +DROP TABLE IF EXISTS `account_search_v`; +/*!50001 DROP VIEW IF EXISTS `account_search_v`*/; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE VIEW `account_search_v` AS SELECT + 1 AS `id`, + 1 AS `clientId`, + 1 AS `categoryId`, + 1 AS `name`, + 1 AS `login`, + 1 AS `url`, + 1 AS `notes`, + 1 AS `userId`, + 1 AS `userGroupId`, + 1 AS `otherUserEdit`, + 1 AS `otherUserGroupEdit`, + 1 AS `isPrivate`, + 1 AS `isPrivateGroup`, + 1 AS `passDate`, + 1 AS `passDateChange`, + 1 AS `parentId`, + 1 AS `countView`, + 1 AS `dateEdit`, + 1 AS `userName`, + 1 AS `userLogin`, + 1 AS `userGroupName`, + 1 AS `categoryName`, + 1 AS `clientName`, + 1 AS `num_files`, + 1 AS `publicLinkHash`, + 1 AS `publicLinkDateExpire`, + 1 AS `publicLinkTotalCountViews`*/; +SET character_set_client = @saved_cs_client; + +-- +-- Final view structure for view `account_data_v` +-- + +/*!50001 DROP VIEW IF EXISTS `account_data_v`*/; +/*!50001 SET @saved_cs_client = @@character_set_client */; +/*!50001 SET @saved_cs_results = @@character_set_results */; +/*!50001 SET @saved_col_connection = @@collation_connection */; +/*!50001 SET character_set_client = utf8 */; +/*!50001 SET character_set_results = utf8 */; +/*!50001 SET collation_connection = utf8_general_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50001 VIEW `account_data_v` AS select `Account`.`id` AS `id`,`Account`.`name` AS `name`,`Account`.`categoryId` AS `categoryId`,`Account`.`userId` AS `userId`,`Account`.`clientId` AS `clientId`,`Account`.`userGroupId` AS `userGroupId`,`Account`.`userEditId` AS `userEditId`,`Account`.`login` AS `login`,`Account`.`url` AS `url`,`Account`.`notes` AS `notes`,`Account`.`countView` AS `countView`,`Account`.`countDecrypt` AS `countDecrypt`,`Account`.`dateAdd` AS `dateAdd`,`Account`.`dateEdit` AS `dateEdit`,conv(`Account`.`otherUserEdit`,10,2) AS `otherUserEdit`,conv(`Account`.`otherUserGroupEdit`,10,2) AS `otherUserGroupEdit`,conv(`Account`.`isPrivate`,10,2) AS `isPrivate`,conv(`Account`.`isPrivateGroup`,10,2) AS `isPrivateGroup`,`Account`.`passDate` AS `passDate`,`Account`.`passDateChange` AS `passDateChange`,`Account`.`parentId` AS `parentId`,`Category`.`name` AS `categoryName`,`Client`.`name` AS `clientName`,`ug`.`name` AS `userGroupName`,`u1`.`name` AS `userName`,`u1`.`login` AS `userLogin`,`u2`.`name` AS `userEditName`,`u2`.`login` AS `userEditLogin`,`PublicLink`.`hash` AS `publicLinkHash` from ((((((`Account` left join `Category` on((`Account`.`categoryId` = `Category`.`id`))) join `UserGroup` `ug` on((`Account`.`userGroupId` = `ug`.`id`))) join `User` `u1` on((`Account`.`userId` = `u1`.`id`))) join `User` `u2` on((`Account`.`userEditId` = `u2`.`id`))) left join `Client` on((`Account`.`clientId` = `Client`.`id`))) left join `PublicLink` on((`Account`.`id` = `PublicLink`.`itemId`))) */; +/*!50001 SET character_set_client = @saved_cs_client */; +/*!50001 SET character_set_results = @saved_cs_results */; +/*!50001 SET collation_connection = @saved_col_connection */; + +-- +-- Final view structure for view `account_search_v` +-- + +/*!50001 DROP VIEW IF EXISTS `account_search_v`*/; +/*!50001 SET @saved_cs_client = @@character_set_client */; +/*!50001 SET @saved_cs_results = @@character_set_results */; +/*!50001 SET @saved_col_connection = @@collation_connection */; +/*!50001 SET character_set_client = utf8 */; +/*!50001 SET character_set_results = utf8 */; +/*!50001 SET collation_connection = utf8_general_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50001 VIEW `account_search_v` AS select `Account`.`id` AS `id`,`Account`.`clientId` AS `clientId`,`Account`.`categoryId` AS `categoryId`,`Account`.`name` AS `name`,`Account`.`login` AS `login`,`Account`.`url` AS `url`,`Account`.`notes` AS `notes`,`Account`.`userId` AS `userId`,`Account`.`userGroupId` AS `userGroupId`,`Account`.`otherUserEdit` AS `otherUserEdit`,`Account`.`otherUserGroupEdit` AS `otherUserGroupEdit`,`Account`.`isPrivate` AS `isPrivate`,`Account`.`isPrivateGroup` AS `isPrivateGroup`,`Account`.`passDate` AS `passDate`,`Account`.`passDateChange` AS `passDateChange`,`Account`.`parentId` AS `parentId`,`Account`.`countView` AS `countView`,`Account`.`dateEdit` AS `dateEdit`,`User`.`name` AS `userName`,`User`.`login` AS `userLogin`,`UserGroup`.`name` AS `userGroupName`,`Category`.`name` AS `categoryName`,`Client`.`name` AS `clientName`,(select count(0) from `AccountFile` where (`AccountFile`.`accountId` = `Account`.`id`)) AS `num_files`,`PublicLink`.`hash` AS `publicLinkHash`,`PublicLink`.`dateExpire` AS `publicLinkDateExpire`,`PublicLink`.`totalCountViews` AS `publicLinkTotalCountViews` from (((((`Account` join `Category` on((`Account`.`categoryId` = `Category`.`id`))) join `Client` on((`Client`.`id` = `Account`.`clientId`))) join `User` on((`Account`.`userId` = `User`.`id`))) join `UserGroup` on((`Account`.`userGroupId` = `UserGroup`.`id`))) left join `PublicLink` on((`Account`.`id` = `PublicLink`.`itemId`))) */; +/*!50001 SET character_set_client = @saved_cs_client */; +/*!50001 SET character_set_results = @saved_cs_results */; +/*!50001 SET collation_connection = @saved_col_connection */; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +-- Dump completed on 2019-08-13 17:41:30 From 304f0a40669c8b6ae62170373db5777f23254a24 Mon Sep 17 00:00:00 2001 From: Benjamin Bohard Date: Wed, 14 Aug 2019 15:15:41 +0200 Subject: [PATCH 2/2] Test minimal eole-db configuration --- dicos/51_syspass.xml | 1 - tmpl/syspass-apache.conf | 4 ++-- tmpl/syspass-db.sql | 22 +--------------------- tmpl/syspass.yml | 5 +---- 4 files changed, 4 insertions(+), 28 deletions(-) diff --git a/dicos/51_syspass.xml b/dicos/51_syspass.xml index 09800eb..44fbeaf 100644 --- a/dicos/51_syspass.xml +++ b/dicos/51_syspass.xml @@ -12,7 +12,6 @@ syspass - diff --git a/tmpl/syspass-apache.conf b/tmpl/syspass-apache.conf index 7563648..bc0fee8 100644 --- a/tmpl/syspass-apache.conf +++ b/tmpl/syspass-apache.conf @@ -1,6 +1,6 @@ %set %%allowed_networks = ' '.join(['/'.join([%%str(ip), ip.syspass_allowed_netmask]) for ip in %%getVar('syspass_allowed_ip', [])]) -Alias /syspass /var/www/html/syspass - +Alias /syspass /srv/syspass + DirectoryIndex index.php Order Deny,Allow Deny from All diff --git a/tmpl/syspass-db.sql b/tmpl/syspass-db.sql index 6542921..d55e68f 100644 --- a/tmpl/syspass-db.sql +++ b/tmpl/syspass-db.sql @@ -371,16 +371,6 @@ CREATE TABLE `Config` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; --- --- Dumping data for table `Config` --- - -LOCK TABLES `Config` WRITE; -/*!40000 ALTER TABLE `Config` DISABLE KEYS */; -INSERT INTO `Config` VALUES ('config_backup','789c95585b6fdb3618ed6f31f6d8a5a464dd1ce421cda52d9666419c165b3120a0284a224c8b1a4925f682fef791929c387248a92ff205e7901fbfdbf9a83f171e58cc9637ff9cf12aa745ff718e149a2d127ff12417beb798bd7b0bf0aea90b8132f207d9ce8eaf8f3532b22133be6a1ee98a5e542865249b1dd30530047f8cf04db099066a13679336d0f88f48927dce7c942389f825c20d92729f908c11aed19ac81ae15776c53616cb507d4e72d430f549f0a636de829a310713183782e794911dc77e985af0cd76723c5af4928887d7ae824efc0d17ca2c1d83188ca3876118597b1003ab37eb2665b45ac9af68f39d9247690cf29db9b4c7b8a3ebd69521009328437f5abd8f30e64da5cecca38d95e7747f0fbfd27b8c47169704afbed51952449f369d82aeb8a2780f6d2d79dc7efd8c6439eb3312a628f7a3046539823e4e62fd2385fe7c1ee40027fa09334c62944083f7ac51cad2cf5c2a83d1c5c43846acec7ffbd6accfd225c72ba2bae6e35adbd49f590beab5e45657a2946a5d8f59b44b31182e6669f1d1bbaaffba78faedb6f9c1c32f63dc5d321baeacef832cf0b230ce02e2857874dfbe6c7c1f84066a6f7a246d0a13b3915e4ad67c9898d6ed4df390a78cf147925d6cd4b41adb277da5eb696d6e9fb4a4ff752d0b787367b6b6a4bdc3b873bb603c456c4990c0e533dada5768251562edc27d19381bee4e67a05e909f14bc79788f4f72e196909648ab6c971f9e26e3ea4410ada3e2fd2f2fb34bd140a7192f71b422346694c53f38918806b8a4fae353d9047f23f32d5c21529409a2558128a811897999b63b05ae9d6ede6acfd674338ce708758ef4ac0a69c0a7997cce4ba7c7efb635190fa341f6baf962adb5a119f48bae419dade69fc5870f30f18e60181f0547d1c80abc181cd7619bc63e90ca9415d2b63dfd7489ca1a5176daa8924c1569431816bad5a1067c29f87adf4b4ef05071dde0be8779819109ab3f0cf496fcdb10a9a66ba7212d096e0455db4931ee08c3d9c569ff30db43f70930ad6917d689e6ecb260423d6978a5740e54667c4c477c63a4ed918b6c8958ab9ea15e3e84c8cf21f6c3204f4090c61003986b71c1208a2210e5c48bb464cff32c08fc34f03d04731c7a499e85b9e73ebc20528f9cf2549e21b157c456bc2452525e99a98a379dc60177964aaac815aa8ab6c92d66b9b8bfbc754f87867157925ef0b557d77a0e1214b1df53d61077b3eba69bef44182b5bbe0ea20fc1114c40e40100dd8145753dc6b56bb97ea45a51c616b0a6c95bd72baba5067c49999ad8d2bb4b4f419ad7b731ab1f0dbe53dd016364aed45fbb061f84410441109bf9676e25eda6ee2f6b6ddbe4ab4c8af0aaa9efcb7e861d3d3cd9d4ba991de0ad25582a55cba122585da5c7d14301b137cc0e7eab273a757062ab451de9b0035a1ddb11763d3c8073e7edb3bf9c187db8e36d2cc683d0c57b897a8bb47b50b6a695bbdd900a8b6dad965d177976d6d825ebb261ac1d084eb1bee3c8f1191869d1d5d31dc5c3b058abf799a1f59a5ff18256c30418a79e73d3e927bded90920f5f1000e78b8817c2defb01e02caede79179b9a8a8354b36ef48ab5bb3d43e08731006e6d68073c76300558f1bad9328a91d299d0be24ba3efef93f6cb41c2c'),('config_backup_date','1565710668'),('lastupdatempass','1565709968'),('masterPwd','$2y$10$Rmw6ev7gLeN1mNMgzijwG.AaELVryBfh2ed3DCSDZetGZdQ6n3lGa'),('version','310.19072001'); -/*!40000 ALTER TABLE `Config` ENABLE KEYS */; -UNLOCK TABLES; - -- -- Table structure for table `CustomFieldData` -- @@ -490,16 +480,6 @@ CREATE TABLE `EventLog` ( ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; --- --- Dumping data for table `EventLog` --- - -LOCK TABLES `EventLog` WRITE; -/*!40000 ALTER TABLE `EventLog` DISABLE KEYS */; -INSERT INTO `EventLog` VALUES (1,1565710075,'admin',1,'192.168.122.1','save.config.general','','INFO'),(2,1565710538,'admin',1,'192.168.122.1','save.config.ldap','','INFO'),(3,1565710586,'admin',1,'192.168.122.1','save.config.ldap','','INFO'),(4,1565710668,'admin',1,'192.168.122.1','save.config.ldap','','INFO'),(5,1565710791,'admin',1,'192.168.122.1','show.authToken.create',NULL,'INFO'); -/*!40000 ALTER TABLE `EventLog` ENABLE KEYS */; -UNLOCK TABLES; - -- -- Table structure for table `ItemPreset` -- @@ -768,7 +748,7 @@ CREATE TABLE `User` ( LOCK TABLES `User` WRITE; /*!40000 ALTER TABLE `User` DISABLE KEYS */; -INSERT INTO `User` VALUES (1,'sysPass Admin',1,'admin',NULL,_binary '$2y$10$U/9taXi98cQJ3NWsJLvbi.9QlENO471.kl89wBGog2fbW7nbeURlq',_binary 'def50200358152864353d3ccd1cb1ba6a9ead3b573908ebd059b5384b94cd7c9446bc513a169c92878211d59010930a79736ba92c5913d54a33aab77b0f35efcb6f0e826643337a2b3402a7f584ea4b6d9c19f141b5e82b46989bec6977662d7',_binary 'def10000def502005a92dafd2fb8665c497948c5f47ea6cc69b1f1eb002c385d8f037ef1dcc9bfc221812e8ca93552ba3999d1db4d9ebee5588fd79224dc8df815c6d0a19a8be1278b748c794d46230feff99e442b6d17008b4d84ae939b05d95beae2ba2b5de82c7bcaa4bef2dcd8787fdb6b88810f343db43da12878a704e18f11efe67ec28066d8f2e51ed99971682a567595933a917eb3436ad98d9d0fecac944351152a5b035cc5f95ab304911cb13a895c0406a372f0514437c8792f2d4cdab779fe02510b17bc44214802d620ebc9212ff746b20862523203b33073b1e2c1b0aca551f6d7954da61813493f50a388c0a1f0f37ed0e8f900db35b1cfe4',NULL,NULL,4,1,'2019-08-13 17:34:19',NULL,1565709969,1,0,0,0,'',0,0,0,NULL); +INSERT INTO `User` VALUES (1,'sysPass Admin',1,'sp_admin',NULL,_binary '$2y$10$U/9taXi98cQJ3NWsJLvbi.9QlENO471.kl89wBGog2fbW7nbeURlq',_binary 'def50200358152864353d3ccd1cb1ba6a9ead3b573908ebd059b5384b94cd7c9446bc513a169c92878211d59010930a79736ba92c5913d54a33aab77b0f35efcb6f0e826643337a2b3402a7f584ea4b6d9c19f141b5e82b46989bec6977662d7',_binary 'def10000def502005a92dafd2fb8665c497948c5f47ea6cc69b1f1eb002c385d8f037ef1dcc9bfc221812e8ca93552ba3999d1db4d9ebee5588fd79224dc8df815c6d0a19a8be1278b748c794d46230feff99e442b6d17008b4d84ae939b05d95beae2ba2b5de82c7bcaa4bef2dcd8787fdb6b88810f343db43da12878a704e18f11efe67ec28066d8f2e51ed99971682a567595933a917eb3436ad98d9d0fecac944351152a5b035cc5f95ab304911cb13a895c0406a372f0514437c8792f2d4cdab779fe02510b17bc44214802d620ebc9212ff746b20862523203b33073b1e2c1b0aca551f6d7954da61813493f50a388c0a1f0f37ed0e8f900db35b1cfe4',NULL,NULL,4,1,'2019-08-13 17:34:19',NULL,1565709969,1,0,0,0,'',0,0,0,NULL); /*!40000 ALTER TABLE `User` ENABLE KEYS */; UNLOCK TABLES; diff --git a/tmpl/syspass.yml b/tmpl/syspass.yml index 1807abe..1d1dd78 100644 --- a/tmpl/syspass.yml +++ b/tmpl/syspass.yml @@ -20,11 +20,8 @@ dbport: %%syspass_db_port dbroot: %%syspass_db_root dbrootpwd: %%syspass_db_root_passwd_path %end if -createscript: "/usr/share/eole/db/syspass/gen/0_eole-syspass.sql" -sqlscripts: ["/usr/share/eole/db/syspass/gen/dbstructure.sql"] -updatescripts: [] pwd_files: - - {file: '%%container_path_web/var/www/html/syspass/app/config/config.xml', + - {file: '%%container_path_web/srv/syspass/app/config/config.xml', type: 'xml', pattern: " ", end_pattern: "",