Compare commits

..
467 Commits
Author SHA1 Message Date
Синельник Тимур Романович 4d474b1cd8 Merge branch 'MSP-8995' into 'dev'
Resolve MSP-8995

See merge request isp/isp-gate-service!41
2026-11-23 12:04:46 +03:00
bogdanmezencev 3d58cc4dde MSP-8995 up deps 2026-11-20 14:53:09 +03:00
bogdanmezencev 458f94cfd6 MSP-8995 fix review comments 2026-11-20 14:51:43 +03:00
bogdanmezencev 5fef05516b MSP-8995 up Go to 1.27 and deps 2026-11-18 20:08:55 +03:00
bogdanmezencev 1a4f2d49b1 MSP-8995 bump version to 5.12.0 2026-11-18 19:53:29 +03:00
bogdanmezencev 5191f45076 MSP-8995 up golangci-lint config and fix lint issues 2026-11-18 19:52:40 +03:00
bogdanmezencev 80d9286498 MSP-8995 migrate admin client from grpc to http and update tests 2026-11-18 19:49:36 +03:00
komissarovyv 4e924575ce Delete fix 2026-09-11 11:31:01 +03:00
komissarovyv 7abecf78ad Add adminServiceName variable 2026-09-10 14:00:18 +03:00
Синельник Тимур Романович 657d430288 Merge branch 'MSP-8438' into 'main'
MSP-8438 Add setting for overriding standart json content-header to...

Closes MSP-8438

See merge request isp/isp-gate-service!40
2026-08-28 15:16:19 +03:00
Синельник Тимур Романович d2167d2f07 MSP-8438 Bump version to 5.11.3 2026-08-28 14:07:53 +03:00
Синельник Тимур Романович 2fb58a7195 MSP-8438 Add setting for overriding standart json content-header to "application/json; charset=utf-8" 2026-08-28 14:07:53 +03:00
Синельник Тимур Романович 72f2d37920 MSP-8438 Use isp-kit/errors 2026-08-28 13:27:24 +03:00
Синельник Тимур Романович 1a1f764f75 MSP-8438 Up deps 2026-08-28 13:10:26 +03:00
Синельник Тимур Романович fbf10c8722 MSP-8438 Replace deprecated context import 2026-08-28 13:09:50 +03:00
komissarovyv 227a2a069d Merge branch '__deps' into 'main'
Update dependencies

See merge request isp/isp-gate-service!39
2026-07-27 16:26:51 +03:00
komissarovyv cf4979560b Update dependencies 2026-07-27 16:26:51 +03:00
komissarovyv 7d936adaf0 Merge branch 'MSP-8007' into 'main'
Resolve MSP-8007

Closes MSP-8007

See merge request isp/isp-gate-service!38
2026-07-07 10:18:18 +03:00
kochanovrv a8af70f93c MSP-8007 up version to v5.11.1 2026-07-06 17:16:16 +03:00
kochanovrv d6b8ed5f2d MSP-8007 update isp-kit 2026-07-06 17:15:20 +03:00
Синельник Тимур Романович 81e9195d79 Merge branch 'KVN-421' into 'main'
Resolve KVN-421

Closes KVN-421

See merge request isp/isp-gate-service!37
2026-05-12 13:54:41 +03:00
Синельник Тимур Романович c5626b5aca KVN-421 Bump version to 5.11.0 2026-05-12 13:34:17 +03:00
Синельник Тимур Романович e0e3609185 KVN-421 Support multiple token providers for user authentication 2026-05-12 13:34:17 +03:00
Синельник Тимур Романович 6ec6987597 KVN-421 Fix typo 2026-05-12 12:39:52 +03:00
Пучков Андрей Павлович ac8a556442 Merge branch 'MSP-7570' into 'main'
Resolve MSP-7570

Closes MSP-7570

See merge request isp/isp-gate-service!36
2026-04-20 09:26:52 +00:00
nglmq 5cb927d4dc MSP-7570 fixes 2026-04-17 18:32:56 +03:00
nglmq 587e369e08 MSP-7570 bump version to 5.10.2 2026-04-17 17:58:04 +03:00
nglmq 87bfa22b52 MSP-7570 remove requestId duplicate in logs 2026-04-17 17:57:28 +03:00
Синельник Тимур Романович cca6ce0ad1 Merge branch 'rename_authenticateMethodPath' into 'main'
Rename authenticatemethodpath

See merge request isp/isp-gate-service!35
2026-04-08 18:34:57 +03:00
Синельник Тимур Романович f98ecd049e Bump version to 5.10.1 2026-04-08 17:06:35 +03:00
Синельник Тимур Романович ff560441b2 up schema comment 2026-04-08 17:06:34 +03:00
Синельник Тимур Романович 81ece162cc AuthenticateMethodPath -> AuthenticateEndpoint 2026-04-08 16:26:39 +03:00
Синельник Тимур Романович 48e5315986 Merge branch 'MSP-7470' into 'main'
Resolve MSP-7470

Closes MSP-7470

See merge request isp/isp-gate-service!34
2026-04-06 15:35:08 +03:00
Синельник Тимур Романович da38b66d9a MSP-7470 Bump version to 5.10.0 2026-04-06 13:17:22 +03:00
Синельник Тимур Романович 206e64f9e1 MSP-7470 Up middleware error prefix 2026-04-06 13:17:22 +03:00
Синельник Тимур Романович 1b0651e42f MSP-7470 AuthMethodBasePath -> AuthenticateMethodPath 2026-04-06 13:17:22 +03:00
Синельник Тимур Романович 215ccbd25b MSP-7470 Use module name for custom user auth setting 2026-04-06 12:48:01 +03:00
Синельник Тимур Романович 1b2b9c5817 MSP-7470 AuthModuleName -> AuthMethodBasePath & trim slash 2026-04-06 09:26:04 +03:00
Синельник Тимур Романович 23a4d94cff MSP-7470 token providers []string -> string 2026-04-06 09:26:03 +03:00
Синельник Тимур Романович 6186f7bdb5 MSP-7470 Up UserAuth repo client & metrics 2026-04-02 18:00:16 +03:00
Синельник Тимур Романович 2e0889491d MSP-7470 401 on invalid user token 2026-04-02 18:00:16 +03:00
Синельник Тимур Романович 3484276256 MSP-7470 Add error on empty user token 2026-04-02 16:52:50 +03:00
Синельник Тимур Романович f13c1ced4f MSP-7470 Move nolint comment 2026-04-02 16:04:09 +03:00
Синельник Тимур Романович 9d9353cf57 MSP-7470 Ref users auth cache 2026-04-02 15:57:30 +03:00
Синельник Тимур Романович a185cb0878 MSP-7470 UserAuth->CustomAuth 2026-04-02 14:46:49 +03:00
Синельник Тимур Романович 41762113e7 MSP-7470 Ref config 2026-04-01 10:21:59 +03:00
Синельник Тимур Романович 7cca2eb773 MSP-7470 Add skip app auth log 2026-04-01 10:21:59 +03:00
Синельник Тимур Романович eb6326c343 MSP-7470 Init user auth 2026-04-01 10:05:20 +03:00
Синельник Тимур Романович b67eb8137c MSP-7470 Up deps 2026-03-31 21:55:10 +03:00
Синельник Тимур Романович 8b672bdd30 Merge branch 'endpoint_typo' into 'main'
Endpoint typo

See merge request isp/isp-gate-service!33
2026-03-31 16:56:28 +03:00
Синельник Тимур Романович 1363935f66 bump version to 5.9.3 2026-03-31 16:14:10 +03:00
Синельник Тимур Романович 77f3311401 fix typo 2026-03-31 16:13:04 +03:00
Синельник Тимур Романович c523d2347d Merge branch 'MSP-7358' into 'main'
Resolve MSP-7391

Closes MSP-7391

See merge request isp/isp-gate-service!32
2026-03-24 17:40:16 +03:00
Синельник Тимур Романович 7ff454d6d9 MSP-7391 Bump version to 5.9.2 2026-03-24 17:18:45 +03:00
Синельник Тимур Романович 7b5ff23615 MSP-7391 Use pathSchema for log, fallback on endpoint 2026-03-24 17:18:44 +03:00
Синельник Тимур Романович 1bd032e5aa Merge branch 'fix_ws' into 'main'
Fix ws

See merge request isp/isp-gate-service!31
2026-03-18 17:06:06 +03:00
Синельник Тимур Романович f160467e77 bump version to 5.9.1 2026-03-18 16:57:22 +03:00
Синельник Тимур Романович 59875487ae up lint 2026-03-18 16:51:54 +03:00
Синельник Тимур Романович b692728cc3 add warn log 2026-03-18 16:51:06 +03:00
Синельник Тимур Романович f5a5e7d8bb up deps 2026-03-18 16:49:48 +03:00
Грязнов Денис Владимирович aae3c28225 Merge branch 'dev' into 'main'
Dev

Closes MSP-7197 and MSP-7199

See merge request isp/isp-gate-service!27
2026-03-10 07:35:44 +00:00
Синельник Тимур Романович d417e202e0 Merge branch 'routes_fix' into 'dev'
Fix seek endpoint metadata for endpoints with path params

See merge request isp/isp-gate-service!30
2026-03-04 17:55:45 +03:00
Синельник Тимур Романович 211b47d21e Fix seek endpoint metadata for endpoints with path params 2026-03-03 16:44:26 +03:00
Парусов Павел Андреевич e623018b72 Merge branch 'MSP-7197' into 'dev'
Resolve MSP-7197

See merge request isp/isp-gate-service!28
2026-02-19 11:14:43 +00:00
Парусов Павел Андреевич 56548cbf4d MSP-7197 up changelog 2026-02-19 14:04:22 +03:00
Парусов Павел Андреевич e4869135b4 MSP-7197 added statuscode to log filter 2026-02-19 14:03:57 +03:00
Антон Могилев 40e521462d Merge branch 'MSP-7199' into 'dev'
Resolve MSP-7199

See merge request isp/isp-gate-service!29
2026-02-18 13:53:27 +00:00
nglmq c422de39b4 MSP-7199 bump version to 5.9.0 2026-02-18 10:14:05 +03:00
nglmq c0bb6fdc7e MSP-7199 edit requestId middleware 2026-02-17 17:38:17 +03:00
nglmq 01b6263f29 MSP-7199 replace RequestId middleware 2026-02-17 15:44:34 +03:00
Синельник Тимур Романович 30d731ebfa Bump version to 5.8.1 2026-01-27 15:09:25 +03:00
Синельник Тимур Романович 8a0dce574a up deps 2026-01-27 15:09:01 +03:00
Синельник Тимур Романович e5e723811e Merge branch 'MSP-7042_v2' into 'main'
Resolve MSP-7042 "V2"

Closes MSP-7042

See merge request isp/isp-gate-service!25
2026-01-27 13:23:11 +03:00
Синельник Тимур Романович 56518b86f0 MSP-7042 Up isp-kit 2026-01-23 13:44:14 +03:00
Синельник Тимур Романович 6acaf9c7ee MSP-7042 Bump version to 5.8.0 2026-01-23 13:42:59 +03:00
Синельник Тимур Романович 2ddb3a3d1f MSP-7042 Ref routes.Routes 2026-01-23 13:42:41 +03:00
Синельник Тимур Романович 29cdf42808 MSP-7042 Up authorize 2026-01-23 13:42:41 +03:00
Синельник Тимур Романович b2ffc15cfa MSP-7042 Up deps 2026-01-23 13:42:41 +03:00
Синельник Тимур Романович 7cb16f87e5 MSP-6964 Up isp-kit 2026-01-23 13:42:41 +03:00
Синельник Тимур Романович 63c694e2a3 Merge branch 'dev' into 'main'
Dev

See merge request isp/isp-gate-service!23
2026-01-23 13:07:45 +03:00
Синельник Тимур Романович b7028f3c9e MSP-6964 Up isp-kit 2026-01-23 13:03:25 +03:00
Синельник Тимур Романович de80daad81 MSP-6964 Bump version to 5.7.0 2026-01-23 12:57:35 +03:00
Синельник Тимур Романович 54a3ac5ed4 MSP-6964 Add applicationName log field to bypassing unauthorized log 2026-01-23 12:57:12 +03:00
Синельник Тимур Романович 9e6846ac03 MSP-6964 Add applicationName log field 2026-01-23 12:57:12 +03:00
Рябов Владислав Олегович 4f90477e73 Merge branch 'MSP-7057' into 'main'
Resolve MSP-7057

Closes MSP-7057

See merge request isp/isp-gate-service!26
2026-01-23 09:56:11 +00:00
kochanovrv 8b92a460de MSP-7057 up version to v5.6.2 2026-01-23 12:09:59 +03:00
kochanovrv 68105a2179 MSP-7057 add base64 for x-application-name 2026-01-23 12:09:50 +03:00
Пучков Андрей Павлович 1a274e79e5 Merge branch 'MSP-7007' into 'main'
Resolve MSP-7007

Closes MSP-7007

See merge request isp/isp-gate-service!21
2026-01-14 08:50:50 +00:00
Пучков Андрей Павлович 690820b7c4 MSP-7007 Bump version to 5.6.1 2026-01-14 10:31:27 +03:00
Пучков Андрей Павлович d4f5d7d66f MSP-7007 update dependencies 2026-01-14 10:31:27 +03:00
Пучков Андрей Павлович e6c241f112 MSP-7007 add x-application-name to header 2026-01-14 10:31:27 +03:00
Синельник Тимур Романович 2b5ee66527 Merge branch 'MSP-6943' into 'main'
Resolve MSP-6943

Closes MSP-6943

See merge request isp/isp-gate-service!20
2025-12-26 09:35:31 +03:00
yakovlevav 4ddc963481 MSP-6493 up version to 5.6.0 2025-12-25 22:47:23 +03:00
yakovlevav 16cdb18f43 MSP-6493 add http metrics middleware 2025-12-25 22:47:23 +03:00
komissarovyv e9c5c9b805 Merge branch 'MSP-6673_fix' into 'main'
Resolve MSP-6673 "Fix"

Closes MSP-6673

See merge request isp/isp-gate-service!19
2025-11-26 13:41:24 +03:00
komissarovyv d447bb52bc MSP-6673 bump dependencies 2025-11-26 13:39:58 +03:00
komissarovyv 102fa48a92 MSP-6673 check x-application-token at first 2025-11-26 13:39:58 +03:00
Синельник Тимур Романович 96f8e79d33 Merge branch 'dev' into 'main'
Dev

Closes MSP-6673

See merge request isp/isp-gate-service!17
2025-11-26 10:01:58 +03:00
Синельник Тимур Романович 9b9b66c07c Merge branch 'MSP-6673' into 'dev'
Resolve MSP-6673

See merge request isp/isp-gate-service!18
2025-11-13 11:52:52 +03:00
Синельник Тимур Романович abfd06b407 MSP-6673 Bump version to 5.5.0 2025-11-11 18:22:07 +03:00
Синельник Тимур Романович 325ededd86 MSP-6673 Up internal error message 2025-11-11 18:22:07 +03:00
Синельник Тимур Романович 069881f85f MSP-6673 Error on empty appName on basic auth 2025-11-11 14:23:32 +03:00
Синельник Тимур Романович fa803e9cac MSP-6673 Add basic auth 2025-11-06 14:00:28 +03:00
Синельник Тимур Романович a39036a051 MSP-6673 Up deps 2025-11-06 14:00:28 +03:00
Синельник Тимур Романович c3e3ed9636 Merge branch 'unicode_optimization' into 'main'
Unicode optimization

See merge request isp/isp-gate-service!16
2025-10-03 15:13:57 +03:00
Синельник Тимур Романович 2d8e24ef2b bump version to 5.4.1 2025-10-03 14:56:18 +03:00
Синельник Тимур Романович 566b601c85 add tests & benchmark 2025-10-03 14:56:17 +03:00
Синельник Тимур Романович 181edb8823 move to helpers 2025-10-03 14:36:12 +03:00
Синельник Тимур Романович d4a097a7a7 optimize append rune & add fast path for ASCII 2025-10-03 11:01:14 +03:00
Синельник Тимур Романович 5f556dcde3 optimize forceUnescapingUnicode 2025-10-03 11:01:14 +03:00
Синельник Тимур Романович 13db082fca Merge branch 'dev' into 'main'
Dev

Closes MSP-1684

See merge request isp/isp-gate-service!14
2025-10-02 15:59:44 +03:00
Синельник Тимур Романович bebd43dde2 Merge branch 'MSP-1684' into 'dev'
Resolve MSP-1684

See merge request isp/isp-gate-service!15
2025-09-22 11:47:17 +03:00
Синельник Тимур Романович b17e4b78aa MSP-1684 Bump version to 5.4.0 2025-09-22 11:00:53 +03:00
Синельник Тимур Романович dc61927345 MSP-1684 Up deps & lint 2025-09-22 10:52:22 +03:00
Синельник Тимур Романович 5230e9ac42 MSP-1684 Add forward client id setting for app 2025-09-22 10:52:22 +03:00
Кузьмин Игорь Александрович f5bfe7d2ba Delete Dockerfile.dit 2025-09-17 14:50:00 +00:00
Кузьмин Игорь Александрович 0dfbe57af1 Delete Dockerfile 2025-09-17 14:49:19 +00:00
Грязнов Денис Владимирович a4b6e5fd1d Merge branch 'MSP-6078' into 'main'
Resolve MSP-6078

Closes MSP-6078

See merge request isp/isp-gate-service!13
2025-08-21 12:02:58 +00:00
Кузнецов Иван Александрович 14f3c541e4 MSP-6078 bump version to 5.3.0 2025-08-21 14:40:35 +03:00
Кузнецов Иван Александрович aa704effde MSP-6078 update deps 2025-08-21 14:39:33 +03:00
komissarovyv 9f485b5e57 Merge branch 'MSP-5800' into 'main'
Resolve MSP-5800

Closes MSP-5800

See merge request isp/isp-gate-service!12
2025-07-09 12:32:53 +03:00
Парусов Павел Андреевич 52d8504089 MSP-5800 refac err return 2025-07-09 09:48:39 +03:00
Парусов Павел Андреевич 26691b99de MSP-5800 bump version to 5.2.10 2025-07-08 17:21:16 +03:00
Парусов Павел Андреевич f45f62c4b1 MSP-5800 added stack trace to error 2025-07-08 17:19:44 +03:00
Пучков Андрей Павлович 66e6c4b9c4 Merge branch 'MSP-4558' into 'main'
Resolve MSP-4558

Closes MSP-4558

See merge request isp/isp-gate-service!11
2025-07-03 09:24:53 +00:00
komissarovyv 61f11c0bda MSP-5358 fix again 2025-07-01 16:38:16 +03:00
komissarovyv 343f9d0cfa MSP-5358 fix again 2025-07-01 16:37:02 +03:00
Пучков Андрей Павлович cd721daa81 MSP-4558 Bump version to 5.2.9 2025-07-01 14:19:12 +03:00
Пучков Андрей Павлович e7bfd34e9e MSP-4558 replace redis cli with isp-lock-service 2025-07-01 14:19:12 +03:00
komissarovyv 6491e79afd Merge branch 'MSP-5358' into 'main'
MSP-5358

See merge request isp/isp-gate-service!10
2025-07-01 13:30:06 +03:00
komissarovyv 5fed5d7683 MSP-5358 bump dependencies 2025-06-30 19:15:01 +03:00
komissarovyv 0c2bcc6cfe MSP-5358 reimplement 2025-06-30 19:14:05 +03:00
Kirill Ryabov e56a2b829f MSP-5358 bump version to 5.2.8 2025-06-06 13:46:49 +03:00
Kirill Ryabov 944c7b7415 MSP-5358 update dependencies 2025-06-06 13:46:49 +03:00
Kirill Ryabov dbf094afd8 MSP-5358 add checking path with inverted slash in routes methods 2025-05-27 17:38:19 +03:00
Kirill Ryabov b7912dcd9f MSP-5358 revert commit 'fix bug with incorrect endpoint from request context' 2025-05-27 17:33:28 +03:00
Рябов Кирилл Александрович 01f8dcdc36 Merge branch 'MSP-5494' into 'master'
MSP-5494

