apisonator 3.1.0 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: edd1887f6aa71c17fb5279f98988c9a3b5e631e80bc1f4142b6619b5f5e24f48
4
- data.tar.gz: b6478d14e88a177480396a7d46d5f4e33cea683aea17303175ad18ae646e546f
3
+ metadata.gz: 1036d32ab3793674c8fe3d815e471581d0056c9a7739b46079ce67f89827bc40
4
+ data.tar.gz: 63bd9f6b690a4e5ec8fa276839001979cbf25f38e9105727679dfcb6d962a0ea
5
5
  SHA512:
6
- metadata.gz: 944b75385817abc4d2f8828c61b2301d5cdfbb6c1bb681b7a3165590f23ad1b6c80451fcf579b8f3cf0010fe5a95e65605998f5d8ec94f1ff4ce690556b3011a
7
- data.tar.gz: f3f44b1b2ebfe6c8fcbbf36b90dd44e5a7875d997a36b97288417472fa4156689508bfc95afdf196a7a168f768aa6e38521502b93078f128994959d184c1cd37
6
+ metadata.gz: 669fa971a4f210d6709f40bac15bad1768e803f5bd4b979a66046151e8f8b572735088dd4e164866edafba681b6de7311abcce4bab9bb951e3b7fcfc128e1cb4
7
+ data.tar.gz: 58775cf983c7ba17ff823a9f11d41ef7790b63c3f206cf718f4ba605be8781bc5c8fe99830b8e2bb9da4951dfd7108655b83e055f99bc8c91d6950c891f0234b
@@ -2,6 +2,25 @@
2
2
 
3
3
  Notable changes to Apisonator will be tracked in this document.
4
4
 
5
+ ## 3.2.0 - 2021-01-19
6
+
7
+ ### Added
8
+
9
+ - New endpoint in the internal API to get the provider key for a given (token,
10
+ service_id) pair ([#243](https://github.com/3scale/apisonator/pull/243)).
11
+
12
+ ### Changed
13
+
14
+ - The config file used when running in a Docker image now parses "1" and "true"
15
+ (case-insensitive) as true
16
+ ([#245](https://github.com/3scale/apisonator/pull/245)).
17
+
18
+ ### Fixed
19
+
20
+ - Fixed some metrics of the internal API that were not being counted
21
+ correctly([#244](https://github.com/3scale/apisonator/pull/244)).
22
+
23
+
5
24
  ## 3.1.0 - 2020-10-14
6
25
 
7
26
  ### Added
@@ -35,7 +35,7 @@ GIT
35
35
  PATH
36
36
  remote: .
37
37
  specs:
38
- apisonator (3.1.0)
38
+ apisonator (3.2.0)
39
39
 
40
40
  GEM
41
41
  remote: https://rubygems.org/
@@ -35,7 +35,7 @@ GIT
35
35
  PATH
36
36
  remote: .
37
37
  specs:
38
- apisonator (3.1.0)
38
+ apisonator (3.2.0)
39
39
 
40
40
  GEM
41
41
  remote: https://rubygems.org/
@@ -7,6 +7,14 @@ module ThreeScale
7
7
  ServiceToken.exists?(token, service_id) ? 200 : 404
8
8
  end
9
9
 
10
+ get '/:token/:service_id/provider_key' do |token, service_id|
11
+ if ServiceToken.exists?(token, service_id)
12
+ { status: :found, provider_key: Service.provider_key_for(service_id) }.to_json
13
+ else
14
+ respond_with_404('token/service combination not found'.freeze)
15
+ end
16
+ end
17
+
10
18
  post '/' do
11
19
  check_tokens_param!
12
20
 
@@ -13,19 +13,21 @@ module ThreeScale
13
13
  }
14
14
  private_constant :AUTH_AND_REPORT_REQUEST_TYPES
15
15
 
16
+ # Only the first match is taken into account, that's why for example,
17
+ # "/\/services\/.*\/stats/" needs to appear before "/\/services/"
16
18
  INTERNAL_API_PATHS = [
17
- [/\/services\/.*\/alert_limits/, 'alerts'],
18
- [/\/services\/.*\/applications\/.*\/keys/, 'application_keys'],
19
- [/\/services\/.*\/applications\/.*\/referrer_filters/, 'application_referrer_filters'],
20
- [/\/services\/.*\/applications/, 'applications'],
21
- [/\/services\/.*\/errors/, 'errors'],
22
- [/\/events/, 'events'],
23
- [/\/services\/.*\/metrics/, 'metrics'],
24
- [/\/service_tokens/, 'service_tokens'],
25
- [/\/services/, 'services'],
26
- [/\/services\/.*\/stats/, 'stats'],
27
- [/\/services\/.*\/plans\/.*\/usagelimits/, 'usage_limits'],
28
- [/\/services\/.*\/applications\/.*\/utilization/, 'utilization'],
19
+ [/\/services\/.*\/alert_limits/, 'alerts'.freeze],
20
+ [/\/services\/.*\/applications\/.*\/keys/, 'application_keys'.freeze],
21
+ [/\/services\/.*\/applications\/.*\/referrer_filters/, 'application_referrer_filters'.freeze],
22
+ [/\/services\/.*\/applications\/.*\/utilization/, 'utilization'.freeze],
23
+ [/\/services\/.*\/applications/, 'applications'.freeze],
24
+ [/\/services\/.*\/errors/, 'errors'.freeze],
25
+ [/\/events/, 'events'.freeze],
26
+ [/\/services\/.*\/metrics/, 'metrics'.freeze],
27
+ [/\/service_tokens/, 'service_tokens'.freeze],
28
+ [/\/services\/.*\/stats/, 'stats'.freeze],
29
+ [/\/services\/.*\/plans\/.*\/usagelimits/, 'usage_limits'.freeze],
30
+ [/\/services/, 'services'.freeze],
29
31
  ].freeze
30
32
  private_constant :INTERNAL_API_PATHS
31
33
 
@@ -1,5 +1,5 @@
1
1
  module ThreeScale
2
2
  module Backend
3
- VERSION = '3.1.0'
3
+ VERSION = '3.2.0'
4
4
  end
5
5
  end
@@ -23,7 +23,7 @@
23
23
  </dependency>
24
24
  <dependency>
25
25
  <packageName>apisonator</packageName>
26
- <version>3.1.0</version>
26
+ <version>3.2.0</version>
27
27
  <licenses>
28
28
  <license>
29
29
  <name>Apache 2.0</name>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: apisonator
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0
4
+ version: 3.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Ciganek
@@ -16,7 +16,7 @@ authors:
16
16
  autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
- date: 2020-10-14 00:00:00.000000000 Z
19
+ date: 2021-01-19 00:00:00.000000000 Z
20
20
  dependencies: []
21
21
  description: This gem provides a daemon that handles authorization and reporting of
22
22
  web services managed by 3scale.