3
0

180 Commits

Author SHA1 Message Date
Denis Arh
5bfafd4adc Support run-as for automation scripts
Add grpc-server capabilities for system service (make jwt, find user by id)
Add jwt generation (via grpc) to compose for run-as automation-scripts
Add SuperUser for system-level tasks and operations that are ran in the background w/o initiator
and require permision checking
2019-08-23 13:49:36 +02:00
Denis Arh
6463df9af1 Improvements of automation trigger management 2019-08-23 13:49:36 +02:00
Denis Arh
69602148dc Add ability to precheck (in db query) access on resources 2019-08-14 17:19:10 +02:00
Denis Arh
aabff3df6e Add sentry wrapper, improve recover() logic 2019-08-14 17:07:56 +02:00
Denis Arh
c1e3231d00 Add support for membership policy, featured channels 2019-08-08 11:43:51 +02:00
Tit Petric
cc3c100c62 replace profiler with logger, update logger option to bool 2019-08-06 20:27:35 +00:00
Denis Arh
ba3b59acd3 Unread refactoring, moving logic to backend 2019-07-19 22:03:39 +02:00
Denis Arh
9f19a49317 Improve DB conn. code, make retry/timeout configurable 2019-07-17 10:20:41 +02:00
Denis Arh
ab4b74620f Improve settings auto-discovery, make it provisionable 2019-07-14 11:24:43 +02:00
Denis Arh
60ad32e440 Add support for error (panic) reporting through Sentry 2019-07-03 16:35:06 +02:00
Denis Arh
bb447ee795 Chan & thread unread fixes 2019-06-25 08:45:22 +02:00
Denis Arh
328bdeda07 Update mocks & tests 2019-05-28 20:53:35 +02:00
Denis Arh
4d06b3e942 Improve logging info when connecting to the database 2019-05-28 18:56:37 +02:00
Denis Arh
22476933f4 Improve cli env setup & running 2019-05-26 08:41:20 +02:00
Denis Arh
36b32fa2fe Move logger package from internal to pkg 2019-05-24 13:30:48 +02:00
Denis Arh
5a9bce44e8 Cleanup internal, vendors, cleanup cmd/*
Introduces /pkg for non-intenral packages
2019-05-24 12:44:56 +02:00
Denis Arh
0bf5d5d24f Fix comments on permissions Check() function 2019-05-20 15:37:16 +02:00
Denis Arh
68387f6bd2 Fix bug in AccessControl check when user does not have any roles 2019-05-20 14:14:53 +02:00
Tit Petric
68dc98ad92 add(all): test files for type-set
Signed-off-by: Tit Petric <black@scene-si.org>
2019-05-19 15:58:39 +02:00
Tit Petric
4a6798ea3f upd(internal/http): perform internal test for http client
Signed-off-by: Tit Petric <black@scene-si.org>
2019-05-19 14:41:15 +02:00
Denis Arh
0baf38fdb5 Protect record values on non-updatable fields 2019-05-16 11:31:41 +02:00
Denis Arh
7468f0a855 Refactor permission whitelist to maintain stable sort order 2019-05-15 21:16:13 +02:00
Denis Arh
669820cdde Add permission.Whitelist Flatten() func
It generates json-rest friendly structure
2019-05-15 11:14:21 +02:00
Denis Arh
cc89435b9d Improve permission rules flush procedure 2019-05-15 11:13:38 +02:00
Denis Arh
c15eb72b06 Cleanup testing procedures
- remove "unit" build flag
 - make sure tests without build flag (integration, external) run
   without deps
 - move unit-tests step in front of "docker image build" drone pipeline
2019-05-14 14:51:57 +02:00
Denis Arh
6a5e5dead2 Fix auth flow, allow case with missing JWT 2019-05-13 18:29:34 +02:00
Denis Arh
e5d5cc16ad Remove obsolete code, placeholders 2019-05-13 13:23:19 +02:00
Denis Arh
b0b7c7d391 Allow HTTP requests to insecure servers
With SYSTEM_HTTP_CLIENT_TSL_INSECURE we reconfigure DefaultTransport and allow requests to insecure
hosts. This has direct effect on OIDC autodiscovery.
2019-05-13 09:36:33 +02:00
Denis Arh
2ad7b466f1 Refactor JWT/ctx, include role membership 2019-05-12 23:40:39 +02:00
Denis Arh
d3f7335e25 Fix tests, add temp testing workarounds, permissiong service mocks 2019-05-10 13:05:47 +02:00
Denis Arh
9e043b34fd Resource/operation combo whitelist (refactored validation) 2019-05-10 11:33:32 +02:00
Denis Arh
f113439d23 Implement permission rule storage and watcher
Plus some additional naming changes (value => access)
2019-05-10 09:44:25 +02:00
Denis Arh
4dece123a5 Refactor all services & controllers and implement new a/c pattern 2019-05-09 16:55:18 +02:00
Denis Arh
087ba7c92d Permission rules refactored 2019-05-08 18:02:46 +02:00
Denis Arh
6e00826dc8 Rename json names for ID props 2019-05-08 11:23:11 +02:00
Denis Arh
f7905bcf37 Fix & improve remote address handling (on req. log) 2019-05-07 23:09:16 +02:00
Denis Arh
970f545156 Move avail. route output to /routes endpoint 2019-05-07 21:18:23 +02:00
Denis Arh
6e8fbe8935 Port monitor log to zap logger 2019-05-07 21:18:23 +02:00
Denis Arh
aea9741a2b Improve logging, migrate to zap, use requestID
- migrate from log to go.uber.org/zap package
 - add requestID header with sticky log field
 - push logging via context to REST controllers & HTTP middleware
 - enhance request/resnpose logging
 - add service logging framework
 - add ZapProfiler for db query profiling
2019-05-07 21:18:23 +02:00
Denis Arh
f557247cde Extend default JWT lifetime to 30 days 2019-05-06 08:02:37 +02:00
Denis Arh
1ce5b355ae Improves presence/activity handling over websocket 2019-04-27 14:20:33 +02:00
Denis Arh
980b6d581c Refactor JWT encoder/handler
Handler is no longer passed as argument into routes etc but initialized in the Init()
and stored into auth.DefaultJwtHandler.
2019-04-27 13:17:37 +02:00
Tit Petric
2952cebb62 upd(internal): encode ChannelID as string 2019-04-26 18:37:56 +02:00
Denis Arh
dc2dd4c787 Add missing userID field to output payload 2019-04-26 17:15:23 +02:00
Denis Arh
3026a594ed Decupling system & messaging, removing Organisation type mess 2019-04-26 14:37:23 +02:00
Denis Arh
bc181ee9a2 User list is no longer sent on ws connect 2019-04-26 13:51:23 +02:00
Denis Arh
b0239761f7 User/chan/messaging activity refactored 2019-04-26 13:34:35 +02:00
Denis Arh
d533cca1d5 Move message filtering to /search endpoint 2019-04-26 09:34:23 +02:00
Denis Arh
ed078ce456 Move cmd execution to REST endpoint, remove /echo, add /me 2019-04-26 07:18:18 +02:00
Denis Arh
2132d1fdca Add url/param signing capapbilities to support access to attachments 2019-04-25 18:24:41 +02:00