See merge request isp/isp-gate-service!9
2025-05-27 18:29:08 +07:00
Kirill Ryabov dce66f423d MSP-5494 bump version to 5.2.7 2025-05-27 13:42:28 +03:00
Kirill Ryabov 4f8d2e9ae9 MSP-5494 update dependencies 2025-05-27 13:42:28 +03:00
Kirill Ryabov 1c8ba2d700 MSP-5494 add github actions ci to build & publish docker image 2025-05-27 13:42:28 +03:00
Kirill Ryabov 16a0c66ab7 MSP-5494 add Dockerfile 2025-05-27 13:41:03 +03:00
Kirill Ryabov 49d1bfaa3f migrate golangci-lint to v2 2025-05-13 12:58:29 +03:00
Рябов Кирилл Александрович c6685ddfb9 Merge branch 'MSP-5358' into 'master'
MSP-5358

See merge request isp/isp-gate-service!8
2025-05-13 16:49:09 +07:00
Kirill Ryabov 6a24a7bdd8 MSP-5358 bump version to 5.2.6 2025-04-29 15:34:56 +03:00
Kirill Ryabov 738146be5c MSP-5358 fix bug with incorrect endpoint from request context 2025-04-29 15:34:04 +03:00
Грязнов Денис Владимирович 357ce03935 Merge branch 'MSP-2267' into 'master'
Resolve MSP-2267

Closes MSP-2267

See merge request isp/isp-gate-service!7
2025-04-29 11:55:54 +00:00
Павел Комиссаров ce4d8ec165 MSP-2267 refactor changelog 2025-04-28 17:58:42 +03:00
Павел Комиссаров 0793b8f90f MSP-2267 change version and add changelogs 2025-04-28 17:40:46 +03:00
Павел Комиссаров d954b8d828 MSP-2267 вывел в константу префикс для поиска 2025-04-28 15:08:59 +03:00
Павел Комиссаров 600b3d7808 MSP-2267 перенёс утилитарную функцию под основную мидлвары 2025-04-28 14:22:17 +03:00
Павел Комиссаров 9808e30cb9 MSP-2267 исправил поиск по строке на поиск по байтам 2025-04-28 14:17:17 +03:00
Павел Комиссаров 7acd770e26 MSP-2267 go.mod was modified 2025-04-28 13:38:29 +03:00
Павел Комиссаров 87af899a0d MSP-2267 добавил флаг в конфиг и реализовал конвертацию кодировки в логгере 2025-04-28 13:34:22 +03:00
Грязнов Денис Владимирович 82ac257e91 Merge branch 'MSP-5320' into 'master'
Update dependencies

See merge request isp/isp-gate-service!6
2025-04-23 09:35:52 +00:00
Парусов Павел Андреевич 3d22feec9c MSP-5320 update dependencies 2025-04-22 17:40:40 +03:00
Кузьмин Игорь Александрович 7b5fc0b416 Edit README.md 2025-04-18 09:45:11 +00:00
Кузьмин Игорь Александрович 576ef18526 Replace .gitlab-ci.yml 2025-04-18 09:23:35 +00:00
Кузнецов Иван Александрович 03df79d7b3 Merge branch 'MSP-5160' into 'master'
Resolve MSP-5160

Closes MSP-5160

See merge request isp/isp-gate-service!5
2025-04-03 14:30:01 +00:00
Кузнецов Иван Александрович 136024c387 MSP-5160 bump version to 5.2.3 2025-04-03 17:24:06 +03:00
Кузнецов Иван Александрович 7cd5b507c4 MSP-5160 fix handleError 2025-04-03 16:49:20 +03:00
Кузнецов Иван Александрович 02cc03e744 MSP-5160 refactoring HttpError 2025-04-03 16:39:06 +03:00
Кузнецов Иван Александрович 1999ea366b MSP-5160 refactoring writeResponse 2025-04-03 16:11:52 +03:00
Кузнецов Иван Александрович 57e788e7dc MSP-5160 add header x-request-id in writeResponse 2025-04-03 16:11:52 +03:00
Кузнецов Иван Александрович 93482f05d3 MSP-5160 update deps + go 1.24 + fix linters 2025-04-03 16:11:33 +03:00
Кузьмин Игорь Александрович 4898a95fc4 Upload New File 2024-12-27 14:44:43 +00:00
Кузьмин Игорь Александрович 95f9e46f45 Upload New File 2024-12-27 14:44:26 +00:00
komissarovyv 9ec52bd852 Delete test.json 2024-12-27 12:26:16 +03:00
komissarovyv bf6ba426f6 Add test.json 2024-12-27 12:04:52 +03:00
foxxy 744eaa2605 bump version to 5.2.2 2024-12-11 12:30:53 +03:00
Рябов Владислав Олегович b21f96b8a5 Merge branch 'update_kkd_config' into 'master'
update config_kkd.yml

See merge request isp/isp-gate-service!3
2024-12-03 10:00:29 +00:00
riabovvo 45e6d9128b update config_kkd.yml 2024-12-03 12:55:25 +03:00
komissarovyv 7f99b95cea Merge branch 'MSP-4211' into 'master'
Resolve MSP-4211

Closes MSP-4211

See merge request isp/isp-gate-service!2
2024-10-11 11:56:55 +00:00
Синельник Тимур Романович ac8cbcef8a MSP-4211 Bump version to 5.2.1 2024-10-11 14:32:17 +03:00
Синельник Тимур Романович 914e9e1226 MSP-4211 Fix ws proxy test 2024-10-11 14:32:17 +03:00
Синельник Тимур Романович d09e784ca8 MSP-4211 Update dependencies 2024-10-11 14:32:17 +03:00
Синельник Тимур Романович 875d3985bd MSP-4211 Add remote setting for client request id forwarding 2024-10-11 14:32:17 +03:00
Грязнов Денис Владимирович f9b2632335 Merge branch 'MSP-3533' into 'master'
Resolve MSP-3533

Closes MSP-3533

See merge request isp/isp-gate-service!1
2024-07-01 07:54:02 +00:00
Синельник Тимур Романович 01159874b8 MSP-3533 Bump version to 5.2.0 2024-06-27 16:21:45 +03:00
Синельник Тимур Романович 843c6d36c2 MSP-3533 Update lint 2024-06-27 16:21:17 +03:00
Синельник Тимур Романович 4480d932e1 MSP-3533 Update dependencies 2024-06-27 15:22:56 +03:00
Синельник Тимур Романович 54292a9597 MSP-3533 Change log format from snake_case to camelCase 2024-06-27 15:07:42 +03:00
Кузьмин Игорь Александрович 27c825f705 Update README.md 2024-03-26 09:17:59 +00:00
Кузьмин Игорь Александрович 0d0cf8f2a0 Delete Dockerfile.dit 2024-03-25 13:17:04 +00:00
Кузьмин Игорь Александрович 200f65a8ba Delete .gitlab-ci.yml 2024-03-25 13:16:57 +00:00
Кузьмин Игорь Александрович d3624ee87e Add README.md 2024-03-22 12:18:34 +00:00
komissarovyv 56d3e06e49 Merge branch 'MSP-2684' into 'master'
MSP-2684

See merge request integration-system/isp-gate-service!16
2024-01-22 14:20:37 +00:00
Kirill Ryabov f6dbff900b MSP-2684 Add entrypoint config struct 2024-01-22 21:17:01 +07:00
Kirill Ryabov 6683d2dcd0 MSP-2684 Remove unnecessary location 2024-01-22 21:03:32 +07:00
Kirill Ryabov 1f40e9d5d3 MSP-2684 Update Entrypoint function 2024-01-22 21:02:51 +07:00
Kirill Ryabov 87690bbd12 MSP-2684 Remove unnecessary location 2024-01-22 21:02:25 +07:00
Kirill Ryabov e4892b737f MSP-2684 Bump version to 5.1.1 2024-01-22 20:51:06 +07:00
Kirill Ryabov f94672569b MSP-2684 Update config.yml 2024-01-22 20:22:20 +07:00
Kirill Ryabov c390fe3948 MSP-2684 Fix linter's warning 2024-01-22 20:17:02 +07:00
Kirill Ryabov 8a83ba0b3a MSP-2684 Add using 'withPrefix' flag to avoid trimming request's url prefix 2024-01-22 20:12:58 +07:00
Kirill Ryabov 402c6c18cf MSP-2684 Update local config 2024-01-22 20:08:03 +07:00
d1slike 0c62aa8b1b MSP-2539 update dependencies 2023-12-21 14:35:08 +03:00
komissarovyv 6ba1761634 Merge branch 'MSP-2370_add_admin_authz' into 'master'
Resolve MSP-2370 "Add admin authz"

Closes MSP-2370

See merge request integration-system/isp-gate-service!15
2023-11-14 15:20:30 +00:00
d1slike ca5dc08fbd MSP-2370 bump version 2023-11-14 12:37:55 +03:00
d1slike 219d4ce382 MSP-2370 implement admin authz test 2023-11-14 12:37:45 +03:00
d1slike 3f88c01417 MSP-2370 pass new dependencies in locator 2023-11-14 12:37:18 +03:00
d1slike ac7f26f705 MSP-2370 implement admin authz in middleware 2023-11-14 12:36:55 +03:00
d1slike 960ad5a253 MSP-2370 implement admin authz in service 2023-11-14 12:36:25 +03:00
d1slike 365bddceda MSP-2370 use more abstract naming in cache repo 2023-11-14 12:35:24 +03:00
d1slike 7069f43366 MSP-2370 implement admin authz endpoint calling 2023-11-14 12:34:57 +03:00
d1slike b938e2f81d MSP-2370 add new admin endpoint domains 2023-11-14 12:34:32 +03:00
d1slike 011cdd022c MSP-2370 collect endpoints with permission demand 2023-11-14 12:34:01 +03:00
d1slike 5d2e6753a0 MSP-2370 move string lowering to param func 2023-11-14 12:33:06 +03:00
d1slike 82a6d1959a MSP-2370 upgrade dependencies 2023-11-14 12:32:06 +03:00
d1slike c7295c6219 Use custom http transport 2023-10-20 18:15:41 +03:00
d1slike 1f808ea387 Upgrade dependencies 2023-10-20 18:15:24 +03:00
Кузьмин Игорь 9639b312b2 Update Dockerfile.dit 2023-07-14 09:48:25 +00:00
Кузьмин Игорь 7039bf2cf7 Update config_kkd.yml 2023-07-14 09:47:41 +00:00
Кузьмин Игорь 2f74836b5c Add new file 2023-07-14 09:46:49 +00:00
d1slike ed9ba371f7 Fix body logging 2023-06-13 14:14:45 +03:00
Николаев Леонид Виссарионович 0d430df928 Merge branch 'MSP-1777' into 'master'
MSP-1777 [+] новый параметр в remote_config: logging.skip. Массив re. Если они...

Closes MSP-1777

See merge request integration-system/isp-gate-service!14
2023-06-07 10:23:45 +00:00
Leonid Nikolaev 037b3bebda MSP-1777 [v] after review#3 2023-06-07 12:23:08 +03:00
Leonid Nikolaev 1fa746c3e9 MSP-1777 [v] after review#2 2023-06-07 11:45:55 +03:00
Leonid Nikolaev dfbc05cd7d MSP-1777 [v] after review#1 2023-06-07 10:57:12 +03:00
Кузьмин Игорь 0d60ec0798 Update .gitlab-ci.yml 2023-06-07 06:49:41 +00:00
Leonid Nikolaev 2332737031 MSP-1777 тесты для skip 2023-06-06 16:41:50 +03:00
Leonid Nikolaev ae1bba7575 MSP-1777 [+] новый параметр в remote_config: logging.skip. Массив re. Если они есть в пути, то запрос не будет логироваться 2023-06-06 16:13:08 +03:00
Leonid Nikolaev 716428dd58 MSP-1777 [+] новый параметр в remote_config: logging.skip. Массив re. Если они есть в пути, то запрос не будет логироваться 2023-06-06 16:12:19 +03:00
Leonid Nikolaev 9e68e9662c Merge branch 'master' of gitlab.elocont.ru:integration-system/isp-gate-service 2023-06-06 13:55:24 +03:00
Кузьмин Игорь 3483b1f52b Update Dockerfile.dit 2023-05-10 09:03:15 +00:00
Кузьмин Игорь 1d34dc6f2e Upload New File 2023-05-10 08:45:56 +00:00
Кузьмин Игорь 5139158d7a Add new file 2023-05-03 10:17:27 +00:00
d1slike 3182cefbe2 Fix body logging 2023-04-18 11:18:59 +03:00
d1slike bce6527dc7 MSP-1470 user gorilla muxer 2023-03-31 16:45:39 +03:00
komissarovyv d430e1e402 Merge branch 'MSP-1470' into 'master'
Resolve MSP-1470

Closes MSP-1470

See merge request integration-system/isp-gate-service!13
2023-03-31 11:45:19 +00:00
d1slike 08c39a9b58 MSP-1470 bump version 2023-03-31 14:44:30 +03:00
d1slike f78db86e39 MSP-1470 implement ws proxy test 2023-03-31 14:44:30 +03:00
d1slike 02334b3617 MSP-1470 add ws in locator 2023-03-31 14:44:30 +03:00
d1slike cbbc03acb9 MSP-1470 add ws proxy const 2023-03-27 11:41:32 +03:00
d1slike d298485722 MSP-1470 implement websocket proxy 2023-03-27 11:41:32 +03:00
d1slike 390bd0423e MSP-1470 move headers passing to dedicated func 2023-03-27 11:41:32 +03:00
d1slike 35e9311cc7 MSP-1470 implement Hijacker iface for ws proxy 2023-03-27 11:41:32 +03:00
d1slike 0e51c54415 MSP-1470 extract tokens from url query 2023-03-27 11:41:32 +03:00
d1slike c650929476 MSP-1470 upgrade dependencies 2023-03-22 20:03:35 +03:00
komissarovyv 2ab43de749 Merge branch 'MSP-1069' into 'master'
Resolve MSP-1069

Closes MSP-1069

See merge request integration-system/isp-gate-service!12
2022-10-10 14:56:30 +00:00
john 01027e6f29 MSP-1069 update tests and benchmark 2022-10-05 13:49:17 +03:00
john 2b329d5270 MSP-1069 update locator handler and add admin cli 2022-10-05 13:49:17 +03:00
john 0910add54c MSP-1069 update middleware admin auth 2022-10-05 13:49:17 +03:00
john b054257e06 MSP-1069 update proxy grpc http 2022-10-05 13:49:17 +03:00
john 614abce93f MSP-1069 update remote conf 2022-10-05 13:49:17 +03:00
john fa9a5b7633 MSP-1069 add service admin auth 2022-10-05 13:49:17 +03:00
john 9163d0749d MSP-1069 add repo admin auth 2022-10-05 13:49:17 +03:00
john 57dff99bb5 MSP-1069 add admin auth response 2022-10-05 13:49:17 +03:00
john 8a269cd0e0 MSP-1069 up version 2022-10-05 13:49:17 +03:00
john bb92f0628a MSP-1069 update go.mod go.sum 2022-10-05 13:49:17 +03:00
Грязнов Денис Владимирович 8adec87573 Merge branch 'MSP-927' into 'master'
Resolve MSP-927

Closes MSP-927

See merge request integration-system/isp-gate-service!11
2022-09-27 15:30:34 +00:00
DeniskaRediska 1a1a200173 MSP-927 fix linter 2022-09-27 18:06:29 +03:00
DeniskaRediska d4f8201bd5 MSP-927 up version 2022-09-27 18:02:25 +03:00
DeniskaRediska 2f714b32c8 MSP-927 update dependencies 2022-09-27 18:02:17 +03:00
DeniskaRediska 9d400c4158 MSP-927 add import type errdetails 2022-09-27 17:59:56 +03:00
Грязнов Денис Владимирович 6283cc64a5 Merge branch 'MSP-1014' into 'master'
Resolve MSP-1014

Closes MSP-1014

See merge request integration-system/isp-gate-service!10
2022-09-06 15:24:00 +00:00
DeniskaRediska 586752ac8c MSP-1014 up version 2022-09-06 18:22:10 +03:00
DeniskaRediska 191e48d464 MSP-1014 add charset=utf-8 for grpc response header 2022-09-06 18:21:12 +03:00
d1slike 5a9fc1a59b Fix linter 2022-08-11 11:31:08 +03:00
d1slike 4175a36bf8 Bump version 2022-08-11 11:29:20 +03:00
d1slike 203dbcb1bf Fix http GET params proxying 2022-08-11 11:29:11 +03:00
d1slike f13e45762b Fix path logging 2022-08-11 11:28:36 +03:00
komissarovyv aeb297065d Add runtime.log 2022-08-08 11:11:01 +00:00
komissarovyv 1cb43ec54d Merge branch 'v3' into 'master'
V3

