• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

TykTechnologies / tyk / 9570
39%
master: %

Build:
Build:
LAST BUILD BRANCH: v2.9.4.8
DEFAULT BRANCH: master
Ran 21 Jul 2020 01:24PM UTC
Jobs 1
Files 86
Run time 11s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
9570

push

travis-ci

Tyk Bot
Fix custom keys in MDCB (#3129)

<!-- Provide a general summary of your changes in the Title above -->

## Description
When users attempts to create a custom key, then we should allow them to use this key in any of the slaves nodes. So, at the moment of retriving a key we should handle as well the situation of customs keys, therefore we should check the existence of that key by searching for `generateToken(orgID, keyName) `

In other hand, as we might use a key by alias or by token value then the slave nodes were storing the api based with the value that we used, this is not correct at all as we need to keep consistency in the values stored in redis (to avoid issues on update and delete operations). Basically if we used the alias to generate the hash value (if enabled) and then store that in redis, later if we used the token instead the alias we again hash the value (if enabled) and store that in redis, that made us having duplicates of the same key, in order to fix that then we now consider the option that the key can be modified inside `CheckSessionAndIdentityForValidKey` therefore now that function will receive a `*string` instead `string` (refer to https://github.com/TykTechnologies/tyk/pull/3129/files#diff-76df41fc5dc0183d026b785861779d24R688 )

## Related Issue
https://github.com/TykTechnologies/tyk/issues/3103

## Motivation and Context
Give solution to https://github.com/TykTechnologies/tyk/issues/3103 so custom keys works in MDCB environment. 

## How This Has Been Tested
1- Setup MDCB environment
2- Create API and Policy. Set API with authentication token method
2- Create custom key in Master GW...something like:
```
curl --location --request POST 'http://tyk-gateway:8080/tyk/keys/mycustomkey' \
--header 'x-tyk-authorization: 352d20ee67be67f6340b4c0605b044b7' \
--header 'Content-Type: application/json' \
--data-raw '{
   "allowance":1000,
   "rate":1000,
   "per":60,
   "quota_max":-1,
   "quota_renews":1552996743,... (continued)

11175 of 18385 relevant lines covered (60.78%)

147.98 hits per line

Jobs
ID Job ID Ran Files Coverage
1 9570.1 (TYK_LOGLEVEL=info LATEST_GO=true) 21 Jul 2020 01:24PM UTC 0
60.78
Travis Job 9570.1
Source Files on build 9570
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #9570
  • b21d3324 on github
  • Prev Build on release-2.9 (#9518)
  • Next Build on release-2.9 (#9573)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc