379 Commits

Author SHA1 Message Date
Dave Horton
307787526d bugfix: one account could potentially use speech creds from a different account 2023-05-30 14:58:54 -04:00
Hoan Luu Huu
d09dca47b9 wip (#172) 2023-05-24 08:29:12 -04:00
Hoan Luu Huu
34895daf4f fix admin setting issue (#168) 2023-05-11 20:27:19 -04:00
Hoan Luu Huu
3486ff958c feat: add protocol to sip-gateways (#166)
* feat: add protocol to sip-gateways

* add tls/srtp options

* fix sql

* update db script has new changes

---------

Co-authored-by: Dave Horton <daveh@beachdognet.com>
2023-05-10 15:41:39 -04:00
Hoan Luu Huu
2aa3d40268 fix: remove metadata out of rest:dial (#165) 2023-05-07 08:33:56 -04:00
Hoan Luu Huu
148fc49f06 feat: add metadata for create call (#164) 2023-05-07 07:21:46 -04:00
Dave Horton
02806a109c added schema changes for LCR (#150)
* added schema changes for LCR

* fix FK

* first draft

* force drop table

* add testcases

* swagger updated

* update code

* wip: add service provider LCR

* fix userpermission on lcr

* add lcr.is_active

* remove FK constraints on lcr

* wip

* wip

* wip

* fix: review comments

* fix: final review

* fix: final review

* fix: update database schema

* fix: update database schema

* fix: update database schema

* update schema

* fix: review comments

* lcr_routes.priority should not be unique

* fix review comments

---------

Co-authored-by: Quan HL <quan.luuhoang8@gmail.com>
2023-05-05 20:09:34 -04:00
Hoan Luu Huu
4b70c6458a feat: system information (#162) 2023-05-04 13:12:29 -04:00
Paulo Telles
aadb0b15f2 change response text to avoid reveal user's data (#161)
* change response text to avoid reveal user's data

* include log into forgot password

---------

Co-authored-by: p.souza <p.souza@cognigy.com>
2023-05-04 08:39:04 -04:00
Anton Voylenko
3997f57365 update swagger docs (#157) 2023-05-01 10:50:22 -04:00
Markus Frindt
1dcc92a177 Fix bug in forgot-password req.user destruction (#159)
* Fix bug in forgot-password req.user destruction

* add test for forgot password

---------

Co-authored-by: Markus Frindt <m.frindt@cognigy.com>
2023-04-28 08:43:23 -04:00
EgleH
105aa16ffe SP users were not able to update Phone numbers (#158)
Co-authored-by: eglehelms <e.helms@cognigy.com>
2023-04-24 07:46:57 -04:00
Anton Voylenko
a574045f8a endpoint to retrieve active queues (#156) 2023-04-22 14:48:07 -04:00
Anton Voylenko
af3d03bef9 support filtering for retrieve info endpoint (#153)
* support filtering for retrieve info endpoint

* bump realtimedb-helpers
2023-04-19 07:33:24 -04:00
Anton Voylenko
5b1b50c3a3 remove unnecessary await (#152) 2023-04-18 13:01:38 -04:00
EgleH
ba431aeb35 Fix 403 for SP calling RecentCalls/Alerts via /Accounts route (#149)
* fix 403 for SP calling RecentCalls/Alerts via /Accounts route

* update base image

* update base image

---------

Co-authored-by: eglehelms <e.helms@cognigy.com>
2023-04-12 13:22:40 -04:00
Antony Jukes
36607b505f added retrieve jaeger trace endpoint. (#147) 2023-04-10 13:35:22 -04:00
Markus Frindt
009396becc Feature/delay middleware (#146)
* add delay middleware to login and signin routes

* Different delay for sendStatus and json

---------

Co-authored-by: Markus Frindt <m.frindt@cognigy.com>
2023-04-06 08:25:45 -04:00
EgleH
9c7f8b4e7b fix small issues in the code (#145)
Co-authored-by: eglehelms <e.helms@cognigy.com>
2023-04-06 07:31:14 -04:00
EgleH
b2dce18c7a Limit access to resources according to user scoped Account or SP (#140)
* limit access to resources according to user scope

* fix error change

* speech credentials validation

* fix speech credentials validation

* fix the issues that didnt allow tests to pass

* speech credential validation

* retrieve speech cred list

* fixt speech credential test valodation

* check scope of smpp-gateways

* check scope of smpp-gateways

* testing time

* /signin for hosted system needs to return scope in jwt

* fix user delete route and adjust tests

* get refactor

---------

Co-authored-by: eglehelms <e.helms@cognigy.com>
Co-authored-by: Dave Horton <daveh@beachdognet.com>
Co-authored-by: Guilherme Rauen <g.rauen@cognigy.com>
2023-04-05 14:20:51 -04:00
Paulo Telles
8f93b69af0 block retries (#144)
* block retries

* block retries

* fixed logginAttempsBlocked typo

---------

Co-authored-by: p.souza <p.souza@cognigy.com>
2023-04-05 10:47:25 -04:00
Hoan Luu Huu
3ad19eca3c feat: carrier register status (#141)
* feat: carrier register status

* update homer to query register pcap

* fix: homer

* fix: remove homer changes

* fix: homer issue
2023-04-03 13:21:38 -04:00
Markus Frindt
97b17d9e1d Improved invalidation of JWT in redis (#139)
* Improved invalidation of JWT in redis

* use jwt as default value in generateRedisKey

* import logger in app.js

---------

Co-authored-by: Markus Frindt <m.frindt@cognigy.com>
2023-03-31 16:19:34 -04:00
Guilherme Rauen
d656857509 extend sid validation to all routes (#138)
Co-authored-by: Guilherme Rauen <g.rauen@cognigy.com>
2023-03-31 07:46:33 -04:00
Hoan Luu Huu
bb705fe808 feat: custom email vendor (#130)
* feat: custom email vendor

* feat: custom email vendor

* feat: custom email vendor

* feat: custom email vendor

---------

Co-authored-by: Quan HL <quanluuhoang8@gmail.com>
2023-03-29 12:48:53 -04:00
Guilherme Rauen
789a0ba3ff Fix SQL Injection Vulnerabilities (#134)
* avoid sql injections

* linter

* fix test using random sid

* add some test cases

* remove tests that don't use the new validation

* add test

* linter

* fix tests

* add test

---------

Co-authored-by: Guilherme Rauen <g.rauen@cognigy.com>
2023-03-29 12:36:51 -04:00
EgleH
27cb7c471a Add passwordSettings validation (#136)
* add password Settings validation

* fix test failing because of pass validation

---------

Co-authored-by: eglehelms <e.helms@cognigy.com>
2023-03-29 08:54:05 -04:00
Anton Voylenko
518a9163fb add ENCRYPTION_SECRET variable (#132) 2023-03-25 15:34:09 -04:00
Hoan Luu Huu
5fb4bd7bd1 feat: add nuance on-premise (#131)
* feat: add nuance on-premise

* feat: update fetch nuance credential

* fix: update

* fix nuance tts test against on-prem, refactor aws/google tts testing to use speech-utils package

---------

Co-authored-by: Quan HL <quanluuhoang8@gmail.com>
Co-authored-by: Dave Horton <daveh@beachdognet.com>
2023-03-25 11:20:44 -04:00
Dave Horton
409ad68123 fix tests for AWS speech 2023-03-24 08:59:16 -04:00
Anton Voylenko
34f83e323c update swagger yaml (#127) 2023-03-23 09:08:38 -04:00
Anton Voylenko
00af458cb3 Migrate to argon2 from argon2-ffi (#126) 2023-03-22 16:15:01 -04:00
Dave Horton
c4cc6c51ee eliminate parsing of jwt to support either jwt or api key (#124)
* eliminate parsing of jwt to support either jwt or api key

* fixes for preventing non-authorized changes to users

* update to AWS v3 api
2023-03-14 18:54:56 -04:00
Dave Horton
aea7388ba0 refactor of speech-utils (#123) 2023-03-14 10:01:05 -04:00
Dave Horton
3d86292a90 prevent updates to users that would move them to a different account … (#122)
* prevent updates to users that would move them to a different account or service provider, or make them admin users

* bugfix: when updating account as admin user, verify the account sid

* validate account sid when SP user tries to update
2023-03-08 11:38:49 -05:00
Dave Horton
08962fe7ba bugfix: get of speech credential was not returning soniox api_key 2023-03-03 13:49:36 -05:00
Dave Horton
e573f6ab06 change property names for custom speech 2023-03-02 15:28:53 -05:00
Dave Horton
4934e2a1ca add support for custom speech api (#121) 2023-03-02 14:13:41 -05:00
EgleH
cc384995ea add support for soniox speech (#120)
Co-authored-by: eglehelms <e.helms@cognigy.com>
2023-02-26 11:31:39 -05:00
Dave Horton
f7f3881d70 update to @jambonz/verb-specifications (#109) 2023-02-15 10:15:06 -05:00
Hoan Luu Huu
4d48c6946c feat: start using verb-specifications (#107)
* feat: start using verb-specifications

* fix: verb specification v2

* fix vulnerabilities

---------

Co-authored-by: Quan HL <quanluuhoang8@gmail.com>
Co-authored-by: Dave Horton <daveh@beachdognet.com>
2023-02-14 17:24:19 -05:00
Hoan Luu Huu
f46be95551 feat: nvidia speech credential (#105)
* feat: nvidia speech credential

* fix: riva_server_uri

* fix: riva_server_uri

---------

Co-authored-by: Quan HL <quanluuhoang8@gmail.com>
2023-02-10 08:31:49 -05:00
EgleH
d4f2be3dc1 Add check for users to delete function (#104)
* add check for users to delete function

* fix typo

* fix active admin check

---------

Co-authored-by: eglehelms <e.helms@cognigy.com>
2023-02-08 07:16:29 -05:00
EgleH
4d2cc15de4 Bug/speech creds get all with no sp sid (#102)
* backwards compatibility

* fetch account and sp speech remove duplicates

* fix retrieval of SP credentials associated to an account level user

* update gh actions

---------

Co-authored-by: eglehelms <e.helms@cognigy.com>
Co-authored-by: Dave Horton <daveh@beachdognet.com>
2023-01-30 10:06:16 -05:00
Hoan Luu Huu
019599741a feat: add app_json to applications endpoint (#100)
* added phone_numbers.app_json column

* modify prev commit to put app_json on applications table

* feat: add app_json to applications endpoint

---------

Co-authored-by: Dave Horton <daveh@beachdognet.com>
Co-authored-by: Quan HL <quanluuhoang8@gmail.com>
2023-01-28 10:02:04 -05:00
EgleH
f2c2623b28 Speech should always be attached to an SP (#98)
* user will always be attached to SP, thus always provide SP sid

* add another fallback for service_provider_sid

* fix the email and username check in user creation that was crashing the server

* not allow same names for shared and account carriers

Co-authored-by: eglehelms <e.helms@cognigy.com>
2023-01-26 07:53:29 -05:00
EgleH
6c494786c8 add check to not allow the same password to be user as new (#97)
Co-authored-by: eglehelms <e.helms@cognigy.com>
2023-01-23 07:59:33 -05:00
EgleH
80ee1d06d7 Return scoped carriers and speech creds in /SP GET call (#96)
* return scoped carriers and speech creds in /SP GET call

* apply review comments

Co-authored-by: eglehelms <e.helms@cognigy.com>
2023-01-19 10:53:37 -05:00
EgleH
274377960e Allow falsy values for force_change and Is_active in PUT user call (#95)
* allow falsy values

* apply review comments

Co-authored-by: eglehelms <e.helms@cognigy.com>
2023-01-19 10:39:57 -05:00
Dave Horton
e42634d726 error case: creating user with duplicate email, return json with msg for toast 2022-12-26 13:19:24 -06:00