====== Password protection for settings ====== ==== Overview ==== To enable password protection for certain options in COBI.wms, the corresponding COBI.wms tenant database (schema/database) must be extended by the table ''SETTINGS''. The table ''SETTINGS'' contains: * ''ID'' – key of the setting (e.g. ''PASSWORD'') * ''VALUE'' – value of the setting (here: the password) If a password is stored in ''VALUE'', COBI.wms will request this password when changing protected options. ==== Example (Screenshot) ==== The screenshot shows a HANA query on ''"COBIWMS"."SETTINGS"''. The result contains: * ''ID'' = ''PASSWORD'' * ''VALUE'' = ''abcd'' {{:cobi.wms:settings.png?700|}} ==== Implementation ==== === SAP HANA === '''Create table (if not exists):''' CREATE COLUMN TABLE "SETTINGS" ( "ID" NVARCHAR(50) NOT NULL, "VALUE" NVARCHAR(255), PRIMARY KEY ("ID") ); '''Set / update password:''' INSERT INTO "SETTINGS" ("ID", "VALUE") VALUES ('PASSWORD', 'YourPasswordHere'); UPDATE "SETTINGS" SET "VALUE" = 'YourPasswordHere' WHERE "ID" = 'PASSWORD'; === Microsoft SQL Server (MSSQL) === '''Create table (if not exists):''' CREATE TABLE [dbo].[SETTINGS] ( [ID] NVARCHAR(50) NOT NULL PRIMARY KEY, [VALUE] NVARCHAR(255) NULL ); '''Set password (UPSERT):''' IF EXISTS (SELECT 1 FROM [dbo].[SETTINGS] WHERE [ID] = N'PASSWORD') BEGIN UPDATE [dbo].[SETTINGS] SET [VALUE] = N'YourPasswordHere' WHERE [ID] = N'PASSWORD'; END ELSE BEGIN INSERT INTO [dbo].[SETTINGS] ([ID], [VALUE]) VALUES (N'PASSWORD', N'YourPasswordHere'); END ==== Note ==== Apply the change in each COBI.wms tenant database where password protection should be used.