Skip to content

Commit

Permalink
Merge pull request #2735 from Krishanx92/gonew
Browse files Browse the repository at this point in the history
Change token Bearer
  • Loading branch information
Krishanx92 authored Jan 31, 2025
2 parents b4893cd + 88584c1 commit 0e1f8f4
Show file tree
Hide file tree
Showing 36 changed files with 137 additions and 137 deletions.
8 changes: 4 additions & 4 deletions helm-charts/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ wso2:
strategy: RollingUpdate
replicas: 1
imagePullPolicy: IfNotPresent
image: apk-adapter:1.2.0-SNAPSHOT
image: apk-adapter:1.3.0-SNAPSHOT
security:
sslHostname: "adapter"
logging:
Expand Down Expand Up @@ -156,8 +156,8 @@ wso2:
failureThreshold: 5
strategy: RollingUpdate
replicas: 1
imagePullPolicy: Always
image: wso2/apk-common-controller:1.2.0
imagePullPolicy: IfNotPresent
image: apk-common-controller:1.3.0-SNAPSHOT
security:
sslHostname: "commoncontroller"
# configs:
Expand Down Expand Up @@ -245,7 +245,7 @@ wso2:
failureThreshold: 5
strategy: RollingUpdate
imagePullPolicy: IfNotPresent
image: apk-enforcer:1.2.0-SNAPSHOT
image: apk-enforcer:1.3.0-SNAPSHOT
security:
sslHostname: "enforcer"
# logging:
Expand Down
2 changes: 1 addition & 1 deletion runtime/config-deployer-service/ballerina/APIClient.bal
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import wso2/apk_common_lib as commons;