See merge request integration-system/isp-gate-service!9
2022-08-05 09:42:23 +00:00
d1slike 4505292943 MSP-437 translate CHANGELOG.md 2022-08-04 22:40:00 +03:00
d1slike 5bf5373056 MSP-437 specify infra port 2022-08-04 21:49:14 +03:00
d1slike 8d2df6364b MSP-437 implement benchmark 2022-08-04 21:49:14 +03:00
d1slike e2b2d05777 MSP-437 implement tests 2022-08-04 21:49:14 +03:00
d1slike 3c0e0386e1 MSP-437 implement test redis client 2022-08-04 21:49:14 +03:00
d1slike 773fbe7883 MSP-437 add unused redis cache 2022-08-04 21:49:14 +03:00
d1slike e663429dfe MSP-437 reimplement assembly 2022-08-04 21:49:14 +03:00
d1slike 61f4d16ef8 MSP-437 reimplement locator 2022-08-04 21:49:14 +03:00
d1slike ff7e47a64e MSP-437 implement throttling middleware 2022-08-04 21:49:14 +03:00
d1slike d71dc62634 MSP-437 implement daily limit middleware 2022-08-04 21:49:14 +03:00
d1slike 0367fa8ac7 MSP-437 implement admin authz middleware 2022-08-04 21:49:14 +03:00
d1slike 14995e91dd MSP-437 implement authz middleware 2022-08-04 21:49:13 +03:00
d1slike e64a58e85a MSP-437 implement admin auth middleware 2022-08-04 21:49:13 +03:00
d1slike 51d9cc0397 MSP-437 implement auth middleware 2022-08-04 21:49:13 +03:00
d1slike f9f127f6b9 MSP-437 implement error handler 2022-08-04 21:49:13 +03:00
d1slike a73b9c119e MSP-437 implement logger middleware 2022-08-04 21:49:13 +03:00
d1slike 901f350adb MSP-437 implement request id middleware 2022-08-04 21:49:13 +03:00
d1slike 0b08f532e1 MSP-437 implement entrypoint handler 2022-08-04 21:49:13 +03:00
d1slike 2c29a2f0a3 MSP-437 implement http error wrapper 2022-08-04 21:49:13 +03:00
d1slike 71100e8c7b MSP-437 drop ws proxy 2022-08-04 21:49:13 +03:00
d1slike fd40a83e83 MSP-437 reimplement http proxy 2022-08-04 21:49:13 +03:00
d1slike e7a165875d MSP-437 reimplement grpc proxy 2022-08-04 21:49:13 +03:00
d1slike cd5e286fb0 MSP-437 implement error wrapper 2022-08-04 21:49:13 +03:00
d1slike 9408f5d83f MSP-437 implement request context 2022-08-04 21:49:13 +03:00
d1slike cd6b4729aa MSP-437 reimplement routes storage 2022-08-04 21:49:13 +03:00
d1slike 5d4729e0c7 MSP-437 reimplement admin service 2022-08-04 21:49:13 +03:00
d1slike 4b0ff6f627 MSP-437 implement throttling service 2022-08-04 21:49:13 +03:00
d1slike b415ce8acf MSP-437 implement throttling repository 2022-08-04 21:49:13 +03:00
d1slike 9e205573ea MSP-437 add throttling domain 2022-08-04 21:49:13 +03:00
d1slike 6a8c628570 MSP-437 implement daily limit service 2022-08-04 21:49:13 +03:00
d1slike 83668d944a MSP-437 implement daily limit repository 2022-08-04 21:49:13 +03:00
d1slike a6c7ff3af3 MSP-437 implement authz service 2022-08-04 21:49:13 +03:00
d1slike 5bda86fe46 MSP-437 implement authz cache repository 2022-08-04 21:49:13 +03:00
d1slike 46f447447b MSP-437 implement auth service 2022-08-04 21:49:13 +03:00
d1slike 2ca358a4ea MSP-437 implement auth cache repository 2022-08-04 21:49:13 +03:00
d1slike bd4b52e5cc MSP-437 implement simple cache 2022-07-27 10:44:07 +03:00
d1slike ed77144fdf MSP-437 implement system repository 2022-07-27 10:44:07 +03:00
d1slike 963d8a1dfe MSP-437 add system service domains 2022-07-27 10:44:07 +03:00
d1slike 12908ef2dc MSP-437 reimplement remote config 2022-07-27 10:44:07 +03:00
d1slike a7e312b066 MSP-437 bump dependencies 2022-07-27 10:44:07 +03:00
DeniskaRediska 3a526a25cc MSP-625 up version 2022-07-27 10:44:07 +03:00
DeniskaRediska 363785db94 MSP-625 up gitignore 2022-07-27 10:44:07 +03:00
DeniskaRediska 3999f9c514 MSP-625 update main 2022-07-27 10:44:07 +03:00
DeniskaRediska f2928ddcf7 MSP-625 reimplement proxy 2022-07-27 10:44:07 +03:00
DeniskaRediska ba2aeaf556 MSP-625 init assembly 2022-07-27 10:44:07 +03:00
DeniskaRediska 1a63a616ee MSP-625 reimplement authorize 2022-07-27 10:44:07 +03:00
DeniskaRediska 668cbb37d2 MSP-625 reimplement authenticate 2022-07-27 10:44:07 +03:00
DeniskaRediska 538e9a7aab MSP-625 init admin service 2022-07-27 10:44:07 +03:00
DeniskaRediska c1dd4b1846 MSP-625 remove health_check proxy 2022-07-27 10:44:07 +03:00
DeniskaRediska 266f3cbc20 MSP-625 reimplement grpc proxy 2022-07-27 10:44:07 +03:00
DeniskaRediska 6940b30756 MSP-625 reimplement websocket proxy 2022-07-27 10:44:07 +03:00
DeniskaRediska 3f9d25c217 MSP-625 reimplement http proxy 2022-07-27 10:44:07 +03:00
DeniskaRediska 828ac1cd4f MSP-625 add path middleware 2022-07-27 10:44:07 +03:00
DeniskaRediska db3b6aa32f MSP-625 init middleware 2022-07-27 10:44:07 +03:00
DeniskaRediska 39a7899a98 MSP-625 update structs 2022-07-27 10:44:07 +03:00
DeniskaRediska 39dbeda9d8 MSP-625 update config 2022-07-27 10:44:07 +03:00
DeniskaRediska 9307c80b2b MSP-625 reimplement routes 2022-07-27 10:43:47 +03:00
DeniskaRediska d9605304d2 MSP-625 update dependencies 2022-07-27 10:43:47 +03:00
DeniskaRediska 29ed65b193 MSP-625 remove metrics 2022-07-27 10:43:47 +03:00
DeniskaRediska ad57079fc6 MSP-625 remove file handler 2022-07-27 10:43:47 +03:00
DeniskaRediska 6f511ddc53 MSP-625 remove db cli 2022-07-27 10:43:47 +03:00
DeniskaRediska b0f871d032 MSP-625 remove accounting 2022-07-27 10:43:47 +03:00
DeniskaRediska 6a150402d2 MSP-625 remove auth cache 2022-07-27 10:43:47 +03:00
Комиссаров Ян Вадимович 626eda7990 Update default_remote_config.json 2022-07-07 14:24:28 +00:00
Грязнов Денис Владимирович d207e56e68 Merge branch 'MSP-650' into 'master'
Resolve MSP-650

Closes MSP-650

See merge request integration-system/isp-gate-service!7
2022-05-04 08:14:43 +00:00
DeniskaRediska be6cce7bd1 MSP-650 up version 2022-04-29 18:38:18 +04:00
DeniskaRediska f71e29f145 MSP-650 up dependencies 2022-04-29 18:38:18 +04:00
DeniskaRediska 5157143904 MSP-650 up linter 2022-04-29 16:54:22 +04:00
DeniskaRediska 0102206734 MSP-650 move array keys to const 2022-04-29 16:54:22 +04:00
DeniskaRediska 67d0512c6b MSP-650 remove old logger 2022-04-29 16:54:22 +04:00
DeniskaRediska 0f002b5633 MSP-650 use isp-kit logger 2022-04-29 16:38:10 +04:00
Грязнов Денис Владимирович 1fdc36d797 Merge branch 'MSP-345' into 'master'
Resolve MSP-345

Closes MSP-345

See merge request integration-system/isp-gate-service!6
2021-10-28 12:55:13 +00:00
DeniskaRediska 3fe2126eaa MSP-345 up version 2021-10-28 15:32:47 +03:00
DeniskaRediska f82c264f95 MSP-345 add file rotation 2021-10-28 15:32:05 +03:00
Рябов Владислав Олегович 104524855c Merge branch 'MSP-333_xml_log_support' into 'master'
Resolve MSP-333 "Xml log support"

Closes MSP-333

See merge request integration-system/isp-gate-service!5
2021-10-28 09:25:53 +00:00
riabovvo 468653eba8 MSP-333 up version 2021-10-27 14:48:34 +03:00
riabovvo d6e1356b2a MSP-333 implement xml request/response body format support 2021-10-27 14:48:31 +03:00
Грязнов Денис Владимирович 97912e5d5a Merge branch 'MSP-325' into 'master'
Resolve MSP-325

Closes MSP-325

See merge request integration-system/isp-gate-service!4
2021-10-22 11:58:30 +00:00
DeniskaRediska eeddba7858 MSP-325 up version 2021-10-22 13:57:09 +03:00
DeniskaRediska 63f14564b8 MSP-325 add new params to log 2021-10-22 13:56:59 +03:00
DeniskaRediska ed7a49ef04 MSP-325 add ids return from authentication 2021-10-22 11:00:49 +03:00
DeniskaRediska 7b5c6165f2 MSP-325 remove journal 2021-10-22 11:00:49 +03:00
DeniskaRediska 04a07377c1 MSP-325 use new logger instead journal 2021-10-22 11:00:49 +03:00
DeniskaRediska 24b22aa7f1 MSP-325 add receiver argument to http requests handler 2021-10-22 11:00:49 +03:00
DeniskaRediska 05bdf75e95 MSP-325 add new logger 2021-10-22 11:00:49 +03:00
DeniskaRediska 71e78d01e7 MSP-325 rename model to repository 2021-10-22 11:00:43 +03:00
Мержанов Максим Владимирович ed83722c76 Merge branch 'local_config_migrate' into 'master'
migrate local config to config.CommonLocalConfig, update dependencies

See merge request integration-system/isp-gate-service!3
2021-08-13 11:27:41 +00:00
Maxim Merzhanov 43679853e7 migrate local config to config.CommonLocalConfig, update dependencies 2021-08-09 15:29:39 +03:00
Мержанов Максим Владимирович 13477fa8ca Merge branch '__deps' into 'master'
Update dependencies

See merge request integration-system/isp-gate-service!2
2021-05-18 12:42:01 +00:00
Egor Kiryushchenko b25956d028 Update dependencies 2021-05-17 16:25:25 +03:00
Maxim Merzhanov f2e9438605 add admin websocket location to default config.yml 2021-02-05 13:29:43 +03:00
Мержанов Максим Владимирович 0afe95786f Merge branch '__deps' into 'master'
Update dependencies

See merge request integration-system/isp-gate-service!1
2021-01-25 14:20:45 +03:00
Egor Kiryushchenko 814d8dc15a Update dependencies 2021-01-25 12:24:17 +03:00
Максим Мержанов 7db2eb84b5 Merge branch '__deps' into 'master'
Update dependencies

See merge request integration-system/isp-gate-service!23
2020-11-24 16:51:06 +03:00
Egor Kiryushchenko 77112d82f8 fix2 lint 2020-11-24 09:44:57 +03:00
Egor Kiryushchenko 3125d7cd10 Update dependencies 2020-11-24 09:38:34 +03:00
Egor Kiryushchenko 3608c729f7 fix 2020-11-20 16:28:36 +03:00
Egor Kiryushchenko 248801bbf7 fix lint 2020-11-20 16:10:16 +03:00
Egor Kiryushchenko 607ecf629c Update dependencies 2020-11-19 10:31:12 +03:00
DeniskaRediska aa3bed6ff8 fix accounting requests 2020-09-23 13:58:32 +03:00
Максим Мержанов 447d719a16 Merge branch 'fix_default_config' into 'master'
fix default local config

See merge request integration-system/isp-gate-service!10
2020-09-15 17:43:05 +03:00
Maxim Merzhanov e6bdec3f1e fix default local config 2020-09-15 12:53:43 +03:00
d1slike 2d45f210db fix linter 2020-06-03 14:04:49 +03:00
d1slike 2aff6210b5 update libs 2020-06-03 14:02:41 +03:00
d1slike 8d8369b4cc test commits message 2020-06-02 14:58:12 +03:00
d1slike b1c16e4901 update libs 2020-06-02 14:52:24 +03:00
yan komissarov 48cbb5c25d Merge branch 'fixes' into 'master'
fix search in locations, fix proxying URI in http

See merge request integration-system/isp-gate-service!9
2020-04-27 12:20:12 +03:00
Maxim Merzhanov 037c5f3fcd up version 2020-04-27 12:15:41 +03:00
d1slike 8c732a15e2 small ref 2020-04-27 12:00:50 +03:00
Maxim Merzhanov 896dd36025 fix search in locations, fix proxying URI in http 2020-04-24 19:12:31 +03:00
d1slike f0b8407479 add missing journaling 2020-03-20 14:50:35 +03:00
d1slike c31c6aaf81 remove unstable ws lib 2020-03-20 14:26:06 +03:00
d1slike 478b1ce5d7 fix panic if journal enable and error logging 2020-03-20 14:15:33 +03:00
yan komissarov 453aa44148 Update .version 2020-03-19 17:19:26 +03:00
ykomissarov 9cd697a40d fix require module 2020-03-10 13:43:55 +03:00
yan komissarov 97d971fe14 Merge branch 'fix_auth_cache' into 'master'
migrate to go mod

See merge request integration-system/isp-gate-service!8
2020-03-10 10:57:54 +03:00
DeniskaRediska 68259fa369 up linter 2020-03-06 15:14:03 +03:00
DeniskaRediska 1794041802 update websocket pool 2020-03-06 14:05:36 +03:00
DeniskaRediska 72e6bbe6d7 migrate to go mod 2020-03-06 12:14:52 +03:00
DeniskaRediska 665641c88b update default remote config 2020-03-05 12:51:04 +03:00
yan komissarov b8d0c8e6d0 Merge branch 'fix_auth_cache' into 'master'
fix auth cache

See merge request integration-system/isp-gate-service!7
2020-03-04 19:12:34 +03:00
DeniskaRediska 9a9e941580 fix auth cache 2020-03-04 19:11:35 +03:00
DeniskaRediska 675a917c0c fix auth cache 2020-03-04 18:01:01 +03:00
Maxim Merzhanov 7e10fb5217 optimize allocations 2020-03-03 17:59:51 +03:00
yan komissarov 6d67d3a331 Merge branch 'fix_file_error_response' into 'master'
fix grpc multipart error response

See merge request integration-system/isp-gate-service!6
2020-02-19 11:56:12 +03:00
DeniskaRediska e2d45ecdd2 fix grpc multipart error response 2020-02-18 15:17:33 +03:00
yan komissarov 61ca62db75 Merge branch 'up_status_response' into 'master'
update error response

See merge request integration-system/isp-gate-service!5
2020-01-31 17:01:37 +03:00
DeniskaRediska e0ab3236d4 ref 2020-01-31 15:51:16 +03:00
DeniskaRediska 910fb81a0e update error response 2020-01-31 12:01:29 +03:00
yan komissarov f1c597bde9 Merge branch 'fix_init_http' into 'master'
fix init http

See merge request integration-system/isp-gate-service!4
2020-01-23 18:18:38 +03:00
DeniskaRediska f25ded3015 add stop working 2020-01-23 17:51:01 +03:00
DeniskaRediska 3f8e03eda4 fix init http 2020-01-23 17:46:39 +03:00
yan komissarov 50a7e32b48 Merge branch 'fix_config_reload' into 'master'
fix config reload and error response

See merge request integration-system/isp-gate-service!3
2020-01-23 17:02:39 +03:00
DeniskaRediska df31719324 fix config reload and error response 2020-01-23 14:21:21 +03:00
ykomissarov cc5da31e59 fix user id replacing 2020-01-17 14:16:19 +03:00
yan komissarov 2d936e543c Merge branch 'update_auth_check' into 'master'
add skip for check exist method && handler for user methods

See merge request integration-system/isp-gate-service!2
2020-01-17 13:29:28 +03:00
DeniskaRediska 91a14f9f23 add skip for check exist method && handler for user methods 2020-01-17 13:21:23 +03:00
yan komissarov 08c4fb9bee Merge branch 'access_checkout_by_user_id' into 'master'
add access checkout by user id

See merge request integration-system/isp-gate-service!1
2020-01-13 13:39:32 +03:00
DeniskaRediska dbaa347162 update remote config 2020-01-13 13:20:20 +03:00
DeniskaRediska 78f1fe43b9 update access checkout by user id 2020-01-13 12:14:17 +03:00
DeniskaRediska ab95347767 add access checkout by user id 2020-01-10 16:03:26 +03:00
ykomissarov 7dd989bac2 fix rc 2020-01-09 18:48:02 +03:00
ykomissarov b9dc101141 try 2020-01-09 18:31:51 +03:00
ykomissarov b3452ef5f6 try fix rc 2020-01-09 18:19:33 +03:00
ykomissarov 41357efef0 fix concurrent read 2020-01-09 18:09:50 +03:00
ykomissarov b0cac278d2 add mutex 2020-01-09 18:06:50 +03:00
ykomissarov 75abb294c0 fix race 2020-01-09 18:00:02 +03:00
Jenkins Automation Server 3d02fa550d Update dependencies 2020-01-09 17:40:34 +03:00
Yan 8a9accbdeb Merge pull request #9 from integration-system/tokens_get_params
add support for tokens in get params
2019-12-16 11:11:54 +03:00
Maxim Merzhanov 88bff98d25 add support for tokens in get params 2019-12-13 19:01:16 +03:00
Yan bdb0c50a22 Merge pull request #8 from integration-system/websocket_proxy
add websocket proxy
2019-12-13 17:56:58 +03:00
Maxim Merzhanov 0cf2b61ce3 add proxying cookies in websocket proxy
fix bug in http proxy when receive 0 addresses
2019-12-13 17:38:43 +03:00
Maxim Merzhanov 6ec99e8d1f add websocket proxy, up version 2019-12-13 16:10:20 +03:00
Yan a6c1fcb972 Merge pull request #7 from integration-system/update_proxy
Update proxy
2019-11-28 13:48:29 +03:00
ykomissarov ed91071557 remove atomic 2019-11-28 12:27:36 +03:00
ykomissarov 6e1770273e ref 2019-11-28 12:23:03 +03:00
DeniskaRediska 5a462ef158 fix snapshot recovery 2019-11-28 12:01:28 +03:00
DeniskaRediska a3415470f7 ref 2019-11-27 18:42:35 +03:00
DeniskaRediska 909a26eace refactoring 2019-11-27 15:28:36 +03:00
DeniskaRediska 1ffe9e4a62 fix recovery accounting 2019-11-27 13:46:46 +03:00
DeniskaRediska 909ff91b2b add snapshot version 2019-11-26 17:28:22 +03:00
DeniskaRediska 4c7e96813c add accounting version & fix proxy consumer 2019-11-26 12:11:13 +03:00
DeniskaRediska 244d8fbdc2 fix proxy path & add skip auth 2019-11-25 15:44:03 +03:00
ykomissarov 745a4ae1e2 rename 2019-11-25 15:32:57 +03:00
ykomissarov 38806190e7 upd ver 2019-11-21 15:26:21 +03:00
ykomissarov 3e593f759d Merge remote-tracking branch 'origin/accounting_request'
# Conflicts:
#	.version
#	CHANGELOG.md
2019-11-21 15:24:55 +03:00
ykomissarov 0672da8e9c upd lib 2019-11-21 15:24:19 +03:00
DeniskaRediska bc53089fce fix storing close 2019-11-21 15:17:44 +03:00
ykomissarov 7a22e3558e ref 2019-11-21 14:46:39 +03:00
DeniskaRediska 3c801a4c09 fix storing test 2019-11-21 13:06:18 +03:00
ykomissarov b4541f6c1b refactoring 2019-11-21 11:39:20 +03:00
DeniskaRediska 7acc4ebbd6 update error message 2019-11-20 17:28:50 +03:00
DeniskaRediska 1665cc78cf up version 2019-11-20 13:47:37 +03:00
DeniskaRediska 8dcb8eef68 add unloading setting for application 2019-11-20 13:41:45 +03:00
DeniskaRediska 37c08f4500 add unloading all requests 2019-11-19 19:02:17 +03:00
DeniskaRediska 8af97e56d7 add recovery limit state from storage 2019-11-19 12:21:22 +03:00
ykomissarov f9138cbbfe add x-instance-identity header 2019-11-19 10:44:44 +03:00
DeniskaRediska 4d81fe7a26 add accounting snapshot 2019-11-18 15:48:50 +03:00
DeniskaRediska 3d2cee1ae8 add snapshot 2019-11-15 19:18:47 +03:00
Yan 9eb5a3030b Update default_remote_config.json 2019-11-15 13:34:15 +03:00
Yan bad913e339 Merge pull request #4 from integration-system/update-auth
update auth
2019-11-15 13:32:33 +03:00
ykomissarov 0e3c14d099 ref 2019-11-15 13:27:34 +03:00
DeniskaRediska 23ede62f24 add(jwt verify) 2019-11-13 17:32:42 +03:00
DeniskaRediska fc80638b76 up default remote config 2019-11-08 17:41:10 +03:00
Yan 8f57203d96 Merge pull request #3 from integration-system/approve-request
Approve request
2019-11-08 16:38:15 +03:00
DeniskaRediska 422bdb9831 ref 2019-11-08 16:36:43 +03:00
DeniskaRediska 8c68ffea8c up(matcher) 2019-11-08 11:49:37 +03:00
DeniskaRediska f802b2000d up(proxy response) 2019-11-07 19:16:40 +03:00
DeniskaRediska 1a46b678ef up approve matcher 2019-11-07 18:08:17 +03:00
DeniskaRediska 3d97f3789a add(metrics and journaling) 2019-11-07 17:55:27 +03:00
DeniskaRediska 2a81e83b2e fix(approve mutex) 2019-11-06 19:14:40 +03:00
DeniskaRediska 1a8ed4e8ea add(approve request) 2019-11-06 16:38:50 +03:00
DeniskaRediska e3c3b86b04 up log code 2019-10-25 12:20:52 +03:00
DeniskaRediska a9e03750ab up version 2019-10-25 11:50:33 +03:00
DeniskaRediska 0edf80ffed add admin authenticate 2019-10-25 11:31:18 +03:00
DeniskaRediska 5b115440f1 ref 2019-10-24 16:31:08 +03:00
DeniskaRediska 4fdf7c0ca2 ref 2019-10-24 14:37:22 +03:00
DeniskaRediska f3934e038e fix panic 2019-10-23 15:41:58 +03:00
DeniskaRediska 3461f20510 fix(fine cmd) 2019-10-23 15:11:18 +03:00
DeniskaRediska b6baa9e5e7 init auth 2019-10-23 14:17:28 +03:00
DeniskaRediska 3a4931ca8c init 2019-10-22 13:27:32 +03:00
DeniskaRediska 70f5ebeb4b fix test 2019-10-22 12:42:19 +03:00
DeniskaRediska b29f3c6dcd add server route 2019-10-22 12:40:21 +03:00
DeniskaRediska fe6f1f5e5a init 2019-10-21 17:12:34 +03:00
49 changed files with 397 additions and 365 deletions

