platform/core/security/vist.git
4 years agoAdd virtual table API to README
Sangwan Kwon [Fri, 28 Feb 2020 06:09:21 +0000 (15:09 +0900)]
Add virtual table API to README

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoAdd schema API and query-builder API to README
Sangwan Kwon [Fri, 28 Feb 2020 05:18:50 +0000 (14:18 +0900)]
Add schema API and query-builder API to README

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoAdd main features to README
Sangwan Kwon [Thu, 27 Feb 2020 08:10:22 +0000 (17:10 +0900)]
Add main features to README

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoAdd comparision with osquery
Sangwan Kwon [Thu, 27 Feb 2020 07:54:15 +0000 (16:54 +0900)]
Add comparision with osquery

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoAdd terminology to README
Sangwan Kwon [Thu, 27 Feb 2020 07:01:33 +0000 (16:01 +0900)]
Add terminology to README

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoAdd the purpose of ViST to README
Sangwan Kwon [Thu, 27 Feb 2020 04:14:29 +0000 (13:14 +0900)]
Add the purpose of ViST to README

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoAdd virtual table description to README
Sangwan Kwon [Wed, 26 Feb 2020 05:13:41 +0000 (14:13 +0900)]
Add virtual table description to README

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoFix to get process identifier from cmdline
Sangwan Kwon [Tue, 25 Feb 2020 06:53:41 +0000 (15:53 +0900)]
Fix to get process identifier from cmdline

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agopolicy: Fix default admin identifier
Sangwan Kwon [Tue, 25 Feb 2020 05:57:18 +0000 (14:57 +0900)]
policy: Fix default admin identifier

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoDisable dlog on docker
Sangwan Kwon [Tue, 25 Feb 2020 05:17:49 +0000 (14:17 +0900)]
Disable dlog on docker

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agopolicy: Enhance testcase on bluetooth vtab
Sangwan Kwon [Mon, 24 Feb 2020 09:14:53 +0000 (18:14 +0900)]
policy: Enhance testcase on bluetooth vtab

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agopolicy: Add update query to bluetooth vtab
Sangwan Kwon [Mon, 24 Feb 2020 08:12:45 +0000 (17:12 +0900)]
policy: Add update query to bluetooth vtab

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoGet process identifier from cmdline
Sangwan Kwon [Mon, 24 Feb 2020 07:03:13 +0000 (16:03 +0900)]
Get process identifier from cmdline

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoEnable dlog on on-demand startup
Sangwan Kwon [Mon, 24 Feb 2020 04:46:19 +0000 (13:46 +0900)]
Enable dlog on on-demand startup

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agopolicy: Add bluetooth virtual table
Sangwan Kwon [Tue, 14 Jan 2020 01:56:31 +0000 (10:56 +0900)]
policy: Add bluetooth virtual table

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agopolicy: Draft bluetooth virtual table
Sangwan Kwon [Thu, 20 Feb 2020 04:33:06 +0000 (13:33 +0900)]
policy: Draft bluetooth virtual table

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoFix stringop-truncation warning
Sangwan Kwon [Wed, 19 Feb 2020 02:03:11 +0000 (11:03 +0900)]
Fix stringop-truncation warning

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoUpdate gbs-conf
Sangwan Kwon [Wed, 19 Feb 2020 01:51:00 +0000 (10:51 +0900)]
Update gbs-conf

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoquery-builder: Add README
Sangwan Kwon [Tue, 18 Feb 2020 05:23:29 +0000 (14:23 +0900)]
query-builder: Add README

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoquery-builder: Bump latest interface to testacase
Sangwan Kwon [Tue, 18 Feb 2020 04:48:18 +0000 (13:48 +0900)]
query-builder: Bump latest interface to testacase

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoquery-builder: Bind operand to insert clause
Sangwan Kwon [Tue, 18 Feb 2020 04:30:19 +0000 (13:30 +0900)]
query-builder: Bind operand to insert clause

ex) AdminTable.insert(Admin::Id = id, Admin::Pkg = "pkg", Admin::Key = "key");
  - Before: "INSERT INTO admin (id, pkg, key) VALUES (?, ?, ?)"
  - Afater: "INSERT INTO admin (id, pkg, key) VALUES (0, 'pkg', 'key')"

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoquery-builder: Bind operand to update clause
Sangwan Kwon [Tue, 18 Feb 2020 03:42:47 +0000 (12:42 +0900)]
query-builder: Bind operand to update clause