public class APIClient {

# This function used to convert APKInternalAPI model to APKConf.
# This function to convert APKInternalAPI model to APKConf.
#
# + api - APKInternalAPI model
# + return - APKConf model.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Feature: API Deploying in DP to CP Flow
Then the response status code should be 200
And the response body should contain "accessToken"
Then I set headers
|Authorization|bearer ${accessToken}|
|Authorization|Bearer ${accessToken}|
And I send "GET" request to "https://carbon.super.gw.wso2.com:9095/endpoint/3.14/employee" with body ""
And I eventually receive 200 response code, not accepting
|429|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Feature: API backend based AI ratelimit Feature
Given The system is ready
And I have a valid subscription
Then I set headers
| Authorization | bearer ${accessToken} |
| Authorization | Bearer ${accessToken} |
And I wait for next minute strictly
And I send "GET" request to "https://default.gw.wso2.com:9095/llm-api/v1.0.0/3.14/employee?send=body" with body ""
Then the response status code should be 200
Expand Down Expand Up @@ -55,7 +55,7 @@ Feature: API backend based AI ratelimit Feature
Given The system is ready
And I have a valid subscription
Then I set headers
| Authorization | bearer ${accessToken} |
| Authorization | Bearer ${accessToken} |
And I wait for next minute strictly
And I send "GET" request to "https://default.gw.wso2.com:9095/llm-api-header/v1.0.0/3.14/employee?send=header" with body ""
Then the response status code should be 200
Expand Down Expand Up @@ -91,7 +91,7 @@ Feature: API backend based AI ratelimit Feature
Given The system is ready
And I have a valid subscription
Then I set headers
| Authorization | bearer ${accessToken} |
| Authorization | Bearer ${accessToken} |
And I wait for next minute strictly
And I send "GET" request to "https://default.gw.wso2.com:9095/llm-api/v1.0.0/3.14/employee?send=header" with body ""
Then the response status code should be 200
Expand All @@ -111,7 +111,7 @@ Feature: API backend based AI ratelimit Feature
And make the API deployment request
Then the response status code should be 200
Then I set headers
| Authorization | bearer ${accessToken} |
| Authorization | Bearer ${accessToken} |
And I wait for next minute strictly
And I send "GET" request to "https://default.gw.wso2.com:9095/backend-based-airl/1.0.0/employee?send=body" with body ""
Then the response status code should be 200
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Feature: API Definition Endpoint
And make the API deployment request
Then the response status code should be 200
Then I set headers
|Authorization|bearer ${accessToken}|
|Authorization|Bearer ${accessToken}|
And I send "GET" request to "https://default.gw.wso2.com:9095/test-definition-default/3.14/api-definition" with body ""
And I eventually receive 200 response code, not accepting
|429|
Expand All @@ -23,7 +23,7 @@ Feature: API Definition Endpoint
And make the API deployment request
Then the response status code should be 200
Then I set headers
|Authorization|bearer ${accessToken}|
|Authorization|Bearer ${accessToken}|
And I send "GET" request to "https://default.gw.wso2.com:9095/test-definition-custom/3.14/docs" with body ""
And I eventually receive 200 response code, not accepting
|429|
Expand All @@ -46,7 +46,7 @@ Feature: API Definition Endpoint
Then the response status code should be 200
And I wait for 1 minute
Then I set headers
| Authorization | bearer ${accessToken} |
| Authorization | Bearer ${accessToken} |
And I send "GET" request to "https://default.gw.wso2.com:9095/test-definition-default/3.14/api-definition" with body ""
Then the response status code should be 404
And I send "GET" request to "https://default.gw.wso2.com:9095/test-definition-default/api-definition" with body ""
Expand All @@ -65,7 +65,7 @@ Feature: API Definition Endpoint
Then the response status code should be 200
And I wait for 1 minute
Then I set headers
| Authorization | bearer ${accessToken} |
| Authorization | Bearer ${accessToken} |
And I send "GET" request to "https://default.sandbox.gw.wso2.com:9095/test-definition-default/3.14/api-definition" with body ""
Then the response status code should be 404
And I send "GET" request to "https://default.sandbox.gw.wso2.com:9095/test-definition-default/api-definition" with body ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ Feature: API Subscription Feature
And make the API deployment request
Then the response status code should be 200
Then I set headers
|Authorization|bearer ${accessToken}|
|Authorization|Bearer ${accessToken}|
And I send "GET" request to "https://default.gw.wso2.com:9095/subscription-api/1.0.0/endpoint1" with body ""
And I eventually receive 403 response code, not accepting
|429|
And I send "GET" request to "https://default.sandbox.gw.wso2.com:9095/subscription-api/1.0.0/endpoint1" with body ""
Then the response status code should be 403
Then I generate JWT token from idp1 with kid "123-456" and consumer_key "45f1c5c8-a92e-11ed-afa1-0242ac120005"
Then I set headers
|Authorization|bearer ${idp-1-45f1c5c8-a92e-11ed-afa1-0242ac120005-token}|
|Authorization|Bearer ${idp-1-45f1c5c8-a92e-11ed-afa1-0242ac120005-token}|
And I send "GET" request to "https://default.gw.wso2.com:9095/subscription-api/1.0.0/endpoint1" with body ""
And I eventually receive 200 response code, not accepting
|429|
Expand All @@ -25,7 +25,7 @@ Feature: API Subscription Feature

Then I generate JWT token from idp1 with kid "123-456" and consumer_key "45f1c5c8-a92e-11ed-afa1-0242ac120006"
Then I set headers
|Authorization|bearer ${idp-1-45f1c5c8-a92e-11ed-afa1-0242ac120006-token}|
|Authorization|Bearer ${idp-1-45f1c5c8-a92e-11ed-afa1-0242ac120006-token}|
And I send "GET" request to "https://default.gw.wso2.com:9095/subscription-api/1.0.0/endpoint1" with body ""
And I eventually receive 200 response code, not accepting
|429|
Expand All @@ -36,7 +36,7 @@ Feature: API Subscription Feature
|429|
Then I generate JWT token from idp1 with kid "123-456" and consumer_key "45f1c5c8-a92e-11ed-afa1-0242ac120007"
Then I set headers
|Authorization|bearer ${idp-1-45f1c5c8-a92e-11ed-afa1-0242ac120007-token}|
|Authorization|Bearer ${idp-1-45f1c5c8-a92e-11ed-afa1-0242ac120007-token}|
And I send "GET" request to "https://default.sandbox.gw.wso2.com:9095/subscription-api/1.0.0/endpoint1" with body ""
Then the response status code should be 200
And I send "GET" request to "https://default.gw.wso2.com:9095/subscription-api/1.0.0/endpoint1" with body ""
Expand All @@ -45,7 +45,7 @@ Feature: API Subscription Feature
|429|
Then I generate JWT token from idp1 with kid "123-456" and consumer_key "45f1c5c8-a92e-11ed-afa1-0242ac120008"
Then I set headers
|Authorization|bearer ${idp-1-45f1c5c8-a92e-11ed-afa1-0242ac120008-token}|
|Authorization|Bearer ${idp-1-45f1c5c8-a92e-11ed-afa1-0242ac120008-token}|
And I send "GET" request to "https://default.gw.wso2.com:9095/subscription-api/1.0.0/endpoint1" with body ""
And I eventually receive 403 response code, not accepting
|200|
Expand All @@ -56,7 +56,7 @@ Feature: API Subscription Feature
|429|
Then I generate JWT token from idp1 with kid "123-456" and consumer_key "45f1c5c8-a92e-11ed-afa1-0242ac120009"
Then I set headers
|Authorization|bearer ${idp-1-45f1c5c8-a92e-11ed-afa1-0242ac120009-token}|
|Authorization|Bearer ${idp-1-45f1c5c8-a92e-11ed-afa1-0242ac120009-token}|
And I send "GET" request to "https://default.sandbox.gw.wso2.com:9095/subscription-api/1.0.0/endpoint1" with body ""
Then the response status code should be 403
And I send "GET" request to "https://default.gw.wso2.com:9095/subscription-api/1.0.0/endpoint1" with body ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Feature: API subscription based AI ratelimit Feature
And I have a valid subscription
Then I generate JWT token from idp1 with kid "123-456" and consumer_key "45f1c5c8-a92e-11ed-afa1-0242ac120065"
Then I set headers
|Authorization|bearer ${idp-1-45f1c5c8-a92e-11ed-afa1-0242ac120065-token}|
|Authorization|Bearer ${idp-1-45f1c5c8-a92e-11ed-afa1-0242ac120065-token}|
And I wait for next minute strictly
And I send "GET" request to "https://default.gw.wso2.com:9095/llm-api-subs/v1.0.0/3.14/employee?send=body" with body ""
Then the response status code should be 200
Expand Down Expand Up @@ -41,7 +41,7 @@ Feature: API subscription based AI ratelimit Feature
And I have a valid subscription
Then I generate JWT token from idp1 with kid "123-456" and consumer_key "45f1c5c8-a92e-11ed-afa1-0242ac120065"
Then I set headers
|Authorization|bearer ${idp-1-45f1c5c8-a92e-11ed-afa1-0242ac120065-token}|
|Authorization|Bearer ${idp-1-45f1c5c8-a92e-11ed-afa1-0242ac120065-token}|
And I wait for next minute strictly
And I send "GET" request to "https://default.gw.wso2.com:9095/llm-api-subs/v1.0.0/3.14/employee?send=header" with body ""
Then the response status code should be 200
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Feature: Backend API Key auth
And make the API deployment request
Then the response status code should be 200
Then I set headers
|Authorization|bearer ${accessToken}|
|Authorization|Bearer ${accessToken}|
And I send "GET" request to "https://default.gw.wso2.com:9095/backend-api-key-security/3.14/employee/" with body ""
And I eventually receive 200 response code, not accepting
|429|
Expand All @@ -28,7 +28,7 @@ Feature: Backend API Key auth
Given The system is ready
And I have a valid subscription
Then I set headers
| Authorization | bearer ${accessToken} |
| Authorization | Bearer ${accessToken} |
And I send "GET" request to "https://default.gw.wso2.com:9095/backend-api-key-security/3.14/employee/" with body ""
And I eventually receive 404 response code, not accepting
| 200 |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Feature: BackendRetry
And make the API deployment request
Then the response status code should be 200
Then I set headers
|Authorization|bearer ${accessToken}|
|Authorization|Bearer ${accessToken}|
And I send "GET" request to "https://default.gw.wso2.com:9095/backend-retry/3.14/retry" with body ""
And I eventually receive 200 response code, not accepting
|429|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Feature: BackendTimeout
And make the API deployment request
Then the response status code should be 200
Then I set headers
|Authorization|bearer ${accessToken}|
|Authorization|Bearer ${accessToken}|
And I send "GET" request to "https://default.gw.wso2.com:9095/backend-timeout/3.14/delay/2" with body ""
And I eventually receive 504 response code, not accepting
|429|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Feature: Basic auth
And make the API deployment request
Then the response status code should be 200
Then I set headers
|Authorization|bearer ${accessToken}|
|Authorization|Bearer ${accessToken}|
And I send "GET" request to "https://default.gw.wso2.com:9095/basic-auth/3.14/employee/" with body ""
And I eventually receive 200 response code, not accepting
|429|
Expand Down Expand Up @@ -36,7 +36,7 @@ Feature: Basic auth
Given The system is ready
And I have a valid subscription
Then I set headers
| Authorization | bearer ${accessToken} |
| Authorization | Bearer ${accessToken} |
And I send "GET" request to "https://default.gw.wso2.com:9095/basic-auth/3.14/employee/" with body ""
And I eventually receive 404 response code, not accepting
| 200 |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Feature: API Deployment and invocation
And make the API deployment request
Then the response status code should be 200
Then I set headers
| Authorization | bearer ${accessToken} |
| Authorization | Bearer ${accessToken} |
And I send "GET" request to "https://default.gw.wso2.com:9095/test/3.14/employee/" with body ""
And I eventually receive 200 response code, not accepting
| 429 |
Expand All @@ -20,7 +20,7 @@ Feature: API Deployment and invocation
And I send "DELETE" request to "https://default.gw.wso2.com:9095/test/3.14/employee/12" with body ""
And the response status code should be 200
Then I set headers
| Authorization | bearer invalidToken |
| Authorization | Bearer invalidToken |
And I send "GET" request to "https://default.gw.wso2.com:9095/test/3.14/employee/" with body ""
And the response status code should be 401
And I send "POST" request to "https://default.gw.wso2.com:9095/test/3.14/employee/" with body ""
Expand All @@ -42,7 +42,7 @@ Feature: API Deployment and invocation
And make the API deployment request
Then the response status code should be 200
Then I set headers
| Authorization | bearer ${accessToken} |
| Authorization | Bearer ${accessToken} |
And I wait for next minute
And I send "GET" request to "https://default.gw.wso2.com:9095/test-version/1.0/employee/" with body ""
And I eventually receive 200 response code, not accepting
Expand All @@ -59,7 +59,7 @@ Feature: API Deployment and invocation
And make the API deployment request
Then the response status code should be 200
Then I set headers
| Authorization | bearer ${accessToken} |
| Authorization | Bearer ${accessToken} |
And I send "GET" request to "https://default.gw.wso2.com:9095/test-default/3.14/employee/" with body ""
And I eventually receive 200 response code, not accepting
| 429 |
Expand Down Expand Up @@ -91,7 +91,7 @@ Feature: API Deployment and invocation
And make the API deployment request
Then the response status code should be 200
Then I set headers
| Authorization | bearer ${accessToken} |
| Authorization | Bearer ${accessToken} |
And I send "GET" request to "https://default.gw.wso2.com:9095/test-scope/1.0.0/employeewithoutscope/" with body ""
And I eventually receive 200 response code, not accepting
| 429 |
Expand All @@ -100,7 +100,7 @@ Feature: API Deployment and invocation
Given I have a valid subscription with scopes
| scope1 |
Then I set headers
| Authorization | bearer ${accessToken} |
| Authorization | Bearer ${accessToken} |
And I send "GET" request to "https://default.gw.wso2.com:9095/test-scope/1.0.0/employeewithoutscope/" with body ""
And I eventually receive 200 response code, not accepting
| 429 |
Expand All @@ -117,7 +117,7 @@ Feature: API Deployment and invocation
| scope1 |
| scope2 |
Then I set headers
| Authorization | bearer ${accessToken} |
| Authorization | Bearer ${accessToken} |
And I send "GET" request to "https://default.gw.wso2.com:9095/test-scope/1.0.0/employeewithscopes/" with body ""
And I eventually receive 200 response code, not accepting
| 429 |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Feature: BackendRetry
And make the API deployment request
Then the response status code should be 200
Then I set headers
|Authorization|bearer ${accessToken}|
|Authorization|Bearer ${accessToken}|
And I send "POST" request to "https://default.gw.wso2.com:9095/circuit-breaker/3.14/set-retry-count" with body "{\"count\": 500}"
And I eventually receive 200 response code, not accepting
|429|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Feature: circuitBreakerMaxRequest
And make the API deployment request
Then the response status code should be 200
Then I set headers
|Authorization|bearer ${accessToken}|
|Authorization|Bearer ${accessToken}|
And I send "GET" request to "https://default.gw.wso2.com:9095/circuit-breaker-max-request/3.14/anything/test" with body ""
And I eventually receive 200 response code, not accepting
|429|
Expand All @@ -23,7 +23,7 @@ Feature: circuitBreakerMaxRequest
And make the API deployment request
Then the response status code should be 200
Then I set headers
|Authorization|bearer ${accessToken}|
|Authorization|Bearer ${accessToken}|
And I send "GET" request to "https://default.gw.wso2.com:9095/circuit-breaker-max-request-v1/3.14/anything/test" with body ""
And I eventually receive 200 response code, not accepting
|429|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Feature: Custom ratelimit
And make the API deployment request
Then the response status code should be 200
Then I set headers
| Authorization | bearer ${accessToken} |
| Authorization | Bearer ${accessToken} |
| user_id | bob |
| org_id | wso2 |
And I wait for next minute
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Feature: API different endpoint resource level
And make the API deployment request
Then the response status code should be 200
Then I set headers
|Authorization|bearer ${accessToken}|
|Authorization|Bearer ${accessToken}|
And I send "GET" request to "https://default.gw.wso2.com:9095/test-different-endpoint-resource-level/3.14/endpoint1" with body ""
And I eventually receive 200 response code, not accepting
|429|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Feature: API different endpoint resource level
And make the API deployment request
Then the response status code should be 200
Then I set headers
|Authorization|bearer ${accessToken}|
|Authorization|Bearer ${accessToken}|
And I send "GET" request to "https://default.gw.wso2.com:9095/test-different-sand-prod-endpoint/3.14/endpoint1" with body ""
And I eventually receive 200 response code, not accepting
|429|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Feature: Endpoint
And make the API deployment request
Then the response status code should be 200
Then I set headers
|Authorization|bearer ${accessToken}|
|Authorization|Bearer ${accessToken}|
And I send "GET" request to "https://default.gw.wso2.com:9095/endpoint/3.14/employee" with body ""
And I eventually receive 200 response code, not accepting
|429|
Expand Down
Loading

0 comments on commit 0e1f8f4

Please sign in to comment.