No files matched your search

-60
View File
@@ -1,60 +0,0 @@
name: Create and publish a Docker image
on:
push:
tags:
- 'v*'
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
APP_NAME: ${{ github.event.repository.name }}
jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
attestations: write
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Get version from tag
id: version_reader
run: |
VERSION=${GITHUB_REF_NAME#v}
echo "version=$VERSION" >> $GITHUB_OUTPUT
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver: docker-container
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
id: push
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.version_reader.outputs.version }}
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
labels: |
org.opencontainers.image.title=${{ env.IMAGE_NAME }}
org.opencontainers.image.version=${{ steps.version_reader.outputs.version }}
build-args: |
app_name=${{ env.APP_NAME }}
version=${{ steps.version_reader.outputs.version }}
- name: Generate artifact attestation
uses: actions/attest-build-provenance@v2
with:
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true
+8 -1
View File
@@ -15,13 +15,17 @@ linters:
- nolintlint # Goland все равно форматирует с отступом - nolintlint # Goland все равно форматирует с отступом
- perfsprint # мнимая производительность в угоду читаемости - perfsprint # мнимая производительность в угоду читаемости
- tagalign # не всегда имеет смысл - tagalign # не всегда имеет смысл
- testpackage
- varnamelen # очень индивидуально (db) - varnamelen # очень индивидуально (db)
- wsl # расставление пробелов очень индивидуально - wsl # расставление пробелов очень индивидуально
- wsl_v5 # расставление пробелов очень индивидуально - wsl_v5 # расставление пробелов очень индивидуально
- godoclint # ругается на // nolint, не удобно - godoclint # ругается на // nolint, не удобно
- prealloc # слишком аггресивный, в большинстве случаев не требуется - prealloc # слишком аггресивный, в большинстве случаев не требуется
- gomodguard # deprecated
- goconst # слишком агрессивный
settings: settings:
exhaustruct_v5:
allow-empty: true
explicit-mode: true
cyclop: cyclop:
max-complexity: 15 # по умолчанию 10 мало max-complexity: 15 # по умолчанию 10 мало
funlen: funlen:
@@ -71,6 +75,9 @@ linters:
- linters: - linters:
- wrapcheck - wrapcheck
path: httperrors #отсутствует необходимость оборачивать ошибки path: httperrors #отсутствует необходимость оборачивать ошибки
- linters:
- goconst
path: "tests/" # компонентные тесты: фикстуры и моки не выносим в константы
paths: paths:
- third_party$ - third_party$
- builtin$ - builtin$
+1 -1
View File
@@ -1 +1 @@
5.10.2 5.12.0
+12
View File
@@ -1,3 +1,15 @@
### v5.12.0
* взаимодействие с `isp-admin-service` переведено с gRPC на HTTP
### v5.11.4
* добавлена возможность через переменную окружения `adminServiceName` переопределить название сервиса `msp-admin-service`
### v5.11.3
* добавлена настройка для преопределения content-type в ответе с `application/json` на `application/json; charset=utf-8` для конкретных приложений
### v5.11.2
* обновлены зависимости
### v5.11.1
* Обновлен isp-kit
### v5.11.0
* Добавлена поддержка нескольких `tokenProvider` для `customAuth.userAuthSettings`: используется первый провайдер, вернувший токен
### v5.10.2 ### v5.10.2
* Убрано дублирование поля `requestId` при логгировании * Убрано дублирование поля `requestId` при логгировании
### v5.10.1 ### v5.10.1
+14 -11
View File
@@ -8,18 +8,20 @@ import (
"isp-gate-service/conf" "isp-gate-service/conf"
"isp-gate-service/routes" "isp-gate-service/routes"
"github.com/pkg/errors"
"github.com/txix-open/isp-kit/app" "github.com/txix-open/isp-kit/app"
"github.com/txix-open/isp-kit/bootstrap" "github.com/txix-open/isp-kit/bootstrap"
"github.com/txix-open/isp-kit/cluster" "github.com/txix-open/isp-kit/cluster"
"github.com/txix-open/isp-kit/errors"
"github.com/txix-open/isp-kit/grpc/client" "github.com/txix-open/isp-kit/grpc/client"
"github.com/txix-open/isp-kit/http" "github.com/txix-open/isp-kit/http"
"github.com/txix-open/isp-kit/http/httpclix"
"github.com/txix-open/isp-kit/lb" "github.com/txix-open/isp-kit/lb"
"github.com/txix-open/isp-kit/log" "github.com/txix-open/isp-kit/log"
) )
const ( const (
routerModuleName = "isp-router-service" routerModuleName = "isp-router-service"
defaultAdminServiceName = "msp-admin-service"
usersAuthCachePurgeInterval = 5 * time.Second usersAuthCachePurgeInterval = 5 * time.Second
) )
@@ -29,11 +31,11 @@ type Assembly struct {
logger *log.Adapter logger *log.Adapter
routes *routes.Routes routes *routes.Routes
systemCli *client.Client systemCli *client.Client
adminCli *client.Client adminCli *httpclix.ClientBalancer
lockerCli *client.Client lockerCli *client.Client
routerLb *lb.RoundRobin routerLb *lb.RoundRobin
locations []conf.Location localConfig conf.Local
grpcClientByModuleName map[string]*client.Client grpcClientByModuleName map[string]*client.Client
httpHostManagerByModuleName map[string]*lb.RoundRobin httpHostManagerByModuleName map[string]*lb.RoundRobin
@@ -71,10 +73,7 @@ func New(boot *bootstrap.Bootstrap) (*Assembly, error) {
if err != nil { if err != nil {
return nil, errors.WithMessage(err, "create system cli") return nil, errors.WithMessage(err, "create system cli")
} }
adminCli, err := client.Default() adminCli := httpclix.DefaultWithBalancer(nil)
if err != nil {
return nil, errors.WithMessage(err, "create admin cli")
}
lockerCli, err := client.Default() lockerCli, err := client.Default()
if err != nil { if err != nil {
return nil, errors.WithMessage(err, "create isp-lock-service client") return nil, errors.WithMessage(err, "create isp-lock-service client")
@@ -85,7 +84,7 @@ func New(boot *bootstrap.Bootstrap) (*Assembly, error) {
server: server, server: server,
logger: boot.App.Logger(), logger: boot.App.Logger(),
routes: routes.NewRoutes(boot.App.Logger()), routes: routes.NewRoutes(boot.App.Logger()),
locations: localConfig.Locations, localConfig: localConfig,
grpcClientByModuleName: grpcClientByModuleName, grpcClientByModuleName: grpcClientByModuleName,
httpHostManagerByModuleName: httpHostManagerByModuleName, httpHostManagerByModuleName: httpHostManagerByModuleName,
systemCli: systemCli, systemCli: systemCli,
@@ -118,7 +117,7 @@ func (a *Assembly) ReceiveConfig(ctx context.Context, remoteConfig []byte) error
a.routerLb, a.routerLb,
a.usersAuthCache, a.usersAuthCache,
) )
handler, err := locator.Handler(newCfg, a.locations) handler, err := locator.Handler(newCfg, a.localConfig.Locations)
if err != nil { if err != nil {
return errors.WithMessage(err, "locator handler") return errors.WithMessage(err, "locator handler")
} }
@@ -139,8 +138,12 @@ func (a *Assembly) Runners() []app.Runner {
for moduleName, upgrader := range a.httpHostManagerByModuleName { for moduleName, upgrader := range a.httpHostManagerByModuleName {
eventHandler.RequireModule(moduleName, upgrader) eventHandler.RequireModule(moduleName, upgrader)
} }
adminServiceName := a.localConfig.AdminServiceName
if adminServiceName == "" {
adminServiceName = defaultAdminServiceName
}
eventHandler.RequireModule("isp-system-service", a.systemCli) eventHandler.RequireModule("isp-system-service", a.systemCli)
eventHandler.RequireModule("msp-admin-service", a.adminCli) eventHandler.RequireModule(adminServiceName, a.adminCli)
eventHandler.RequireModule("isp-lock-service", a.lockerCli) eventHandler.RequireModule("isp-lock-service", a.lockerCli)
eventHandler.RequireModule(routerModuleName, a.routerLb) eventHandler.RequireModule(routerModuleName, a.routerLb)
@@ -168,7 +171,7 @@ func (a *Assembly) Closers() []app.Closer {
for _, cliCloser := range a.grpcClientByModuleName { for _, cliCloser := range a.grpcClientByModuleName {
closers = append(closers, cliCloser) closers = append(closers, cliCloser)
} }
closers = append(closers, a.systemCli, a.adminCli, a.lockerCli) closers = append(closers, a.systemCli, a.lockerCli)
return closers return closers
} }
+10 -3
View File
@@ -5,6 +5,7 @@ import (
"strings" "strings"
"time" "time"
"github.com/txix-open/isp-kit/http/httpclix"
"github.com/txix-open/isp-kit/metrics" "github.com/txix-open/isp-kit/metrics"
"github.com/txix-open/isp-kit/metrics/http_metrics" "github.com/txix-open/isp-kit/metrics/http_metrics"
@@ -17,7 +18,7 @@ import (
"isp-gate-service/service" "isp-gate-service/service"
mux2 "github.com/gorilla/mux" mux2 "github.com/gorilla/mux"
"github.com/pkg/errors" "github.com/txix-open/isp-kit/errors"
"github.com/txix-open/isp-kit/grpc/client" "github.com/txix-open/isp-kit/grpc/client"
"github.com/txix-open/isp-kit/lb" "github.com/txix-open/isp-kit/lb"
"github.com/txix-open/isp-kit/log" "github.com/txix-open/isp-kit/log"
@@ -29,7 +30,7 @@ type Locator struct {
httpHostManagerByModuleName map[string]*lb.RoundRobin httpHostManagerByModuleName map[string]*lb.RoundRobin
routes *routes.Routes routes *routes.Routes
systemCli *client.Client systemCli *client.Client
adminCli *client.Client adminCli *httpclix.ClientBalancer
lockerCli *client.Client lockerCli *client.Client
routerLb *lb.RoundRobin routerLb *lb.RoundRobin
usersAuthCache *cache.Cache usersAuthCache *cache.Cache
@@ -41,7 +42,7 @@ func NewLocator(
httpHostManagerByModuleName map[string]*lb.RoundRobin, httpHostManagerByModuleName map[string]*lb.RoundRobin,
routes *routes.Routes, routes *routes.Routes,
systemCli *client.Client, systemCli *client.Client,
adminCli *client.Client, adminCli *httpclix.ClientBalancer,
lockerCli *client.Client, lockerCli *client.Client,
routerLb *lb.RoundRobin, routerLb *lb.RoundRobin,
usersAuthCache *cache.Cache, usersAuthCache *cache.Cache,
@@ -124,6 +125,11 @@ func (l Locator) Handler(config conf.Remote, locations []conf.Location) (http.Ha
forwardReqIdByAppId[setting.ApplicationId] = setting.ForwardRequestId forwardReqIdByAppId[setting.ApplicationId] = setting.ForwardRequestId
} }
enableUtf8JsonCharsetByApp := make(map[int]bool, len(config.ResponseContentTypeSettings))
for _, setting := range config.ResponseContentTypeSettings {
enableUtf8JsonCharsetByApp[setting.ApplicationId] = setting.AddJsonUtf8Charset
}
metricsStorage := http_metrics.NewServerStorage(metrics.DefaultRegistry) metricsStorage := http_metrics.NewServerStorage(metrics.DefaultRegistry)
handler := middleware.Chain( handler := middleware.Chain(
@@ -140,6 +146,7 @@ func (l Locator) Handler(config conf.Remote, locations []conf.Location) (http.Ha
middleware.Authenticate(authentication), middleware.Authenticate(authentication),
middleware.AdminAuthenticate(adminService), middleware.AdminAuthenticate(adminService),
middleware.ClientRequestId(config.EnableClientRequestIdForwarding, forwardReqIdByAppId), middleware.ClientRequestId(config.EnableClientRequestIdForwarding, forwardReqIdByAppId),
middleware.JsonResponseUtf8Charset(enableUtf8JsonCharsetByApp),
middleware.Authorize(authorization, l.logger), middleware.Authorize(authorization, l.logger),
middleware.AdminAuthorize(adminService), middleware.AdminAuthorize(adminService),
middleware.Throttling(throttlingService), middleware.Throttling(throttlingService),
+2 -1
View File
@@ -17,8 +17,9 @@ logfile:
maxBackups: 4 maxBackups: 4
compress: true compress: true
adminServiceName: msp-admin-service
locations: locations:
- pathPrefix: /api - pathPrefix: /api
protocol: grpc protocol: grpc
targetModule: router targetModule: router
+2 -1
View File
@@ -7,7 +7,8 @@ const (
) )
type Local struct { type Local struct {
Locations []Location Locations []Location
AdminServiceName string
} }
type Location struct { type Location struct {
+7 -1
View File
@@ -30,6 +30,7 @@ type Remote struct {
EnableClientRequestIdForwarding bool `schema:"Включить проброс requestId из заголовка запроса"` EnableClientRequestIdForwarding bool `schema:"Включить проброс requestId из заголовка запроса"`
ForwardReqIdClientSettings []ForwardReqIdClientSettings `schema:"Настройки проброcа requestId для приложений"` ForwardReqIdClientSettings []ForwardReqIdClientSettings `schema:"Настройки проброcа requestId для приложений"`
CustomAuth CustomAuth `schema:"Настройка кастомной аутентификации/авторизации"` CustomAuth CustomAuth `schema:"Настройка кастомной аутентификации/авторизации"`
ResponseContentTypeSettings []ResponseContentTypeSetting `schema:"Настройки Content-Type ответов"`
} }
type ForwardReqIdClientSettings struct { type ForwardReqIdClientSettings struct {
@@ -93,8 +94,13 @@ type CookieTokenProvider struct {
type UserAuthSetting struct { type UserAuthSetting struct {
ModuleNameList []string `schema:"Название модулей,для которых настраивается аутентификация/авторизация,название модулей должно быть уникальным" validate:"required"` ModuleNameList []string `schema:"Название модулей,для которых настраивается аутентификация/авторизация,название модулей должно быть уникальным" validate:"required"`
TokenProvider string `schema:"Название метода получения токена из запроса" validate:"required"` TokenProviders []string `schema:"Список названий методов получения токена из запроса,используется первый провайдер, вернувший токен"`
AuthenticateEndpoint string `schema:"Endpoint для аутентификации пользователя,вызывается через isp-router-service" validate:"required"` AuthenticateEndpoint string `schema:"Endpoint для аутентификации пользователя,вызывается через isp-router-service" validate:"required"`
CacheDataInSec int `schema:"Время кеширования данных аутентификации/авторизации пользователя,отключен при значениях <=0,в секундах"` CacheDataInSec int `schema:"Время кеширования данных аутентификации/авторизации пользователя,отключен при значениях <=0,в секундах"`
SkipAppAuth bool `schema:"Пропустить аутентификацию и авторизацию приложения"` SkipAppAuth bool `schema:"Пропустить аутентификацию и авторизацию приложения"`
} }
type ResponseContentTypeSetting struct {
ApplicationId int `validate:"required" schema:"ID приложения"`
AddJsonUtf8Charset bool `schema:"Добавлять charset=utf-8 в Content-Type ответа: application/json для locations с protocol=http"`
}
-3
View File
@@ -8,9 +8,6 @@ type AuthenticateAppResponse struct {
type AppAuthData struct { type AppAuthData struct {
AppName string AppName string
SystemId int
DomainId int
ServiceId int
ApplicationId int ApplicationId int
} }
+1 -1
View File
@@ -1,7 +1,7 @@
package domain package domain
import ( import (
"github.com/pkg/errors" "github.com/txix-open/isp-kit/errors"
) )
var ( var (
+1 -1
View File
@@ -1,6 +1,6 @@
package domain package domain
import "github.com/pkg/errors" import "github.com/txix-open/isp-kit/errors"
var ( var (
ErrUserAuthSettingNotFound = errors.New("user auth setting not found") ErrUserAuthSettingNotFound = errors.New("user auth setting not found")
-3
View File
@@ -2,8 +2,5 @@ package entity
type AppAuthData struct { type AppAuthData struct {
AppName string AppName string
SystemId int
DomainId int
ServiceId int
ApplicationId int ApplicationId int
} }
+45 -48
View File
@@ -1,81 +1,78 @@
module isp-gate-service module isp-gate-service
go 1.26 go 1.27
require ( require (
github.com/google/uuid v1.6.0 github.com/google/uuid v1.6.0
github.com/gorilla/mux v1.8.1 github.com/gorilla/mux v1.8.1
github.com/gorilla/websocket v1.5.3 github.com/gorilla/websocket v1.5.3
github.com/pkg/errors v0.9.1 github.com/julienschmidt/httprouter v1.3.0
github.com/redis/go-redis/v9 v9.18.0 github.com/redis/go-redis/v9 v9.18.0
github.com/stretchr/testify v1.11.1 github.com/stretchr/testify v1.12.1
github.com/tomakado/websocketproxy v0.1.0 github.com/tomakado/websocketproxy v0.1.0
github.com/txix-open/isp-kit v1.66.4 github.com/txix-open/etp/v3 v3.2.0
github.com/txix-open/isp-kit v1.76.0
github.com/txix-open/jsonschema v1.3.0 github.com/txix-open/jsonschema v1.3.0
golang.org/x/net v0.53.0 google.golang.org/genproto/googleapis/rpc v0.0.0-20261118221215-c8830f628b3f
google.golang.org/genproto/googleapis/rpc v0.0.0-20260414002931-afd174a4e478 google.golang.org/grpc v1.85.0
google.golang.org/grpc v1.80.0
)
require (
github.com/cenkalti/backoff/v5 v5.0.3 // indirect
github.com/go-faker/faker/v4 v4.7.0 // indirect
github.com/txix-open/etp/v4 v4.0.1 // indirect
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
go.uber.org/atomic v1.11.0 // indirect
go.yaml.in/yaml/v2 v2.4.4 // indirect
) )
require ( require (
github.com/bahlo/generic-list-go v0.2.0 // indirect github.com/bahlo/generic-list-go v0.2.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect github.com/beorn7/perks v1.0.1 // indirect
github.com/buger/jsonparser v1.1.2 // indirect github.com/buger/jsonparser v1.6.1 // indirect
github.com/cenkalti/backoff/v5 v5.0.3 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/coder/websocket v1.8.14 // indirect github.com/coder/websocket v1.8.15 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
github.com/gabriel-vasile/mimetype v1.4.13 // indirect github.com/gabriel-vasile/mimetype v1.4.16 // indirect
github.com/getsentry/sentry-go v0.45.1 // indirect github.com/getsentry/sentry-go v0.50.0 // indirect
github.com/go-logr/logr v1.4.3 // indirect github.com/go-faker/faker/v4 v4.12.0 // indirect
github.com/go-logr/logr v1.4.4 // indirect
github.com/go-logr/stdr v1.2.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/locales v0.14.2 // indirect
github.com/go-playground/universal-translator v0.18.1 // indirect github.com/go-playground/universal-translator v0.18.2 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.29.0 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.34.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect github.com/json-iterator/go v1.1.12 // indirect
github.com/julienschmidt/httprouter v1.3.0 github.com/klauspost/compress v1.20.4 // indirect
github.com/leodido/go-urn v1.4.0 // indirect github.com/leodido/go-urn v1.5.0 // indirect
github.com/mailru/easyjson v0.9.2 // indirect github.com/mailru/easyjson v0.9.2 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect github.com/pandatix/go-abnf v0.5.5 // indirect
github.com/prometheus/client_golang v1.23.2 // indirect github.com/prometheus/client_golang v1.25.0 // indirect
github.com/prometheus/client_model v0.6.2 // indirect github.com/prometheus/client_model v0.6.3 // indirect
github.com/prometheus/common v0.67.5 // indirect github.com/prometheus/common v0.74.0 // indirect
github.com/prometheus/procfs v0.20.1 // indirect github.com/prometheus/procfs v0.23.0 // indirect
github.com/txix-open/bellows v1.2.0 // indirect github.com/txix-open/bellows v1.2.0 // indirect
github.com/txix-open/etp/v3 v3.2.0 github.com/txix-open/etp/v4 v4.1.3 // indirect
github.com/txix-open/validator/v10 v10.0.0-20250506161033-f8ce404fffdb // indirect github.com/txix-open/validator/v10 v10.0.0-20261027072444-85f3391fc5c3 // indirect
github.com/wk8/go-ordered-map/v2 v2.1.8 // indirect github.com/wk8/go-ordered-map/v2 v2.1.8 // indirect
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
github.com/xeipuuv/gojsonschema v1.2.0 // indirect github.com/xeipuuv/gojsonschema v1.2.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.68.0 // indirect go.opentelemetry.io/auto/sdk v1.2.1 // indirect
go.opentelemetry.io/otel v1.43.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.72.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.43.0 // indirect go.opentelemetry.io/otel v1.47.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.43.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.47.0 // indirect
go.opentelemetry.io/otel/metric v1.43.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.47.0 // indirect
go.opentelemetry.io/otel/sdk v1.43.0 // indirect go.opentelemetry.io/otel/log v1.47.0 // indirect
go.opentelemetry.io/otel/trace v1.43.0 // indirect go.opentelemetry.io/otel/metric v1.47.0 // indirect
go.opentelemetry.io/proto/otlp v1.10.0 // indirect go.opentelemetry.io/otel/sdk v1.47.0 // indirect
go.opentelemetry.io/otel/trace v1.47.0 // indirect
go.opentelemetry.io/proto/otlp v1.11.1 // indirect
go.uber.org/atomic v1.12.0 // indirect
go.uber.org/multierr v1.11.0 // indirect go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.27.1 // indirect go.uber.org/zap v1.28.0 // indirect
golang.org/x/crypto v0.50.0 // indirect go.yaml.in/yaml/v3 v3.0.6 // indirect
golang.org/x/sys v0.43.0 // indirect golang.org/x/crypto v0.59.0 // indirect
golang.org/x/text v0.36.0 // indirect golang.org/x/net v0.63.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20260414002931-afd174a4e478 // indirect golang.org/x/sys v0.50.0 // indirect
google.golang.org/protobuf v1.36.11 // indirect golang.org/x/text v0.44.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20261118221215-c8830f628b3f // indirect
google.golang.org/protobuf v1.36.12 // indirect
gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect
) )
+94 -92
View File
@@ -8,42 +8,39 @@ github.com/bsm/ginkgo/v2 v2.12.0 h1:Ny8MWAHyOepLGlLKYmXG4IEkioBysk6GpaRTLC8zwWs=
github.com/bsm/ginkgo/v2 v2.12.0/go.mod h1:SwYbGRRDovPVboqFv0tPTcG1sN61LM1Z4ARdbAV9g4c= github.com/bsm/ginkgo/v2 v2.12.0/go.mod h1:SwYbGRRDovPVboqFv0tPTcG1sN61LM1Z4ARdbAV9g4c=
github.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA= github.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA=
github.com/bsm/gomega v1.27.10/go.mod h1:JyEr/xRbxbtgWNi8tIEVPUYZ5Dzef52k01W3YH0H+O0= github.com/bsm/gomega v1.27.10/go.mod h1:JyEr/xRbxbtgWNi8tIEVPUYZ5Dzef52k01W3YH0H+O0=
github.com/buger/jsonparser v1.1.2 h1:frqHqw7otoVbk5M8LlE/L7HTnIq2v9RX6EJ48i9AxJk= github.com/buger/jsonparser v1.6.1 h1:I0phFv0PlbLHnM7TZAVjZ2MJ2/eWRTDyuO7GLR98IEs=
github.com/buger/jsonparser v1.1.2/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= github.com/buger/jsonparser v1.6.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0=
github.com/cenkalti/backoff/v5 v5.0.3 h1:ZN+IMa753KfX5hd8vVaMixjnqRZ3y8CuJKRKj1xcsSM= github.com/cenkalti/backoff/v5 v5.0.3 h1:ZN+IMa753KfX5hd8vVaMixjnqRZ3y8CuJKRKj1xcsSM=
github.com/cenkalti/backoff/v5 v5.0.3/go.mod h1:rkhZdG3JZukswDf7f0cwqPNk4K0sa+F97BxZthm/crw= github.com/cenkalti/backoff/v5 v5.0.3/go.mod h1:rkhZdG3JZukswDf7f0cwqPNk4K0sa+F97BxZthm/crw=
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/coder/websocket v1.8.14 h1:9L0p0iKiNOibykf283eHkKUHHrpG7f65OE3BhhO7v9g= github.com/coder/websocket v1.8.15 h1:6B2JPeOGlpff2Uz6vOEH1Vzpi0iUz20A+lPVhPHtNUA=
github.com/coder/websocket v1.8.14/go.mod h1:NX3SzP+inril6yawo5CQXx8+fk145lPDC6pumgx0mVg= github.com/coder/websocket v1.8.15/go.mod h1:NX3SzP+inril6yawo5CQXx8+fk145lPDC6pumgx0mVg=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78=
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=
github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.1.0 h1:3YtUj32ZZkqZtt3sZZsClsymw/QDuVfpNhoA31zeORc=
github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/felixge/httpsnoop v1.1.0/go.mod h1:Zqxgdd+1Rkcz8euOqdr7lqgCRJztwr5hp9vDSi5UZCE=
github.com/gabriel-vasile/mimetype v1.4.13 h1:46nXokslUBsAJE/wMsp5gtO500a4F3Nkz9Ufpk2AcUM= github.com/gabriel-vasile/mimetype v1.4.16 h1:5izNFuvA37st1dDRAcA7TtmngBmRgiIPDmTtiEvjx1E=
github.com/gabriel-vasile/mimetype v1.4.13/go.mod h1:d+9Oxyo1wTzWdyVUPMmXFvp4F9tea18J8ufA774AB3s= github.com/gabriel-vasile/mimetype v1.4.16/go.mod h1:3oFFwxX8kTklZwzIl2aQEDZT0lKY8xH92ST88bAwba4=
github.com/getsentry/sentry-go v0.45.1 h1:9rfzJtGiJG+MGIaWZXidDGHcH5GU1Z5y0WVJGf9nysw= github.com/getsentry/sentry-go v0.50.0 h1:gkO59rn/i0RCAXUUTflC5QVbTQGPXbaFabs2olVzc9g=
github.com/getsentry/sentry-go v0.45.1/go.mod h1:XDotiNZbgf5U8bPDUAfvcFmOnMQQceESxyKaObSssW0= github.com/getsentry/sentry-go v0.50.0/go.mod h1:+xsDuN+SoRN/xfs1hdq78wnrE3omIZf+FCuh9FOW1C8=
github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA=
github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og=
github.com/go-faker/faker/v4 v4.7.0 h1:VboC02cXHl/NuQh5lM2W8b87yp4iFXIu59x4w0RZi4E= github.com/go-faker/faker/v4 v4.12.0 h1:yZXxuoQjxN+C2PVgYoDSHGiD9wj6dX1/Ful4p7QQV0k=
github.com/go-faker/faker/v4 v4.7.0/go.mod h1:u1dIRP5neLB6kTzgyVjdBOV5R1uP7BdxkcWk7tiKQXk= github.com/go-faker/faker/v4 v4.12.0/go.mod h1:VFIEwWDd16EdYDLF6NJ5gAAzEp7vz5LgKgJ2iZ17Tdg=
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= github.com/go-logr/logr v1.4.4 h1:tG4xh9yMsRCAiodLVTxyrkzSZ9+o0L1Kg/+cPVcbP/8=
github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/logr v1.4.4/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s=
github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= github.com/go-playground/locales v0.14.2 h1:d8UmcrM6Nip0hfGZKLGpAvZH37XB4TS0xzK9B56YNCY=
github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= github.com/go-playground/locales v0.14.2/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY=
github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= github.com/go-playground/universal-translator v0.18.2 h1:LCsMLC9RzmbUMNUPVYD15dmcjwYAJhmX8mPZRW4rAVU=
github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= github.com/go-playground/universal-translator v0.18.2/go.mod h1:67VZIMp5lQpDWlnStOct22q1bkdJGJqHghbOtmkawxk=
github.com/go-resty/resty/v2 v2.17.2 h1:FQW5oHYcIlkCNrMD2lloGScxcHJ0gkjshV3qcQAyHQk=
github.com/go-resty/resty/v2 v2.17.2/go.mod h1:kCKZ3wWmwJaNc7S29BRtUhJwy7iqmn+2mLtQrOyQlVA=
github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
@@ -55,14 +52,14 @@ github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY=
github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ= github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ=
github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg= github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg=
github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.29.0 h1:5VipnvEpbqr2gA2VbM+nYVbkIF28c5ZQfqCBQ5g2xfk= github.com/grpc-ecosystem/grpc-gateway/v2 v2.34.0 h1:vzlTzzi4tHLa/JQdIE5LeXw6SEX5EVVhq/VPqKHnKOk=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.29.0/go.mod h1:Hyl3n6Twe1hvtd9XUXDec4pTvgMSEixRuQKPTMH2bNs= github.com/grpc-ecosystem/grpc-gateway/v2 v2.34.0/go.mod h1:FHXQZnW5pA0txiMr3jApv9uNJzZ+7mYZd+u+PPenCFU=
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
github.com/julienschmidt/httprouter v1.3.0 h1:U0609e9tgbseu3rBINet9P48AI/D3oJs4dN7jwJOQ1U= github.com/julienschmidt/httprouter v1.3.0 h1:U0609e9tgbseu3rBINet9P48AI/D3oJs4dN7jwJOQ1U=
github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM=
github.com/klauspost/compress v1.18.4 h1:RPhnKRAQ4Fh8zU2FY/6ZFDwTVTxgJ/EMydqSTzE9a2c= github.com/klauspost/compress v1.20.4 h1:dD0v/bvxtjCBqQu6sx1TNWkalEY5lNTIe+HY9w8TeNI=
github.com/klauspost/compress v1.18.4/go.mod h1:R0h/fSBs8DE4ENlcrlib3PsXS61voFxhIs2DeRhCvJ4= github.com/klauspost/compress v1.20.4/go.mod h1:LUdAzn7YLVvxLpc7y3V1m40wESHTgc1422pwwBSKYuI=
github.com/klauspost/cpuid/v2 v2.0.9 h1:lgaqFMSdTdQYdZ04uHyN2d/eKdOMyi2YLSvlQIBFYa4= github.com/klauspost/cpuid/v2 v2.0.9 h1:lgaqFMSdTdQYdZ04uHyN2d/eKdOMyi2YLSvlQIBFYa4=
github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
@@ -71,8 +68,8 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc=
github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ= github.com/leodido/go-urn v1.5.0 h1:pLqT2kq1zpHW/1D18QMjMpdtX7cekxqtJJjg5ANyWw0=
github.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI= github.com/leodido/go-urn v1.5.0/go.mod h1:9BORnCDhdPBJNDEX+w1bJisa8yOKYi116VeO96s4ifE=
github.com/mailru/easyjson v0.9.2 h1:dX8U45hQsZpxd80nLvDGihsQ/OxlvTkVUXH2r/8cb2M= github.com/mailru/easyjson v0.9.2 h1:dX8U45hQsZpxd80nLvDGihsQ/OxlvTkVUXH2r/8cb2M=
github.com/mailru/easyjson v0.9.2/go.mod h1:1+xMtQp2MRNVL/V1bOzuP3aP8VNwRW55fQUto+XFtTU= github.com/mailru/easyjson v0.9.2/go.mod h1:1+xMtQp2MRNVL/V1bOzuP3aP8VNwRW55fQUto+XFtTU=
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
@@ -84,22 +81,23 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
github.com/pandatix/go-abnf v0.5.5 h1:EXex5KkRQx4Dm6GnpAcQnIMBs9KiK0uf8p/wq+4t9PM=
github.com/pandatix/go-abnf v0.5.5/go.mod h1:AE0KD3/VNoCjGzc1gqetRKshbI4SYErXQ/8kPenR5mc=
github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4=
github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/prometheus/client_golang v1.23.2 h1:Je96obch5RDVy3FDMndoUsjAhG5Edi49h0RJWRi/o0o= github.com/prometheus/client_golang v1.25.0 h1:cDtW1TcFsMi1RJc8khwCKB4VhzwV04aKqbYtNOXuiK0=
github.com/prometheus/client_golang v1.23.2/go.mod h1:Tb1a6LWHB3/SPIzCoaDXI4I8UHKeFTEQ1YCr+0Gyqmg= github.com/prometheus/client_golang v1.25.0/go.mod h1:j2X/4/kaQHLPnmyEU8zjmkndo1T317VpCIQEml8LTKk=
github.com/prometheus/client_model v0.6.2 h1:oBsgwpGs7iVziMvrGhE53c/GrLUsZdHnqNwqPLxwZyk= github.com/prometheus/client_model v0.6.3 h1:O0jaTVAYNxTHYInEPFJt5I3+sN8zqBtVMPTB1qyxiEo=
github.com/prometheus/client_model v0.6.2/go.mod h1:y3m2F6Gdpfy6Ut/GBsUqTWZqCUvMVzSfMLjcu6wAwpE= github.com/prometheus/client_model v0.6.3/go.mod h1:gpN5P9S7Rr6Yr92PiQ+Ixvhf6JZEkF1dnxsYL2aPBEM=
github.com/prometheus/common v0.67.5 h1:pIgK94WWlQt1WLwAC5j2ynLaBRDiinoAb86HZHTUGI4= github.com/prometheus/common v0.74.0 h1:6iYW8MsYvmEnXFD9zLGgF0qmReaRhs3OMONu1c/nrLI=
github.com/prometheus/common v0.67.5/go.mod h1:SjE/0MzDEEAyrdr5Gqc6G+sXI67maCxzaT3A2+HqjUw= github.com/prometheus/common v0.74.0/go.mod h1:i/02C+FCst5B1etKgWesNrD49n+onplJCqUCtUKkOeA=
github.com/prometheus/procfs v0.20.1 h1:XwbrGOIplXW/AU3YhIhLODXMJYyC1isLFfYCsTEycfc= github.com/prometheus/procfs v0.23.0 h1:ad+S6FTkzwaMgacKLM5h6bNKExS+DMH0YiUwXItH/o4=
github.com/prometheus/procfs v0.20.1/go.mod h1:o9EMBZGRyvDrSPH1RqdxhojkuXstoe4UlK79eF5TGGo= github.com/prometheus/procfs v0.23.0/go.mod h1:3AVXO0FqLafyYFU/V/IQRZlC8Rgqz8Dm/x6pKLK+RIk=
github.com/rabbitmq/amqp091-go v1.10.0 h1:STpn5XsHlHGcecLmMFCtg7mqq0RnD+zFr4uzukfVhBw= github.com/rabbitmq/amqp091-go v1.17.0 h1:6KmTqrnJq93cGIE3Q3UnXgsqw6NtLu8MNfFoIbfBAIQ=
github.com/rabbitmq/amqp091-go v1.10.0/go.mod h1:Hy4jKW5kQART1u+JkDTF9YYOQUHXqMuhrgxOEeS7G4o= github.com/rabbitmq/amqp091-go v1.17.0/go.mod h1:Hy4jKW5kQART1u+JkDTF9YYOQUHXqMuhrgxOEeS7G4o=
github.com/redis/go-redis/v9 v9.18.0 h1:pMkxYPkEbMPwRdenAzUNyFNrDgHx9U+DrBabWNfSRQs= github.com/redis/go-redis/v9 v9.18.0 h1:pMkxYPkEbMPwRdenAzUNyFNrDgHx9U+DrBabWNfSRQs=
github.com/redis/go-redis/v9 v9.18.0/go.mod h1:k3ufPphLU5YXwNTUcCRXGxUoF1fqxnhFQmscfkCoDA0= github.com/redis/go-redis/v9 v9.18.0/go.mod h1:k3ufPphLU5YXwNTUcCRXGxUoF1fqxnhFQmscfkCoDA0=
github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ=
@@ -113,24 +111,24 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWDWE=
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg=
github.com/tomakado/websocketproxy v0.1.0 h1:e037TLXDvEYYHlxHE5pqmj/DytFKm2NRn7i4wbVzIyE= github.com/tomakado/websocketproxy v0.1.0 h1:e037TLXDvEYYHlxHE5pqmj/DytFKm2NRn7i4wbVzIyE=
github.com/tomakado/websocketproxy v0.1.0/go.mod h1:EXg/3jcTJYZ04Hsf93RpY90FYA9lj1Sl+VM7lZI6xpM= github.com/tomakado/websocketproxy v0.1.0/go.mod h1:EXg/3jcTJYZ04Hsf93RpY90FYA9lj1Sl+VM7lZI6xpM=
github.com/txix-open/bellows v1.2.0 h1:CXv8nQaZtB/micraeRilYyj/gtfv+bqBgP5aPYQgjeY= github.com/txix-open/bellows v1.2.0 h1:CXv8nQaZtB/micraeRilYyj/gtfv+bqBgP5aPYQgjeY=
github.com/txix-open/bellows v1.2.0/go.mod h1:qbKCy+RTgD30Qpw1fyb3y3jp5Y9mGhLLxgae1l0W92o= github.com/txix-open/bellows v1.2.0/go.mod h1:qbKCy+RTgD30Qpw1fyb3y3jp5Y9mGhLLxgae1l0W92o=
github.com/txix-open/etp/v3 v3.2.0 h1:EgTchT8VtCYV1iEo/y4jII3/NybrXiQDE0y6pmS350M= github.com/txix-open/etp/v3 v3.2.0 h1:EgTchT8VtCYV1iEo/y4jII3/NybrXiQDE0y6pmS350M=
github.com/txix-open/etp/v3 v3.2.0/go.mod h1:lgen0TJmiturgBhvlxH1/PQ7iLL/OebKbxPAQYkuKI0= github.com/txix-open/etp/v3 v3.2.0/go.mod h1:lgen0TJmiturgBhvlxH1/PQ7iLL/OebKbxPAQYkuKI0=
github.com/txix-open/etp/v4 v4.0.1 h1:5VSYgGsvnMz0tvUHsjVWFETI0qWBTCF1O3ARCHaCIgA= github.com/txix-open/etp/v4 v4.1.3 h1:u9ZyU2yKGgoQ1/DSaElhazWm8xASdqGEdWjoJ2xQlfo=
github.com/txix-open/etp/v4 v4.0.1/go.mod h1:FIu7TUDdwcgmtmF6tFTV1bGA2fRY/iVaPQdsGzvqYc8= github.com/txix-open/etp/v4 v4.1.3/go.mod h1:9GK+Aje8BmLFq8Hk4j6Qb976LdU9WECCWAuLK1vAKgM=
github.com/txix-open/grmq v1.11.0 h1:MJX10Sbspv21tKKYv9AqnSF1yMBrTa1UcwSDdoi19K0= github.com/txix-open/grmq v1.12.0 h1:lSPYvwLfTL0+b0xDQmuuN6RaKS3NCEJNK9ccWpOWa8Y=
github.com/txix-open/grmq v1.11.0/go.mod h1:6m9CCTQao/HAFalu5rFOZGJ5KLEP6WzzIwj80Ml3KGE= github.com/txix-open/grmq v1.12.0/go.mod h1:6m9CCTQao/HAFalu5rFOZGJ5KLEP6WzzIwj80Ml3KGE=
github.com/txix-open/isp-kit v1.66.4 h1:hRtcOIc1p8mQK8Ax3WyHYdtHl00hzLyNq/qY72TyCd0= github.com/txix-open/isp-kit v1.76.0 h1:kqhX2DuoTfeW7BIshedG26TRIfOgX0QOInm606ssGVg=
github.com/txix-open/isp-kit v1.66.4/go.mod h1:TAqW1YLfSgQeCurE1LNrru5LEHCjAyaxeAvRvrSFHTM= github.com/txix-open/isp-kit v1.76.0/go.mod h1:hR9iAlh3x9gEg5GfALrrkN/2SbGkgZQCmwO2GZWjC1M=
github.com/txix-open/jsonschema v1.3.0 h1:XGuOTg22G7PdqfKypjajM20/i5FyGfFYsJKmheebKi4= github.com/txix-open/jsonschema v1.3.0 h1:XGuOTg22G7PdqfKypjajM20/i5FyGfFYsJKmheebKi4=
github.com/txix-open/jsonschema v1.3.0/go.mod h1:l8YDZ1nvJrw6uxWowSVOxCV/ebiMJyapffW87ZEqH00= github.com/txix-open/jsonschema v1.3.0/go.mod h1:l8YDZ1nvJrw6uxWowSVOxCV/ebiMJyapffW87ZEqH00=
github.com/txix-open/validator/v10 v10.0.0-20250506161033-f8ce404fffdb h1:UJgT4u/QMv5QHKOQeJ7igShHa36c2/vIRqJiRLdDlf0= github.com/txix-open/validator/v10 v10.0.0-20261027072444-85f3391fc5c3 h1:1jE11HLmMHDYYAcE+UmQ5VHgz4stzz0+daJbDWS+sEs=
github.com/txix-open/validator/v10 v10.0.0-20250506161033-f8ce404fffdb/go.mod h1:0biAFE0bgbcKeBBAwgEDhbZz6uT1vuSETCrFQlv2RiA= github.com/txix-open/validator/v10 v10.0.0-20261027072444-85f3391fc5c3/go.mod h1:Yf41v210LFyYAj+tGmDh7PHdGsTaZjdBzHG0ptUvihw=
github.com/wk8/go-ordered-map/v2 v2.1.8 h1:5h/BUHu93oj4gIdvHHHGsScSTMijfx5PeYkE/fJgbpc= github.com/wk8/go-ordered-map/v2 v2.1.8 h1:5h/BUHu93oj4gIdvHHHGsScSTMijfx5PeYkE/fJgbpc=
github.com/wk8/go-ordered-map/v2 v2.1.8/go.mod h1:5nJHM5DyteebpVlHnWMV0rPz6Zp7+xBAnxjb1X5vnTw= github.com/wk8/go-ordered-map/v2 v2.1.8/go.mod h1:5nJHM5DyteebpVlHnWMV0rPz6Zp7+xBAnxjb1X5vnTw=
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU=
@@ -144,56 +142,60 @@ github.com/zeebo/xxh3 v1.0.2 h1:xZmwmqxHZA8AI603jOQ0tMqmBr9lPeFwGg6d+xy9DC0=
github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaDcA= github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaDcA=
go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64=
go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y=
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.68.0 h1:cuXaPAfIoJKsYjBjPSb2nKZEmgM43zVr25l37IxhKME= go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.72.0 h1:jva1c3z2ZFEQ5sTvnLG2tBALNehO+QvdXKQii6eKRoo=
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.68.0/go.mod h1:BuzhPofpCzlDi/Q/Xjg54M4/3oWqqyDe2Zeq7A2I0QE= go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.72.0/go.mod h1:3pjFS5EnOVfjvYO6/NMdtJFHFQR+8uiGtrZ965nZP4w=
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.68.0 h1:CqXxU8VOmDefoh0+ztfGaymYbhdB/tT3zs79QaZTNGY= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.72.0 h1:LxwW/9ctSCv+QkE/cLR7M91ZIkXNMqJtEMi1vCw9U8s=
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.68.0/go.mod h1:BuhAPThV8PBHBvg8ZzZ/Ok3idOdhWIodywz2xEcRbJo= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.72.0/go.mod h1:tOsftB4SslBwwErVEPaenU2RpThXWPIU8DoJHEC4dyw=
go.opentelemetry.io/otel v1.43.0 h1:mYIM03dnh5zfN7HautFE4ieIig9amkNANT+xcVxAj9I= go.opentelemetry.io/otel v1.47.0 h1:j7ALJ/zgkS7Z6aeJW09p8VC9804bC+PpeTfCD4XPnOM=
go.opentelemetry.io/otel v1.43.0/go.mod h1:JuG+u74mvjvcm8vj8pI5XiHy1zDeoCS2LB1spIq7Ay0= go.opentelemetry.io/otel v1.47.0/go.mod h1:8wS9O2qfXrYrzp6hIF/HOYJJf/wIhFPhR2xLuP+iXQU=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.43.0 h1:88Y4s2C8oTui1LGM6bTWkw0ICGcOLCAI5l6zsD1j20k= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.47.0 h1:julhjPeUH/q/7hinbSdDdqt5h7Zw9YWmRlWRhI0jd54=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.43.0/go.mod h1:Vl1/iaggsuRlrHf/hfPJPvVag77kKyvrLeD10kpMl+A= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.47.0/go.mod h1:Ao2mz688LH/tFf0yMAenidq6k2YNSx6SIY2q6jDACck=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.43.0 h1:3iZJKlCZufyRzPzlQhUIWVmfltrXuGyfjREgGP3UUjc= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.47.0 h1:aXZXsZ012wOgVkqaiQv+Z/d8V0xKjmg70F6m4CE94lc=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.43.0/go.mod h1:/G+nUPfhq2e+qiXMGxMwumDrP5jtzU+mWN7/sjT2rak= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.47.0/go.mod h1:ziu1gUIJhAaxM3EV1e3Ralk5AAyL1UOYz3lJJ4VSI38=
go.opentelemetry.io/otel/metric v1.43.0 h1:d7638QeInOnuwOONPp4JAOGfbCEpYb+K6DVWvdxGzgM= go.opentelemetry.io/otel/log v1.47.0 h1:cOTS1CcLbSQeZKanGJ+0JpF/+t4PELi3O3bbl2lqCcI=
go.opentelemetry.io/otel/metric v1.43.0/go.mod h1:RDnPtIxvqlgO8GRW18W6Z/4P462ldprJtfxHxyKd2PY= go.opentelemetry.io/otel/log v1.47.0/go.mod h1:9byitSQ5pLC6PpqwGXjqdMKya6ZTswHRZh2vvXT33nw=
go.opentelemetry.io/otel/sdk v1.43.0 h1:pi5mE86i5rTeLXqoF/hhiBtUNcrAGHLKQdhg4h4V9Dg= go.opentelemetry.io/otel/metric v1.47.0 h1:4PptaldXx3Eat1XjMZ68pPJEs5wrhlemctZE9a3UdWY=
go.opentelemetry.io/otel/sdk v1.43.0/go.mod h1:P+IkVU3iWukmiit/Yf9AWvpyRDlUeBaRg6Y+C58QHzg= go.opentelemetry.io/otel/metric v1.47.0/go.mod h1:ADGSXxRrXM6bjbvLo535EstVFlPpPYZm4LBKixjDHwU=
go.opentelemetry.io/otel/sdk/metric v1.43.0 h1:S88dyqXjJkuBNLeMcVPRFXpRw2fuwdvfCGLEo89fDkw= go.opentelemetry.io/otel/sdk v1.47.0 h1:zWXEr4j2lFefG87TU6Yg8a7ngfohIKFZHKp0Hf5hC6I=
go.opentelemetry.io/otel/sdk/metric v1.43.0/go.mod h1:C/RJtwSEJ5hzTiUz5pXF1kILHStzb9zFlIEe85bhj6A= go.opentelemetry.io/otel/sdk v1.47.0/go.mod h1:VUc24kiOeoGsxG8G9ULx3fWKvB7jMhnGE8Oi607lgR0=
go.opentelemetry.io/otel/trace v1.43.0 h1:BkNrHpup+4k4w+ZZ86CZoHHEkohws8AY+WTX09nk+3A= go.opentelemetry.io/otel/sdk/metric v1.47.0 h1:lfISg2j93VT6yqdk9OfUaZmw/GfcZqCCV3jdXtsPnKw=
go.opentelemetry.io/otel/trace v1.43.0/go.mod h1:/QJhyVBUUswCphDVxq+8mld+AvhXZLhe+8WVFxiFff0= go.opentelemetry.io/otel/sdk/metric v1.47.0/go.mod h1:ypLp+mW1Nt2x+Szt3b5/i1syodyts49lMOwxpDI3VGw=
go.opentelemetry.io/proto/otlp v1.10.0 h1:IQRWgT5srOCYfiWnpqUYz9CVmbO8bFmKcwYxpuCSL2g= go.opentelemetry.io/otel/trace v1.47.0 h1:JOjX/Oci8K94QHddo+bbfya/Ai/nf6/dt9ZfrFNWSrM=
go.opentelemetry.io/proto/otlp v1.10.0/go.mod h1:/CV4QoCR/S9yaPj8utp3lvQPoqMtxXdzn7ozvvozVqk= go.opentelemetry.io/otel/trace v1.47.0/go.mod h1:jNaSLa2PZEYFG6fRjJABAu+bw4FS08uDmPg28lTghu0=
go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= go.opentelemetry.io/proto/otlp v1.11.1 h1:SCrPqH9NE5CmBrOqpjNCiT0X5mGwMyGERXdogfR7Yjw=
go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= go.opentelemetry.io/proto/otlp v1.11.1/go.mod h1:wq8W4aSf6bOy8RZyESOeQFr9Pu7wydWX/TY4sgvrTPg=
go.uber.org/atomic v1.12.0 h1:BvcXdFKuviU4fTL/f+SxdQ5qJX/Jix8pAkgdUcb3XOE=
go.uber.org/atomic v1.12.0/go.mod h1:I6c4cg+6HCxRjfjSsYtApoFILnpc0CGUdGkXVqbYVNk=
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
go.uber.org/zap v1.27.1 h1:08RqriUEv8+ArZRYSTXy1LeBScaMpVSTBhCeaZYfMYc= go.uber.org/zap v1.28.0 h1:IZzaP1Fv73/T/pBMLk4VutPl36uNC+OSUh3JLG3FIjo=
go.uber.org/zap v1.27.1/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= go.uber.org/zap v1.28.0/go.mod h1:rDLpOi171uODNm/mxFcuYWxDsqWSAVkFdX4XojSKg/Q=
go.yaml.in/yaml/v2 v2.4.4 h1:tuyd0P+2Ont/d6e2rl3be67goVK4R6deVxCUX5vyPaQ= go.yaml.in/yaml/v2 v2.4.5 h1:a5nxWvYi94DRl6QSLlTbLpVmutgx2qg8EVjnJtuFpwI=
go.yaml.in/yaml/v2 v2.4.4/go.mod h1:gMZqIpDtDqOfM0uNfy0SkpRhvUryYH0Z6wdMYcacYXQ= go.yaml.in/yaml/v2 v2.4.5/go.mod h1:gMZqIpDtDqOfM0uNfy0SkpRhvUryYH0Z6wdMYcacYXQ=
golang.org/x/crypto v0.50.0 h1:zO47/JPrL6vsNkINmLoo/PH1gcxpls50DNogFvB5ZGI= go.yaml.in/yaml/v3 v3.0.6 h1:zcDfvjXEqTQmpjniUBLc91xYJMB2c4QOFxEF/LCEckM=
golang.org/x/crypto v0.50.0/go.mod h1:3muZ7vA7PBCE6xgPX7nkzzjiUq87kRItoJQM1Yo8S+Q= go.yaml.in/yaml/v3 v3.0.6/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg=
golang.org/x/net v0.53.0 h1:d+qAbo5L0orcWAr0a9JweQpjXF19LMXJE8Ey7hwOdUA= golang.org/x/crypto v0.59.0 h1:xS2jhqYbzNrpvkWP2YTDf4TJwBy3ykR03i8vFDxEc7c=
golang.org/x/net v0.53.0/go.mod h1:JvMuJH7rrdiCfbeHoo3fCQU24Lf5JJwT9W3sJFulfgs= golang.org/x/crypto v0.59.0/go.mod h1:veDyUwATGs3c+vN3VfTbzViMGXeTBk3WyhBOkn+F/4U=
golang.org/x/sync v0.20.0 h1:e0PTpb7pjO8GAtTs2dQ6jYa5BWYlMuX047Dco/pItO4= golang.org/x/net v0.63.0 h1:HCoTmNh9EpD1PpK8gBNFY4gcTY4N+KQEO8ylfIKqFJ0=
golang.org/x/sync v0.20.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0= golang.org/x/net v0.63.0/go.mod h1:15JLg3IX1bLjHK264EZQEbIpTiR/KVLuo9CTRWd0pig=
golang.org/x/sys v0.43.0 h1:Rlag2XtaFTxp19wS8MXlJwTvoh8ArU6ezoyFsMyCTNI= golang.org/x/sync v0.25.0 h1:dJnifr0nMV8/SBnBvdo4eSGGnrc3O4FFx6IqvtLcmRs=
golang.org/x/sys v0.43.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= golang.org/x/sync v0.25.0/go.mod h1:sUUOizhqBxiL6pEWpqNLUiaJn1ShEbZ6BBqskPbjZm0=
golang.org/x/text v0.36.0 h1:JfKh3XmcRPqZPKevfXVpI1wXPTqbkE5f7JA92a55Yxg= golang.org/x/sys v0.50.0 h1:dkKZEFTEKaLr1sjhs0WiKqoi8Jj5nHbS3Njmx1UoMJs=
golang.org/x/text v0.36.0/go.mod h1:NIdBknypM8iqVmPiuco0Dh6P5Jcdk8lJL0CUebqK164= golang.org/x/sys v0.50.0/go.mod h1:hNLxWAXmnKAxqDtdwIYC4bM9oQPEecfsnNMuSxOs3og=
golang.org/x/text v0.44.0 h1:YItdp/mQNGnsmrgpcdA5yQ3bnRxCfo/Tj/iByGW9GGo=
golang.org/x/text v0.44.0/go.mod h1:S4FR1waQ9LbjQTls97SyRjDaUUVkaM+cXwwuG/G+MwY=
gonum.org/v1/gonum v0.17.0 h1:VbpOemQlsSMrYmn7T2OUvQ4dqxQXU+ouZFQsZOx50z4= gonum.org/v1/gonum v0.17.0 h1:VbpOemQlsSMrYmn7T2OUvQ4dqxQXU+ouZFQsZOx50z4=
gonum.org/v1/gonum v0.17.0/go.mod h1:El3tOrEuMpv2UdMrbNlKEh9vd86bmQ6vqIcDwxEOc1E= gonum.org/v1/gonum v0.17.0/go.mod h1:El3tOrEuMpv2UdMrbNlKEh9vd86bmQ6vqIcDwxEOc1E=
google.golang.org/genproto/googleapis/api v0.0.0-20260414002931-afd174a4e478 h1:yQugLulqltosq0B/f8l4w9VryjV+N/5gcW0jQ3N8Qec= google.golang.org/genproto/googleapis/api v0.0.0-20261118221215-c8830f628b3f h1:7CbYDSDM5xqpq8v2tNm+Q057COf1lvA0gorVk+304tY=
google.golang.org/genproto/googleapis/api v0.0.0-20260414002931-afd174a4e478/go.mod h1:C6ADNqOxbgdUUeRTU+LCHDPB9ttAMCTff6auwCVa4uc= google.golang.org/genproto/googleapis/api v0.0.0-20261118221215-c8830f628b3f/go.mod h1:CPxXEEQ1S9iJmInAF/8MNc8tKWnya8I8Kni9Zh2hV0M=
google.golang.org/genproto/googleapis/rpc v0.0.0-20260414002931-afd174a4e478 h1:RmoJA1ujG+/lRGNfUnOMfhCy5EipVMyvUE+KNbPbTlw= google.golang.org/genproto/googleapis/rpc v0.0.0-20261118221215-c8830f628b3f h1:aDW6Vb2T1K0xbAgW+ED8iz39WlgjjX/OKiNh6tXv/+g=
google.golang.org/genproto/googleapis/rpc v0.0.0-20260414002931-afd174a4e478/go.mod h1:4Hqkh8ycfw05ld/3BWL7rJOSfebL2Q+DVDeRgYgxUU8= google.golang.org/genproto/googleapis/rpc v0.0.0-20261118221215-c8830f628b3f/go.mod h1:OaIUM3+LpYcK2GXM4FTmhWoIq371Owdr+Cc7/BsYHHc=
google.golang.org/grpc v1.80.0 h1:Xr6m2WmWZLETvUNvIUmeD5OAagMw3FiKmMlTdViWsHM= google.golang.org/grpc v1.85.0 h1:BPBCfuVRQ1qvBhKDOq9uvQllMvO59rKsYhXpp7Dd8vw=
google.golang.org/grpc v1.80.0/go.mod h1:ho/dLnxwi3EDJA4Zghp7k2Ec1+c2jqup0bFkw07bwF4= google.golang.org/grpc v1.85.0/go.mod h1:0rQrOD58yjal/0EaVbGBANindixsCZNQPDV3VKtaKuQ=
google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE= google.golang.org/protobuf v1.36.12 h1:pJOKDDOyeXErUroCihFAd5LQuwXBSpVnKGrj5o/fwxc=
google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= google.golang.org/protobuf v1.36.12/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
+1 -1
View File
@@ -8,7 +8,7 @@ import (
"isp-gate-service/httperrors" "isp-gate-service/httperrors"
"isp-gate-service/request" "isp-gate-service/request"
"github.com/pkg/errors" "github.com/txix-open/isp-kit/errors"
) )
const ( const (
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"context" "context"
"net/http" "net/http"
"github.com/pkg/errors" "github.com/txix-open/isp-kit/errors"
"isp-gate-service/httperrors" "isp-gate-service/httperrors"
"isp-gate-service/request" "isp-gate-service/request"
) )
+1 -1
View File
@@ -8,7 +8,7 @@ import (
"isp-gate-service/httperrors" "isp-gate-service/httperrors"
"isp-gate-service/request" "isp-gate-service/request"
"github.com/pkg/errors" "github.com/txix-open/isp-kit/errors"
) )
const ( const (
+1 -1
View File
@@ -7,7 +7,7 @@ import (
"isp-gate-service/httperrors" "isp-gate-service/httperrors"
"isp-gate-service/request" "isp-gate-service/request"
"github.com/pkg/errors" "github.com/txix-open/isp-kit/errors"
"github.com/txix-open/isp-kit/log" "github.com/txix-open/isp-kit/log"
) )
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"context" "context"
"net/http" "net/http"
"github.com/pkg/errors" "github.com/txix-open/isp-kit/errors"
"isp-gate-service/httperrors" "isp-gate-service/httperrors"
"isp-gate-service/request" "isp-gate-service/request"
) )
+1 -1
View File
@@ -5,7 +5,7 @@ import (
"isp-gate-service/request" "isp-gate-service/request"
"net/http" "net/http"
"github.com/pkg/errors" "github.com/txix-open/isp-kit/errors"
"github.com/txix-open/isp-kit/log" "github.com/txix-open/isp-kit/log"
) )
+15
View File
@@ -0,0 +1,15 @@
package middleware
import (
"isp-gate-service/request"
)
func JsonResponseUtf8Charset(applicationIds map[int]bool) Middleware {
return func(next Handler) Handler {
return HandlerFunc(func(ctx *request.Context) error {
authData, _ := ctx.GetAuthData()
ctx.EnableHttpJsonUtf8Charset(applicationIds[authData.ApplicationId])
return next.Handle(ctx)
})
}
}
+1 -1
View File
@@ -11,7 +11,7 @@ import (
"isp-gate-service/helpers" "isp-gate-service/helpers"
"isp-gate-service/request" "isp-gate-service/request"
"github.com/pkg/errors" "github.com/txix-open/isp-kit/errors"
"github.com/txix-open/isp-kit/http/endpoint/buffer" "github.com/txix-open/isp-kit/http/endpoint/buffer"
"github.com/txix-open/isp-kit/log" "github.com/txix-open/isp-kit/log"
) )
+4 -2
View File
@@ -1,6 +1,8 @@
package middleware package middleware
import ( import (
"slices"
"isp-gate-service/request" "isp-gate-service/request"
) )
@@ -18,8 +20,8 @@ type Middleware func(next Handler) Handler
// nolint:ireturn // nolint:ireturn
func Chain(root Handler, middlewares ...Middleware) Handler { func Chain(root Handler, middlewares ...Middleware) Handler {
for i := len(middlewares) - 1; i >= 0; i-- { for _, middleware := range slices.Backward(middlewares) {
root = middlewares[i](root) root = middleware(root)
} }
return root return root
} }
+1 -1
View File
@@ -5,7 +5,7 @@ import (
"fmt" "fmt"
"net/http" "net/http"
"github.com/pkg/errors" "github.com/txix-open/isp-kit/errors"
"isp-gate-service/domain" "isp-gate-service/domain"
"isp-gate-service/httperrors" "isp-gate-service/httperrors"
"isp-gate-service/request" "isp-gate-service/request"
+1 -1
View File
@@ -7,7 +7,7 @@ import (
"isp-gate-service/httperrors" "isp-gate-service/httperrors"
"isp-gate-service/request" "isp-gate-service/request"
"github.com/pkg/errors" "github.com/txix-open/isp-kit/errors"
"github.com/txix-open/isp-kit/log" "github.com/txix-open/isp-kit/log"
) )
+1 -4
View File
@@ -14,7 +14,7 @@ import (
"isp-gate-service/httperrors" "isp-gate-service/httperrors"
"isp-gate-service/request" "isp-gate-service/request"
"github.com/pkg/errors" "github.com/txix-open/isp-kit/errors"
"github.com/txix-open/isp-kit/grpc" "github.com/txix-open/isp-kit/grpc"
"github.com/txix-open/isp-kit/grpc/client" "github.com/txix-open/isp-kit/grpc/client"
"github.com/txix-open/isp-kit/grpc/isp" "github.com/txix-open/isp-kit/grpc/isp"
@@ -164,9 +164,6 @@ func (p Grpc) writeMetadata(ctx *request.Context) metadata.MD {
appAuthData, err := ctx.GetAuthData() appAuthData, err := ctx.GetAuthData()
if err == nil { if err == nil {
md[grpc.SystemIdHeader] = []string{strconv.Itoa(appAuthData.SystemId)}
md[grpc.DomainIdHeader] = []string{strconv.Itoa(appAuthData.DomainId)}
md[grpc.ServiceIdHeader] = []string{strconv.Itoa(appAuthData.ServiceId)}
md[grpc.ApplicationIdHeader] = []string{strconv.Itoa(appAuthData.ApplicationId)} md[grpc.ApplicationIdHeader] = []string{strconv.Itoa(appAuthData.ApplicationId)}
encodedAppName := base64.StdEncoding.EncodeToString([]byte(appAuthData.AppName)) encodedAppName := base64.StdEncoding.EncodeToString([]byte(appAuthData.AppName))
md[grpc.ApplicationNameHeader] = []string{encodedAppName} md[grpc.ApplicationNameHeader] = []string{encodedAppName}
+15 -5
View File
@@ -1,6 +1,7 @@
package proxy package proxy
import ( import (
"context"
"encoding/base64" "encoding/base64"
"fmt" "fmt"
"net" "net"
@@ -8,15 +9,15 @@ import (
"net/http/httputil" "net/http/httputil"
"net/url" "net/url"
"strconv" "strconv"
"strings"
"time" "time"
"isp-gate-service/httperrors" "isp-gate-service/httperrors"
"isp-gate-service/request" "isp-gate-service/request"
"github.com/pkg/errors" "github.com/txix-open/isp-kit/errors"
"github.com/txix-open/isp-kit/grpc" "github.com/txix-open/isp-kit/grpc"
"github.com/txix-open/isp-kit/requestid" "github.com/txix-open/isp-kit/requestid"
"golang.org/x/net/context"
) )
var ( var (
@@ -79,6 +80,9 @@ func (p Http) Handle(ctx *request.Context) error {
errors.WithMessagef(err, "http proxy to %s", host), errors.WithMessagef(err, "http proxy to %s", host),
) )
} }
if ctx.IsJsonUtf8CharsetEnabled() {
reverseProxy.ModifyResponse = addJsonUtf8Charset
}
context, cancel := context.WithTimeout(request.Context(), p.timeout) context, cancel := context.WithTimeout(request.Context(), p.timeout)
defer cancel() defer cancel()
@@ -106,9 +110,6 @@ func setHttpHeaders(ctx *request.Context, header http.Header, skipAuth bool) {
appAuthData, err := ctx.GetAuthData() appAuthData, err := ctx.GetAuthData()
if err == nil { if err == nil {
header.Set(grpc.SystemIdHeader, strconv.Itoa(appAuthData.SystemId))
header.Set(grpc.DomainIdHeader, strconv.Itoa(appAuthData.DomainId))
header.Set(grpc.ServiceIdHeader, strconv.Itoa(appAuthData.ServiceId))
header.Set(grpc.ApplicationIdHeader, strconv.Itoa(appAuthData.ApplicationId)) header.Set(grpc.ApplicationIdHeader, strconv.Itoa(appAuthData.ApplicationId))
encodedAppName := base64.StdEncoding.EncodeToString([]byte(appAuthData.AppName)) encodedAppName := base64.StdEncoding.EncodeToString([]byte(appAuthData.AppName))
header.Set(grpc.ApplicationNameHeader, encodedAppName) //nolint:canonicalheader header.Set(grpc.ApplicationNameHeader, encodedAppName) //nolint:canonicalheader
@@ -124,3 +125,12 @@ func setHttpHeaders(ctx *request.Context, header http.Header, skipAuth bool) {
func defaultTransportDialContext(dialer *net.Dialer) func(context.Context, string, string) (net.Conn, error) { func defaultTransportDialContext(dialer *net.Dialer) func(context.Context, string, string) (net.Conn, error) {
return dialer.DialContext return dialer.DialContext
} }
func addJsonUtf8Charset(response *http.Response) error {
contentType := response.Header.Get("Content-Type")
if strings.EqualFold(contentType, "application/json") {
response.Header.Set("Content-Type", "application/json; charset=utf-8")
}
return nil
}
+1 -1
View File
@@ -7,8 +7,8 @@ import (
"time" "time"
"github.com/gorilla/websocket" "github.com/gorilla/websocket"
"github.com/pkg/errors"
"github.com/tomakado/websocketproxy" "github.com/tomakado/websocketproxy"
"github.com/txix-open/isp-kit/errors"
"isp-gate-service/httperrors" "isp-gate-service/httperrors"
"isp-gate-service/request" "isp-gate-service/request"
) )
+17 -10
View File
@@ -6,8 +6,9 @@ import (
"isp-gate-service/entity" "isp-gate-service/entity"
"github.com/pkg/errors" "github.com/txix-open/isp-kit/errors"
"github.com/txix-open/isp-kit/grpc/client" "github.com/txix-open/isp-kit/http/httpclix"
"github.com/txix-open/isp-kit/metrics/http_metrics"
) )
const ( const (
@@ -16,33 +17,39 @@ const (
) )
type Admin struct { type Admin struct {
cli *client.Client cli *httpclix.ClientBalancer
} }
func NewAdmin(cli *client.Client) Admin { func NewAdmin(cli *httpclix.ClientBalancer) Admin {
return Admin{cli: cli} return Admin{cli: cli}
} }
func (r Admin) Authenticate(ctx context.Context, token string) (*entity.AdminAuthenticateResponse, error) { func (r Admin) Authenticate(ctx context.Context, token string) (*entity.AdminAuthenticateResponse, error) {
ctx = http_metrics.ClientEndpointToContext(ctx, adminAuthenticate)
resp := entity.AdminAuthenticateResponse{} resp := entity.AdminAuthenticateResponse{}
err := r.cli.Invoke(adminAuthenticate). err := r.cli.Post(adminAuthenticate).
JsonRequestBody(entity.AuthenticateRequest{Token: token}). JsonRequestBody(entity.AuthenticateRequest{Token: token}).
JsonResponseBody(&resp). JsonResponseBody(&resp).
Do(ctx) StatusCodeToError().
DoWithoutResponse(ctx)
if err != nil { if err != nil {
return nil, errors.WithMessagef(err, "grpc client invoke %s", adminAuthenticate) return nil, errors.WithMessagef(err, "http client invoke %s", adminAuthenticate)
} }
return &resp, nil return &resp, nil
} }
func (r Admin) Authorize(ctx context.Context, adminId int, permission string) (bool, error) { func (r Admin) Authorize(ctx context.Context, adminId int, permission string) (bool, error) {
ctx = http_metrics.ClientEndpointToContext(ctx, adminAuthorize)
resp := entity.AdminAuthorizeResponse{} resp := entity.AdminAuthorizeResponse{}
err := r.cli.Invoke(adminAuthorize). err := r.cli.Post(adminAuthorize).
JsonRequestBody(entity.AdminAuthorizeRequest{AdminId: adminId, Permission: permission}). JsonRequestBody(entity.AdminAuthorizeRequest{AdminId: adminId, Permission: permission}).
JsonResponseBody(&resp). JsonResponseBody(&resp).
Do(ctx) StatusCodeToError().
DoWithoutResponse(ctx)
if err != nil { if err != nil {
return false, errors.WithMessagef(err, "grpc client invoke: %s", adminAuthorize) return false, errors.WithMessagef(err, "http client invoke %s", adminAuthorize)
} }
return resp.Authorized, nil return resp.Authorized, nil
} }
+1 -1
View File
@@ -8,7 +8,7 @@ import (
"isp-gate-service/domain" "isp-gate-service/domain"
"isp-gate-service/entity" "isp-gate-service/entity"
"github.com/pkg/errors" "github.com/txix-open/isp-kit/errors"
"github.com/txix-open/isp-kit/json" "github.com/txix-open/isp-kit/json"
) )
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"context" "context"
"time" "time"
"github.com/pkg/errors" "github.com/txix-open/isp-kit/errors"
"github.com/txix-open/isp-kit/grpc/client" "github.com/txix-open/isp-kit/grpc/client"
"isp-gate-service/entity" "isp-gate-service/entity"
) )
+1 -1
View File
@@ -6,7 +6,7 @@ import (
"isp-gate-service/entity" "isp-gate-service/entity"
"github.com/pkg/errors" "github.com/txix-open/isp-kit/errors"
"github.com/txix-open/isp-kit/grpc/client" "github.com/txix-open/isp-kit/grpc/client"
) )
+1 -1
View File
@@ -7,8 +7,8 @@ import (
"isp-gate-service/domain" "isp-gate-service/domain"
"isp-gate-service/entity" "isp-gate-service/entity"
"github.com/pkg/errors"
"github.com/redis/go-redis/v9" "github.com/redis/go-redis/v9"
"github.com/txix-open/isp-kit/errors"
"github.com/txix-open/isp-kit/json" "github.com/txix-open/isp-kit/json"
) )
+1 -1
View File
@@ -5,8 +5,8 @@ import (
"fmt" "fmt"
"time" "time"
"github.com/pkg/errors"
"github.com/redis/go-redis/v9" "github.com/redis/go-redis/v9"
"github.com/txix-open/isp-kit/errors"
) )
type RedisAuthzCache struct { type RedisAuthzCache struct {
+1 -1
View File
@@ -5,7 +5,7 @@ import (
"fmt" "fmt"
"isp-gate-service/entity" "isp-gate-service/entity"
"github.com/pkg/errors" "github.com/txix-open/isp-kit/errors"
"github.com/txix-open/isp-kit/http/httpcli" "github.com/txix-open/isp-kit/http/httpcli"
"github.com/txix-open/isp-kit/http/httpclix" "github.com/txix-open/isp-kit/http/httpclix"
"github.com/txix-open/isp-kit/lb" "github.com/txix-open/isp-kit/lb"
+1 -1
View File
@@ -8,7 +8,7 @@ import (
"isp-gate-service/domain" "isp-gate-service/domain"
"isp-gate-service/entity" "isp-gate-service/entity"
"github.com/pkg/errors" "github.com/txix-open/isp-kit/errors"
"github.com/txix-open/isp-kit/json" "github.com/txix-open/isp-kit/json"
) )
+11 -1
View File
@@ -6,7 +6,7 @@ import (
"net/http" "net/http"
"strings" "strings"
"github.com/pkg/errors" "github.com/txix-open/isp-kit/errors"
) )
var ( var (
@@ -30,6 +30,8 @@ type Context struct {
adminToken string adminToken string
queryParams map[string]string queryParams map[string]string
httpJsonUtf8Charset bool
} }
func NewContext( func NewContext(
@@ -114,6 +116,14 @@ func (c *Context) SetContext(ctx context.Context) {
c.request = c.request.WithContext(ctx) c.request = c.request.WithContext(ctx)
} }
func (c *Context) EnableHttpJsonUtf8Charset(enable bool) {
c.httpJsonUtf8Charset = enable
}
func (c *Context) IsJsonUtf8CharsetEnabled() bool {
return c.httpJsonUtf8Charset
}
func (c *Context) Param(name string) string { func (c *Context) Param(name string) string {
value := c.request.Header.Get(name) value := c.request.Header.Get(name)
if value != "" { if value != "" {
+1 -1
View File
@@ -8,7 +8,7 @@ import (
"strings" "strings"
"github.com/julienschmidt/httprouter" "github.com/julienschmidt/httprouter"
"github.com/pkg/errors" "github.com/txix-open/isp-kit/errors"
"github.com/txix-open/isp-kit/cluster" "github.com/txix-open/isp-kit/cluster"
"github.com/txix-open/isp-kit/log" "github.com/txix-open/isp-kit/log"
+1 -1
View File
@@ -6,7 +6,7 @@ import (
"isp-gate-service/domain" "isp-gate-service/domain"
"isp-gate-service/entity" "isp-gate-service/entity"
"github.com/pkg/errors" "github.com/txix-open/isp-kit/errors"
) )
type AdminAuth interface { type AdminAuth interface {
+1 -4
View File
@@ -5,7 +5,7 @@ import (
"isp-gate-service/domain" "isp-gate-service/domain"
"isp-gate-service/entity" "isp-gate-service/entity"
"github.com/pkg/errors" "github.com/txix-open/isp-kit/errors"
) )
type AuthenticationCache interface { type AuthenticationCache interface {
@@ -74,9 +74,6 @@ func (Authentication) convertAuthData(authData *entity.AppAuthData) *domain.AppA
return &domain.AppAuthData{ return &domain.AppAuthData{
AppName: authData.AppName, AppName: authData.AppName,
SystemId: authData.SystemId,
DomainId: authData.DomainId,
ServiceId: authData.ServiceId,
ApplicationId: authData.ApplicationId, ApplicationId: authData.ApplicationId,
} }
} }
+1 -1
View File
@@ -5,7 +5,7 @@ import (
"fmt" "fmt"
"isp-gate-service/entity" "isp-gate-service/entity"
"github.com/pkg/errors" "github.com/txix-open/isp-kit/errors"
) )
type AuthorizationCache interface { type AuthorizationCache interface {
+1 -1
View File
@@ -5,7 +5,7 @@ import (
"fmt" "fmt"
"time" "time"
"github.com/pkg/errors" "github.com/txix-open/isp-kit/errors"
"isp-gate-service/conf" "isp-gate-service/conf"
) )
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"context" "context"
"fmt" "fmt"
"github.com/pkg/errors" "github.com/txix-open/isp-kit/errors"
"isp-gate-service/conf" "isp-gate-service/conf"
"isp-gate-service/domain" "isp-gate-service/domain"
"isp-gate-service/entity" "isp-gate-service/entity"
+8 -2
View File
@@ -6,21 +6,27 @@ import (
"net/http" "net/http"
"strings" "strings"
"github.com/pkg/errors" "github.com/txix-open/isp-kit/errors"
) )
type CookieProvider struct { type CookieProvider struct {
name string
cookieName string cookieName string
validate bool validate bool
} }
func NewCookieProvider(cfg conf.CookieTokenProvider) CookieProvider { func NewCookieProvider(name string, cfg conf.CookieTokenProvider) CookieProvider {
return CookieProvider{ return CookieProvider{
name: name,
cookieName: cfg.CookieName, cookieName: cfg.CookieName,
validate: cfg.Validate, validate: cfg.Validate,
} }
} }
func (p CookieProvider) GetName() string {
return p.name
}
func (p CookieProvider) ExtractToken(ctx *request.Context) (string, error) { func (p CookieProvider) ExtractToken(ctx *request.Context) (string, error) {
cookie, err := ctx.Request().Cookie(p.cookieName) cookie, err := ctx.Request().Cookie(p.cookieName)
switch { switch {
+7 -1
View File
@@ -7,15 +7,21 @@ import (
) )
type HeaderProvider struct { type HeaderProvider struct {
name string
headerName string headerName string
} }
func NewHeaderProvider(cfg conf.HeaderTokenProvider) HeaderProvider { func NewHeaderProvider(name string, cfg conf.HeaderTokenProvider) HeaderProvider {
return HeaderProvider{ return HeaderProvider{
name: name,
headerName: cfg.HeaderName, headerName: cfg.HeaderName,
} }
} }
func (p HeaderProvider) GetName() string {
return p.name
}
func (p HeaderProvider) ExtractToken(ctx *request.Context) (string, error) { func (p HeaderProvider) ExtractToken(ctx *request.Context) (string, error) {
value := ctx.Request().Header.Get(p.headerName) value := ctx.Request().Header.Get(p.headerName)
return strings.TrimSpace(value), nil return strings.TrimSpace(value), nil
+41 -26
View File
@@ -11,7 +11,7 @@ import (
"strings" "strings"
"time" "time"
"github.com/pkg/errors" "github.com/txix-open/isp-kit/errors"
) )
type UserAuthenticationCache interface { type UserAuthenticationCache interface {
@@ -24,11 +24,12 @@ type UserAuthenticationRepo interface {
} }
type TokenProvider interface { type TokenProvider interface {
GetName() string
ExtractToken(ctx *request.Context) (string, error) ExtractToken(ctx *request.Context) (string, error)
} }
type userAuthSetting struct { type userAuthSetting struct {
tokenProvider string tokenProviders []TokenProvider
authEndpoint string authEndpoint string
authCacheDuration time.Duration authCacheDuration time.Duration
skipAppAuth bool skipAppAuth bool
@@ -38,7 +39,6 @@ type UserAuthentication struct {
cache UserAuthenticationCache cache UserAuthenticationCache
repo UserAuthenticationRepo repo UserAuthenticationRepo
settingsByModuleName map[string]userAuthSetting settingsByModuleName map[string]userAuthSetting
tokenProviders map[string]TokenProvider
} }
func NewUserAuthentication( func NewUserAuthentication(
@@ -62,13 +62,17 @@ func NewUserAuthentication(
settingsByModuleName := make(map[string]userAuthSetting, len(cfg.UserAuthSettings)) settingsByModuleName := make(map[string]userAuthSetting, len(cfg.UserAuthSettings))
for _, setting := range cfg.UserAuthSettings { for _, setting := range cfg.UserAuthSettings {
_, ok := tokenProviders[setting.TokenProvider] settingTokenProviders := make([]TokenProvider, 0, len(setting.TokenProviders))
if !ok { for _, providerName := range setting.TokenProviders {
return UserAuthentication{}, tokenProvider, ok := tokenProviders[providerName]
errors.Errorf("modules with names'[%s]' has unknown token provider '%s'", if !ok {
strings.Join(setting.ModuleNameList, ","), return UserAuthentication{},
setting.TokenProvider, errors.Errorf("modules with names'[%s]' has unknown token provider '%s'",
) strings.Join(setting.ModuleNameList, ","),
providerName,
)
}
settingTokenProviders = append(settingTokenProviders, tokenProvider)
} }
cacheDuration := time.Duration(setting.CacheDataInSec) * time.Second cacheDuration := time.Duration(setting.CacheDataInSec) * time.Second
@@ -81,7 +85,7 @@ func NewUserAuthentication(
) )
} }
settingsByModuleName[moduleName] = userAuthSetting{ settingsByModuleName[moduleName] = userAuthSetting{
tokenProvider: setting.TokenProvider, tokenProviders: settingTokenProviders,
authEndpoint: setting.AuthenticateEndpoint, authEndpoint: setting.AuthenticateEndpoint,
authCacheDuration: cacheDuration, authCacheDuration: cacheDuration,
skipAppAuth: setting.SkipAppAuth, skipAppAuth: setting.SkipAppAuth,
@@ -93,7 +97,6 @@ func NewUserAuthentication(
cache: cache, cache: cache,
repo: repo, repo: repo,
settingsByModuleName: settingsByModuleName, settingsByModuleName: settingsByModuleName,
tokenProviders: tokenProviders,
}, nil }, nil
} }
@@ -113,15 +116,9 @@ func (s UserAuthentication) Authenticate(ctx *request.Context) (*domain.Authenti
) )
} }
provider := s.tokenProviders[setting.tokenProvider] token, err := s.extractToken(ctx, setting.tokenProviders)
token, err := provider.ExtractToken(ctx)
if err != nil { if err != nil {
return nil, errors.WithMessagef(domain.ErrInvalidUserToken, return nil, errors.WithMessage(err, "extract user token")
"extract token by '%s' error: %s", setting.tokenProvider, err.Error())
}
if token == "" {
return nil, domain.ErrEmptyUserToken
} }
resp, err := s.authenticate( resp, err := s.authenticate(
@@ -135,6 +132,24 @@ func (s UserAuthentication) Authenticate(ctx *request.Context) (*domain.Authenti
return resp, nil return resp, nil
} }
func (s UserAuthentication) extractToken(ctx *request.Context, providers []TokenProvider) (string, error) {
for _, provider := range providers {
token, err := provider.ExtractToken(ctx)
if err != nil {
return "", errors.WithMessagef(
domain.ErrInvalidUserToken,
"extract token by '%s' error: %s",
provider.GetName(),
err.Error(),
)
}
if token != "" {
return token, nil
}
}
return "", domain.ErrEmptyUserToken
}
func (s UserAuthentication) authenticate( func (s UserAuthentication) authenticate(
ctx context.Context, ctx context.Context,
setting userAuthSetting, setting userAuthSetting,
@@ -145,7 +160,7 @@ func (s UserAuthentication) authenticate(
if err != nil { if err != nil {
return nil, errors.WithMessage(err, "auth repo authenticate") return nil, errors.WithMessage(err, "auth repo authenticate")
} }
return s.convertAuthReponse(resp, setting.skipAppAuth), nil return s.convertAuthResponse(resp, setting.skipAppAuth), nil
} }
authData, err := s.cache.Get(ctx, setting.authEndpoint, token) authData, err := s.cache.Get(ctx, setting.authEndpoint, token)
@@ -156,7 +171,7 @@ func (s UserAuthentication) authenticate(
return nil, errors.WithMessage(err, "auth repo authenticate") return nil, errors.WithMessage(err, "auth repo authenticate")
} }
if !resp.Authenticated { if !resp.Authenticated {
return s.convertAuthReponse(resp, setting.skipAppAuth), nil return s.convertAuthResponse(resp, setting.skipAppAuth), nil
} }
err = s.cache.Set( err = s.cache.Set(
ctx, ctx,
@@ -168,7 +183,7 @@ func (s UserAuthentication) authenticate(
if err != nil { if err != nil {
return nil, errors.WithMessage(err, "auth cache set") return nil, errors.WithMessage(err, "auth cache set")
} }
return s.convertAuthReponse(resp, setting.skipAppAuth), nil return s.convertAuthResponse(resp, setting.skipAppAuth), nil
case err != nil: case err != nil:
return nil, errors.WithMessage(err, "auth cache get") return nil, errors.WithMessage(err, "auth cache get")
default: default:
@@ -180,7 +195,7 @@ func (s UserAuthentication) authenticate(
} }
} }
func (s UserAuthentication) convertAuthReponse(resp *entity.UserAuthenticateResponse, skipAppAuth bool) *domain.AuthenticateUserResponse { func (s UserAuthentication) convertAuthResponse(resp *entity.UserAuthenticateResponse, skipAppAuth bool) *domain.AuthenticateUserResponse {
return &domain.AuthenticateUserResponse{ return &domain.AuthenticateUserResponse{
Authenticated: resp.Authenticated, Authenticated: resp.Authenticated,
ErrorReason: resp.ErrorReason, ErrorReason: resp.ErrorReason,
@@ -207,12 +222,12 @@ func tokenProviderFromConfig(cfg conf.TokenProvider) (TokenProvider, error) {
if cfg.HeaderProvider == nil { if cfg.HeaderProvider == nil {
return nil, errors.Errorf("token method '%s' has empty header provider", cfg.Name) return nil, errors.Errorf("token method '%s' has empty header provider", cfg.Name)
} }
return token_provider.NewHeaderProvider(*cfg.HeaderProvider), nil return token_provider.NewHeaderProvider(cfg.Name, *cfg.HeaderProvider), nil
case conf.CookieTokenProviderType: case conf.CookieTokenProviderType:
if cfg.CookieProvider == nil { if cfg.CookieProvider == nil {
return nil, errors.Errorf("token method '%s' has empty cookie provider", cfg.Name) return nil, errors.Errorf("token method '%s' has empty cookie provider", cfg.Name)
} }
return token_provider.NewCookieProvider(*cfg.CookieProvider), nil return token_provider.NewCookieProvider(cfg.Name, *cfg.CookieProvider), nil
default: default:
return nil, errors.Errorf("unknown token provider with type '%s'", cfg.Type) return nil, errors.Errorf("unknown token provider with type '%s'", cfg.Type)
} }
+28 -40
View File
@@ -1,5 +1,5 @@
// nolint:canonicalheader // nolint:canonicalheader
package tests package tests_test
import ( import (
"context" "context"
@@ -24,6 +24,7 @@ import (
"github.com/txix-open/isp-kit/http/endpoint" "github.com/txix-open/isp-kit/http/endpoint"
"github.com/txix-open/isp-kit/http/endpoint/httplog" "github.com/txix-open/isp-kit/http/endpoint/httplog"
"github.com/txix-open/isp-kit/http/httpcli" "github.com/txix-open/isp-kit/http/httpcli"
"github.com/txix-open/isp-kit/http/httpclix"
"github.com/txix-open/isp-kit/http/router" "github.com/txix-open/isp-kit/http/router"
"github.com/txix-open/isp-kit/test/fake" "github.com/txix-open/isp-kit/test/fake"
@@ -59,18 +60,9 @@ func (s *HappyPathTestSuite) TestGrpcProxy() {
requestId := requestid.Next() requestId := requestid.Next()
targetService, targetCli := grpct.NewMock(test) targetService, targetCli := grpct.NewMock(test)
targetService.Mock("endpoint", func(ctx context.Context, authData grpc.AuthData, req request) response { targetService.Mock("endpoint", func(ctx context.Context, authData grpc.AuthData, req request) response {
systemId, err := authData.SystemId()
require.NoError(err)
domainId, err := authData.DomainId()
require.NoError(err)
serviceId, err := authData.ServiceId()
require.NoError(err)
applicationId, err := authData.ApplicationId() applicationId, err := authData.ApplicationId()
require.NoError(err) require.NoError(err)
require.EqualValues(requestId, requestid.FromContext(ctx)) require.EqualValues(requestId, requestid.FromContext(ctx))
require.EqualValues(1, systemId)
require.EqualValues(2, domainId)
require.EqualValues(3, serviceId)
require.EqualValues(4, applicationId) require.EqualValues(4, applicationId)
adminId, err := grpc.StringFromMd("x-admin-id", metadata.MD(authData)) adminId, err := grpc.StringFromMd("x-admin-id", metadata.MD(authData))
@@ -380,12 +372,12 @@ func (s *HappyPathTestSuite) TestUserAuthorization() { // nolint:funlen
UserAuthSettings: []conf.UserAuthSetting{ UserAuthSettings: []conf.UserAuthSetting{
{ {
ModuleNameList: []string{"target"}, ModuleNameList: []string{"target"},
TokenProvider: "test_provider", TokenProviders: []string{"test_provider"},
AuthenticateEndpoint: "test-user-auth/authenticate", AuthenticateEndpoint: "test-user-auth/authenticate",
}, },
{ {
ModuleNameList: []string{"target2"}, ModuleNameList: []string{"target2"},
TokenProvider: "test_provider", TokenProviders: []string{"test_provider"},
AuthenticateEndpoint: "failed-user-auth/authenticate", AuthenticateEndpoint: "failed-user-auth/authenticate",
}, },
}, },
@@ -519,13 +511,13 @@ func (s *HappyPathTestSuite) TestUserAuthorization_SkipAppAuth() { // nolint:fun
UserAuthSettings: []conf.UserAuthSetting{ UserAuthSettings: []conf.UserAuthSetting{
{ {
ModuleNameList: []string{"target"}, ModuleNameList: []string{"target"},
TokenProvider: "test_provider", TokenProviders: []string{"test_provider"},
AuthenticateEndpoint: "test-user-auth/authenticate", AuthenticateEndpoint: "test-user-auth/authenticate",
SkipAppAuth: true, SkipAppAuth: true,
}, },
{ {
ModuleNameList: []string{"target2"}, ModuleNameList: []string{"target2"},
TokenProvider: "test_provider", TokenProviders: []string{"test_provider"},
AuthenticateEndpoint: "test-user-auth/authenticate", AuthenticateEndpoint: "test-user-auth/authenticate",
}, },
}, },
@@ -580,7 +572,7 @@ func (s *HappyPathTestSuite) TestUserAuthorization_SkipAppAuth() { // nolint:fun
} }
// nolint:ireturn // nolint:ireturn
func (s *HappyPathTestSuite) commonDependencies(test *test.Test) (conf.Remote, *client.Client, *client.Client) { func (s *HappyPathTestSuite) commonDependencies(test *test.Test) (conf.Remote, *client.Client, *httpclix.ClientBalancer) {
config := conf.Remote{ config := conf.Remote{
Http: conf.Http{MaxRequestBodySizeInMb: 1, ProxyTimeoutInSec: 15}, Http: conf.Http{MaxRequestBodySizeInMb: 1, ProxyTimeoutInSec: 15},
Logging: conf.Logging{LogLevel: log.DebugLevel, RequestLogEnable: true, BodyLogEnable: true, Logging: conf.Logging{LogLevel: log.DebugLevel, RequestLogEnable: true, BodyLogEnable: true,
@@ -597,9 +589,6 @@ func (s *HappyPathTestSuite) commonDependencies(test *test.Test) (conf.Remote, *
Authenticated: true, Authenticated: true,
ErrorReason: "", ErrorReason: "",
AuthData: &entity.AppAuthData{ AuthData: &entity.AppAuthData{
SystemId: 1,
DomainId: 2,
ServiceId: 3,
ApplicationId: 4, ApplicationId: 4,
AppName: "test", AppName: "test",
}, },
@@ -608,19 +597,27 @@ func (s *HappyPathTestSuite) commonDependencies(test *test.Test) (conf.Remote, *
return entity.AuthorizeResponse{Authorized: true} return entity.AuthorizeResponse{Authorized: true}
}) })
adminService, adminCli := grpct.NewMock(test) adminMux := router.New()
adminService.Mock("admin/secure/authenticate", func(req entity.AdminAuthorizeRequest) entity.AdminAuthenticateResponse { defaultWrapper := endpoint.DefaultWrapper(test.Logger(), httplog.Noop())
return entity.AdminAuthenticateResponse{ adminMux.POST("/admin/secure/authenticate",
Authenticated: true, defaultWrapper.Endpoint(func(req entity.AuthenticateRequest) entity.AdminAuthenticateResponse {
ErrorReason: "", return entity.AdminAuthenticateResponse{
AdminId: 1, Authenticated: true,
} ErrorReason: "",
}).Mock("admin/secure/authorize", func(req entity.AdminAuthorizeRequest) entity.AdminAuthorizeResponse { AdminId: 1,
if req.Permission == "ok_permission" { }
return entity.AdminAuthorizeResponse{Authorized: true} }))
} adminMux.POST("/admin/secure/authorize",
return entity.AdminAuthorizeResponse{Authorized: false} defaultWrapper.Endpoint(func(req entity.AdminAuthorizeRequest) entity.AdminAuthorizeResponse {
}) if req.Permission == "ok_permission" {
return entity.AdminAuthorizeResponse{Authorized: true}
}
return entity.AdminAuthorizeResponse{Authorized: false}
}))
adminMock := httptest.NewServer(adminMux)
adminUrl, err := url.Parse(adminMock.URL)
require.New(s.T()).NoError(err)
adminCli := httpclix.NewClientBalancer([]string{adminUrl.Host})
return config, systemCli, adminCli return config, systemCli, adminCli
} }
@@ -631,18 +628,9 @@ func TestHappyPathTestSuite(t *testing.T) {
} }
func assertHeaders(require *require.Assertions, requestId string, ctx context.Context, headers http.Header) { func assertHeaders(require *require.Assertions, requestId string, ctx context.Context, headers http.Header) {
systemId, err := strconv.Atoi(headers.Get("x-system-identity"))
require.NoError(err)
domainId, err := strconv.Atoi(headers.Get("x-domain-identity"))
require.NoError(err)
serviceId, err := strconv.Atoi(headers.Get("x-service-identity"))
require.NoError(err)
applicationId, err := strconv.Atoi(headers.Get("x-application-identity")) applicationId, err := strconv.Atoi(headers.Get("x-application-identity"))
require.NoError(err) require.NoError(err)
require.EqualValues(requestId, requestid.FromContext(ctx)) require.EqualValues(requestId, requestid.FromContext(ctx))
require.EqualValues(1, systemId)
require.EqualValues(2, domainId)
require.EqualValues(3, serviceId)
require.EqualValues(4, applicationId) require.EqualValues(4, applicationId)
expectedAppName := base64.StdEncoding.EncodeToString([]byte("test")) expectedAppName := base64.StdEncoding.EncodeToString([]byte("test"))
require.EqualValues(expectedAppName, headers.Get("x-application-name")) require.EqualValues(expectedAppName, headers.Get("x-application-name"))
+30 -21
View File
@@ -4,10 +4,11 @@ import (
"context" "context"
"net" "net"
"net/http" "net/http"
"net/http/httptest"
"net/url"
"isp-gate-service/assembly" "isp-gate-service/assembly"
"isp-gate-service/conf" "isp-gate-service/conf"
"isp-gate-service/domain"
"isp-gate-service/entity" "isp-gate-service/entity"
"isp-gate-service/routes" "isp-gate-service/routes"
@@ -17,6 +18,10 @@ import (
"github.com/txix-open/isp-kit/grpc/client" "github.com/txix-open/isp-kit/grpc/client"
endpoint2 "github.com/txix-open/isp-kit/grpc/endpoint" endpoint2 "github.com/txix-open/isp-kit/grpc/endpoint"
"github.com/txix-open/isp-kit/grpc/isp" "github.com/txix-open/isp-kit/grpc/isp"
"github.com/txix-open/isp-kit/http/endpoint"
"github.com/txix-open/isp-kit/http/endpoint/httplog"
"github.com/txix-open/isp-kit/http/httpclix"
"github.com/txix-open/isp-kit/http/router"
"github.com/txix-open/isp-kit/log" "github.com/txix-open/isp-kit/log"
) )
@@ -55,15 +60,12 @@ func main() {
Throttling: []conf.Throttling{{ApplicationId: 1, RequestsPerSeconds: 5000}}, Throttling: []conf.Throttling{{ApplicationId: 1, RequestsPerSeconds: 5000}},
} }
systemService, systemCli, _ := NewMock(logger) systemService, systemCli := NewMock(logger)
systemService.Mock("system/secure/authenticate", func() entity.AuthenticateResponse { systemService.Mock("system/secure/authenticate", func() entity.AuthenticateResponse {
return entity.AuthenticateResponse{ return entity.AuthenticateResponse{
Authenticated: true, Authenticated: true,
ErrorReason: "", ErrorReason: "",
AuthData: &entity.AppAuthData{ AuthData: &entity.AppAuthData{
SystemId: 1,
DomainId: 1,
ServiceId: 1,
ApplicationId: 1, ApplicationId: 1,
}, },
} }
@@ -71,16 +73,9 @@ func main() {
return entity.AuthorizeResponse{Authorized: true} return entity.AuthorizeResponse{Authorized: true}
}) })
adminService, _, adminCli := NewMock(logger) adminCli := NewAdminMock(logger)
adminService.Mock("admin/secure/authenticate", func() domain.AdminAuthenticateResponse {
return domain.AdminAuthenticateResponse{
Authenticated: true,
ErrorReason: "",
AdminId: 1,
}
})
targetService, targetCli, _ := NewMock(logger) targetService, targetCli := NewMock(logger)
targetService.Mock("endpoint", func(req request) response { targetService.Mock("endpoint", func(req request) response {
return response{Id: req.Id} return response{Id: req.Id}
}) })
@@ -102,19 +97,33 @@ func main() {
srv.ListenAndServe() srv.ListenAndServe()
} }
func TestServer(service isp.BackendServiceServer) (*grpc.Server, *client.Client, *client.Client) { func NewAdminMock(logger log.Logger) *httpclix.ClientBalancer {
mux := router.New()
wrapper := endpoint.DefaultWrapper(logger, httplog.Noop())
mux.POST("/admin/secure/authenticate",
wrapper.Endpoint(func() entity.AdminAuthenticateResponse {
return entity.AdminAuthenticateResponse{
Authenticated: true,
ErrorReason: "",
AdminId: 1,
}
}))
mock := httptest.NewServer(mux)
u, _ := url.Parse(mock.URL)
return httpclix.NewClientBalancer([]string{u.Host})
}
func TestServer(service isp.BackendServiceServer) (*grpc.Server, *client.Client) {
listener, _ := net.Listen("tcp", "127.0.0.1:") // nolint:noctx listener, _ := net.Listen("tcp", "127.0.0.1:") // nolint:noctx
srv := grpc.NewServer() srv := grpc.NewServer()
sysCli, _ := client.Default() sysCli, _ := client.Default()
adminCli, _ := client.Default()
srv.Upgrade(service) srv.Upgrade(service)
go func() { go func() {
_ = srv.Serve(listener) _ = srv.Serve(listener)
}() }()
sysCli.Upgrade([]string{listener.Addr().String()}) sysCli.Upgrade([]string{listener.Addr().String()})
adminCli.Upgrade([]string{listener.Addr().String()}) return srv, sysCli
return srv, sysCli, adminCli
} }
type MockServer struct { type MockServer struct {
@@ -123,13 +132,13 @@ type MockServer struct {
mockEndpoints map[string]any mockEndpoints map[string]any
} }
func NewMock(logger log.Logger) (*MockServer, *client.Client, *client.Client) { func NewMock(logger log.Logger) (*MockServer, *client.Client) {
srv, syscli, admincli := TestServer(grpc.NewMux()) srv, syscli := TestServer(grpc.NewMux())
return &MockServer{ return &MockServer{
srv: srv, srv: srv,
logger: logger, logger: logger,
mockEndpoints: make(map[string]any), mockEndpoints: make(map[string]any),
}, syscli, admincli }, syscli
} }
func (m *MockServer) Mock(endpoint string, handler any) *MockServer { func (m *MockServer) Mock(endpoint string, handler any) *MockServer {