ex) AdminTable.update(Admin::Id = id, Admin::Pkg = "pkg");
  - Before: "UPDATE admin SET id = ?, pkg = ?"
  - After: "UPDATE admin SET id = 1, pkg = 'pkg'"

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoquery-builder: Bind operand to where clause
Sangwan Kwon [Mon, 17 Feb 2020 11:46:38 +0000 (20:46 +0900)]
query-builder: Bind operand to where clause

ex) AdminTable.select(Admin::Uid, Admin::Key).where(Admin::Id > 3);
  - Before: "SELECT uid, key FROM admin WHERE id > ?"
  - After: "SELECT uid, key FROM admin WHERE id > 3"

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoquery-builder: Refactor expression interface
Sangwan Kwon [Tue, 4 Feb 2020 12:23:11 +0000 (21:23 +0900)]
query-builder: Refactor expression interface

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoquery-builder: Add macros
Sangwan Kwon [Tue, 4 Feb 2020 11:04:33 +0000 (20:04 +0900)]
query-builder: Add macros

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoquery-builder: Remove deprecated code
Sangwan Kwon [Tue, 4 Feb 2020 10:11:11 +0000 (19:11 +0900)]
query-builder: Remove deprecated code

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoquery-builder: Refactor insert interface
Sangwan Kwon [Tue, 4 Feb 2020 09:39:14 +0000 (18:39 +0900)]
query-builder: Refactor insert interface

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoquery-builder: Refactor update interface
Sangwan Kwon [Tue, 4 Feb 2020 09:32:09 +0000 (18:32 +0900)]
query-builder: Refactor update interface

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoquery-builder: Refactor select interface
Sangwan Kwon [Tue, 4 Feb 2020 06:10:56 +0000 (15:10 +0900)]
query-builder: Refactor select interface

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoc++17: Use fold expression with std::apply
Sangwan Kwon [Fri, 31 Jan 2020 04:41:06 +0000 (13:41 +0900)]
c++17: Use fold expression with std::apply

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoFix query-builder testcase name
Sangwan Kwon [Fri, 31 Jan 2020 01:06:46 +0000 (10:06 +0900)]
Fix query-builder testcase name

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoMerge pull request #62 from RS7-SECIOTSW/gcc9
권상완/Security 2Lab(SR)/Engineer/삼성전자 [Thu, 30 Jan 2020 09:43:12 +0000 (18:43 +0900)]
Merge pull request #62 from RS7-SECIOTSW/gcc9

Bump query-builder to c++17

4 years agoApply latest query-builder to policy-storage
Sangwan Kwon [Thu, 30 Jan 2020 06:08:12 +0000 (15:08 +0900)]
Apply latest query-builder to policy-storage

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoc++17: Refactor with template class type deduction
Sangwan Kwon [Thu, 30 Jan 2020 05:53:14 +0000 (14:53 +0900)]
c++17: Refactor with template class type deduction

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoRefactor CRTP functions
Sangwan Kwon [Thu, 30 Jan 2020 05:23:23 +0000 (14:23 +0900)]
Refactor CRTP functions

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoc++17: Refactor database with generic lambda
Sangwan Kwon [Thu, 30 Jan 2020 04:13:32 +0000 (13:13 +0900)]
c++17: Refactor database with generic lambda

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoc++17: Refactor table with generic lambda
Sangwan Kwon [Thu, 23 Jan 2020 10:09:29 +0000 (19:09 +0900)]
c++17: Refactor table with generic lambda

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
Move ColumnPack to Table

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoc++17: Refactor table with class type deduction
Sangwan Kwon [Thu, 23 Jan 2020 06:26:09 +0000 (15:26 +0900)]
c++17: Refactor table with class type deduction

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoBump to c++17
Sangwan Kwon [Thu, 23 Jan 2020 04:39:53 +0000 (13:39 +0900)]
Bump to c++17

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoBump to gcc-9 on docker
Sangwan Kwon [Thu, 23 Jan 2020 04:38:46 +0000 (13:38 +0900)]
Bump to gcc-9 on docker

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoFix default admin path
Sangwan Kwon [Fri, 17 Jan 2020 06:23:12 +0000 (15:23 +0900)]
Fix default admin path

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoAdd access-control logic to policy-admin
Sangwan Kwon [Fri, 17 Jan 2020 05:37:07 +0000 (14:37 +0900)]
Add access-control logic to policy-admin

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoGet process executable path from pid
Sangwan Kwon [Fri, 17 Jan 2020 02:29:29 +0000 (11:29 +0900)]
Get process executable path from pid

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoAdd GetPeerCredentials() to rmi::Gateway
Sangwan Kwon [Thu, 16 Jan 2020 09:00:27 +0000 (18:00 +0900)]
Add GetPeerCredentials() to rmi::Gateway

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoGet credentials from peer
Sangwan Kwon [Thu, 16 Jan 2020 06:50:34 +0000 (15:50 +0900)]
Get credentials from peer

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoAllocate server session per thread
Sangwan Kwon [Wed, 15 Jan 2020 08:17:55 +0000 (17:17 +0900)]
Allocate server session per thread

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoImport thread-pool from klay
Sangwan Kwon [Wed, 15 Jan 2020 05:29:37 +0000 (14:29 +0900)]
Import thread-pool from klay

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoRemove boost dependency from rmi
Sangwan Kwon [Wed, 15 Jan 2020 05:06:19 +0000 (14:06 +0900)]
Remove boost dependency from rmi

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoFix compiler warnings
Sangwan Kwon [Tue, 14 Jan 2020 06:07:33 +0000 (15:07 +0900)]
Fix compiler warnings

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoMerge pull request #59 from RS7-SECIOTSW/minimize-osquery-code
권상완/Security 2Lab(SR)/Engineer/삼성전자 [Wed, 15 Jan 2020 04:16:49 +0000 (13:16 +0900)]
Merge pull request #59 from RS7-SECIOTSW/minimize-osquery-code

