profile
viewpoint
Matias Insaurralde matiasinsaurralde @TykTechnologies Paraguay https://matias.insaurral.de/ software developer (most of the time), infosec enthusiast, human being, self-taught. 24 years.

startedTykTechnologies/native-go-auth-middleware

started time in a day

startedoriansj/stage0

started time in 2 days

startedtilk/digitaljs

started time in 2 days

pull request commentTykTechnologies/tyk

Support response middleware when using rich plugins (PoC)

Rebased and updated this to incorporate #2213, I'm doing some additional changes related to errors during response middleware and it will be ready.

matiasinsaurralde

comment created time in 2 days

push eventmatiasinsaurralde/tyk

Furkan Senharputlu

commit sha 3a20db12fee8d98d1d79ca44abae12d38c550168

Make InitDNSMock configurable (#2309) This mutex should be used in `tyk-analytics` to prevent race conditions in integration of dashboard and gateway.

view details

Matias Insaurralde

commit sha 21b2b874bd057fef68f3a3cddfe7481459db69da

coprocess: extend ReturnOverrides headers usage (fixes #2282) (#2283) Fixes #2282. This was a case we didn't cover while building this feature. It was available in different `ReturnOverrides` scenarios.

view details

Leonid Bugaev

commit sha 112be389787c52d590c8312acb12ecd0e4bda6d7

if dash is enabled, auto-configure policy record (#2276) Addresses #1505

view details

Leonid Bugaev

commit sha 63e32efb7582cee417d4f82193806517f955ce80

Fix tests

view details

Ahmet Soormally

commit sha bab1e56d054116ee272265c2f17079b7e979a01f

consistent mw version order (#2270) - Consistent MW execution order - previously, the keyless APIs executed in a different order to protected APIs. - Remove duplicate code - When creating new plugins - you no longer need to create it in 2 places - Resolves #2317

view details

Ahmet Soormally

commit sha d61d28214d7ea8948d974ccdc68904cc21003204

basic auth cache - thundering heard (#2323) resolves: https://github.com/TykTechnologies/tyk/issues/2324 Implemented singleflight, which suppresses/coalesces duplicate BCrypt function calls for the same cache key in event of cache miss. The purpose of Caching, is to avoid performing expensive computation if the computation has already been calculated. But if the cache is empty (cold start, reload, expiry), and under high load, the first `x` requests will get a cache miss, and all simultaneously perform BCrypt + Caching of exactly the same password - then race to fill the cache. So we have various problems under load… 1. BCrypt is being called`x-1` too many times, 2. Necessity to check & set in cache `x-1` too many times. --- After receiving a cache-miss, we performs BCrypt + Cache via singleflight. Singleflight coalesces similar requests into a single call to BCrypt+Cache function, and returns the result to all of the remaining requests. As such, when the cache is cleared (hot reload, cold-start, cache expire), we have mitigated the thundering herd problem, because only one of the herd will actually perform the expensive operation, while the others simply wait for the result.

view details

Ahmet Soormally

commit sha 0c211d14a8c5a8b91669db9602cd666bc1de4778

ux: gateway logs (#2307) Fixing some of the startup log order Organizing some of the startup service checks by moving into the checkup package

view details

Komal Sukhani

commit sha e1466dbea4a63611179c604adf9b25a49a2f5ede

Added support of WSDL import (#2230) User can now import WSDL file to create API definition. [#Reference](https://github.com/TykTechnologies/tyk-analytics/issues/1160) **Supported features:** 1. WSDL file with multiple services 2. SOAP/SOAP12 binding 3. HTTP binding **Generated API Definition will be as follows:** 1. API `name` is same as that of the service name. If WSDL contains multiple services, then the name of the first service in the file will be used. 2. `listen-path` of the API will be > "/service name/" If WSDL contains multiple services, then the name of the first service in the file will be used. 3. For each supported operation, an endpoint will be created. Endpoint will have the path > /service_name/end_path In case of **SOAP/SOAP12** binding, _end_path_ will be operation name. In case of **HTTP** binding, _end_path_ will be value of `location` attribute of the operation. 4. Each endpoint will use url-rewrite middleware to direct the request to the upstream. This was necessary to support multiple services If service has multiple Ports type, name of the Port needs to be specified. If Port name is not provided then first Port of the service is used. https://github.com/TykTechnologies/tyk/issues/2255

view details

Leonid Bugaev

commit sha b117d0f28337976e9f34cb7c41dac12b8983524a

Fix tests from (#2230)

view details

Leonid Bugaev

commit sha f4131dac6628fcf0c6834284ff9553e279436d71

Change log field error to prevent misleading (#2267) Fixes #2263

view details

Lanre Adelowo

commit sha 8932e86eeb5898d89fe4cb1c60281ad4707382bd

add json tag to skip (un)marshalling (#2207) `MatchRegexp` is meant to be an internal value used for caching the regexp of `match_pattern` not controlled by the user

view details

Leonid Bugaev

commit sha 51c590c2765f99e38edfff53c97cb7716ba7d90a

Respect tags coming from key level (#2128) When a policy with a tag is applied to a key, it doesn't respect key's tag. This PR fixes the bug if in FE, https://github.com/TykTechnologies/tyk-analytics-ui/issues/1082 should be fixed for this PR to work properly. Fixes #1671

view details

Yevhen Vitiuk

commit sha 1adb4288c818056511c66d8b8a6f741d4b95bc41

[WIP]Feature/issues/640 body transforms (#2104) Issue - #640 What was changed? - Added https://github.com/Masterminds/sprig as template engine for API endpoint body transforms (as based on #2100) - add https://github.com/Masterminds/sprig/tree/v2.17.1 to vendor Requires update of POST /api/designer/test within tyk-analytics

view details

Leonid Bugaev

commit sha 379328b53e46bfe5d73c09fdcfb8381315c494cd

Fix vendoring

view details

Lanre Adelowo

commit sha 794af2586e99979e5b084df44021ba767d62f9e4

Add pagination when listing Oauth clients tokens (#2109) Added optional query parameter called `page` to the endpoint `/oauth/clients/{apiID}/{keyName}/tokens` . To prevent breaking backwards compatibility, tokens will only be paginated if they contain a `page` query item Part of https://github.com/TykTechnologies/tyk-analytics/issues/1101

view details

Lanre Adelowo

commit sha 8f64358ae93647ebfa786553705c6cb31a0b9d78

Notify dashboard whenever monitor for a key quota limit kicks in (#2134) Per discussion in https://github.com/TykTechnologies/tyk-analytics/issues/1013 ~~Will send the PR for the dashboard in the appropriate repository~~ See https://github.com/TykTechnologies/tyk-analytics/pull/1186

view details

Ahmet Soormally

commit sha 3425f53c0ca23f70cba595f342a62bf85d678d34

basic auth cache - thundering heard (#2326) Addition to https://github.com/TykTechnologies/tyk/pull/2323

view details

Ahmet Soormally

commit sha e6d23953a612f48dad2e7bc8df525057a3b6258d

sorting config options in struct by category (#2333) 1st pass - re-organising top-level Gateway configuration options. Related fields together, and logically grouped. This will assist further down the line when auto-generating documentation.

view details

Furkan Senharputlu

commit sha 84e537923d78d9170c4bfaebdccceb6bc2c3c93b

Implement xmlMarshal function for body transform (#2336) Fixes #2086

view details

dencoded

commit sha 87a105baac359dc5e44cc9e8a3ae1952b7b19234

PoC: Go-plugins support added (#2077) added initial changes for https://github.com/TykTechnologies/tyk/issues/553 - provides low level access to plugin supplying actual `http.ResponseWriter`, `*http.Request` - assumes that plugin optionally sends reply to `http.ResponseWriter` - in this case all tyk's MW-chain stops and reply returned to client - assumes that plugin always wire reply to `http.ResponseWriter` in case of error - recovers with 500 error reply in case plugin did panic - our logic around custom middleware was used - we specify all settings on API spec level in `custom_middleware` field, i.e.: ``` "custom_middleware": { "pre": [], "post": [ { "name": "MyProcessRequest", "path": "/abc/xyz.so", "require_session": true } ], "post_key_auth": [], "auth_check": {}, "driver": "goplugin", ... } ``` - added new plugin driver `"goplugin"` - supports `"pre"`, `"post"`, `"post_key_auth"` and `"auth_check"` custom middlewares as described in https://tyk.io/docs/customise-tyk/plugins/rich-plugins/rich-plugins-work/#coprocess-dispatcher-hooks - .so file can also be packaged as a bundle and loaded/deployed using our logic for `custom_middleware_bundle`

view details

push time in 2 days

push eventmatiasinsaurralde/tyk

Furkan Senharputlu

commit sha cead6ce452d447f3288d4552be8b72adb7f974b0

Fix TestGetPaginatedClientTokens (#2345) I run this test 1000 times and all passed.

view details

Matias Insaurralde

commit sha 1a3b173c0586000a99615632eae91b40bc466ce8

Avoid duplicate request body in gRPC request object (#2213) Potential fix for #2208, described [here](https://github.com/TykTechnologies/tyk/issues/2208#issuecomment-483262129). Need to add tests.

view details

Furkan Senharputlu

commit sha c3d882a5aa1336b4c66a669fb4f1f5c8c7f67674

Fix body decompression error with cache (#2351) Fixes #2281

view details

Alok G Singh

commit sha f191564400f76694758e5d8f793b13eff72adfda

RPMs can be signed via the agent (#2343) This will enable us to use the official go 1.12 base image rather than having to setup go by hand on jessie.

view details

Furkan Senharputlu

commit sha 6abbf8fd4b9c63f796f144f041db8c92eb236c89

Fix oauth token pagination (#2360) Fixes #2359

view details

push time in 2 days

startedPopulateTools/gobierto

started time in 2 days

startedmicrosoft/mimalloc

started time in 4 days

pull request commentTykTechnologies/tyk

Support response middleware when using rich plugins (PoC)

Hi @l3ender, feel free to try this branch, have you previously used pre/post hooks? This basically works in the same way, the main difference is that there's a new field called response in the manifest file, like this:

{
  "file_list": [
  ],
  "custom_middleware": {
    "pre": [
      {
        "name": "MyPreHook"
      }
    ],
    "response": [{
      "name": "MyResponseHook"
    }]
}

In this scenario MyResponseHook will be called after Tyk proxies your request to the upstream API, and the object that your hook receives will include the response data too. I'm planning to incorporate other changes like #2213 before this gets merged, also extend tests and polish some code.

Best.

matiasinsaurralde

comment created time in 12 days

push eventmatiasinsaurralde/tyk

Matias Insaurralde

commit sha e23a658f9d34bc0f67c1559c99d5039b6ef86b8f

coprocess: fix gofmt

view details

push time in 12 days

push eventmatiasinsaurralde/tyk

Leonid Bugaev

commit sha b248c1914d0294207b4171d09b1a39e7344b44c4

Fix JWT expiration (#2310) With code added in #1849 we made JWT keys set expiration on keys (pick whatever bigger either policy or token value) However this change introduce bug in situation when policy is set to "Never Expire" (or just lower then JWT value): if JWT key expire its expiration value gets hold in session value, and never gets overriden, even if JWT token gets re-issued. The bug itself consists of two parts. 1) Code which should update the session for alredy existing JWT token gets run ONLY if policy ID has changed 2) Code above updates only local session cache, but not propagate change to the Redis This PR fix both 1) and 2), and adds test coverting this issue. Fix #2304

view details

Leonid Bugaev

commit sha 5290f8f3473ef57f64bc724c845b59e9632c8a58

Fix creating oAuth clients with multiple APIs (#2315) Rollback part of 2.8 changes

view details

Komal Sukhani

commit sha 3af01290a695c943292595db2596c2a748106e1d

Use TrimPrefix to strip listen path (#2316) Fixes #2313 Same as #2211 Missed this case `strings.Replace()` method was used to strip the `listen_path`. So when URL rewrite plugin was used to call an endpoint that contained `listen_path` anywhere in it's path, it was getting removed. To fix this I replaced `strings.Replace()` with `strings.TrimPrefix()`

view details

Furkan Senharputlu

commit sha 3a20db12fee8d98d1d79ca44abae12d38c550168

Make InitDNSMock configurable (#2309) This mutex should be used in `tyk-analytics` to prevent race conditions in integration of dashboard and gateway.

view details

Matias Insaurralde

commit sha 21b2b874bd057fef68f3a3cddfe7481459db69da

coprocess: extend ReturnOverrides headers usage (fixes #2282) (#2283) Fixes #2282. This was a case we didn't cover while building this feature. It was available in different `ReturnOverrides` scenarios.

view details

Leonid Bugaev

commit sha 112be389787c52d590c8312acb12ecd0e4bda6d7

if dash is enabled, auto-configure policy record (#2276) Addresses #1505

view details

Leonid Bugaev

commit sha 63e32efb7582cee417d4f82193806517f955ce80

Fix tests

view details

Ahmet Soormally

commit sha bab1e56d054116ee272265c2f17079b7e979a01f

consistent mw version order (#2270) - Consistent MW execution order - previously, the keyless APIs executed in a different order to protected APIs. - Remove duplicate code - When creating new plugins - you no longer need to create it in 2 places - Resolves #2317

view details

Ahmet Soormally

commit sha d61d28214d7ea8948d974ccdc68904cc21003204

basic auth cache - thundering heard (#2323) resolves: https://github.com/TykTechnologies/tyk/issues/2324 Implemented singleflight, which suppresses/coalesces duplicate BCrypt function calls for the same cache key in event of cache miss. The purpose of Caching, is to avoid performing expensive computation if the computation has already been calculated. But if the cache is empty (cold start, reload, expiry), and under high load, the first `x` requests will get a cache miss, and all simultaneously perform BCrypt + Caching of exactly the same password - then race to fill the cache. So we have various problems under load… 1. BCrypt is being called`x-1` too many times, 2. Necessity to check & set in cache `x-1` too many times. --- After receiving a cache-miss, we performs BCrypt + Cache via singleflight. Singleflight coalesces similar requests into a single call to BCrypt+Cache function, and returns the result to all of the remaining requests. As such, when the cache is cleared (hot reload, cold-start, cache expire), we have mitigated the thundering herd problem, because only one of the herd will actually perform the expensive operation, while the others simply wait for the result.

view details

Ahmet Soormally

commit sha 0c211d14a8c5a8b91669db9602cd666bc1de4778

ux: gateway logs (#2307) Fixing some of the startup log order Organizing some of the startup service checks by moving into the checkup package

view details

Komal Sukhani

commit sha e1466dbea4a63611179c604adf9b25a49a2f5ede

Added support of WSDL import (#2230) User can now import WSDL file to create API definition. [#Reference](https://github.com/TykTechnologies/tyk-analytics/issues/1160) **Supported features:** 1. WSDL file with multiple services 2. SOAP/SOAP12 binding 3. HTTP binding **Generated API Definition will be as follows:** 1. API `name` is same as that of the service name. If WSDL contains multiple services, then the name of the first service in the file will be used. 2. `listen-path` of the API will be > "/service name/" If WSDL contains multiple services, then the name of the first service in the file will be used. 3. For each supported operation, an endpoint will be created. Endpoint will have the path > /service_name/end_path In case of **SOAP/SOAP12** binding, _end_path_ will be operation name. In case of **HTTP** binding, _end_path_ will be value of `location` attribute of the operation. 4. Each endpoint will use url-rewrite middleware to direct the request to the upstream. This was necessary to support multiple services If service has multiple Ports type, name of the Port needs to be specified. If Port name is not provided then first Port of the service is used. https://github.com/TykTechnologies/tyk/issues/2255

view details

Leonid Bugaev

commit sha b117d0f28337976e9f34cb7c41dac12b8983524a

Fix tests from (#2230)

view details

Leonid Bugaev

commit sha f4131dac6628fcf0c6834284ff9553e279436d71

Change log field error to prevent misleading (#2267) Fixes #2263

view details

Lanre Adelowo

commit sha 8932e86eeb5898d89fe4cb1c60281ad4707382bd

add json tag to skip (un)marshalling (#2207) `MatchRegexp` is meant to be an internal value used for caching the regexp of `match_pattern` not controlled by the user

view details

Leonid Bugaev

commit sha 51c590c2765f99e38edfff53c97cb7716ba7d90a

Respect tags coming from key level (#2128) When a policy with a tag is applied to a key, it doesn't respect key's tag. This PR fixes the bug if in FE, https://github.com/TykTechnologies/tyk-analytics-ui/issues/1082 should be fixed for this PR to work properly. Fixes #1671

view details

Yevhen Vitiuk

commit sha 1adb4288c818056511c66d8b8a6f741d4b95bc41

[WIP]Feature/issues/640 body transforms (#2104) Issue - #640 What was changed? - Added https://github.com/Masterminds/sprig as template engine for API endpoint body transforms (as based on #2100) - add https://github.com/Masterminds/sprig/tree/v2.17.1 to vendor Requires update of POST /api/designer/test within tyk-analytics

view details

Leonid Bugaev

commit sha 379328b53e46bfe5d73c09fdcfb8381315c494cd

Fix vendoring

view details

Lanre Adelowo

commit sha 794af2586e99979e5b084df44021ba767d62f9e4

Add pagination when listing Oauth clients tokens (#2109) Added optional query parameter called `page` to the endpoint `/oauth/clients/{apiID}/{keyName}/tokens` . To prevent breaking backwards compatibility, tokens will only be paginated if they contain a `page` query item Part of https://github.com/TykTechnologies/tyk-analytics/issues/1101

view details

Lanre Adelowo

commit sha 8f64358ae93647ebfa786553705c6cb31a0b9d78

Notify dashboard whenever monitor for a key quota limit kicks in (#2134) Per discussion in https://github.com/TykTechnologies/tyk-analytics/issues/1013 ~~Will send the PR for the dashboard in the appropriate repository~~ See https://github.com/TykTechnologies/tyk-analytics/pull/1186

view details

Ahmet Soormally

commit sha 3425f53c0ca23f70cba595f342a62bf85d678d34

basic auth cache - thundering heard (#2326) Addition to https://github.com/TykTechnologies/tyk/pull/2323

view details

push time in 12 days

push eventmatiasinsaurralde/tyk

Lanre Adelowo

commit sha 8f64358ae93647ebfa786553705c6cb31a0b9d78

Notify dashboard whenever monitor for a key quota limit kicks in (#2134) Per discussion in https://github.com/TykTechnologies/tyk-analytics/issues/1013 ~~Will send the PR for the dashboard in the appropriate repository~~ See https://github.com/TykTechnologies/tyk-analytics/pull/1186

view details

Ahmet Soormally

commit sha 3425f53c0ca23f70cba595f342a62bf85d678d34

basic auth cache - thundering heard (#2326) Addition to https://github.com/TykTechnologies/tyk/pull/2323

view details

Ahmet Soormally

commit sha e6d23953a612f48dad2e7bc8df525057a3b6258d

sorting config options in struct by category (#2333) 1st pass - re-organising top-level Gateway configuration options. Related fields together, and logically grouped. This will assist further down the line when auto-generating documentation.

view details

Furkan Senharputlu

commit sha 84e537923d78d9170c4bfaebdccceb6bc2c3c93b

Implement xmlMarshal function for body transform (#2336) Fixes #2086

view details

dencoded

commit sha 87a105baac359dc5e44cc9e8a3ae1952b7b19234

PoC: Go-plugins support added (#2077) added initial changes for https://github.com/TykTechnologies/tyk/issues/553 - provides low level access to plugin supplying actual `http.ResponseWriter`, `*http.Request` - assumes that plugin optionally sends reply to `http.ResponseWriter` - in this case all tyk's MW-chain stops and reply returned to client - assumes that plugin always wire reply to `http.ResponseWriter` in case of error - recovers with 500 error reply in case plugin did panic - our logic around custom middleware was used - we specify all settings on API spec level in `custom_middleware` field, i.e.: ``` "custom_middleware": { "pre": [], "post": [ { "name": "MyProcessRequest", "path": "/abc/xyz.so", "require_session": true } ], "post_key_auth": [], "auth_check": {}, "driver": "goplugin", ... } ``` - added new plugin driver `"goplugin"` - supports `"pre"`, `"post"`, `"post_key_auth"` and `"auth_check"` custom middlewares as described in https://tyk.io/docs/customise-tyk/plugins/rich-plugins/rich-plugins-work/#coprocess-dispatcher-hooks - .so file can also be packaged as a bundle and loaded/deployed using our logic for `custom_middleware_bundle`

view details

Furkan Senharputlu

commit sha a752481b4c3457043345db2ceb8bfc10c7dc0608

Add case sensitivity tests for urlrewrite, body transforms, whitelist and blacklist (#2340) These tests are added for backward compatibility purposes. Some whitelist and blacklist test cases are commented because they have bug. They are going be fixed by the PR #2339

view details

Furkan Senharputlu

commit sha e1c078fe03645cb39775b0c317438a6dfcb0d688

Respect upper case coming from relative path to fix whitelist plugin (#2339) Fixes #2330

view details

Furkan Senharputlu

commit sha 0b6424018db34e5a24ea4a965feb34df7191ed80

Add JWTDefaultPolicies field and default policy feature (#2318) This PR adds `JWTDefaultPolicies` to api definition. This means in `JWT` authentication, a user can apply some default policies not having conflict to the session created by `JWT` authentication. Note: Error messages start with lowercase. I refactored the messages in the related part. There should be a big refactor to make error messages compatible with Go conventions. Fixes #2009

view details

Komal Sukhani

commit sha fc3a224a8c09d8fdb117c946ac3f2f8e78ef03e1

Update accessRights of Per API policy when API is deleted (#2312) Fixes [tyk-analytics/issues/1222](https://github.com/TykTechnologies/tyk-analytics/issues/1222) `accessRights` are stored in a map. While applying Per API policy, previous instance of map was used and entries where updated. So if an API was deleted from policy, it's entry was not deleted from `accessRights`. The issue is resolved by creating new instance of map and adding entries to it.

view details

Furkan Senharputlu

commit sha 14bfa6b3fc59c101b23fdfea619b4e14771d4258

Update readme for roadmap (#2338)

view details

Furkan Senharputlu

commit sha 3a75a1a0c045cfaa6a58a302b844b46c5590acb2

Escape invalid chars for xmlMarshal (#2337) Extending #2336

view details

Leonid Bugaev

commit sha 0817f911ff9ea83acdbe9aae35b2f8c163ae45db

Do not run instrumentation code if its not enabled (#2342) Fix #2289

view details

push time in 12 days

push eventmatiasinsaurralde/tyk

Matias Insaurralde

commit sha df8440d7e9ffbc48866da968b2f587d046f03605

coprocess: take RawBodyOnly flag directly from middleware settings

view details

push time in 12 days

push eventmatiasinsaurralde/tyk

Matias Insaurralde

commit sha a1fe9a99353dc7f4095eb0ebed6fd1f39418a4df

coprocess: add check for "raw_body_only"

view details

Matias Insaurralde

commit sha b21e1711b654f829c9e5a30173391b7dc9c33344

coprocess: extend error handling when building request object

view details

Matias Insaurralde

commit sha e5df796ed11a964eff2b2b906d0cb9180faaf8f7

coprocess: adjust error handling

view details

Matias Insaurralde

commit sha 1eb83793ab057aa8486fc6edeabab83a6c615e67

coprocess: use hook level "raw_body_only" flag

view details

Matias Insaurralde

commit sha 3c736e0ef0c98566047f5e779a0ab382dff3c748

coprocess: fix non-CP builds

view details

push time in 12 days

Pull request review commentTykTechnologies/tyk

Escape invalid chars for xmlMarshal

 var Template = template.New("").Funcs(map[string]interface{}{ 		var xmlValue []byte 		mv, ok := v.(mxj.Map) 		if ok {+			mxj.XMLEscapeChars(true) 			xmlValue, err = mv.Xml()

Perhaps return after this line and remove the block in else like?

if ok {
  mxj.XMLEscapeChars(true)
  xmlValue, err = mv.Xml()
  return string(xmlValue), err
}
res, ok := v.(map[string]interface{})
...
furkansenharputlu

comment created time in 15 days

push eventmatiasinsaurralde/tyk

Matias Insaurralde

commit sha 00565482914964eae3cab91f5e93d21dc1326beb

coprocess: fix non-CP builds

view details

push time in 19 days

push eventmatiasinsaurralde/tyk

Matias Insaurralde

commit sha 33a82f6c9ef9dbefe1516a8db66105c000d19095

coprocess: use hook level "raw_body_only" flag

view details

push time in 19 days

issue commentTykTechnologies/tyk

Provide hook level flags for rich plugins

@l3ender You can find it here on the last paragraph.

matiasinsaurralde

comment created time in 21 days

issue openedTykTechnologies/tyk

Provide hook level flags for rich plugins

Do you want to request a feature or report a bug? Feature/enhancement

What is the current behavior? Flags like require_session exist but they are not used by rich plugins, only by JSVM. While building #2321 I find that it will be better to extend the hook level flags we currently support.

What is the expected behavior?

  1. We could make require_session work for rich plugins.
  2. Also integrate #2213 at this level, so the user would have more control on where to access body data in raw mode or not. A proper default behavior should be set in order to not break any existing functionality. #2321 could also make use of this flag, for example, when a response is received and sent to the plugin we face the same problem as #2213.

Which versions of Tyk affected by this issue? Did this work in previous versions of Tyk? All

created time in 22 days

Pull request review commentTykTechnologies/tyk

Make maximum gRPC message size configurable

 func (d *GRPCDispatcher) Reload() {} // HandleMiddlewareCache isn't used by gRPC. func (d *GRPCDispatcher) HandleMiddlewareCache(b *apidef.BundleManifest, basePath string) {} +func grpcCallOpts() grpc.DialOption {+	recvSize := config.Global().CoProcessOptions.GRPCRecvMaxSize+	sendSize := config.Global().CoProcessOptions.GRPCSendMaxSize+	if recvSize > 0 && sendSize > 0 {

Added this

matiasinsaurralde

comment created time in 23 days

Pull request review commentTykTechnologies/tyk

Make maximum gRPC message size configurable

 func TestGRPCDispatch(t *testing.T) { 		}) 	}) +	t.Run("Post Hook with long message", func(t *testing.T) {

Updated tests

matiasinsaurralde

comment created time in 23 days

push eventmatiasinsaurralde/tyk

Matias Insaurralde

commit sha d731be1c306f2034e01a9a59a1da84a649306773

coprocess: fix header file location

view details

Matias Insaurralde

commit sha ae2fed3bb753ffdec38a6ecf74036533bd249cce

coprocess: extend test to cover additional case

view details

push time in 23 days

pull request commentTykTechnologies/tyk

Make maximum gRPC message size configurable

I've rebased and fixed a conflict here, will add what @asoorm mentioned now, think it's a valid use case

matiasinsaurralde

comment created time in 23 days

push eventmatiasinsaurralde/tyk

Matias Insaurralde

commit sha 00d9ac05548b5a8db2df1a296867f424b19557ff

mw_basic_auth: avoid missing header error when body basic auth is enabled (#2194) Fix #2193

view details

dencoded

commit sha 32859da5b997f58e972416660a5f3823a973950c

update key endpoint changed (#2209) added changes for https://github.com/TykTechnologies/tyk-analytics/issues/996 The problem was because we were setting `quota_renews` to 0 when updating key with `suppress_reset=1` as it forces starting new quota renewal period (which equal to reseting quotas)

view details

Furkan Senharputlu

commit sha e0a2b30548e8767034168c071664e99d527f17a6

Fix key update EOF issue (#2215) See https://github.com/TykTechnologies/tyk-analytics/issues/1224 The issue is about trying to read a `ReadCloser` without resetting it.

view details

Lanre Adelowo

commit sha 81265fcef2ae7f203f7d20f68587f172049ea2b1

Make sure there can only be one Access-Control-Allow-Origin header as per https://www.w3.org/TR/cors/\#resource-sharing-check (#2202) Fixes https://github.com/TykTechnologies/tyk/issues/2199 Also see https://www.w3.org/TR/cors/#resource-sharing-check The value of `Access-Control-Allow-Origin` in the proxy target's header takes precedence

view details

dencoded

commit sha b29a5e8bbd89817b8971537a035ac67a79044318

don't touch last_updated when suppress_reset=1 (#2219) added changes for https://github.com/TykTechnologies/tyk-analytics/issues/1221

view details

Lanre Adelowo

commit sha 513829c9fc8a20cec3b886a33b06fa6223febe66

Debug instead of Warning (#2220) Fixes https://github.com/TykTechnologies/tyk/issues/2216

view details

Komal Sukhani

commit sha fbaf23884e921d38b7d7f68ce3de41f02c962ef3

Bug/2211 fix strip path (#2212) Fixes #2211 Previously, strings.Replace() method was used to strip the `listen_path`. So when URL rewrite plugin was used to call an endpoint that contained `listen_path` anywhere in it's path, it was getting removed. To fix this I replaced `strings.Replace()` with `strings.TrimPrefix()`

view details

Leonid Bugaev

commit sha 38c3428ba250598868b2bbe181f5e9a7b1db3bcd

Ensure that policy applied before checking access rights (#2226) Fix https://github.com/TykTechnologies/tyk-analytics/issues/1222

view details

Leonid Bugaev

commit sha b7feb323165783e4334f96e1514e4cd6ffda9622

Fix tests (#2227)

view details

Furkan Senharputlu

commit sha d71a568f151bdeb0da699afc765a671f5906858a

Read log browser response body if compressed (#2218) * Read log browser response body if compressed * Set content length to 0 for deflate too

view details

Leonid Bugaev

commit sha acb61c78156df9653ce30ecd11622a27e4da49e1

Fix panics during reload (#2229) Initialize fallback manager on GW start

view details

Furkan Senharputlu

commit sha b0a8e0a921dfc12ada1370a01993f137018732c0

Fix body transform with cache plugin (#2231) `WrappedServeHTTP` is copying a response without handling body transformations. Then, it returns the early copied value. So, the actual response is cached. This PR prioritizes the body transformation. Fixes #2137.

view details

Leonid Bugaev

commit sha ab2334aebc8d62620c4ded1585eda4767649a8eb

Allow enable HTTP profiling via config (#2235) Added `enable_http_profiler` config option

view details

Leonid Bugaev

commit sha ef56da7e8c10618241958d31c732d238f7672f36

Fix goroutine leak with async session update (#2237) Session update worker pool was startng for every "DefaultSessionStore" object. And it was happening for every API initialization. So if you have 1000 APIs, and your worker pool is 100, each API reload will trigger at least 100k goroutines. This change maintains single worker pool which initilized only once. Issue itself was introduced by https://github.com/TykTechnologies/tyk/pull/1757 Fix https://github.com/TykTechnologies/tyk/issues/2236

view details

Leonid Bugaev

commit sha 08dfc0aea909a8dbd5117ca26c433dfde9f8187a

Fix basic auth caching (#2239) Basic auth cache was initialized for every API on every API reload. go-cache by itself consume quite lot of resources, when started in such amounts. Fix https://github.com/TykTechnologies/tyk/issues/2238

view details

Furkan Senharputlu

commit sha abc733bad5aa47c68365d127bd8b480adbce3a0b

Deprecate event_trigers_defunct, use event_triggers_defunct, (#2233) * Deprecate event_trigers_defunct, use event_triggers_defunct * Update linter

view details

Leonid Bugaev

commit sha 5b8aa1649ecba689c27d4811c4b6f2a343bbbb51

Re-vendor goautosocket (#2251) Fixed panic during error handling: https://github.com/TykTechnologies/goautosocket Fix https://github.com/TykTechnologies/tyk/issues/2250

view details

Komal Sukhani

commit sha dbfb801abc84efc63540a6573de538e0fbc4a259

Add enable_http_profiler in schema.json (#2257) Add `enable_http_profiler` in schema.json

view details

dencoded

commit sha 402be5db7ff45173d7b08dc02b4d27803466736a

stop circuit breaker Go routine before reloading api spec (#2256) added changes for: ``` File: tyk Type: goroutine Time: May 1, 2019 at 4:32pm (EDT) Entering interactive mode (type "help" for commands, "o" for options) (pprof) top10 Showing nodes accounting for 10488, 100% of 10490 total Dropped 74 nodes (cum <= 52) Showing top 10 nodes out of 22 flat flat% sum% cum cum% 10488 100% 100% 10488 100% runtime.gopark 0 0% 100% 96 0.92% bufio.(*Reader).Peek 0 0% 100% 141 1.34% bufio.(*Reader).fill 0 0% 100% 999 9.52% github.com/TykTechnologies/tyk/vendor/github.com/TykTechnologies/leakybucket/memorycache.(*Cache).startCleanupTimer.func1 0 0% 100% 4557 43.44% github.com/TykTechnologies/tyk/vendor/github.com/rubyist/circuitbreaker.(*Breaker).Subscribe.func1 0 0% 100% 145 1.38% internal/poll.(*FD).Read 0 0% 100% 147 1.40% internal/poll.(*pollDesc).wait 0 0% 100% 147 1.40% internal/poll.(*pollDesc).waitRead 0 0% 100% 147 1.40% internal/poll.runtime_pollWait 0 0% 100% 4557 43.44% main.APIDefinitionLoader.compileCircuitBreakerPathSpec.func1 (pprof) ``` this change addresses `4557 43.44% main.APIDefinitionLoader.compileCircuitBreakerPathSpec.func1` to fix it completely we need to fix `github.com/rubyist/circuitbreaker.(*Breaker).Subscribe`

view details

Lanre Adelowo

commit sha 51a8d212acf5d8841cf0e421e272b168b3a92f8e

Swagger documentation (#2126) See https://github.com/TykTechnologies/product/issues/88 - [x] Definition of swagger models and responses - [x] CI build step to validate the schema

view details

push time in 23 days

push eventmatiasinsaurralde/tyk

Furkan Senharputlu

commit sha 3a20db12fee8d98d1d79ca44abae12d38c550168

Make InitDNSMock configurable (#2309) This mutex should be used in `tyk-analytics` to prevent race conditions in integration of dashboard and gateway.

view details

Matias Insaurralde

commit sha 21b2b874bd057fef68f3a3cddfe7481459db69da

coprocess: extend ReturnOverrides headers usage (fixes #2282) (#2283) Fixes #2282. This was a case we didn't cover while building this feature. It was available in different `ReturnOverrides` scenarios.

view details

Leonid Bugaev

commit sha 112be389787c52d590c8312acb12ecd0e4bda6d7

if dash is enabled, auto-configure policy record (#2276) Addresses #1505

view details

Leonid Bugaev

commit sha 63e32efb7582cee417d4f82193806517f955ce80

Fix tests

view details

Ahmet Soormally

commit sha bab1e56d054116ee272265c2f17079b7e979a01f

consistent mw version order (#2270) - Consistent MW execution order - previously, the keyless APIs executed in a different order to protected APIs. - Remove duplicate code - When creating new plugins - you no longer need to create it in 2 places - Resolves #2317

view details

Ahmet Soormally

commit sha d61d28214d7ea8948d974ccdc68904cc21003204

basic auth cache - thundering heard (#2323) resolves: https://github.com/TykTechnologies/tyk/issues/2324 Implemented singleflight, which suppresses/coalesces duplicate BCrypt function calls for the same cache key in event of cache miss. The purpose of Caching, is to avoid performing expensive computation if the computation has already been calculated. But if the cache is empty (cold start, reload, expiry), and under high load, the first `x` requests will get a cache miss, and all simultaneously perform BCrypt + Caching of exactly the same password - then race to fill the cache. So we have various problems under load… 1. BCrypt is being called`x-1` too many times, 2. Necessity to check & set in cache `x-1` too many times. --- After receiving a cache-miss, we performs BCrypt + Cache via singleflight. Singleflight coalesces similar requests into a single call to BCrypt+Cache function, and returns the result to all of the remaining requests. As such, when the cache is cleared (hot reload, cold-start, cache expire), we have mitigated the thundering herd problem, because only one of the herd will actually perform the expensive operation, while the others simply wait for the result.

view details

Ahmet Soormally

commit sha 0c211d14a8c5a8b91669db9602cd666bc1de4778

ux: gateway logs (#2307) Fixing some of the startup log order Organizing some of the startup service checks by moving into the checkup package

view details

Komal Sukhani

commit sha e1466dbea4a63611179c604adf9b25a49a2f5ede

Added support of WSDL import (#2230) User can now import WSDL file to create API definition. [#Reference](https://github.com/TykTechnologies/tyk-analytics/issues/1160) **Supported features:** 1. WSDL file with multiple services 2. SOAP/SOAP12 binding 3. HTTP binding **Generated API Definition will be as follows:** 1. API `name` is same as that of the service name. If WSDL contains multiple services, then the name of the first service in the file will be used. 2. `listen-path` of the API will be > "/service name/" If WSDL contains multiple services, then the name of the first service in the file will be used. 3. For each supported operation, an endpoint will be created. Endpoint will have the path > /service_name/end_path In case of **SOAP/SOAP12** binding, _end_path_ will be operation name. In case of **HTTP** binding, _end_path_ will be value of `location` attribute of the operation. 4. Each endpoint will use url-rewrite middleware to direct the request to the upstream. This was necessary to support multiple services If service has multiple Ports type, name of the Port needs to be specified. If Port name is not provided then first Port of the service is used. https://github.com/TykTechnologies/tyk/issues/2255

view details

Leonid Bugaev

commit sha b117d0f28337976e9f34cb7c41dac12b8983524a

Fix tests from (#2230)

view details

Leonid Bugaev

commit sha f4131dac6628fcf0c6834284ff9553e279436d71

Change log field error to prevent misleading (#2267) Fixes #2263

view details

Lanre Adelowo

commit sha 8932e86eeb5898d89fe4cb1c60281ad4707382bd

add json tag to skip (un)marshalling (#2207) `MatchRegexp` is meant to be an internal value used for caching the regexp of `match_pattern` not controlled by the user

view details

Leonid Bugaev

commit sha 51c590c2765f99e38edfff53c97cb7716ba7d90a

Respect tags coming from key level (#2128) When a policy with a tag is applied to a key, it doesn't respect key's tag. This PR fixes the bug if in FE, https://github.com/TykTechnologies/tyk-analytics-ui/issues/1082 should be fixed for this PR to work properly. Fixes #1671

view details

Yevhen Vitiuk

commit sha 1adb4288c818056511c66d8b8a6f741d4b95bc41

[WIP]Feature/issues/640 body transforms (#2104) Issue - #640 What was changed? - Added https://github.com/Masterminds/sprig as template engine for API endpoint body transforms (as based on #2100) - add https://github.com/Masterminds/sprig/tree/v2.17.1 to vendor Requires update of POST /api/designer/test within tyk-analytics

view details

Leonid Bugaev

commit sha 379328b53e46bfe5d73c09fdcfb8381315c494cd

Fix vendoring

view details

Lanre Adelowo

commit sha 794af2586e99979e5b084df44021ba767d62f9e4

Add pagination when listing Oauth clients tokens (#2109) Added optional query parameter called `page` to the endpoint `/oauth/clients/{apiID}/{keyName}/tokens` . To prevent breaking backwards compatibility, tokens will only be paginated if they contain a `page` query item Part of https://github.com/TykTechnologies/tyk-analytics/issues/1101

view details

push time in 23 days

push eventmatiasinsaurralde/tyk

Matias Insaurralde

commit sha 6b6a219720cecb232337ec1fff6751f8471089da

coprocess: modify BuildObject to conditionally use raw body, fix response body read on error scenarios

view details

push time in a month

pull request commentTykTechnologies/tyk

Avoid duplicate request body in gRPC request object

@buger this seems broken after the rebase, I will add additional tweaks and clarify the functionality

matiasinsaurralde

comment created time in a month

push eventmatiasinsaurralde/tyk

Matias Insaurralde

commit sha 8ebaf947d57815608ab7bd10707011ed4bb556d1

coprocess: set headers and status code on response hooks

view details

push time in a month

push eventmatiasinsaurralde/tyk

Matias Insaurralde

commit sha 6699d8adc39dfeb07e25015aced2718db5af1649

coprocess: add code for non-CP builds

view details

push time in a month

PR opened TykTechnologies/tyk

Support response middleware when using rich plugins

This is a very basic PoC (related to #1526), still requires enhancements.

+2321 -234

0 comment

34 changed files

pr created time in a month

push eventmatiasinsaurralde/tyk

Matias Insaurralde

commit sha 4aba3db6ca81601b60f421fd58272af7068b1473

coprocess: modify API loader and main CP logic for response transformation.

view details

Matias Insaurralde

commit sha 85fd11416b53f455d0f3723ada1de989d1079615

coprocess: extend response processor code

view details

Matias Insaurralde

commit sha 5c3ddcdfa050dd449eb32b52116a2514187c2ffa

coprocess: modify Proto definitions to include a basic response data structure. Update bindings.

view details

push time in a month

create barnchmatiasinsaurralde/tyk

branch : response-hook

created branch time in a month

push eventmatiasinsaurralde/tyk

Leonid Bugaev

commit sha b248c1914d0294207b4171d09b1a39e7344b44c4

Fix JWT expiration (#2310) With code added in #1849 we made JWT keys set expiration on keys (pick whatever bigger either policy or token value) However this change introduce bug in situation when policy is set to "Never Expire" (or just lower then JWT value): if JWT key expire its expiration value gets hold in session value, and never gets overriden, even if JWT token gets re-issued. The bug itself consists of two parts. 1) Code which should update the session for alredy existing JWT token gets run ONLY if policy ID has changed 2) Code above updates only local session cache, but not propagate change to the Redis This PR fix both 1) and 2), and adds test coverting this issue. Fix #2304

view details

Leonid Bugaev

commit sha 5290f8f3473ef57f64bc724c845b59e9632c8a58

Fix creating oAuth clients with multiple APIs (#2315) Rollback part of 2.8 changes

view details

Komal Sukhani

commit sha 3af01290a695c943292595db2596c2a748106e1d

Use TrimPrefix to strip listen path (#2316) Fixes #2313 Same as #2211 Missed this case `strings.Replace()` method was used to strip the `listen_path`. So when URL rewrite plugin was used to call an endpoint that contained `listen_path` anywhere in it's path, it was getting removed. To fix this I replaced `strings.Replace()` with `strings.TrimPrefix()`

view details

push time in a month

pull request commentTykTechnologies/tyk

Avoid duplicate request body in gRPC request object

Fixed to match the new structures Tests ok @dencoded 👍

matiasinsaurralde

comment created time in a month

push eventmatiasinsaurralde/tyk

Furkan Senharputlu

commit sha e0a2b30548e8767034168c071664e99d527f17a6

Fix key update EOF issue (#2215) See https://github.com/TykTechnologies/tyk-analytics/issues/1224 The issue is about trying to read a `ReadCloser` without resetting it.

view details

Lanre Adelowo

commit sha 81265fcef2ae7f203f7d20f68587f172049ea2b1

Make sure there can only be one Access-Control-Allow-Origin header as per https://www.w3.org/TR/cors/\#resource-sharing-check (#2202) Fixes https://github.com/TykTechnologies/tyk/issues/2199 Also see https://www.w3.org/TR/cors/#resource-sharing-check The value of `Access-Control-Allow-Origin` in the proxy target's header takes precedence

view details

dencoded

commit sha b29a5e8bbd89817b8971537a035ac67a79044318

don't touch last_updated when suppress_reset=1 (#2219) added changes for https://github.com/TykTechnologies/tyk-analytics/issues/1221

view details

Lanre Adelowo

commit sha 513829c9fc8a20cec3b886a33b06fa6223febe66

Debug instead of Warning (#2220) Fixes https://github.com/TykTechnologies/tyk/issues/2216

view details

Komal Sukhani

commit sha fbaf23884e921d38b7d7f68ce3de41f02c962ef3

Bug/2211 fix strip path (#2212) Fixes #2211 Previously, strings.Replace() method was used to strip the `listen_path`. So when URL rewrite plugin was used to call an endpoint that contained `listen_path` anywhere in it's path, it was getting removed. To fix this I replaced `strings.Replace()` with `strings.TrimPrefix()`

view details

Leonid Bugaev

commit sha 38c3428ba250598868b2bbe181f5e9a7b1db3bcd

Ensure that policy applied before checking access rights (#2226) Fix https://github.com/TykTechnologies/tyk-analytics/issues/1222

view details

Leonid Bugaev

commit sha b7feb323165783e4334f96e1514e4cd6ffda9622

Fix tests (#2227)

view details

Furkan Senharputlu

commit sha d71a568f151bdeb0da699afc765a671f5906858a

Read log browser response body if compressed (#2218) * Read log browser response body if compressed * Set content length to 0 for deflate too

view details

Leonid Bugaev

commit sha acb61c78156df9653ce30ecd11622a27e4da49e1

Fix panics during reload (#2229) Initialize fallback manager on GW start

view details

Furkan Senharputlu

commit sha b0a8e0a921dfc12ada1370a01993f137018732c0

Fix body transform with cache plugin (#2231) `WrappedServeHTTP` is copying a response without handling body transformations. Then, it returns the early copied value. So, the actual response is cached. This PR prioritizes the body transformation. Fixes #2137.

view details

Leonid Bugaev

commit sha ab2334aebc8d62620c4ded1585eda4767649a8eb

Allow enable HTTP profiling via config (#2235) Added `enable_http_profiler` config option

view details

Leonid Bugaev

commit sha ef56da7e8c10618241958d31c732d238f7672f36

Fix goroutine leak with async session update (#2237) Session update worker pool was startng for every "DefaultSessionStore" object. And it was happening for every API initialization. So if you have 1000 APIs, and your worker pool is 100, each API reload will trigger at least 100k goroutines. This change maintains single worker pool which initilized only once. Issue itself was introduced by https://github.com/TykTechnologies/tyk/pull/1757 Fix https://github.com/TykTechnologies/tyk/issues/2236

view details

Leonid Bugaev

commit sha 08dfc0aea909a8dbd5117ca26c433dfde9f8187a

Fix basic auth caching (#2239) Basic auth cache was initialized for every API on every API reload. go-cache by itself consume quite lot of resources, when started in such amounts. Fix https://github.com/TykTechnologies/tyk/issues/2238

view details

Furkan Senharputlu

commit sha abc733bad5aa47c68365d127bd8b480adbce3a0b

Deprecate event_trigers_defunct, use event_triggers_defunct, (#2233) * Deprecate event_trigers_defunct, use event_triggers_defunct * Update linter

view details

Leonid Bugaev

commit sha 5b8aa1649ecba689c27d4811c4b6f2a343bbbb51

Re-vendor goautosocket (#2251) Fixed panic during error handling: https://github.com/TykTechnologies/goautosocket Fix https://github.com/TykTechnologies/tyk/issues/2250

view details

Komal Sukhani

commit sha dbfb801abc84efc63540a6573de538e0fbc4a259

Add enable_http_profiler in schema.json (#2257) Add `enable_http_profiler` in schema.json

view details

dencoded

commit sha 402be5db7ff45173d7b08dc02b4d27803466736a

stop circuit breaker Go routine before reloading api spec (#2256) added changes for: ``` File: tyk Type: goroutine Time: May 1, 2019 at 4:32pm (EDT) Entering interactive mode (type "help" for commands, "o" for options) (pprof) top10 Showing nodes accounting for 10488, 100% of 10490 total Dropped 74 nodes (cum <= 52) Showing top 10 nodes out of 22 flat flat% sum% cum cum% 10488 100% 100% 10488 100% runtime.gopark 0 0% 100% 96 0.92% bufio.(*Reader).Peek 0 0% 100% 141 1.34% bufio.(*Reader).fill 0 0% 100% 999 9.52% github.com/TykTechnologies/tyk/vendor/github.com/TykTechnologies/leakybucket/memorycache.(*Cache).startCleanupTimer.func1 0 0% 100% 4557 43.44% github.com/TykTechnologies/tyk/vendor/github.com/rubyist/circuitbreaker.(*Breaker).Subscribe.func1 0 0% 100% 145 1.38% internal/poll.(*FD).Read 0 0% 100% 147 1.40% internal/poll.(*pollDesc).wait 0 0% 100% 147 1.40% internal/poll.(*pollDesc).waitRead 0 0% 100% 147 1.40% internal/poll.runtime_pollWait 0 0% 100% 4557 43.44% main.APIDefinitionLoader.compileCircuitBreakerPathSpec.func1 (pprof) ``` this change addresses `4557 43.44% main.APIDefinitionLoader.compileCircuitBreakerPathSpec.func1` to fix it completely we need to fix `github.com/rubyist/circuitbreaker.(*Breaker).Subscribe`

view details

Lanre Adelowo

commit sha 51a8d212acf5d8841cf0e421e272b168b3a92f8e

Swagger documentation (#2126) See https://github.com/TykTechnologies/product/issues/88 - [x] Definition of swagger models and responses - [x] CI build step to validate the schema

view details

Leonid Bugaev

commit sha 3c6b3bb90d2e9d0dbacf4daaef6cbe2f70f010ab

Minor swagger changes (#2259)

view details

Leonid Bugaev

commit sha 112fb26c6a5a15783214d953daadae2f6ffd51b5

Swagger fixes

view details

push time in a month

pull request commentTykTechnologies/tyk

coprocess: extend ReturnOverrides headers usage (fixes #2282)

Updated this to fit structure in #2172

matiasinsaurralde

comment created time in a month

push eventmatiasinsaurralde/tyk

Furkan Senharputlu

commit sha 5795b77f47035c7695967fa5ce9d82f6d8fc2589

Refactor project packaging (#2172) This PR renames package names to `tyk` in root folder. The `main.go` will be in `bin` folder and the gateway will be started from there. This code will provide the followings: - We can fix the package structure because everything will not be in `main` package. - Tests can be easily written everywhere. - Debugging tool will work in main binary. Let's say you're using Goland and want to make some debugging. You can add breakpoints and debug the code easily.

view details

Leonid Bugaev

commit sha 42ee3bd718fca44caf7ebb88564b78d5cbd1c71f

Fix panic in transform middleware (#2298) When API is keyless session can't be used Fix https://github.com/TykTechnologies/tyk/issues/2297

view details

Leonid Bugaev

commit sha 9d36b96ab72b469b756943ab897615a453c594e4

Revert "Fix panic in transform middleware" (#2299) Reverts TykTechnologies/tyk#2298

view details

Furkan Senharputlu

commit sha cdfe36080fd1e5c533b1a00093f5cfbd3dc7422d

Notify KeySpaceUpdateNotification when a key deleted or updated (#2294) Fixes #2293

view details

Yaara

commit sha f69055a931dc50abf3ef884fa9cb7277ae667e4c

Add option to meta data on response (#2145) Fix https://github.com/TykTechnologies/tyk/issues/1510

view details

Furkan Senharputlu

commit sha 557e68afa2de9e991467fd45f1a10474acaea18f

Create testutil.go (#2284) This PR creates `testutil.go`. The purpose is to be able to import test functions in other projects. For example, in dashboard, this PR provides us to write the following test: ```go func TestAPIContext_RevokeDeveloperKey(t *testing.T) { g := gateway.StartTest() defer g.Close() Tyk.(*TykApi).Port = strconv.Itoa(g.GlobalConfig.ListenPort) sessionID, _ := UserSessions.CreateAPISession(&testUser) ts := newTykTestServer(tykTestServerConfig{accessKey: sessionID}) defer ts.Close() api := gateway.BuildAndLoadAPI(func(spec *gateway.APISpec) { spec.Proxy.ListenPath = "/" spec.UseKeylessAccess = false })[0] key := gateway.CreateSession(func(s *user.SessionState) { s.AccessRights = map[string]user.AccessDefinition{api.APIID: { APIID: api.APIID, }} }) developer := createSampleDeveloper(func(developer *PortalDeveloper) { developer.OrgId = testOrg.Id.Hex() developer.ApiKeys = map[string]string{ api.APIID: key, } }) authHeaders := map[string]string{ "authorization": key, } g.Run(t, test.TestCase{Path: "/", Headers: authHeaders, Code: http.StatusOK}) headers := map[string]string{"authorization": testUser.AccessKey} revokePath := fmt.Sprintf("/api/portal/developers/key/%s/%s/%s", api.APIID, key, developer.Id.Hex()) _, _ = ts.Run(t, []test.TestCase{ {Method: http.MethodDelete, Headers: headers, Path: revokePath, Code: http.StatusOK, BodyMatch: "User key revoked"}, }...) g.Run(t, test.TestCase{Path: "/", Headers: authHeaders, Code: http.StatusForbidden}) } ```

view details

Furkan Senharputlu

commit sha 8b955b7c875191a9517e547a50d3a5a601515eb5

Fix DNS mock (#2306)

view details

Leonid Bugaev

commit sha 79ae48096ff1af4efc10d83a484bb7e367699884

Do not store router pointer inside api (#2308)

view details

Matias Insaurralde

commit sha 63e013d990a2d869158396853612dbbf47bfbd8b

coprocess: extend ReturnOverrides headers usage (fixes #2282)

view details

push time in a month

push eventmatiasinsaurralde/tyk

Leonid Bugaev

commit sha 42ee3bd718fca44caf7ebb88564b78d5cbd1c71f

Fix panic in transform middleware (#2298) When API is keyless session can't be used Fix https://github.com/TykTechnologies/tyk/issues/2297

view details

Leonid Bugaev

commit sha 9d36b96ab72b469b756943ab897615a453c594e4

Revert "Fix panic in transform middleware" (#2299) Reverts TykTechnologies/tyk#2298

view details

Furkan Senharputlu

commit sha cdfe36080fd1e5c533b1a00093f5cfbd3dc7422d

Notify KeySpaceUpdateNotification when a key deleted or updated (#2294) Fixes #2293

view details

Yaara

commit sha f69055a931dc50abf3ef884fa9cb7277ae667e4c

Add option to meta data on response (#2145) Fix https://github.com/TykTechnologies/tyk/issues/1510

view details

Furkan Senharputlu

commit sha 557e68afa2de9e991467fd45f1a10474acaea18f

Create testutil.go (#2284) This PR creates `testutil.go`. The purpose is to be able to import test functions in other projects. For example, in dashboard, this PR provides us to write the following test: ```go func TestAPIContext_RevokeDeveloperKey(t *testing.T) { g := gateway.StartTest() defer g.Close() Tyk.(*TykApi).Port = strconv.Itoa(g.GlobalConfig.ListenPort) sessionID, _ := UserSessions.CreateAPISession(&testUser) ts := newTykTestServer(tykTestServerConfig{accessKey: sessionID}) defer ts.Close() api := gateway.BuildAndLoadAPI(func(spec *gateway.APISpec) { spec.Proxy.ListenPath = "/" spec.UseKeylessAccess = false })[0] key := gateway.CreateSession(func(s *user.SessionState) { s.AccessRights = map[string]user.AccessDefinition{api.APIID: { APIID: api.APIID, }} }) developer := createSampleDeveloper(func(developer *PortalDeveloper) { developer.OrgId = testOrg.Id.Hex() developer.ApiKeys = map[string]string{ api.APIID: key, } }) authHeaders := map[string]string{ "authorization": key, } g.Run(t, test.TestCase{Path: "/", Headers: authHeaders, Code: http.StatusOK}) headers := map[string]string{"authorization": testUser.AccessKey} revokePath := fmt.Sprintf("/api/portal/developers/key/%s/%s/%s", api.APIID, key, developer.Id.Hex()) _, _ = ts.Run(t, []test.TestCase{ {Method: http.MethodDelete, Headers: headers, Path: revokePath, Code: http.StatusOK, BodyMatch: "User key revoked"}, }...) g.Run(t, test.TestCase{Path: "/", Headers: authHeaders, Code: http.StatusForbidden}) } ```

view details

Furkan Senharputlu

commit sha 8b955b7c875191a9517e547a50d3a5a601515eb5

Fix DNS mock (#2306)

view details

Leonid Bugaev

commit sha 79ae48096ff1af4efc10d83a484bb7e367699884

Do not store router pointer inside api (#2308)

view details

push time in a month

startedrydama/

started time in a month

startedrydama/

started time in a month

starteddisqus/DISQUS-API-Recipes

started time in a month

push eventagendadigitalpy/web-python

push time in a month

push eventagendadigitalpy/web-python

Matias Insaurralde

commit sha 119a7542f06c41576a32a84fd4a14b0ce664fb1c

Test

view details

push time in a month

startedjohanbrandhorst/redeploy

started time in a month

push eventagendadigitalpy/web-python

Matias Insaurralde

commit sha 9ecb677af2650a5cbb083f771221db8c1cda69c4

Preparar deployment

view details

push time in a month

startedtiangolo/meinheld-gunicorn-flask-docker

started time in a month

MemberEvent

push eventmatiasinsaurralde/tyk

Furkan Senharputlu

commit sha 5795b77f47035c7695967fa5ce9d82f6d8fc2589

Refactor project packaging (#2172) This PR renames package names to `tyk` in root folder. The `main.go` will be in `bin` folder and the gateway will be started from there. This code will provide the followings: - We can fix the package structure because everything will not be in `main` package. - Tests can be easily written everywhere. - Debugging tool will work in main binary. Let's say you're using Goland and want to make some debugging. You can add breakpoints and debug the code easily.

view details

push time in a month

issue commentTykTechnologies/tyk

Unable to send grpc messages larger than 4mb after increasing grpc.MaxRecvMsgSize

Hi, we have created a fix for this #2204 We're planning to incorporate this soon

Janrain-Stephanie

comment created time in a month

issue closedagendadigitalpy/web-python

Agregar enlace al formulario de sugerencias/opiniones

El enlace es este:

https://forms.gle/BssGPcXjdXsixLu87

Todo esto va al Drive público, que es útil porque podemos verlo todos.

closed time in a month

matiasinsaurralde

push eventagendadigitalpy/web-python

elvus

commit sha 462d6d33198d38279b8da02625a6edf87676b3de

issue #11

view details

Matias Insaurralde

commit sha 2826912f8250e3bbadb23a1ab90c0cca70e6681d

Merge pull request #21 from elvus/master issue #11

view details

push time in a month

PR merged agendadigitalpy/web-python

issue #11
+2 -0

0 comment

14 changed files

elvus

pr closed time in a month

pull request commentagendadigitalpy/web-python

Propuestas, hasta donde probe funciona.

Creo que hay muchos conflictos y veo que ya se arregló casi todo esto. Sigamos viendo otros puntos.

Gracias

elvus

comment created time in a month

issue commentagendadigitalpy/web-python

Adaptar página de solicitudes para estirar datos de MongoDB

Esto se scrapea de la pagina oficial? si es así sería bueno guardar todo el contenido posible, incluso el raw html. Si es un api, guardar todo lo que retorna el servicio, timestamps incluidos.

@demianfe Bajamos de la API, que retorna JSON.

Hasta el momento funciona así, cada N horas, el programa en Go baja las solicitudes enviadas a MITIC y las guarda en memoria, cuando entras a la web, tomamos esos datos que están en memoria. Como decís creo que sería bueno ir archivando todo, entonces voy a modificar el programa Go para cambiar y mantener el estado de eso en MongoDB.

Entonces esta app Python lo único que debe hacer es obtener esa info de la DB y mostrarla.

matiasinsaurralde

comment created time in a month

issue commentagendadigitalpy/web-python

Adaptar página de solicitudes para estirar datos de MongoDB

Matias, si te referis a la estructura que va a tener el modelo en MongoDB creo que el key "url" no es necesario que forme parte y se almacene por cada solicitud.

@cabupy Tenés razón, con el ID ya estamos, lo que me olvidé de agregar acá es la fecha.

matiasinsaurralde

comment created time in a month

issue closedagendadigitalpy/web-python

Crear un esqueleto con Flask

Idealmente tendría integrado Mongo.

Sería bueno agregar las instrucciones también.

closed time in a month

matiasinsaurralde

push eventagendadigitalpy/web-python

carloscarvallo

commit sha ed02cf589bf4150d012866857d4718a023e71c3e

actualizar readme con requirements y guia para macos

view details

carloscarvallo

commit sha 026fea6e0120bf50dcd76e207010de58c93b5c15

freeze requirements para pip

view details

carloscarvallo

commit sha 7ee8a5d36232fef09b02c685ab2d3c4b5a1c1c44

fix bug #19 y formateo de pylint

view details

Matias Insaurralde

commit sha 67c5154aa25eb7846f9de1713f854d6b3acc597a

Merge pull request #18 from carloscarvallo/master Guía de instalación para macos y definir requirements.txt y otro fix

view details

push time in a month

MemberEvent

push eventagendadigitalpy/web-python

Matias Insaurralde

commit sha 39b8ddf1b2ae5883c87be2aacf8f480b709184ae

Restaurar funcionalidad de propuestas y ajuste de títulos de todas las páginas

view details

push time in a month

push eventagendadigitalpy/web-python

Matias Insaurralde

commit sha 934a3d55d0ad95d2cf2590ead14c77e6c17edc91

README: agregar más datos y mejorar instrucciones

view details

push time in a month

push eventagendadigitalpy/web-python

elvus

commit sha bf9dba9ee3fc6544c25dcf694cb140028e3e20ff

Terminar propuestas.

view details

Matias Insaurralde

commit sha f9f3e840b3cfa77ee483fb8da7ed91406ff33094

Merge pull request #12 from elvus/master Terminar propuestas.

view details

push time in a month

PR merged agendadigitalpy/web-python

Terminar propuestas.
+3974 -2992

0 comment

69 changed files

elvus

pr closed time in a month

issue openedagendadigitalpy/web-python

Agregar enlace al formulario de sugerencias/opiniones

El enlace es este:

https://forms.gle/BssGPcXjdXsixLu87

Todo esto va al Drive público, que es útil porque podemos verlo todos.

created time in a month

issue commentagendadigitalpy/web-python

Creación de espacio para contenido de la comunidad

Si es para publicar algo como posts, opino que es mejor integrar Medium nomás y enlazamos desde el sitio o ponemos algún subdominio, más fácil, menos mantenimiento, etc.

nelruk

comment created time in a month

issue openedagendadigitalpy/web-python

Adaptar página de solicitudes para estirar datos de MongoDB

Podríamos mantener el mismo formato de visualización que ya tenemos en el front.

La colección se puede llamar "solicitudes" y esta es la estructura de cada solicitud:

{
  "id": 20899,
  "subject": "Solicitud ZZZ",
  "replied": false,
  "remaining_days": 5,
  "url": "http://informacionpublica.paraguay.gov.py/portal/#!/ciudadano/solicitud/20899"
}

created time in a month

issue openedagendadigitalpy/web-python

Mejorar acceso a la documentación

Copio directamente algo de feedback que recibimos en el grupo, a ver si podemos analizar posibles mejoras. Yo soy muy partidario de los MVP y de hacer cosas sencillas y efectivas así que no necesariamente debemos pensar en que esto se puede solucionar con la web (por ejemplo, para la encuesta usamos SurveyMonkey nomás, en vez de crear nuestro propio código para todo eso, etc.), estoy abierto a discutir este punto:

1- Si se pudiese comentar directamente en el documento, eventualmente tener un archivo con las dudas/comentarios haciendo referencia a la sección, tener un foro con secciones agrupados en ejes/productos, una "wiki", etc. Me parece q facilitaría.

2- No se si se puede empezar a armar un "How-to", "mapa documentos“, o algo asi para facilitar lectura/entendimiento de todo el contexto. Igualmente, tal vez se pueda marcar de alguna forma el documento que componga el 'camino crítico' de la información. No se si todos van a querer o 'tener tiempo' de leer el 100%.. Tal vez eso facilite lectura.

created time in a month

create barnchagendadigitalpy/monitor-info-publica

branch : master

created branch time in a month

startedagendadigitalpy/monitor-info-publica

started time in a month

created repositoryagendadigitalpy/monitor-info-publica

created time in a month

issue openedagendadigitalpy/web-python

Restaurar seguimiento de solicitudes de info pública

Esto lo estiraremos de algún lugar y el proyecto que está en Go seguirá utilizándose para monitorear eso.

created time in a month

push eventagendadigitalpy/web-python

Demian Florentin

commit sha 7fac646e12c0c61d07edb5b0e45fe85542563bd4

assets

view details

Demian Florentin

commit sha 61ec81d27c53cb359a7d7b638b027c7140a296fe

servido de contenido estatico para los assets

view details

Demian Florentin

commit sha 327902249fef7770b3809054bca3204040e3d113

Merge branch 'master' of github.com:demianfe/web-python

view details

Matias Insaurralde

commit sha 738a79924d7fe11a9fdbe4082699162f729a1c44

Merge pull request #6 from demianfe/master assets y configuracion de flask para contenido estatico

view details

push time in a month

PR closed agendadigitalpy/web

Actualización de Redes Sociales
+382 -100

1 comment

69 changed files

elvus

pr closed time in a month

pull request commentagendadigitalpy/web

Actualización de Redes Sociales

El #3 agregó lo de Telegram, si falta algo cambiemos en la web de Python directamente.

Gracias

elvus

comment created time in a month

push eventagendadigitalpy/web

Cabu Vallejos

commit sha 928cd1407a5eb76f6f6b25785896ea4937e87d71

Agregamos el icono de Telegram

view details

Cabu Vallejos

commit sha 1eb255c9932688b7003162ee9c53a4f092bc1cd3

Agregamos el icono de Telegram

view details

Matias Insaurralde

commit sha 40d528224be4107a114fb310acf9c408a7cc152c

Merge pull request #3 from cabupy/master Agregamos el icono de Telegram

view details

push time in a month

PR merged agendadigitalpy/web

Agregamos el icono de Telegram

Solo se agrego un item mas de Telegram a la lista de iconos en templates/index.html.

+4 -0

0 comment

1 changed file

cabupy

pr closed time in a month

push eventagendadigitalpy/web-python

Demian Florentin

commit sha 9f752a7639d37df6712301aa126de970604550a3

esqueleto inicial, se contecta a mongodb y muestra propuestas si hay

view details

Demian Florentin

commit sha 75209bef28190c2955a1f8a3c92f9ffe2f6a3719

Update README.md

view details

Matias Insaurralde

commit sha 0cb99e1d1250b99caf573dd7d8b0c61258f68176

Merge pull request #5 from demianfe/master esqueleto inicial

view details

push time in a month

PR merged agendadigitalpy/web-python

esqueleto inicial

se conecta a mongo y muestra en un template basico el contenido

+71 -1

0 comment

4 changed files

demianfe

pr closed time in a month

issue openedagendadigitalpy/web-python

Mejorar el contenido de la página principal

Tengo un borrador con texto, sólo hay que revisarlo y agregarlo al sitio.

created time in a month

issue openedagendadigitalpy/web-python

Crear un esqueleto con Flask

created time in a month

pull request commentagendadigitalpy/web-python

Aun le falta propuestas y las solicitudes

Cerramos esto así seguimos en la versión de Python directamente

elvus

comment created time in a month

startedpadiazg/agendadigital_bot

started time in a month

startedelvus/web-python

started time in a month

push eventagendadigitalpy/web

Matias Insaurralde

commit sha 9fc2c8e4db9298059fd61ec88d64a772424be95c

Agregar distribución de presupuesto de Fortalecimiento Institucional

view details

push time in a month

startedelvus/web

started time in a month

push eventagendadigitalpy/web

elvus

commit sha 783ff764e0b238690db6ad3f3b2e32f0a5d0c939

Actualización de solicitudes

view details

push time in a month

push eventelvus/web

Matias Insaurralde

commit sha f1ab866b9723773d3b4b4e78a5eba6acb00dc954

Corregir enlace en documentación

view details

push time in a month

PR closed agendadigitalpy/web

Reviewers
Solicitudes actualizacion
+0 -0

1 comment

0 changed file

elvus

pr closed time in a month

startedagendadigitalpy/web-python

started time in a month

issue commentTykTechnologies/tyk

ReturnOverrides does not work for response code > 400

Have issued a fix (#2283)

The following snippet now sends the header:

from tyk.decorators import *
from gateway import TykGateway as tyk

@Hook
def MyHook(request, session, spec):
  request.object.return_overrides.response_code = 401
  request.object.return_overrides.response_error = "test"
  request.object.return_overrides.headers["test-header"] = "test-value"
  return request, session
ryan-ju

comment created time in a month

PR opened TykTechnologies/tyk

coprocess: extend ReturnOverrides headers usage (fixes #2282)

Fixes #2282.

This was a case we didn't cover while building this feature.

It was available in different ReturnOverrides scenarios.

+4 -0

0 comment

1 changed file

pr created time in a month

create barnchmatiasinsaurralde/tyk

branch : extend-return-overrides-headers

created branch time in a month

push eventmatiasinsaurralde/tyk

Furkan Senharputlu

commit sha abc733bad5aa47c68365d127bd8b480adbce3a0b

Deprecate event_trigers_defunct, use event_triggers_defunct, (#2233) * Deprecate event_trigers_defunct, use event_triggers_defunct * Update linter

view details

Leonid Bugaev

commit sha 5b8aa1649ecba689c27d4811c4b6f2a343bbbb51

Re-vendor goautosocket (#2251) Fixed panic during error handling: https://github.com/TykTechnologies/goautosocket Fix https://github.com/TykTechnologies/tyk/issues/2250

view details

Komal Sukhani

commit sha dbfb801abc84efc63540a6573de538e0fbc4a259

Add enable_http_profiler in schema.json (#2257) Add `enable_http_profiler` in schema.json

view details

dencoded

commit sha 402be5db7ff45173d7b08dc02b4d27803466736a

stop circuit breaker Go routine before reloading api spec (#2256) added changes for: ``` File: tyk Type: goroutine Time: May 1, 2019 at 4:32pm (EDT) Entering interactive mode (type "help" for commands, "o" for options) (pprof) top10 Showing nodes accounting for 10488, 100% of 10490 total Dropped 74 nodes (cum <= 52) Showing top 10 nodes out of 22 flat flat% sum% cum cum% 10488 100% 100% 10488 100% runtime.gopark 0 0% 100% 96 0.92% bufio.(*Reader).Peek 0 0% 100% 141 1.34% bufio.(*Reader).fill 0 0% 100% 999 9.52% github.com/TykTechnologies/tyk/vendor/github.com/TykTechnologies/leakybucket/memorycache.(*Cache).startCleanupTimer.func1 0 0% 100% 4557 43.44% github.com/TykTechnologies/tyk/vendor/github.com/rubyist/circuitbreaker.(*Breaker).Subscribe.func1 0 0% 100% 145 1.38% internal/poll.(*FD).Read 0 0% 100% 147 1.40% internal/poll.(*pollDesc).wait 0 0% 100% 147 1.40% internal/poll.(*pollDesc).waitRead 0 0% 100% 147 1.40% internal/poll.runtime_pollWait 0 0% 100% 4557 43.44% main.APIDefinitionLoader.compileCircuitBreakerPathSpec.func1 (pprof) ``` this change addresses `4557 43.44% main.APIDefinitionLoader.compileCircuitBreakerPathSpec.func1` to fix it completely we need to fix `github.com/rubyist/circuitbreaker.(*Breaker).Subscribe`

view details

Lanre Adelowo

commit sha 51a8d212acf5d8841cf0e421e272b168b3a92f8e

Swagger documentation (#2126) See https://github.com/TykTechnologies/product/issues/88 - [x] Definition of swagger models and responses - [x] CI build step to validate the schema

view details

Leonid Bugaev

commit sha 3c6b3bb90d2e9d0dbacf4daaef6cbe2f70f010ab

Minor swagger changes (#2259)

view details

Leonid Bugaev

commit sha 112fb26c6a5a15783214d953daadae2f6ffd51b5

Swagger fixes

view details

dencoded

commit sha d33ebc54a6df6bd64092dfaceea7d77e83d7466b

added session method, added logic to use API limit for header value (#2264) changes for https://github.com/TykTechnologies/tyk/issues/2261 Added: - fix - a bit of refactoring - modified tests to make sure we receive right value in header for quota limit on API level

view details

Mark Southee

commit sha e61fea5d604fc952d595b0d416b9b373bc275c20

Update swagger.yml (#2269) Added code samples to Keys and Batch Requests section descriptions. Few other text edits. Views fine on my local Hugo.

view details

Mark Southee

commit sha d5d3a632db9c4c510b905006d7eb1684a805c112

Add /tyk/ prefix to Endpoints (#2275) Add /tyk/ prefix from all endpoints and remove from servers section

view details

push time in a month

issue commentTykTechnologies/tyk

ReturnOverrides does not work for response code > 400

The comment about headers is right, we need to enhance that. Could you share a snippet of the middleware code that's using return_overrides?

ryan-ju

comment created time in a month

more