cobi.wms:management_database
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
cobi.wms:management_database [2023/06/28 15:37] – [Optional columns] tkammer | cobi.wms:management_database [2025/09/18 10:16] (current) – [Importing licenses] thuth | ||
---|---|---|---|
Line 74: | Line 74: | ||
The '' | The '' | ||
- | The '' | + | The '' |
===== Devices and Users ===== | ===== Devices and Users ===== | ||
Line 139: | Line 140: | ||
==== Separate login per user ==== | ==== Separate login per user ==== | ||
- | |||
- | Note: This feature requires the app to be connected via Service Layer. | ||
You can specify a separate SAP Business One login for each COBI.wms user or device. | You can specify a separate SAP Business One login for each COBI.wms user or device. | ||
- | To make use of this feature, first make sure that the Users table in the **COBI.wms Management Database** contains the '' | + | Specify |
- | + | ||
- | <code sql> | + | |
- | -- MS SQL Server ----------- | + | |
- | use cobiwms; | + | |
- | alter table users | + | |
- | add apiUser nvarchar(255), | + | |
- | apiPass nvarchar(255); | + | |
- | drop view cwms__version; | + | |
- | ---------------------------- | + | |
- | + | ||
- | -- SAP HANA --------------- | + | |
- | set schema cobiwms; | + | |
- | alter table users | + | |
- | add ( apiUser nvarchar(255), | + | |
- | apiPass nvarchar(255) ); | + | |
- | drop view cwms__version; | + | |
- | ---------------------------- | + | |
- | </ | + | |
- | + | ||
- | (The "drop view" at the end will make the app re-generate some stored procedures on next login.) | + | |
- | + | ||
- | After that, you can overwrite | + | |
<code sql> | <code sql> | ||
Line 195: | Line 172: | ||
Once you've updated the '' | Once you've updated the '' | ||
- | **WARNING: | + | **WARNING: |
+ | |||
+ | ==== Avoiding plaintext passwords in the database ==== | ||
+ | |||
+ | Normally, the password of an SAP Business One user has to be specified either in the '' | ||
+ | |||
+ | (Technical details: It makes no sense to encrypt these columns, because the key to decrypt them would need to be deployed as part of the app, such that anyone could access it by analyzing the Android app. We cannot store a hashed value either, because the app needs to forward the plaintext password to Service Layer when logging in to SAP Business One.) | ||
+ | |||
+ | To avoid this issue, the following strategy can be used: | ||
+ | |||
+ | - Leave the '' | ||
+ | - Create COBI.wms users with the same username and password as SAP Business One users | ||
+ | |||
+ | When you enter a username & password in the COBI.wms login screen, the app first uses these to perform a COBI.wms user login. | ||
+ | |||
+ | (Technical details: The password of a COBI.wms user is //not// stored in plaintext in the database, only a secure hash value of it is stored, since it doesn' | ||
Line 215: | Line 207: | ||
insert into licenses (license) values (' | insert into licenses (license) values (' | ||
insert into licenses (license) values (' | insert into licenses (license) values (' | ||
+ | </ | ||
+ | |||
+ | The licenses table also has an optional '' | ||
+ | |||
+ | <code sql> | ||
+ | insert into licenses (license, notes) values (' | ||
+ | insert into licenses (license, notes) values (' | ||
+ | insert into licenses (license, notes) values (' | ||
</ | </ | ||
Line 285: | Line 285: | ||
* '' | * '' | ||
* '' | * '' | ||
+ | * '' | ||
* '' | * '' | ||
* '' | * '' | ||
Line 291: | Line 292: | ||
* '' | * '' | ||
* '' | * '' | ||
- | * '' | + | * '' |
* '' | * '' | ||
* '' | * '' | ||
* '' | * '' | ||
* '' | * '' | ||
+ | * '' | ||
For your convenience, | For your convenience, | ||
Line 306: | Line 308: | ||
exec setUserPermission ' | exec setUserPermission ' | ||
exec setUserPermission ' | exec setUserPermission ' | ||
+ | exec setUserPermission ' | ||
exec setUserPermission ' | exec setUserPermission ' | ||
exec setUserPermission ' | exec setUserPermission ' | ||
Line 317: | Line 320: | ||
exec setUserPermission ' | exec setUserPermission ' | ||
exec setUserPermission ' | exec setUserPermission ' | ||
+ | exec setUserPermission ' | ||
-- SAP HANA | -- SAP HANA | ||
Line 324: | Line 328: | ||
call setUserPermission(' | call setUserPermission(' | ||
call setUserPermission(' | call setUserPermission(' | ||
+ | call setUserPermission(' | ||
call setUserPermission(' | call setUserPermission(' | ||
call setUserPermission(' | call setUserPermission(' | ||
Line 335: | Line 340: | ||
call setUserPermission(' | call setUserPermission(' | ||
call setUserPermission(' | call setUserPermission(' | ||
+ | call setUserPermission(' | ||
</ | </ | ||
Line 348: | Line 354: | ||
exec setDevicePermission deviceID, ' | exec setDevicePermission deviceID, ' | ||
exec setDevicePermission deviceID, ' | exec setDevicePermission deviceID, ' | ||
+ | exec setDevicePermission deviceID, ' | ||
exec setDevicePermission deviceID, ' | exec setDevicePermission deviceID, ' | ||
exec setDevicePermission deviceID, ' | exec setDevicePermission deviceID, ' | ||
Line 359: | Line 366: | ||
exec setDevicePermission deviceID, ' | exec setDevicePermission deviceID, ' | ||
exec setDevicePermission deviceID, ' | exec setDevicePermission deviceID, ' | ||
+ | exec setDevicePermission deviceID, ' | ||
-- SAP HANA | -- SAP HANA | ||
Line 366: | Line 374: | ||
call setDevicePermission(deviceID, | call setDevicePermission(deviceID, | ||
call setDevicePermission(deviceID, | call setDevicePermission(deviceID, | ||
+ | call setDevicePermission(deviceID, | ||
call setDevicePermission(deviceID, | call setDevicePermission(deviceID, | ||
call setDevicePermission(deviceID, | call setDevicePermission(deviceID, | ||
Line 377: | Line 386: | ||
call setDevicePermission(deviceID, | call setDevicePermission(deviceID, | ||
call setDevicePermission(deviceID, | call setDevicePermission(deviceID, | ||
+ | call setDevicePermission(deviceID, | ||
</ | </ | ||
Change '' | Change '' |
cobi.wms/management_database.1687959454.txt.gz · Last modified: by tkammer