Minimize osquery code

4 years agoosquery: Remove database
Sangwan Kwon [Tue, 14 Jan 2020 05:29:47 +0000 (14:29 +0900)]
osquery: Remove database

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoosquery: Remove events
Sangwan Kwon [Tue, 14 Jan 2020 05:08:10 +0000 (14:08 +0900)]
osquery: Remove events

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoosquery: Remove process
Sangwan Kwon [Tue, 14 Jan 2020 04:52:41 +0000 (13:52 +0900)]
osquery: Remove process

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoosquery: Remove dispatcher
Sangwan Kwon [Tue, 14 Jan 2020 04:16:09 +0000 (13:16 +0900)]
osquery: Remove dispatcher

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoosquery: Remove config
Sangwan Kwon [Tue, 14 Jan 2020 04:01:43 +0000 (13:01 +0900)]
osquery: Remove config

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoosquery: Remove hashing
Sangwan Kwon [Tue, 14 Jan 2020 02:15:48 +0000 (11:15 +0900)]
osquery: Remove hashing

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoAdd ServiceType to rmi::Gateway
Sangwan Kwon [Mon, 13 Jan 2020 09:01:25 +0000 (18:01 +0900)]
Add ServiceType to rmi::Gateway

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoFix stringop-truncation warning
Sangwan Kwon [Fri, 10 Jan 2020 06:58:37 +0000 (15:58 +0900)]
Fix stringop-truncation warning

Pathname sockets: The pathname in sun_path should be null-terminated.
ref: http://man7.org/linux/man-pages/man7/unix.7.html

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoApply shutdown condition to service
Sangwan Kwon [Thu, 9 Jan 2020 09:32:20 +0000 (18:32 +0900)]
Apply shutdown condition to service

If timeout is occured and there are no activated admins,
shutdown the service

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoAdd admin api to check for activation
Sangwan Kwon [Thu, 9 Jan 2020 06:19:46 +0000 (15:19 +0900)]
Add admin api to check for activation

API::Admin::IsActivated() in vist-policy

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoApply timeout to ondemand service
Sangwan Kwon [Thu, 9 Jan 2020 05:39:58 +0000 (14:39 +0900)]
Apply timeout to ondemand service

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoAdd stopper to mainloop
Sangwan Kwon [Thu, 9 Jan 2020 04:54:20 +0000 (13:54 +0900)]
Add stopper to mainloop

