Skip to content

Commit

Permalink
Update missing files
Browse files Browse the repository at this point in the history
  • Loading branch information
Krishanx92 committed Sep 9, 2024
1 parent 567cd24 commit 8ed1ff4
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 76 deletions.
62 changes: 0 additions & 62 deletions common-go-libs/config/crd/bases/dp.wso2.com_ratelimitpolicies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,37 +79,6 @@ spec:
description: Value is the value of the custom policy
type: string
type: object
subscription:
description: Subscription level ratelimit policy
properties:
burstControl:
description: BurstControl defines the rule for token count
quota.
properties:
requestsPerUnit:
format: int32
type: integer
unit:
type: string
type: object
organization:
type: string
requestCount:
description: RequestCount defines the rule for request count
quota.
properties:
requestsPerUnit:
format: int32
type: integer
unit:
type: string
type: object
stopOnQuotaReach:
type: boolean
required:
- organization
- stopOnQuotaReach
type: object
type: object
override:
description: RateLimitAPIPolicy defines the desired state of Policy
Expand Down Expand Up @@ -156,37 +125,6 @@ spec:
description: Value is the value of the custom policy
type: string
type: object
subscription:
description: Subscription level ratelimit policy
properties:
burstControl:
description: BurstControl defines the rule for token count
quota.
properties:
requestsPerUnit:
format: int32
type: integer
unit:
type: string
type: object
organization:
type: string
requestCount:
description: RequestCount defines the rule for request count
quota.
properties:
requestsPerUnit:
format: int32
type: integer
unit:
type: string
type: object
stopOnQuotaReach:
type: boolean
required:
- organization
- stopOnQuotaReach
type: object
type: object
targetRef:
description: PolicyTargetReference identifies an API object to apply
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ private CheckResponse buildResponse(CheckRequest request, ResponseObject respons
responseObject.getMetaDataMap().forEach((key, value) ->
addMetadata(metadataStructBuilder, key, value));
}
System.out.println("correlationID:" + responseObject.getCorrelationID());
addMetadata(metadataStructBuilder, "correlationID", responseObject.getCorrelationID());
addMetadata(metadataStructBuilder, MetadataConstants.APK_ENFORCER_REPLY, "Ok");

Expand Down Expand Up @@ -194,7 +193,6 @@ private CheckResponse buildResponse(CheckRequest request, ResponseObject respons
addMetadata(structBuilder, RouterAccessLogConstants.ORIGINAL_PATH_DATA_NAME,
responseObject.getRequestPath().split("\\?")[0]);
// adding org level ratelimit key to metadata
System.out.println(MetadataConstants.RATELIMIT_WSO2_ORG_PREFIX + responseObject.getOrganizationId());
addMetadata(structBuilder, MetadataConstants.RATELIMIT_WSO2_ORG_PREFIX, responseObject.getOrganizationId());
addMetadata(structBuilder, MetadataConstants.APK_ENFORCER_REPLY, "Ok");

Expand Down Expand Up @@ -266,8 +264,6 @@ private String constructQueryParamString(boolean removeAllQueryParams, String re
* @param value
*/
private void addMetadata(Struct.Builder structBuilder, String key, String value) {
System.out.print("key: " +key);
System.out.print("value: "+ value);
structBuilder.putFields(key, Value.newBuilder().setStringValue(value).build());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
public class SwaggerServerInitializer extends ChannelInitializer<SocketChannel> {
private final SslContext sslCtx;
public SwaggerServerInitializer(SslContext sslCtx) {
System.out.println("SwaggerServerInitializer constructor");
this.sslCtx = sslCtx;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,6 @@ public void addSubscription(org.wso2.apk.enforcer.discovery.subscription.Subscri
resolvedSubscription.setOrganization(subscription.getOrganization());
resolvedSubscription.setSubscribedApi(new SubscribedAPI(subscription.getSubscribedApi()));
resolvedSubscription.setRatelimitTier(subscription.getRatelimitTier());
System.out.println(subscription.getRatelimitTier());
if (subscriptionMap.containsKey(resolvedSubscription.getSubscriptionId())) {
subscriptionMap.replace(resolvedSubscription.getSubscriptionId(), resolvedSubscription);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ public JWKSClient(String jwksEndpoint, List<Certificate> certificates) throws En

public JWKSet getJWKSet() throws EnforcerException {
try {
System.out.print(jwksEndpoint + "haha");
HttpGet httpGet = new HttpGet(jwksEndpoint);
try (CloseableHttpResponse response = (CloseableHttpResponse) httpClient.execute(httpGet)) {
if (response.getStatusLine().getStatusCode() == 200) {
Expand Down
14 changes: 7 additions & 7 deletions helm-charts/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ wso2:
# jwksEndpoint: "https://idp.am.wso2.com:9095/oauth2/jwks"
# secretName: "wso2apk-idp-signing"
# fileName: "idp.crt"
cp:
enabledSubscription: true
host: "apim-apk-agent-service.apk.svc.cluster.local"
skipSSLVerification: true
# cp:
# enabledSubscription: true
# host: "apim-apk-agent-service.apk.svc.cluster.local"
# skipSSLVerification: true
# skipSSLVerification: false
# persistence:
# type: "K8s"
Expand Down Expand Up @@ -252,9 +252,9 @@ wso2:
# secretName: "router-cert"
# certKeyFilename: ""
# certFilename: ""
JWKSClient:
skipSSLVerification: false
hostnameVerifier: "AllowAll"
# JWKSClient:
# skipSSLVerification: false
# hostnameVerifier: "AllowAll"

metrics:
enabled: false
Expand Down

0 comments on commit 8ed1ff4

Please sign in to comment.