Stopper is a predicate what returns a condition to stop mainloop
when timeout is occured.

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoAdd mainloop testcase
Sangwan Kwon [Thu, 9 Jan 2020 04:28:15 +0000 (13:28 +0900)]
Add mainloop testcase

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoRefactor mainloop
Sangwan Kwon [Tue, 7 Jan 2020 06:19:08 +0000 (15:19 +0900)]
Refactor mainloop

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoAdd compile-time switching to RMI socket
Sangwan Kwon [Mon, 6 Jan 2020 09:56:16 +0000 (18:56 +0900)]
Add compile-time switching to RMI socket

We should apply on-demand service based systemd.
But docker does not support systemd.
So, we need to switch socket at compile-time.

- Docker: boost based socket
- Tizen: systemd based socket

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoReply error message when server's task failed
Sangwan Kwon [Mon, 6 Jan 2020 06:18:26 +0000 (15:18 +0900)]
Reply error message when server's task failed

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoMake Client to abstract class
Sangwan Kwon [Mon, 6 Jan 2020 05:24:43 +0000 (14:24 +0900)]
Make Client to abstract class

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoAdd sever-client by ondemand way
Sangwan Kwon [Fri, 3 Jan 2020 07:57:23 +0000 (16:57 +0900)]
Add sever-client by ondemand way

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoAdd socket connection
Sangwan Kwon [Thu, 2 Jan 2020 06:58:09 +0000 (15:58 +0900)]
Add socket connection

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoAdd unix socket feature
Sangwan Kwon [Thu, 2 Jan 2020 06:19:56 +0000 (15:19 +0900)]
Add unix socket feature

This would be changed to systemd socket.

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoDetach server-client interface on RMI
Sangwan Kwon [Thu, 2 Jan 2020 05:57:05 +0000 (14:57 +0900)]
Detach server-client interface on RMI

This is for supporting both general service and on-demand service.

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoUpdate README.md
권상완/Security 2Lab(SR)/Engineer/삼성전자 [Mon, 6 Jan 2020 04:40:30 +0000 (13:40 +0900)]
Update README.md

4 years agoMake vist-rmi visibility to hidden
Sangwan Kwon [Thu, 2 Jan 2020 04:57:50 +0000 (13:57 +0900)]
Make vist-rmi visibility to hidden

Library size is reduced from 1.5M 1.4M (DEBUG MODE)
(ref. size --format=SysV ${libname})

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoDetach vist-rmi to shared library
Sangwan Kwon [Thu, 2 Jan 2020 04:38:08 +0000 (13:38 +0900)]
Detach vist-rmi to shared library

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoRemove timeout feature on docker-rmi
Sangwan Kwon [Tue, 31 Dec 2019 07:22:52 +0000 (16:22 +0900)]
Remove timeout feature on docker-rmi

Since docker does not support systemd, there is no need to exist
timeout feature.

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoReorganize rmi direcorty
Sangwan Kwon [Tue, 31 Dec 2019 07:13:54 +0000 (16:13 +0900)]
Reorganize rmi direcorty

- vist/rmi: API header to be exposed
- vist/rmi/impl: Implementation to be hidden

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoAdd systemd socket
Sangwan Kwon [Tue, 31 Dec 2019 04:39:36 +0000 (13:39 +0900)]
Add systemd socket

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoAdd Timer for on-demand service
Sangwan Kwon [Mon, 30 Dec 2019 04:47:43 +0000 (13:47 +0900)]
Add Timer for on-demand service

- Timer::ExecOnce(task, predicate, 1);
Check every 1 second until predicate() returns true and
execute task() once when predicates() returns true.

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoChange klass instance type on RMI
Sangwan Kwon [Fri, 27 Dec 2019 06:38:13 +0000 (15:38 +0900)]
Change klass instance type on RMI

There are two main issues that the type is changed from shared_ptr
to reference.

First, if klass instance type is shared_ptr,
the destuctor of klass should be public not private.
(This coflicts with meyer singleton.)

Second, if we pass this pointer of object to EXPOSE method,
the object indicated this pointer should be destroyed by shared_ptr.
In such a case, the object should not be static type.
(It causes SEGFAULT by deallocating invalid pointer.)

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoRemove existing plugins before install
Sangwan Kwon [Fri, 27 Dec 2019 04:34:17 +0000 (13:34 +0900)]
Remove existing plugins before install

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoApply on-demand service by systemd
Sangwan Kwon [Thu, 26 Dec 2019 10:04:28 +0000 (19:04 +0900)]
Apply on-demand service by systemd

This patch is only for Tizen. The docker does not include all systemd
features by design. The Docker is designed for process isolation,
not for OS virtualization, so there are no other OS processes and daemons
running inside the container like systemd.

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoMake policy plugins testable
Sangwan Kwon [Thu, 26 Dec 2019 04:47:56 +0000 (13:47 +0900)]
Make policy plugins testable

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoEnable dlog only when the vist is running on Tizen
Sangwan Kwon [Mon, 23 Dec 2019 05:13:00 +0000 (14:13 +0900)]
Enable dlog only when the vist is running on Tizen

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoAdd filter to VirtualTable
Sangwan Kwon [Mon, 23 Dec 2019 02:39:20 +0000 (11:39 +0900)]
Add filter to VirtualTable

- usage -
VirtualTable<Policy<int>> table;
auto row = table.filter(&Policy<int>::name, "sample-int-policy");
auto value = row[&Policy<int>::value];

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoAdd convenience macro to RMI
Sangwan Kwon [Fri, 20 Dec 2019 06:56:28 +0000 (15:56 +0900)]
Add convenience macro to RMI

The purpose of these macros(EXPOSE, REMOTE_METHOD) is to allow
users to use RMI only with member function type.

- server side -
EXPOSE(gateway, this, &Vist::query);

- client side -
auto query = REMOTE_METHOD(remote, &Vist::query);
auto rows = query.invoke<Rows>(statement);

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoRename RMI Exposer to Gateway
Sangwan Kwon [Wed, 18 Dec 2019 09:22:31 +0000 (18:22 +0900)]
Rename RMI Exposer to Gateway

Also Stringfy is changed to Stringify

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoUpdate README.md
Sangwan Kwon [Tue, 17 Dec 2019 05:51:11 +0000 (14:51 +0900)]
Update README.md

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoEnhance error handling on RMI
Sangwan Kwon [Fri, 13 Dec 2019 06:04:33 +0000 (15:04 +0900)]
Enhance error handling on RMI

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoFix Protocol::Task signature
Sangwan Kwon [Fri, 13 Dec 2019 05:04:11 +0000 (14:04 +0900)]
Fix Protocol::Task signature

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoRemove custom deleter on pimpl pattern
Sangwan Kwon [Thu, 12 Dec 2019 11:44:40 +0000 (20:44 +0900)]
Remove custom deleter on pimpl pattern

Custom deleter is needed when 'template constructor' uses.
Because 'template constructor' is defined in header and
the compiler has to know how to delete impl instance.

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoRemove unix socket based communication
Sangwan Kwon [Thu, 12 Dec 2019 10:24:51 +0000 (19:24 +0900)]
Remove unix socket based communication

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoAdd boost::asio based RMI
Sangwan Kwon [Thu, 12 Dec 2019 10:11:15 +0000 (19:11 +0900)]
Add boost::asio based RMI

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoAdd transaction feature to database
Sangwan Kwon [Thu, 12 Dec 2019 02:57:48 +0000 (11:57 +0900)]
Add transaction feature to database

- performance (500 insert statements) -
DatabaseTests.no_transaction (2380 ms)
DatabaseTests.transaction (16 ms)

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoSupport policy activation to client
Sangwan Kwon [Tue, 10 Dec 2019 04:58:50 +0000 (13:58 +0900)]
Support policy activation to client

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoAdd activation property to policy-admin
Sangwan Kwon [Mon, 2 Dec 2019 08:53:23 +0000 (17:53 +0900)]
Add activation property to policy-admin

vist-policy has activated state when any of policy-admins are activated.

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoMake vist testable on docker
Sangwan Kwon [Mon, 2 Dec 2019 06:34:16 +0000 (15:34 +0900)]
Make vist testable on docker

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoChange database from klay to internal
Sangwan Kwon [Fri, 29 Nov 2019 06:47:04 +0000 (15:47 +0900)]
Change database from klay to internal

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoImport database code from klay
Sangwan Kwon [Fri, 29 Nov 2019 06:21:29 +0000 (15:21 +0900)]
Import database code from klay

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoChange filesystem from klay to boost
Sangwan Kwon [Fri, 29 Nov 2019 04:59:32 +0000 (13:59 +0900)]
Change filesystem from klay to boost

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoFix to use vist exception
Sangwan Kwon [Thu, 28 Nov 2019 07:55:08 +0000 (16:55 +0900)]
Fix to use vist exception

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>