diff --git a/components/apimgt/org.wso2.carbon.apimgt.api/pom.xml b/components/apimgt/org.wso2.carbon.apimgt.api/pom.xml index b6336090684b..b84ba86a804d 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.api/pom.xml +++ b/components/apimgt/org.wso2.carbon.apimgt.api/pom.xml @@ -11,7 +11,7 @@ org.wso2.carbon.apimgt apimgt - 9.28.169-SNAPSHOT + 9.28.172-SNAPSHOT ../pom.xml diff --git a/components/apimgt/org.wso2.carbon.apimgt.api/src/main/java/org/wso2/carbon/apimgt/api/model/API.java b/components/apimgt/org.wso2.carbon.apimgt.api/src/main/java/org/wso2/carbon/apimgt/api/model/API.java index 86b7d5a125f6..c150a1847205 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.api/src/main/java/org/wso2/carbon/apimgt/api/model/API.java +++ b/components/apimgt/org.wso2.carbon.apimgt.api/src/main/java/org/wso2/carbon/apimgt/api/model/API.java @@ -152,6 +152,7 @@ public void setSoapToRestSequences(List soapToRestSequences) //Custom authorization header specific to the API private String authorizationHeader; + private String apiKeyHeader; private Set scopes; private boolean isDefaultVersion = false; @@ -1175,6 +1176,12 @@ public void setAuthorizationHeader(String authorizationHeader) { this.authorizationHeader = authorizationHeader; } + public String getApiKeyHeader() { return apiKeyHeader; } + + public void setApiKeyHeader(String apiKeyHeader) { + this.apiKeyHeader = apiKeyHeader; + } + /** * Check the status of the Json schema validation property. * diff --git a/components/apimgt/org.wso2.carbon.apimgt.api/src/main/java/org/wso2/carbon/apimgt/api/model/APIProduct.java b/components/apimgt/org.wso2.carbon.apimgt.api/src/main/java/org/wso2/carbon/apimgt/api/model/APIProduct.java index 7a11c51433fe..dac2ef0e7fb8 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.api/src/main/java/org/wso2/carbon/apimgt/api/model/APIProduct.java +++ b/components/apimgt/org.wso2.carbon.apimgt.api/src/main/java/org/wso2/carbon/apimgt/api/model/APIProduct.java @@ -89,6 +89,7 @@ public class APIProduct { * Custom authorization header specific to the API */ private String authorizationHeader; + private String apiKeyHeader; private CORSConfiguration corsConfiguration; @@ -439,6 +440,14 @@ public void setAuthorizationHeader(String authorizationHeader) { this.authorizationHeader = authorizationHeader; } + public String getApiKeyHeader() { + return apiKeyHeader; + } + + public void setApiKeyHeader(String apiKeyHeader) { + this.apiKeyHeader = apiKeyHeader; + } + public CORSConfiguration getCorsConfiguration() { return corsConfiguration; } diff --git a/components/apimgt/org.wso2.carbon.apimgt.broker.lifecycle/pom.xml b/components/apimgt/org.wso2.carbon.apimgt.broker.lifecycle/pom.xml index c5418f64fcd7..ed06e614a320 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.broker.lifecycle/pom.xml +++ b/components/apimgt/org.wso2.carbon.apimgt.broker.lifecycle/pom.xml @@ -4,7 +4,7 @@ apimgt org.wso2.carbon.apimgt - 9.28.169-SNAPSHOT + 9.28.172-SNAPSHOT ../pom.xml diff --git a/components/apimgt/org.wso2.carbon.apimgt.cache.invalidation/pom.xml b/components/apimgt/org.wso2.carbon.apimgt.cache.invalidation/pom.xml index 0225148cc6da..a527907bfd6f 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.cache.invalidation/pom.xml +++ b/components/apimgt/org.wso2.carbon.apimgt.cache.invalidation/pom.xml @@ -19,7 +19,7 @@ apimgt org.wso2.carbon.apimgt - 9.28.169-SNAPSHOT + 9.28.172-SNAPSHOT 4.0.0 diff --git a/components/apimgt/org.wso2.carbon.apimgt.cleanup.service/pom.xml b/components/apimgt/org.wso2.carbon.apimgt.cleanup.service/pom.xml index 6756a8a3aa49..601022ef0cd8 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.cleanup.service/pom.xml +++ b/components/apimgt/org.wso2.carbon.apimgt.cleanup.service/pom.xml @@ -19,7 +19,7 @@ org.wso2.carbon.apimgt apimgt - 9.28.169-SNAPSHOT + 9.28.172-SNAPSHOT ../pom.xml diff --git a/components/apimgt/org.wso2.carbon.apimgt.common.analytics/pom.xml b/components/apimgt/org.wso2.carbon.apimgt.common.analytics/pom.xml index 20bab35c1fc4..1c2b4c5a553f 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.common.analytics/pom.xml +++ b/components/apimgt/org.wso2.carbon.apimgt.common.analytics/pom.xml @@ -3,7 +3,7 @@ org.wso2.carbon.apimgt apimgt - 9.28.169-SNAPSHOT + 9.28.172-SNAPSHOT ../pom.xml 4.0.0 diff --git a/components/apimgt/org.wso2.carbon.apimgt.common.gateway/pom.xml b/components/apimgt/org.wso2.carbon.apimgt.common.gateway/pom.xml index 2acf6e134aa4..2198f3110f96 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.common.gateway/pom.xml +++ b/components/apimgt/org.wso2.carbon.apimgt.common.gateway/pom.xml @@ -3,7 +3,7 @@ org.wso2.carbon.apimgt apimgt - 9.28.169-SNAPSHOT + 9.28.172-SNAPSHOT ../pom.xml 4.0.0 diff --git a/components/apimgt/org.wso2.carbon.apimgt.common.jms/pom.xml b/components/apimgt/org.wso2.carbon.apimgt.common.jms/pom.xml index 05659f193271..c35d521c212d 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.common.jms/pom.xml +++ b/components/apimgt/org.wso2.carbon.apimgt.common.jms/pom.xml @@ -4,7 +4,7 @@ org.wso2.carbon.apimgt apimgt - 9.28.169-SNAPSHOT + 9.28.172-SNAPSHOT ../pom.xml 4.0.0 diff --git a/components/apimgt/org.wso2.carbon.apimgt.core/pom.xml b/components/apimgt/org.wso2.carbon.apimgt.core/pom.xml index 037eb82d7b54..5808e2ab0248 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.core/pom.xml +++ b/components/apimgt/org.wso2.carbon.apimgt.core/pom.xml @@ -5,7 +5,7 @@ org.wso2.carbon.apimgt apimgt - 9.28.169-SNAPSHOT + 9.28.172-SNAPSHOT ../pom.xml diff --git a/components/apimgt/org.wso2.carbon.apimgt.devops.impl/pom.xml b/components/apimgt/org.wso2.carbon.apimgt.devops.impl/pom.xml index a6df0a52b14b..d49cdfb86b5c 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.devops.impl/pom.xml +++ b/components/apimgt/org.wso2.carbon.apimgt.devops.impl/pom.xml @@ -21,7 +21,7 @@ org.wso2.carbon.apimgt apimgt - 9.28.169-SNAPSHOT + 9.28.172-SNAPSHOT ../pom.xml diff --git a/components/apimgt/org.wso2.carbon.apimgt.eventing.hub/pom.xml b/components/apimgt/org.wso2.carbon.apimgt.eventing.hub/pom.xml index da4a51e05b35..15142a1bbdd7 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.eventing.hub/pom.xml +++ b/components/apimgt/org.wso2.carbon.apimgt.eventing.hub/pom.xml @@ -20,7 +20,7 @@ apimgt org.wso2.carbon.apimgt - 9.28.169-SNAPSHOT + 9.28.172-SNAPSHOT ../pom.xml diff --git a/components/apimgt/org.wso2.carbon.apimgt.eventing/pom.xml b/components/apimgt/org.wso2.carbon.apimgt.eventing/pom.xml index 4fbd7e061583..0986afc243c7 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.eventing/pom.xml +++ b/components/apimgt/org.wso2.carbon.apimgt.eventing/pom.xml @@ -20,7 +20,7 @@ apimgt org.wso2.carbon.apimgt - 9.28.169-SNAPSHOT + 9.28.172-SNAPSHOT ../pom.xml diff --git a/components/apimgt/org.wso2.carbon.apimgt.gateway/pom.xml b/components/apimgt/org.wso2.carbon.apimgt.gateway/pom.xml index fa56fc77e5ca..8fc6a941850e 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.gateway/pom.xml +++ b/components/apimgt/org.wso2.carbon.apimgt.gateway/pom.xml @@ -19,7 +19,7 @@ org.wso2.carbon.apimgt apimgt - 9.28.169-SNAPSHOT + 9.28.172-SNAPSHOT ../pom.xml diff --git a/components/apimgt/org.wso2.carbon.apimgt.gateway/src/main/java/org/wso2/carbon/apimgt/gateway/APIMgtGatewayConstants.java b/components/apimgt/org.wso2.carbon.apimgt.gateway/src/main/java/org/wso2/carbon/apimgt/gateway/APIMgtGatewayConstants.java index dd5d15fc1adc..687912c4d918 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.gateway/src/main/java/org/wso2/carbon/apimgt/gateway/APIMgtGatewayConstants.java +++ b/components/apimgt/org.wso2.carbon.apimgt.gateway/src/main/java/org/wso2/carbon/apimgt/gateway/APIMgtGatewayConstants.java @@ -139,6 +139,7 @@ public class APIMgtGatewayConstants { public static final String CUSTOM_ANALYTICS_RESPONSE_PROPERTIES = "apim.analytics.response.properties"; public static final String CUSTOM_ANALYTICS_PROPERTY_SEPARATOR = ","; public static final String API_UUID_PROPERTY = "API_UUID"; + public static final String TENANT_DOMAIN = "tenant.info.domain"; /** * Constants for swagger schema validator diff --git a/components/apimgt/org.wso2.carbon.apimgt.gateway/src/main/java/org/wso2/carbon/apimgt/gateway/handlers/common/APIMgtLatencySynapseHandler.java b/components/apimgt/org.wso2.carbon.apimgt.gateway/src/main/java/org/wso2/carbon/apimgt/gateway/handlers/common/APIMgtLatencySynapseHandler.java index dc5e76742fa6..e2cd22aa7a5e 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.gateway/src/main/java/org/wso2/carbon/apimgt/gateway/handlers/common/APIMgtLatencySynapseHandler.java +++ b/components/apimgt/org.wso2.carbon.apimgt.gateway/src/main/java/org/wso2/carbon/apimgt/gateway/handlers/common/APIMgtLatencySynapseHandler.java @@ -139,10 +139,11 @@ public boolean handleResponseOutFlow(MessageContext messageContext) { if (responseLatencySpan != null) { GatewayUtils.setAPIRelatedTags(responseLatencySpan, messageContext); API api = GatewayUtils.getAPI(messageContext); + String tenantDomain = (String) messageContext.getProperty(APIMgtGatewayConstants.TENANT_DOMAIN); if (api != null) { TelemetryUtil.updateOperation(responseLatencySpan, api.getApiName().concat("--").concat(api.getApiVersion()).concat("--") - .concat(GatewayUtils.getTenantDomain())); + .concat(tenantDomain)); } TelemetryUtil.finishSpan(responseLatencySpan); } @@ -157,10 +158,11 @@ public boolean handleResponseOutFlow(MessageContext messageContext) { if (responseLatencySpan != null) { GatewayUtils.setAPIRelatedTags(responseLatencySpan, messageContext); API api = GatewayUtils.getAPI(messageContext); + String tenantDomain = (String) messageContext.getProperty(APIMgtGatewayConstants.TENANT_DOMAIN); if (api != null) { Util.updateOperation(responseLatencySpan, api.getApiName().concat("--").concat(api.getApiVersion()).concat("--") - .concat(GatewayUtils.getTenantDomain())); + .concat(tenantDomain)); } if (responseLatencySpan != null) { Util.finishSpan(responseLatencySpan); diff --git a/components/apimgt/org.wso2.carbon.apimgt.gateway/src/main/java/org/wso2/carbon/apimgt/gateway/handlers/security/APIAuthenticationHandler.java b/components/apimgt/org.wso2.carbon.apimgt.gateway/src/main/java/org/wso2/carbon/apimgt/gateway/handlers/security/APIAuthenticationHandler.java index 94d68ea03778..8726db172bff 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.gateway/src/main/java/org/wso2/carbon/apimgt/gateway/handlers/security/APIAuthenticationHandler.java +++ b/components/apimgt/org.wso2.carbon.apimgt.gateway/src/main/java/org/wso2/carbon/apimgt/gateway/handlers/security/APIAuthenticationHandler.java @@ -94,6 +94,7 @@ public class APIAuthenticationHandler extends AbstractHandler implements Managed private SynapseEnvironment synapseEnvironment; private String authorizationHeader; + private String apiKeyHeader; private String apiSecurity; private String apiLevelPolicy; private String certificateInformation; @@ -201,6 +202,24 @@ public void setAuthorizationHeader(String authorizationHeader) { this.authorizationHeader = authorizationHeader; } + /** + * To get the Api Key Header. + * + * @return Relevant the Api Key Header of the API request + */ + public String getApiKeyHeader() { + return apiKeyHeader; + } + + /** + * To set the Api Key Header. + * + * @param apiKeyHeader the Api Key Header of the API request. + */ + public void setApiKeyHeader(String apiKeyHeader) { + this.apiKeyHeader = apiKeyHeader; + } + /** * To get the API level security expected for the current API in gateway level. * @@ -335,7 +354,7 @@ protected void initializeAuthenticators() { authenticators.add(authenticator); } if (isApiKeyProtected) { - Authenticator authenticator = new ApiKeyAuthenticator(APIConstants.API_KEY_HEADER_QUERY_PARAM, apiLevelPolicy, isOAuthBasicAuthMandatory); + Authenticator authenticator = new ApiKeyAuthenticator(apiKeyHeader, apiLevelPolicy, isOAuthBasicAuthMandatory); authenticator.init(synapseEnvironment); authenticators.add(authenticator); } @@ -631,7 +650,7 @@ private void handleAuthFailure(MessageContext messageContext, APISecurityExcepti errorDetail = APISecurityConstants.getFailureMessageDetailDescription(e.getErrorCode(), e.getMessage()) + "'" + authorizationHeader + " : Bearer ACCESS_TOKEN' or '" + authorizationHeader + - " : Basic ACCESS_TOKEN' or 'apikey: API_KEY'" ; + " : Basic ACCESS_TOKEN' or '" + apiKeyHeader + " : API_KEY'"; } messageContext.setProperty(SynapseConstants.ERROR_DETAIL, errorDetail); diff --git a/components/apimgt/org.wso2.carbon.apimgt.gateway/src/main/java/org/wso2/carbon/apimgt/gateway/handlers/security/CORSRequestHandler.java b/components/apimgt/org.wso2.carbon.apimgt.gateway/src/main/java/org/wso2/carbon/apimgt/gateway/handlers/security/CORSRequestHandler.java index 1838a79ac779..d88db46fec2b 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.gateway/src/main/java/org/wso2/carbon/apimgt/gateway/handlers/security/CORSRequestHandler.java +++ b/components/apimgt/org.wso2.carbon.apimgt.gateway/src/main/java/org/wso2/carbon/apimgt/gateway/handlers/security/CORSRequestHandler.java @@ -69,6 +69,7 @@ public class CORSRequestHandler extends AbstractHandler implements ManagedLifecy private List allowedMethodList; private boolean allowCredentialsEnabled; private String authorizationHeader; + private String apiKeyHeader; public void init(SynapseEnvironment synapseEnvironment) { if (log.isDebugEnabled()) { @@ -95,6 +96,9 @@ void initializeHeaders() { if (authorizationHeader != null) { allowHeaders += APIConstants.MULTI_ATTRIBUTE_SEPARATOR_DEFAULT + authorizationHeader; } + if (apiKeyHeader != null) { + allowHeaders += APIConstants.MULTI_ATTRIBUTE_SEPARATOR_DEFAULT + apiKeyHeader; + } if (allowedOrigins == null) { String allowedOriginsList = APIUtil.getAllowedOrigins(); if (!allowedOriginsList.isEmpty()) { @@ -447,4 +451,12 @@ public String getAuthorizationHeader() { public void setAuthorizationHeader(String authorizationHeader) { this.authorizationHeader = authorizationHeader; } + + public String getApiKeyHeader() { + return apiKeyHeader; + } + + public void setApiKeyHeader(String apiKeyHeader) { + this.apiKeyHeader = apiKeyHeader; + } } diff --git a/components/apimgt/org.wso2.carbon.apimgt.impl/pom.xml b/components/apimgt/org.wso2.carbon.apimgt.impl/pom.xml index 6bcdac1327ca..32783bea768e 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.impl/pom.xml +++ b/components/apimgt/org.wso2.carbon.apimgt.impl/pom.xml @@ -12,7 +12,7 @@ org.wso2.carbon.apimgt apimgt - 9.28.169-SNAPSHOT + 9.28.172-SNAPSHOT ../pom.xml diff --git a/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/APIConstants.java b/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/APIConstants.java index 65573f8ccf09..13c2fe0b59e7 100755 --- a/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/APIConstants.java +++ b/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/APIConstants.java @@ -335,6 +335,7 @@ public final class APIConstants { public static final String API_OVERVIEW_OUTSEQUENCE = "overview_outSequence"; public static final String API_OVERVIEW_FAULTSEQUENCE = "overview_faultSequence"; public static final String API_OVERVIEW_AUTHORIZATION_HEADER = "overview_authorizationHeader"; + public static final String API_OVERVIEW_API_KEY_HEADER = "overview_apiKeyHeader"; public static final String API_OVERVIEW_API_SECURITY = "overview_apiSecurity"; public static final String API_OVERVIEW_WS_URI_MAPPING = "overview_wsUriMapping"; public static final String AUTHORIZATION_HEADER_BASIC = "Basic"; @@ -459,10 +460,12 @@ public final class APIConstants { public static final String MEDIATOR_CONFIG = "MediatorConfigs."; public static final String OAUTH_CONFIGS = "OAuthConfigurations."; public static final String AUTHORIZATION_HEADER = "AuthorizationHeader"; + public static final String API_KEY_HEADER = "ApiKeyHeader"; public static final String API_SECURITY = "APISecurity"; public static final String API_LEVEL_POLICY = "APILevelPolicy"; public static final String CERTIFICATE_INFORMATION = "CertificateInformation"; public static final String AUTHORIZATION_HEADER_DEFAULT = "Authorization"; + public static final String API_KEY_HEADER_DEFAULT = "ApiKey"; public static final String HEADER_TENANT = "xWSO2Tenant"; public static final String X_WSO2_TENANT_HEADER = "X-WSO2-Tenant"; public static final String AUTHORIZATION_QUERY_PARAM_DEFAULT = "access_token"; @@ -1596,6 +1599,7 @@ private ConfigParameters() { //swagger MG related constants public static final String X_WSO2_AUTH_HEADER = "x-wso2-auth-header"; + public static final String X_WSO2_API_KEY_HEADER = "x-wso2-api-key-header"; public static final String X_THROTTLING_TIER = "x-throttling-tier"; public static final String X_WSO2_CORS = "x-wso2-cors"; public static final String X_WSO2_PRODUCTION_ENDPOINTS = "x-wso2-production-endpoints"; @@ -2937,6 +2941,7 @@ public enum ConfigType { public static final String OPERATION_SEQUENCE_TYPE_RESPONSE = "response"; public static final String OPERATION_SEQUENCE_TYPE_FAULT = "fault"; public static final String SYNAPSE_POLICY_DEFINITION_EXTENSION = ".j2"; + public static final String SYNAPSE_POLICY_DEFINITION_EXTENSION_XML = ".xml"; public static final String CC_POLICY_DEFINITION_EXTENSION = ".gotmpl"; public static final String YAML_CONTENT_TYPE = "text/yaml"; public static final String COMMON_OPERATION_POLICY_SPECIFICATIONS_LOCATION = "repository" + File.separator diff --git a/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/definitions/OAS2Parser.java b/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/definitions/OAS2Parser.java index 165ed16510fd..481104e0377e 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/definitions/OAS2Parser.java +++ b/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/definitions/OAS2Parser.java @@ -836,6 +836,9 @@ public String getOASDefinitionForPublisher(API api, String oasDefinition) throws if (api.getAuthorizationHeader() != null) { swagger.setVendorExtension(APIConstants.X_WSO2_AUTH_HEADER, api.getAuthorizationHeader()); } + if (api.getApiKeyHeader() != null) { + swagger.setVendorExtension(APIConstants.X_WSO2_API_KEY_HEADER, api.getApiKeyHeader()); + } if (api.getApiLevelPolicy() != null) { swagger.setVendorExtension(APIConstants.X_THROTTLING_TIER, api.getApiLevelPolicy()); } @@ -1678,6 +1681,12 @@ public API setExtensionsToAPI(String apiDefinition, API api) throws APIManagemen if (StringUtils.isNotBlank(authHeader)) { api.setAuthorizationHeader(authHeader); } + //Setup custom api key header for API + String apiKeyHeader = OASParserUtil.getApiKeyHeaderFromSwagger(extensions); + if (StringUtils.isNotBlank(apiKeyHeader)) { + api.setApiKeyHeader(apiKeyHeader); + } + //Setup application Security List applicationSecurity = OASParserUtil.getApplicationSecurityTypes(extensions); Boolean isOptional = OASParserUtil.getAppSecurityStateFromSwagger(extensions); diff --git a/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/definitions/OAS3Parser.java b/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/definitions/OAS3Parser.java index 2012c5b41232..846049fdd72e 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/definitions/OAS3Parser.java +++ b/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/definitions/OAS3Parser.java @@ -951,6 +951,9 @@ public String getOASDefinitionForPublisher(API api, String oasDefinition) throws if (api.getAuthorizationHeader() != null) { openAPI.addExtension(APIConstants.X_WSO2_AUTH_HEADER, api.getAuthorizationHeader()); } + if (api.getApiKeyHeader() != null) { + openAPI.addExtension(APIConstants.X_WSO2_API_KEY_HEADER, api.getApiKeyHeader()); + } if (api.getApiLevelPolicy() != null) { openAPI.addExtension(APIConstants.X_THROTTLING_TIER, api.getApiLevelPolicy()); } @@ -1928,6 +1931,12 @@ public API setExtensionsToAPI(String apiDefinition, API api) throws APIManagemen if (StringUtils.isNotBlank(authHeader)) { api.setAuthorizationHeader(authHeader); } + //Setup custom api key header for API + String apiKeyHeader = OASParserUtil.getApiKeyHeaderFromSwagger(extensions); + if (StringUtils.isNotBlank(apiKeyHeader)) { + api.setApiKeyHeader(apiKeyHeader); + } + //Setup application Security List applicationSecurity = OASParserUtil.getApplicationSecurityTypes(extensions); Boolean isOptional = OASParserUtil.getAppSecurityStateFromSwagger(extensions); diff --git a/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/definitions/OASParserUtil.java b/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/definitions/OASParserUtil.java index a2fbb8f7beed..a4da241041b1 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/definitions/OASParserUtil.java +++ b/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/definitions/OASParserUtil.java @@ -1649,6 +1649,18 @@ public static String getAuthorizationHeaderFromSwagger(Map exten return authorizationHeader == null ? null : authorizationHeader.toString(); } + /** + * This method returns extension of custom API key Header related to micro-gw + * + * @param extensions Map + * @return API key header header value as String + * @throws APIManagementException throws if an error occurred + */ + public static String getApiKeyHeaderFromSwagger(Map extensions) throws APIManagementException { + Object apiKeyHeader = extensions.get(APIConstants.X_WSO2_API_KEY_HEADER); + return apiKeyHeader == null ? null : apiKeyHeader.toString(); + } + /** * This method returns extension of custom authorization Header related to micro-gw * diff --git a/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/utils/APIUtil.java b/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/utils/APIUtil.java index 34f409d38ddf..81c2c209d578 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/utils/APIUtil.java +++ b/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/utils/APIUtil.java @@ -704,6 +704,7 @@ public static API getAPI(GovernanceArtifact artifact) api.setEnvironments(extractEnvironmentsForAPI(environments)); api.setCorsConfiguration(getCorsConfigurationFromArtifact(artifact)); api.setAuthorizationHeader(artifact.getAttribute(APIConstants.API_OVERVIEW_AUTHORIZATION_HEADER)); + api.setApiKeyHeader(artifact.getAttribute(APIConstants.API_OVERVIEW_API_KEY_HEADER)); api.setApiSecurity(artifact.getAttribute(APIConstants.API_OVERVIEW_API_SECURITY)); //get endpoint config string from artifact, parse it as a json and set the environment list configured with @@ -914,6 +915,7 @@ public static GenericArtifact createAPIArtifactContent(GenericArtifact artifact, artifact.setAttribute(APIConstants.API_PRODUCTION_THROTTLE_MAXTPS, api.getProductionMaxTps()); artifact.setAttribute(APIConstants.API_SANDBOX_THROTTLE_MAXTPS, api.getSandboxMaxTps()); artifact.setAttribute(APIConstants.API_OVERVIEW_AUTHORIZATION_HEADER, api.getAuthorizationHeader()); + artifact.setAttribute(APIConstants.API_OVERVIEW_API_KEY_HEADER, api.getApiKeyHeader()); artifact.setAttribute(APIConstants.API_OVERVIEW_API_SECURITY, api.getApiSecurity()); artifact.setAttribute(APIConstants.API_OVERVIEW_ENABLE_JSON_SCHEMA, Boolean.toString(api.isEnabledSchemaValidation())); @@ -1089,6 +1091,7 @@ public static GenericArtifact createAPIProductArtifactContent(GenericArtifact ar artifact.setAttribute(APIConstants.API_OVERVIEW_CORS_CONFIGURATION, APIUtil.getCorsConfigurationJsonFromDto(apiProduct.getCorsConfiguration())); artifact.setAttribute(APIConstants.API_OVERVIEW_AUTHORIZATION_HEADER, apiProduct.getAuthorizationHeader()); + artifact.setAttribute(APIConstants.API_OVERVIEW_API_KEY_HEADER, apiProduct.getApiKeyHeader()); artifact.setAttribute(APIConstants.API_OVERVIEW_API_SECURITY, apiProduct.getApiSecurity()); //Validate if the API has an unsupported context before setting it in the artifact @@ -9398,6 +9401,7 @@ public static API getReducedPublisherAPIForListing(GovernanceArtifact artifact, api.setImplementation(artifact.getAttribute(APIConstants.PROTOTYPE_OVERVIEW_IMPLEMENTATION)); api.setAuthorizationHeader(artifact.getAttribute(APIConstants.API_OVERVIEW_AUTHORIZATION_HEADER)); + api.setApiKeyHeader(artifact.getAttribute(APIConstants.API_OVERVIEW_API_KEY_HEADER)); api.setApiSecurity(artifact.getAttribute(APIConstants.API_OVERVIEW_API_SECURITY)); } catch (GovernanceException e) { diff --git a/components/apimgt/org.wso2.carbon.apimgt.internal.service/pom.xml b/components/apimgt/org.wso2.carbon.apimgt.internal.service/pom.xml index 6324a137f8fa..8ea05be5cc5d 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.internal.service/pom.xml +++ b/components/apimgt/org.wso2.carbon.apimgt.internal.service/pom.xml @@ -20,7 +20,7 @@ org.wso2.carbon.apimgt apimgt - 9.28.169-SNAPSHOT + 9.28.172-SNAPSHOT ../pom.xml diff --git a/components/apimgt/org.wso2.carbon.apimgt.jms.listener/pom.xml b/components/apimgt/org.wso2.carbon.apimgt.jms.listener/pom.xml index 71b3a73c1cb5..63f318917629 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.jms.listener/pom.xml +++ b/components/apimgt/org.wso2.carbon.apimgt.jms.listener/pom.xml @@ -4,7 +4,7 @@ org.wso2.carbon.apimgt apimgt - 9.28.169-SNAPSHOT + 9.28.172-SNAPSHOT ../pom.xml 4.0.0 diff --git a/components/apimgt/org.wso2.carbon.apimgt.keymgt.client/pom.xml b/components/apimgt/org.wso2.carbon.apimgt.keymgt.client/pom.xml index 1b375b7ebff8..4f614e86c065 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.keymgt.client/pom.xml +++ b/components/apimgt/org.wso2.carbon.apimgt.keymgt.client/pom.xml @@ -16,7 +16,7 @@ org.wso2.carbon.apimgt apimgt - 9.28.169-SNAPSHOT + 9.28.172-SNAPSHOT ../pom.xml diff --git a/components/apimgt/org.wso2.carbon.apimgt.keymgt/pom.xml b/components/apimgt/org.wso2.carbon.apimgt.keymgt/pom.xml index e1055f54af4c..700dcf55c1e4 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.keymgt/pom.xml +++ b/components/apimgt/org.wso2.carbon.apimgt.keymgt/pom.xml @@ -16,7 +16,7 @@ org.wso2.carbon.apimgt apimgt - 9.28.169-SNAPSHOT + 9.28.172-SNAPSHOT ../pom.xml diff --git a/components/apimgt/org.wso2.carbon.apimgt.notification/pom.xml b/components/apimgt/org.wso2.carbon.apimgt.notification/pom.xml index a1dce50ce228..bd2cacd45157 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.notification/pom.xml +++ b/components/apimgt/org.wso2.carbon.apimgt.notification/pom.xml @@ -19,7 +19,7 @@ apimgt org.wso2.carbon.apimgt - 9.28.169-SNAPSHOT + 9.28.172-SNAPSHOT org.wso2.carbon.apimgt.notification 4.0.0 diff --git a/components/apimgt/org.wso2.carbon.apimgt.output.adapter.http/pom.xml b/components/apimgt/org.wso2.carbon.apimgt.output.adapter.http/pom.xml index 8a6030773713..b03f0bcf186c 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.output.adapter.http/pom.xml +++ b/components/apimgt/org.wso2.carbon.apimgt.output.adapter.http/pom.xml @@ -21,7 +21,7 @@ org.wso2.carbon.apimgt apimgt - 9.28.169-SNAPSHOT + 9.28.172-SNAPSHOT ../pom.xml diff --git a/components/apimgt/org.wso2.carbon.apimgt.persistence/pom.xml b/components/apimgt/org.wso2.carbon.apimgt.persistence/pom.xml index ab2363bac1ba..25cc2b334f75 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.persistence/pom.xml +++ b/components/apimgt/org.wso2.carbon.apimgt.persistence/pom.xml @@ -3,7 +3,7 @@ apimgt org.wso2.carbon.apimgt - 9.28.169-SNAPSHOT + 9.28.172-SNAPSHOT ../pom.xml 4.0.0 diff --git a/components/apimgt/org.wso2.carbon.apimgt.persistence/src/main/java/org/wso2/carbon/apimgt/persistence/APIConstants.java b/components/apimgt/org.wso2.carbon.apimgt.persistence/src/main/java/org/wso2/carbon/apimgt/persistence/APIConstants.java index f8f9663d8af4..3acfce4d1ed3 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.persistence/src/main/java/org/wso2/carbon/apimgt/persistence/APIConstants.java +++ b/components/apimgt/org.wso2.carbon.apimgt.persistence/src/main/java/org/wso2/carbon/apimgt/persistence/APIConstants.java @@ -82,6 +82,7 @@ public final class APIConstants { public static final String API_OVERVIEW_OUTSEQUENCE = "overview_outSequence"; public static final String API_OVERVIEW_FAULTSEQUENCE = "overview_faultSequence"; public static final String API_OVERVIEW_AUTHORIZATION_HEADER = "overview_authorizationHeader"; + public static final String API_OVERVIEW_API_KEY_HEADER = "overview_apiKeyHeader"; public static final String API_OVERVIEW_API_SECURITY = "overview_apiSecurity"; public static final String API_OVERVIEW_RESPONSE_CACHING = "overview_responseCaching"; public static final String API_OVERVIEW_CACHE_TIMEOUT = "overview_cacheTimeout"; diff --git a/components/apimgt/org.wso2.carbon.apimgt.persistence/src/main/java/org/wso2/carbon/apimgt/persistence/dto/DevPortalAPI.java b/components/apimgt/org.wso2.carbon.apimgt.persistence/src/main/java/org/wso2/carbon/apimgt/persistence/dto/DevPortalAPI.java index 5c9171665517..956ab6313028 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.persistence/src/main/java/org/wso2/carbon/apimgt/persistence/dto/DevPortalAPI.java +++ b/components/apimgt/org.wso2.carbon.apimgt.persistence/src/main/java/org/wso2/carbon/apimgt/persistence/dto/DevPortalAPI.java @@ -46,6 +46,7 @@ public class DevPortalAPI extends DevPortalAPIInfo { private String subscriptionAvailability; // need to decide isSubscriptionAvailable private String subscriptionAvailableOrgs; // (subscriptionAvailableTenants): need to decide the value of "isSubscriptionAvailable" private String authorizationHeader; + private String apiKeyHeader; private List securityScheme = new ArrayList<>(); private Set environments; private Set apiCategories; @@ -221,6 +222,14 @@ public String getAuthorizationHeader() { return authorizationHeader; } + public void setApiKeyHeader(String apiKeyHeader) { + this.apiKeyHeader = apiKeyHeader; + } + + public String getApiKeyHeader() { + return apiKeyHeader; + } + public void setAuthorizationHeader(String authorizationHeader) { this.authorizationHeader = authorizationHeader; } diff --git a/components/apimgt/org.wso2.carbon.apimgt.persistence/src/main/java/org/wso2/carbon/apimgt/persistence/dto/PublisherAPI.java b/components/apimgt/org.wso2.carbon.apimgt.persistence/src/main/java/org/wso2/carbon/apimgt/persistence/dto/PublisherAPI.java index 10d1108ae8a5..0480be1104f3 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.persistence/src/main/java/org/wso2/carbon/apimgt/persistence/dto/PublisherAPI.java +++ b/components/apimgt/org.wso2.carbon.apimgt.persistence/src/main/java/org/wso2/carbon/apimgt/persistence/dto/PublisherAPI.java @@ -65,6 +65,7 @@ public class PublisherAPI extends PublisherAPIInfo { private String productionMaxTps; private String sandboxMaxTps; private String authorizationHeader; + private String apiKeyHeader; private String apiSecurity; // ?check whether same to private List securityScheme = new ArrayList<>(); private boolean enableSchemaValidation; private boolean enableSubscriberVerification; @@ -348,6 +349,14 @@ public void setAuthorizationHeader(String authorizationHeader) { this.authorizationHeader = authorizationHeader; } + public String getApiKeyHeader() { + return apiKeyHeader; + } + + public void setApiKeyHeader(String apiKeyHeader) { + this.apiKeyHeader = apiKeyHeader; + } + public String getApiSecurity() { return apiSecurity; } @@ -621,6 +630,7 @@ public String toString() { + ", subscriptionAvailability=" + subscriptionAvailability + ", subscriptionAvailableOrgs=" + subscriptionAvailableOrgs + ", implementation=" + implementation + ", productionMaxTps=" + productionMaxTps + ", sandboxMaxTps=" + sandboxMaxTps + ", authorizationHeader=" + authorizationHeader + + ", apiKeyHeader=" + apiKeyHeader + ", apiSecurity=" + apiSecurity + ", enableSchemaValidation=" + enableSchemaValidation + ", enableSubscriberVerification=" + enableSubscriberVerification + ", enableStore=" + enableStore + ", testKey=" + testKey + ", contextTemplate=" + contextTemplate + ", availableTierNames=" diff --git a/components/apimgt/org.wso2.carbon.apimgt.persistence/src/main/java/org/wso2/carbon/apimgt/persistence/dto/PublisherAPIProduct.java b/components/apimgt/org.wso2.carbon.apimgt.persistence/src/main/java/org/wso2/carbon/apimgt/persistence/dto/PublisherAPIProduct.java index be3e58c36cba..b3abb97607c9 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.persistence/src/main/java/org/wso2/carbon/apimgt/persistence/dto/PublisherAPIProduct.java +++ b/components/apimgt/org.wso2.carbon.apimgt.persistence/src/main/java/org/wso2/carbon/apimgt/persistence/dto/PublisherAPIProduct.java @@ -46,7 +46,8 @@ public class PublisherAPIProduct extends PublisherAPIProductInfo { private Set environments; private String transports; private CORSConfiguration corsConfiguration; - private String authorizationHeader; + private String authorizationHeader; + private String apiKeyHeader; private String contextTemplate; private boolean enableSchemaValidation; private boolean isMonetizationEnabled; @@ -161,6 +162,15 @@ public String getAuthorizationHeader() { public void setAuthorizationHeader(String authorizationHeader) { this.authorizationHeader = authorizationHeader; } + + public String getApiKeyHeader() { + return apiKeyHeader; + } + + public void setApiKeyHeader(String apiKeyHeader) { + this.apiKeyHeader = apiKeyHeader; + } + public String getContextTemplate() { return contextTemplate; } diff --git a/components/apimgt/org.wso2.carbon.apimgt.persistence/src/main/java/org/wso2/carbon/apimgt/persistence/utils/RegistryPersistenceUtil.java b/components/apimgt/org.wso2.carbon.apimgt.persistence/src/main/java/org/wso2/carbon/apimgt/persistence/utils/RegistryPersistenceUtil.java index bbce559c444f..87c63b4a38b0 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.persistence/src/main/java/org/wso2/carbon/apimgt/persistence/utils/RegistryPersistenceUtil.java +++ b/components/apimgt/org.wso2.carbon.apimgt.persistence/src/main/java/org/wso2/carbon/apimgt/persistence/utils/RegistryPersistenceUtil.java @@ -174,6 +174,7 @@ public static GenericArtifact createAPIArtifactContent(GenericArtifact artifact, artifact.setAttribute(APIConstants.API_PRODUCTION_THROTTLE_MAXTPS, api.getProductionMaxTps()); artifact.setAttribute(APIConstants.API_SANDBOX_THROTTLE_MAXTPS, api.getSandboxMaxTps()); artifact.setAttribute(APIConstants.API_OVERVIEW_AUTHORIZATION_HEADER, api.getAuthorizationHeader()); + artifact.setAttribute(APIConstants.API_OVERVIEW_API_KEY_HEADER, api.getApiKeyHeader()); artifact.setAttribute(APIConstants.API_OVERVIEW_API_SECURITY, api.getApiSecurity()); artifact.setAttribute(APIConstants.API_OVERVIEW_ENABLE_JSON_SCHEMA, Boolean.toString(api.isEnableSchemaValidation())); @@ -680,6 +681,7 @@ public static API getAPI(GovernanceArtifact artifact, Registry registry) api.setCorsConfiguration(getCorsConfigurationFromArtifact(artifact)); api.setWebsubSubscriptionConfiguration(getWebsubSubscriptionConfigurationFromArtifact(artifact)); api.setAuthorizationHeader(artifact.getAttribute(APIConstants.API_OVERVIEW_AUTHORIZATION_HEADER)); + api.setApiKeyHeader(artifact.getAttribute(APIConstants.API_OVERVIEW_API_KEY_HEADER)); api.setApiSecurity(artifact.getAttribute(APIConstants.API_OVERVIEW_API_SECURITY)); //set data and status related to monetization api.setMonetizationEnabled(Boolean.parseBoolean(artifact.getAttribute @@ -1469,6 +1471,7 @@ public static GenericArtifact createAPIProductArtifactContent(GenericArtifact ar artifact.setAttribute(APIConstants.API_OVERVIEW_CORS_CONFIGURATION, getCorsConfigurationJsonFromDto(apiProduct.getCorsConfiguration())); artifact.setAttribute(APIConstants.API_OVERVIEW_AUTHORIZATION_HEADER, apiProduct.getAuthorizationHeader()); + artifact.setAttribute(APIConstants.API_OVERVIEW_API_KEY_HEADER, apiProduct.getApiKeyHeader()); artifact.setAttribute(APIConstants.API_OVERVIEW_API_SECURITY, apiProduct.getApiSecurity()); //Validate if the API has an unsupported context before setting it in the artifact @@ -1568,6 +1571,7 @@ public static APIProduct getAPIProduct(GovernanceArtifact artifact, Registry reg apiProduct.setTransports(artifact.getAttribute(APIConstants.API_OVERVIEW_TRANSPORTS)); apiProduct.setApiSecurity(artifact.getAttribute(APIConstants.API_OVERVIEW_API_SECURITY)); apiProduct.setAuthorizationHeader(artifact.getAttribute(APIConstants.API_OVERVIEW_AUTHORIZATION_HEADER)); + apiProduct.setApiKeyHeader(artifact.getAttribute(APIConstants.API_OVERVIEW_API_KEY_HEADER)); apiProduct.setCorsConfiguration(getCorsConfigurationFromArtifact(artifact)); apiProduct.setCreatedTime(registry.get(artifactPath).getCreatedTime()); apiProduct.setLastUpdated(registry.get(artifactPath).getLastModified()); diff --git a/components/apimgt/org.wso2.carbon.apimgt.rest.api.admin.v1/pom.xml b/components/apimgt/org.wso2.carbon.apimgt.rest.api.admin.v1/pom.xml index 9132a23146fa..14a3666b68fc 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.rest.api.admin.v1/pom.xml +++ b/components/apimgt/org.wso2.carbon.apimgt.rest.api.admin.v1/pom.xml @@ -20,7 +20,7 @@ org.wso2.carbon.apimgt apimgt - 9.28.169-SNAPSHOT + 9.28.172-SNAPSHOT ../pom.xml diff --git a/components/apimgt/org.wso2.carbon.apimgt.rest.api.common/pom.xml b/components/apimgt/org.wso2.carbon.apimgt.rest.api.common/pom.xml index dd5dcb19220a..87482e53fca7 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.rest.api.common/pom.xml +++ b/components/apimgt/org.wso2.carbon.apimgt.rest.api.common/pom.xml @@ -17,7 +17,7 @@ org.wso2.carbon.apimgt apimgt - 9.28.169-SNAPSHOT + 9.28.172-SNAPSHOT ../pom.xml diff --git a/components/apimgt/org.wso2.carbon.apimgt.rest.api.dcr/pom.xml b/components/apimgt/org.wso2.carbon.apimgt.rest.api.dcr/pom.xml index 4d13d4cbfbbe..ffcc7a33a443 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.rest.api.dcr/pom.xml +++ b/components/apimgt/org.wso2.carbon.apimgt.rest.api.dcr/pom.xml @@ -21,7 +21,7 @@ org.wso2.carbon.apimgt apimgt - 9.28.169-SNAPSHOT + 9.28.172-SNAPSHOT ../pom.xml diff --git a/components/apimgt/org.wso2.carbon.apimgt.rest.api.devops/pom.xml b/components/apimgt/org.wso2.carbon.apimgt.rest.api.devops/pom.xml index 78a00cec0d2a..8e16dfc08b9b 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.rest.api.devops/pom.xml +++ b/components/apimgt/org.wso2.carbon.apimgt.rest.api.devops/pom.xml @@ -21,7 +21,7 @@ org.wso2.carbon.apimgt apimgt - 9.28.169-SNAPSHOT + 9.28.172-SNAPSHOT ../pom.xml diff --git a/components/apimgt/org.wso2.carbon.apimgt.rest.api.gateway/pom.xml b/components/apimgt/org.wso2.carbon.apimgt.rest.api.gateway/pom.xml index aaeb712662f8..c0c8d9b3b6aa 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.rest.api.gateway/pom.xml +++ b/components/apimgt/org.wso2.carbon.apimgt.rest.api.gateway/pom.xml @@ -20,7 +20,7 @@ org.wso2.carbon.apimgt apimgt - 9.28.169-SNAPSHOT + 9.28.172-SNAPSHOT ../pom.xml diff --git a/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1.common/pom.xml b/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1.common/pom.xml index c26540fd24ac..d02d4b42be9e 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1.common/pom.xml +++ b/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1.common/pom.xml @@ -20,7 +20,7 @@ org.wso2.carbon.apimgt apimgt - 9.28.169-SNAPSHOT + 9.28.172-SNAPSHOT ../pom.xml diff --git a/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1.common/src/gen/java/org/wso2/carbon/apimgt/rest/api/publisher/v1/dto/APIDTO.java b/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1.common/src/gen/java/org/wso2/carbon/apimgt/rest/api/publisher/v1/dto/APIDTO.java index 5b0c60bf330d..51e5add39d43 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1.common/src/gen/java/org/wso2/carbon/apimgt/rest/api/publisher/v1/dto/APIDTO.java +++ b/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1.common/src/gen/java/org/wso2/carbon/apimgt/rest/api/publisher/v1/dto/APIDTO.java @@ -144,6 +144,7 @@ public static AudienceEnum fromValue(String v) { @Scope(name = "apim:api_manage", description="", value ="") private String apiThrottlingPolicy = null; private String authorizationHeader = null; + private String apiKeyHeader = null; private List securityScheme = new ArrayList(); private APIMaxTpsDTO maxTps = null; @@ -757,6 +758,24 @@ public void setAuthorizationHeader(String authorizationHeader) { this.authorizationHeader = authorizationHeader; } + /** + * Name of the API key header used for invoking the API. If it is not set, default value `apiKey` will be used. + **/ + public APIDTO apiKeyHeader(String apiKeyHeader) { + this.apiKeyHeader = apiKeyHeader; + return this; + } + + + @ApiModelProperty(example = "apiKey", value = "Name of the API key header used for invoking the API. If it is not set, default value `apiKey` will be used. ") + @JsonProperty("apiKeyHeader") + @Pattern(regexp="(^[^~!@#;:%^*()+={}|\\\\<>\"',&$\\s+]*$)") public String getApiKeyHeader() { + return apiKeyHeader; + } + public void setApiKeyHeader(String apiKeyHeader) { + this.apiKeyHeader = apiKeyHeader; + } + /** * Types of API security, the current API secured with. It can be either OAuth2 or mutual SSL or both. If it is not set OAuth2 will be set as the security for the current API. **/ @@ -1381,6 +1400,7 @@ public boolean equals(java.lang.Object o) { Objects.equals(policies, API.policies) && Objects.equals(apiThrottlingPolicy, API.apiThrottlingPolicy) && Objects.equals(authorizationHeader, API.authorizationHeader) && + Objects.equals(apiKeyHeader, API.apiKeyHeader) && Objects.equals(securityScheme, API.securityScheme) && Objects.equals(maxTps, API.maxTps) && Objects.equals(visibility, API.visibility) && @@ -1418,7 +1438,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(id, name, description, context, version, provider, lifeCycleStatus, wsdlInfo, wsdlUrl, responseCachingEnabled, cacheTimeout, hasThumbnail, isDefaultVersion, isRevision, revisionedApiId, revisionId, enableSchemaValidation, enableSubscriberVerification, type, audience, transport, tags, policies, apiThrottlingPolicy, authorizationHeader, securityScheme, maxTps, visibility, visibleRoles, visibleTenants, mediationPolicies, apiPolicies, subscriptionAvailability, subscriptionAvailableTenants, additionalProperties, additionalPropertiesMap, monetization, accessControl, accessControlRoles, businessInformation, corsConfiguration, websubSubscriptionConfiguration, workflowStatus, createdTime, lastUpdatedTimestamp, lastUpdatedTime, endpointConfig, endpointImplementationType, scopes, operations, threatProtectionPolicies, categories, keyManagers, serviceInfo, advertiseInfo, gatewayVendor, gatewayType, asyncTransportProtocols); + return Objects.hash(id, name, description, context, version, provider, lifeCycleStatus, wsdlInfo, wsdlUrl, responseCachingEnabled, cacheTimeout, hasThumbnail, isDefaultVersion, isRevision, revisionedApiId, revisionId, enableSchemaValidation, enableSubscriberVerification, type, audience, transport, tags, policies, apiThrottlingPolicy, authorizationHeader, apiKeyHeader, securityScheme, maxTps, visibility, visibleRoles, visibleTenants, mediationPolicies, apiPolicies, subscriptionAvailability, subscriptionAvailableTenants, additionalProperties, additionalPropertiesMap, monetization, accessControl, accessControlRoles, businessInformation, corsConfiguration, websubSubscriptionConfiguration, workflowStatus, createdTime, lastUpdatedTimestamp, lastUpdatedTime, endpointConfig, endpointImplementationType, scopes, operations, threatProtectionPolicies, categories, keyManagers, serviceInfo, advertiseInfo, gatewayVendor, gatewayType, asyncTransportProtocols); } @Override @@ -1451,6 +1471,7 @@ public String toString() { sb.append(" policies: ").append(toIndentedString(policies)).append("\n"); sb.append(" apiThrottlingPolicy: ").append(toIndentedString(apiThrottlingPolicy)).append("\n"); sb.append(" authorizationHeader: ").append(toIndentedString(authorizationHeader)).append("\n"); + sb.append(" apiKeyHeader: ").append(toIndentedString(apiKeyHeader)).append("\n"); sb.append(" securityScheme: ").append(toIndentedString(securityScheme)).append("\n"); sb.append(" maxTps: ").append(toIndentedString(maxTps)).append("\n"); sb.append(" visibility: ").append(toIndentedString(visibility)).append("\n"); diff --git a/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1.common/src/gen/java/org/wso2/carbon/apimgt/rest/api/publisher/v1/dto/APIProductDTO.java b/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1.common/src/gen/java/org/wso2/carbon/apimgt/rest/api/publisher/v1/dto/APIProductDTO.java index ed184c00bd84..5ba4ac8b52d5 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1.common/src/gen/java/org/wso2/carbon/apimgt/rest/api/publisher/v1/dto/APIProductDTO.java +++ b/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1.common/src/gen/java/org/wso2/carbon/apimgt/rest/api/publisher/v1/dto/APIProductDTO.java @@ -149,6 +149,7 @@ public static ApiTypeEnum fromValue(String v) { private List policies = new ArrayList(); private String apiThrottlingPolicy = null; private String authorizationHeader = null; + private String apiKeyHeader = null; private List securityScheme = new ArrayList(); @XmlType(name="SubscriptionAvailabilityEnum") @@ -623,6 +624,24 @@ public void setAuthorizationHeader(String authorizationHeader) { this.authorizationHeader = authorizationHeader; } + /** + * Name of the API key header used for invoking the API. If it is not set, default value `apiKey` will be used. + **/ + public APIProductDTO apiKeyHeader(String apiKeyHeader) { + this.apiKeyHeader = apiKeyHeader; + return this; + } + + + @ApiModelProperty(example = "ApiKey", value = "Name of the API key header used for invoking the API. If it is not set, default value `apiKey` will be used. ") + @JsonProperty("apiKeyHeader") + public String getApiKeyHeader() { + return apiKeyHeader; + } + public void setApiKeyHeader(String apiKeyHeader) { + this.apiKeyHeader = apiKeyHeader; + } + /** * Types of API security, the current API secured with. It can be either OAuth2 or mutual SSL or both. If it is not set OAuth2 will be set as the security for the current API. **/ @@ -941,6 +960,7 @@ public boolean equals(java.lang.Object o) { Objects.equals(policies, apIProduct.policies) && Objects.equals(apiThrottlingPolicy, apIProduct.apiThrottlingPolicy) && Objects.equals(authorizationHeader, apIProduct.authorizationHeader) && + Objects.equals(apiKeyHeader, apIProduct.apiKeyHeader) && Objects.equals(securityScheme, apIProduct.securityScheme) && Objects.equals(subscriptionAvailability, apIProduct.subscriptionAvailability) && Objects.equals(subscriptionAvailableTenants, apIProduct.subscriptionAvailableTenants) && @@ -961,7 +981,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(id, name, context, description, provider, hasThumbnail, state, enableSchemaValidation, isRevision, revisionedApiProductId, revisionId, responseCachingEnabled, cacheTimeout, visibility, visibleRoles, visibleTenants, accessControl, accessControlRoles, apiType, transport, tags, policies, apiThrottlingPolicy, authorizationHeader, securityScheme, subscriptionAvailability, subscriptionAvailableTenants, additionalProperties, additionalPropertiesMap, monetization, businessInformation, corsConfiguration, createdTime, lastUpdatedTime, lastUpdatedTimestamp, gatewayVendor, apis, scopes, categories, workflowStatus); + return Objects.hash(id, name, context, description, provider, hasThumbnail, state, enableSchemaValidation, isRevision, revisionedApiProductId, revisionId, responseCachingEnabled, cacheTimeout, visibility, visibleRoles, visibleTenants, accessControl, accessControlRoles, apiType, transport, tags, policies, apiThrottlingPolicy, authorizationHeader, apiKeyHeader, securityScheme, subscriptionAvailability, subscriptionAvailableTenants, additionalProperties, additionalPropertiesMap, monetization, businessInformation, corsConfiguration, createdTime, lastUpdatedTime, lastUpdatedTimestamp, gatewayVendor, apis, scopes, categories, workflowStatus); } @Override @@ -993,6 +1013,7 @@ public String toString() { sb.append(" policies: ").append(toIndentedString(policies)).append("\n"); sb.append(" apiThrottlingPolicy: ").append(toIndentedString(apiThrottlingPolicy)).append("\n"); sb.append(" authorizationHeader: ").append(toIndentedString(authorizationHeader)).append("\n"); + sb.append(" apiKeyHeader: ").append(toIndentedString(apiKeyHeader)).append("\n"); sb.append(" securityScheme: ").append(toIndentedString(securityScheme)).append("\n"); sb.append(" subscriptionAvailability: ").append(toIndentedString(subscriptionAvailability)).append("\n"); sb.append(" subscriptionAvailableTenants: ").append(toIndentedString(subscriptionAvailableTenants)).append("\n"); diff --git a/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1.common/src/main/java/org/wso2/carbon/apimgt/rest/api/publisher/v1/common/TemplateBuilderUtil.java b/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1.common/src/main/java/org/wso2/carbon/apimgt/rest/api/publisher/v1/common/TemplateBuilderUtil.java index 13339248b7c2..563be023fa08 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1.common/src/main/java/org/wso2/carbon/apimgt/rest/api/publisher/v1/common/TemplateBuilderUtil.java +++ b/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1.common/src/main/java/org/wso2/carbon/apimgt/rest/api/publisher/v1/common/TemplateBuilderUtil.java @@ -121,6 +121,16 @@ public static APITemplateBuilderImpl getAPITemplateBuilder(API api, String tenan corsProperties.put(APIConstants.AUTHORIZATION_HEADER, authorizationHeader); } + String apiKeyHeader; + if (!StringUtils.isBlank(api.getApiKeyHeader())) { + apiKeyHeader = api.getApiKeyHeader(); + } else { + apiKeyHeader = APIConstants.API_KEY_HEADER_DEFAULT; + } + if (!StringUtils.isBlank(apiKeyHeader)) { + corsProperties.put(APIConstants.API_KEY_HEADER, apiKeyHeader); + } + if (!(APIConstants.APITransportType.WS.toString().equals(api.getType()))) { if (api.getCorsConfiguration() != null && api.getCorsConfiguration().isCorsConfigurationEnabled()) { CORSConfiguration corsConfiguration = api.getCorsConfiguration(); @@ -184,6 +194,9 @@ public static APITemplateBuilderImpl getAPITemplateBuilder(API api, String tenan if (!StringUtils.isBlank(authorizationHeader)) { authProperties.put(APIConstants.AUTHORIZATION_HEADER, authorizationHeader); } + if (!StringUtils.isBlank(apiKeyHeader)) { + authProperties.put(APIConstants.API_KEY_HEADER, apiKeyHeader); + } String apiSecurity = api.getApiSecurity(); String apiLevelPolicy = api.getApiLevelPolicy(); authProperties.put(APIConstants.API_SECURITY, apiSecurity); @@ -296,6 +309,16 @@ public static APITemplateBuilderImpl getAPITemplateBuilder(APIProduct apiProduct corsProperties.put(APIConstants.AUTHORIZATION_HEADER, authorizationHeader); } + String apiKeyHeader; + if (!StringUtils.isBlank(apiProduct.getApiKeyHeader())) { + apiKeyHeader = apiProduct.getApiKeyHeader(); + } else { + apiKeyHeader = APIConstants.API_KEY_HEADER_DEFAULT; + } + if (!StringUtils.isBlank(apiKeyHeader)) { + corsProperties.put(APIConstants.API_KEY_HEADER, apiKeyHeader); + } + if (apiProduct.getCorsConfiguration() != null && apiProduct.getCorsConfiguration().isCorsConfigurationEnabled()) { CORSConfiguration corsConfiguration = apiProduct.getCorsConfiguration(); @@ -356,6 +379,9 @@ public static APITemplateBuilderImpl getAPITemplateBuilder(APIProduct apiProduct if (!StringUtils.isBlank(authorizationHeader)) { authProperties.put(APIConstants.AUTHORIZATION_HEADER, authorizationHeader); } + if (!StringUtils.isBlank(apiKeyHeader)) { + authProperties.put(APIConstants.API_KEY_HEADER, apiKeyHeader); + } String apiSecurity = apiProduct.getApiSecurity(); String apiLevelPolicy = apiProduct.getProductLevelPolicy(); authProperties.put(APIConstants.API_SECURITY, apiSecurity); diff --git a/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1.common/src/main/java/org/wso2/carbon/apimgt/rest/api/publisher/v1/common/mappings/APIMappingUtil.java b/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1.common/src/main/java/org/wso2/carbon/apimgt/rest/api/publisher/v1/common/mappings/APIMappingUtil.java index 042df703e82b..8db46a61f44c 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1.common/src/main/java/org/wso2/carbon/apimgt/rest/api/publisher/v1/common/mappings/APIMappingUtil.java +++ b/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1.common/src/main/java/org/wso2/carbon/apimgt/rest/api/publisher/v1/common/mappings/APIMappingUtil.java @@ -370,6 +370,10 @@ public static API fromDTOtoAPI(APIDTO dto, String provider) throws APIManagement model.setCorsConfiguration(corsConfiguration); setMaxTpsFromApiDTOToModel(dto, model); model.setAuthorizationHeader(dto.getAuthorizationHeader()); + model.setApiKeyHeader(dto.getApiKeyHeader()); + if (model.getApiKeyHeader() == null) { + model.setApiKeyHeader(APIConstants.API_KEY_HEADER_DEFAULT); + } model.setApiSecurity(getSecurityScheme(dto.getSecurityScheme())); if (dto.getType().toString().equals(APIConstants.API_TYPE_WEBSUB)) { @@ -1342,6 +1346,7 @@ public static APIDTO fromAPItoDTO(API model, boolean preserveCredentials, setMaxTpsFromModelToApiDTO(model, dto); dto.setAuthorizationHeader(model.getAuthorizationHeader()); + dto.setApiKeyHeader(model.getApiKeyHeader()); if (model.getApiSecurity() != null) { dto.setSecurityScheme(Arrays.asList(model.getApiSecurity().split(","))); } @@ -2289,6 +2294,7 @@ public static APIProductDTO fromAPIProducttoDTO(APIProduct product) throws APIMa productDto.setDescription(product.getDescription()); productDto.setApiType(APIProductDTO.ApiTypeEnum.fromValue(APIConstants.AuditLogConstants.API_PRODUCT)); productDto.setAuthorizationHeader(product.getAuthorizationHeader()); + productDto.setApiKeyHeader(product.getApiKeyHeader()); productDto.setState(product.getState()); if (product.getGatewayVendor() == null) { productDto.setGatewayVendor(APIConstants.WSO2_GATEWAY_ENVIRONMENT); @@ -2667,6 +2673,10 @@ public static APIProduct fromDTOtoAPIProduct(APIProductDTO dto, String provider) product.setProductResources(productResources); product.setApiSecurity(getSecurityScheme(dto.getSecurityScheme())); product.setAuthorizationHeader(dto.getAuthorizationHeader()); + product.setApiKeyHeader(dto.getApiKeyHeader()); + if (product.getApiKeyHeader() == null) { + product.setApiKeyHeader(APIConstants.API_KEY_HEADER_DEFAULT); + } //attach api categories to API model setAPICategoriesToModel(dto, product, provider); diff --git a/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1.common/src/main/java/org/wso2/carbon/apimgt/rest/api/publisher/v1/common/mappings/ImportUtils.java b/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1.common/src/main/java/org/wso2/carbon/apimgt/rest/api/publisher/v1/common/mappings/ImportUtils.java index 6abf20e4f206..572cb7b3f45b 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1.common/src/main/java/org/wso2/carbon/apimgt/rest/api/publisher/v1/common/mappings/ImportUtils.java +++ b/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1.common/src/main/java/org/wso2/carbon/apimgt/rest/api/publisher/v1/common/mappings/ImportUtils.java @@ -631,6 +631,11 @@ public static List findOrImportPolicy(List pol OperationPolicyDefinition synapseDefinition = APIUtil.getOperationPolicyDefinitionFromFile(policyDirectory, policyFileName, APIConstants.SYNAPSE_POLICY_DEFINITION_EXTENSION); + // Synapse definition files can be either in .j2 or .xml format + if (synapseDefinition == null) { + synapseDefinition = APIUtil.getOperationPolicyDefinitionFromFile(policyDirectory, + policyFileName, APIConstants.SYNAPSE_POLICY_DEFINITION_EXTENSION_XML); + } if (synapseDefinition != null) { synapseDefinition.setGatewayType(OperationPolicyDefinition.GatewayType.Synapse); operationPolicyData.setSynapsePolicyDefinition(synapseDefinition); diff --git a/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1.common/src/main/java/org/wso2/carbon/apimgt/rest/api/publisher/v1/common/mappings/PublisherCommonUtils.java b/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1.common/src/main/java/org/wso2/carbon/apimgt/rest/api/publisher/v1/common/mappings/PublisherCommonUtils.java index d2bcd7bf0b68..4bb028a323da 100755 --- a/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1.common/src/main/java/org/wso2/carbon/apimgt/rest/api/publisher/v1/common/mappings/PublisherCommonUtils.java +++ b/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1.common/src/main/java/org/wso2/carbon/apimgt/rest/api/publisher/v1/common/mappings/PublisherCommonUtils.java @@ -1150,6 +1150,9 @@ public static API prepareToCreateAPIByDTO(APIDTO body, APIProvider apiProvider, if (body.getAuthorizationHeader() == null) { body.setAuthorizationHeader(APIConstants.AUTHORIZATION_HEADER_DEFAULT); } + if (body.getApiKeyHeader() == null) { + body.setApiKeyHeader(APIConstants.API_KEY_HEADER_DEFAULT); + } if (body.getVisibility() == APIDTO.VisibilityEnum.RESTRICTED && body.getVisibleRoles().isEmpty()) { throw new APIManagementException( @@ -1765,6 +1768,10 @@ public static APIProduct addAPIProductWithGeneratedSwaggerDefinition(APIProductD apiProductDTO.setAuthorizationHeader(APIConstants.AUTHORIZATION_HEADER_DEFAULT); } + if (apiProductDTO.getApiKeyHeader() == null) { + apiProductDTO.setApiKeyHeader(APIConstants.API_KEY_HEADER_DEFAULT); + } + //Remove the /{version} from the context. if (context.endsWith("/" + RestApiConstants.API_VERSION_PARAM)) { context = context.replace("/" + RestApiConstants.API_VERSION_PARAM, ""); diff --git a/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1/pom.xml b/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1/pom.xml index 28f5ca1a6bf1..0cd6115dc9b1 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1/pom.xml +++ b/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1/pom.xml @@ -20,7 +20,7 @@ org.wso2.carbon.apimgt apimgt - 9.28.169-SNAPSHOT + 9.28.172-SNAPSHOT ../pom.xml diff --git a/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1/src/main/resources/publisher-api.yaml b/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1/src/main/resources/publisher-api.yaml index c56ce5baed4e..eba45bd78a92 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1/src/main/resources/publisher-api.yaml +++ b/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1/src/main/resources/publisher-api.yaml @@ -8705,6 +8705,12 @@ components: Name of the Authorization header used for invoking the API. If it is not set, Authorization header name specified in tenant or system level will be used. example: Authorization + apiKeyHeader: + type: string + pattern: '(^[^~!@#;:%^*()+={}|\\<>"'',&$\s+]*$)' + description: | + Name of the API key header used for invoking the API. If it is not set, default value `apiKey` will be used. + example: apiKey securityScheme: type: array description: | @@ -9378,6 +9384,11 @@ components: Name of the Authorization header used for invoking the API. If it is not set, Authorization header name specified in tenant or system level will be used. example: Authorization + apiKeyHeader: + type: string + description: | + Name of the API key header used for invoking the API. If it is not set, default value `apiKey` will be used. + example: ApiKey securityScheme: type: array description: | diff --git a/components/apimgt/org.wso2.carbon.apimgt.rest.api.service.catalog/pom.xml b/components/apimgt/org.wso2.carbon.apimgt.rest.api.service.catalog/pom.xml index 7ad348a0d5c4..7fca9d99ddea 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.rest.api.service.catalog/pom.xml +++ b/components/apimgt/org.wso2.carbon.apimgt.rest.api.service.catalog/pom.xml @@ -20,7 +20,7 @@ org.wso2.carbon.apimgt apimgt - 9.28.169-SNAPSHOT + 9.28.172-SNAPSHOT ../pom.xml diff --git a/components/apimgt/org.wso2.carbon.apimgt.rest.api.store.v1/pom.xml b/components/apimgt/org.wso2.carbon.apimgt.rest.api.store.v1/pom.xml index 256d449cfa76..44f04375a2c3 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.rest.api.store.v1/pom.xml +++ b/components/apimgt/org.wso2.carbon.apimgt.rest.api.store.v1/pom.xml @@ -20,7 +20,7 @@ org.wso2.carbon.apimgt apimgt - 9.28.169-SNAPSHOT + 9.28.172-SNAPSHOT ../pom.xml diff --git a/components/apimgt/org.wso2.carbon.apimgt.rest.api.store.v1/src/gen/java/org/wso2/carbon/apimgt/rest/api/store/v1/dto/APIDTO.java b/components/apimgt/org.wso2.carbon.apimgt.rest.api.store.v1/src/gen/java/org/wso2/carbon/apimgt/rest/api/store/v1/dto/APIDTO.java index ea811e18e546..efc2092cf328 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.rest.api.store.v1/src/gen/java/org/wso2/carbon/apimgt/rest/api/store/v1/dto/APIDTO.java +++ b/components/apimgt/org.wso2.carbon.apimgt.rest.api.store.v1/src/gen/java/org/wso2/carbon/apimgt/rest/api/store/v1/dto/APIDTO.java @@ -44,6 +44,7 @@ public class APIDTO { private List transport = new ArrayList(); private List operations = new ArrayList(); private String authorizationHeader = null; + private String apiKeyHeader = null; private List securityScheme = new ArrayList(); private List tags = new ArrayList(); private List tiers = new ArrayList(); @@ -319,6 +320,24 @@ public void setAuthorizationHeader(String authorizationHeader) { this.authorizationHeader = authorizationHeader; } + /** + * Name of the API key header used for invoking the API. If it is not set, default value `apiKey` will be used. + **/ + public APIDTO apiKeyHeader(String apiKeyHeader) { + this.apiKeyHeader = apiKeyHeader; + return this; + } + + + @ApiModelProperty(example = "ApiKey", value = "Name of the API key header used for invoking the API. If it is not set, default value `apiKey` will be used. ") + @JsonProperty("apiKeyHeader") + public String getApiKeyHeader() { + return apiKeyHeader; + } + public void setApiKeyHeader(String apiKeyHeader) { + this.apiKeyHeader = apiKeyHeader; + } + /** * Types of API security, the current API secured with. It can be either OAuth2 or mutual SSL or both. If it is not set OAuth2 will be set as the security for the current API. **/ @@ -683,6 +702,7 @@ public boolean equals(java.lang.Object o) { Objects.equals(transport, API.transport) && Objects.equals(operations, API.operations) && Objects.equals(authorizationHeader, API.authorizationHeader) && + Objects.equals(apiKeyHeader, API.apiKeyHeader) && Objects.equals(securityScheme, API.securityScheme) && Objects.equals(tags, API.tags) && Objects.equals(tiers, API.tiers) && @@ -706,7 +726,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(id, name, description, context, version, provider, apiDefinition, wsdlUri, lifeCycleStatus, isDefaultVersion, type, transport, operations, authorizationHeader, securityScheme, tags, tiers, hasThumbnail, additionalProperties, monetization, endpointURLs, businessInformation, environmentList, scopes, avgRating, advertiseInfo, isSubscriptionAvailable, categories, keyManagers, createdTime, lastUpdatedTime, gatewayVendor, asyncTransportProtocols); + return Objects.hash(id, name, description, context, version, provider, apiDefinition, wsdlUri, lifeCycleStatus, isDefaultVersion, type, transport, operations, authorizationHeader, apiKeyHeader, securityScheme, tags, tiers, hasThumbnail, additionalProperties, monetization, endpointURLs, businessInformation, environmentList, scopes, avgRating, advertiseInfo, isSubscriptionAvailable, categories, keyManagers, createdTime, lastUpdatedTime, gatewayVendor, asyncTransportProtocols); } @Override @@ -728,6 +748,7 @@ public String toString() { sb.append(" transport: ").append(toIndentedString(transport)).append("\n"); sb.append(" operations: ").append(toIndentedString(operations)).append("\n"); sb.append(" authorizationHeader: ").append(toIndentedString(authorizationHeader)).append("\n"); + sb.append(" apiKeyHeader: ").append(toIndentedString(apiKeyHeader)).append("\n"); sb.append(" securityScheme: ").append(toIndentedString(securityScheme)).append("\n"); sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); sb.append(" tiers: ").append(toIndentedString(tiers)).append("\n"); diff --git a/components/apimgt/org.wso2.carbon.apimgt.rest.api.store.v1/src/main/java/org/wso2/carbon/apimgt/rest/api/store/v1/mappings/APIMappingUtil.java b/components/apimgt/org.wso2.carbon.apimgt.rest.api.store.v1/src/main/java/org/wso2/carbon/apimgt/rest/api/store/v1/mappings/APIMappingUtil.java index 05319e3f9e55..17d314709c6e 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.rest.api.store.v1/src/main/java/org/wso2/carbon/apimgt/rest/api/store/v1/mappings/APIMappingUtil.java +++ b/components/apimgt/org.wso2.carbon.apimgt.rest.api.store.v1/src/main/java/org/wso2/carbon/apimgt/rest/api/store/v1/mappings/APIMappingUtil.java @@ -243,6 +243,7 @@ public static APIDTO fromAPItoDTO(API model, String organization) throws APIMana } dto.setAuthorizationHeader(model.getAuthorizationHeader()); + dto.setApiKeyHeader(model.getApiKeyHeader()); if (model.getApiSecurity() != null) { dto.setSecurityScheme(Arrays.asList(model.getApiSecurity().split(","))); } @@ -429,6 +430,7 @@ public static APIDTO fromAPItoDTO(APIProduct model, String organization) throws } dto.setAuthorizationHeader(model.getAuthorizationHeader()); + dto.setApiKeyHeader(model.getApiKeyHeader()); if (model.getApiSecurity() != null) { dto.setSecurityScheme(Arrays.asList(model.getApiSecurity().split(","))); } diff --git a/components/apimgt/org.wso2.carbon.apimgt.rest.api.store.v1/src/main/resources/devportal-api.yaml b/components/apimgt/org.wso2.carbon.apimgt.rest.api.store.v1/src/main/resources/devportal-api.yaml index dac65513e189..2ced4a7c4808 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.rest.api.store.v1/src/main/resources/devportal-api.yaml +++ b/components/apimgt/org.wso2.carbon.apimgt.rest.api.store.v1/src/main/resources/devportal-api.yaml @@ -3849,6 +3849,11 @@ components: Name of the Authorization header used for invoking the API. If it is not set, Authorization header name specified in tenant or system level will be used. example: Authorization + apiKeyHeader: + type: string + description: | + Name of the API key header used for invoking the API. If it is not set, default value `apiKey` will be used. + example: ApiKey securityScheme: type: array description: | diff --git a/components/apimgt/org.wso2.carbon.apimgt.rest.api.store.v1/src/main/resources/store-api.yaml b/components/apimgt/org.wso2.carbon.apimgt.rest.api.store.v1/src/main/resources/store-api.yaml index a63f9a8f793c..aec02dabf4cd 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.rest.api.store.v1/src/main/resources/store-api.yaml +++ b/components/apimgt/org.wso2.carbon.apimgt.rest.api.store.v1/src/main/resources/store-api.yaml @@ -4220,6 +4220,11 @@ definitions: description: | Name of the Authorization header used for invoking the API. If it is not set, Authorization header name specified in tenant or system level will be used. + apiKeyHeader: + type: string + description: | + Name of the API key header used for invoking the API. If it is not set, default value `apiKey` will be used. + example: ApiKey securityScheme: type: array description: | diff --git a/components/apimgt/org.wso2.carbon.apimgt.rest.api.util/pom.xml b/components/apimgt/org.wso2.carbon.apimgt.rest.api.util/pom.xml index d350e0864ba1..ffc39161bc1f 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.rest.api.util/pom.xml +++ b/components/apimgt/org.wso2.carbon.apimgt.rest.api.util/pom.xml @@ -17,7 +17,7 @@ org.wso2.carbon.apimgt apimgt - 9.28.169-SNAPSHOT + 9.28.172-SNAPSHOT ../pom.xml diff --git a/components/apimgt/org.wso2.carbon.apimgt.solace/pom.xml b/components/apimgt/org.wso2.carbon.apimgt.solace/pom.xml index df9c43d19ca6..6608f1abaf54 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.solace/pom.xml +++ b/components/apimgt/org.wso2.carbon.apimgt.solace/pom.xml @@ -3,7 +3,7 @@ apimgt org.wso2.carbon.apimgt - 9.28.169-SNAPSHOT + 9.28.172-SNAPSHOT ../pom.xml diff --git a/components/apimgt/org.wso2.carbon.apimgt.throttle.policy.deployer/pom.xml b/components/apimgt/org.wso2.carbon.apimgt.throttle.policy.deployer/pom.xml index b56ecb730439..bcd116231545 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.throttle.policy.deployer/pom.xml +++ b/components/apimgt/org.wso2.carbon.apimgt.throttle.policy.deployer/pom.xml @@ -19,7 +19,7 @@ apimgt org.wso2.carbon.apimgt - 9.28.169-SNAPSHOT + 9.28.172-SNAPSHOT 4.0.0 bundle diff --git a/components/apimgt/org.wso2.carbon.apimgt.throttling.siddhi.extension/pom.xml b/components/apimgt/org.wso2.carbon.apimgt.throttling.siddhi.extension/pom.xml index 2c2044853497..97e0bd7293d8 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.throttling.siddhi.extension/pom.xml +++ b/components/apimgt/org.wso2.carbon.apimgt.throttling.siddhi.extension/pom.xml @@ -20,7 +20,7 @@ org.wso2.carbon.apimgt apimgt - 9.28.169-SNAPSHOT + 9.28.172-SNAPSHOT ../pom.xml diff --git a/components/apimgt/org.wso2.carbon.apimgt.tokenmgt/pom.xml b/components/apimgt/org.wso2.carbon.apimgt.tokenmgt/pom.xml index 9e19d52ece45..d71803ed2b6c 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.tokenmgt/pom.xml +++ b/components/apimgt/org.wso2.carbon.apimgt.tokenmgt/pom.xml @@ -16,7 +16,7 @@ org.wso2.carbon.apimgt apimgt - 9.28.169-SNAPSHOT + 9.28.172-SNAPSHOT ../pom.xml diff --git a/components/apimgt/org.wso2.carbon.apimgt.tracing/pom.xml b/components/apimgt/org.wso2.carbon.apimgt.tracing/pom.xml index ec32498fb3bb..b35d141345e5 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.tracing/pom.xml +++ b/components/apimgt/org.wso2.carbon.apimgt.tracing/pom.xml @@ -21,7 +21,7 @@ org.wso2.carbon.apimgt apimgt - 9.28.169-SNAPSHOT + 9.28.172-SNAPSHOT ../pom.xml diff --git a/components/apimgt/pom.xml b/components/apimgt/pom.xml index 65f0c153b929..ecd72107461f 100644 --- a/components/apimgt/pom.xml +++ b/components/apimgt/pom.xml @@ -19,7 +19,7 @@ org.wso2.carbon.apimgt carbon-apimgt - 9.28.169-SNAPSHOT + 9.28.172-SNAPSHOT ../../pom.xml diff --git a/components/apimgt/samples/org.wso2.carbon.apimgt.samples.calculator/pom.xml b/components/apimgt/samples/org.wso2.carbon.apimgt.samples.calculator/pom.xml index 06f5cd9da6ee..19f744658ada 100644 --- a/components/apimgt/samples/org.wso2.carbon.apimgt.samples.calculator/pom.xml +++ b/components/apimgt/samples/org.wso2.carbon.apimgt.samples.calculator/pom.xml @@ -19,7 +19,7 @@ apimgt org.wso2.carbon.apimgt - 9.28.169-SNAPSHOT + 9.28.172-SNAPSHOT ../../pom.xml diff --git a/components/apimgt/samples/org.wso2.carbon.apimgt.samples.pizzashack/pom.xml b/components/apimgt/samples/org.wso2.carbon.apimgt.samples.pizzashack/pom.xml index d906530428e8..e453b34687e0 100644 --- a/components/apimgt/samples/org.wso2.carbon.apimgt.samples.pizzashack/pom.xml +++ b/components/apimgt/samples/org.wso2.carbon.apimgt.samples.pizzashack/pom.xml @@ -20,7 +20,7 @@ apimgt org.wso2.carbon.apimgt - 9.28.169-SNAPSHOT + 9.28.172-SNAPSHOT ../../pom.xml diff --git a/features/apimgt/org.wso2.carbon.apimgt.cache.invalidation.feature/pom.xml b/features/apimgt/org.wso2.carbon.apimgt.cache.invalidation.feature/pom.xml index 8dd43d557d2c..df9356feb791 100644 --- a/features/apimgt/org.wso2.carbon.apimgt.cache.invalidation.feature/pom.xml +++ b/features/apimgt/org.wso2.carbon.apimgt.cache.invalidation.feature/pom.xml @@ -20,7 +20,7 @@ org.wso2.carbon.apimgt apimgt-feature - 9.28.169-SNAPSHOT + 9.28.172-SNAPSHOT ../pom.xml diff --git a/features/apimgt/org.wso2.carbon.apimgt.core.feature/pom.xml b/features/apimgt/org.wso2.carbon.apimgt.core.feature/pom.xml index cdb82aea2895..a3f74c0903fe 100644 --- a/features/apimgt/org.wso2.carbon.apimgt.core.feature/pom.xml +++ b/features/apimgt/org.wso2.carbon.apimgt.core.feature/pom.xml @@ -20,7 +20,7 @@ org.wso2.carbon.apimgt apimgt-feature - 9.28.169-SNAPSHOT + 9.28.172-SNAPSHOT ../pom.xml diff --git a/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/rxts/api.rxt b/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/rxts/api.rxt index aa55bebc254a..c4b55ec1746f 100644 --- a/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/rxts/api.rxt +++ b/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/rxts/api.rxt @@ -196,6 +196,9 @@ Authorization Header + + API Key Header + API Security diff --git a/features/apimgt/org.wso2.carbon.apimgt.eventing.feature/pom.xml b/features/apimgt/org.wso2.carbon.apimgt.eventing.feature/pom.xml index aef89699baec..36815b1c9802 100644 --- a/features/apimgt/org.wso2.carbon.apimgt.eventing.feature/pom.xml +++ b/features/apimgt/org.wso2.carbon.apimgt.eventing.feature/pom.xml @@ -20,7 +20,7 @@ apimgt-feature org.wso2.carbon.apimgt - 9.28.169-SNAPSHOT + 9.28.172-SNAPSHOT ../pom.xml diff --git a/features/apimgt/org.wso2.carbon.apimgt.eventing.hub.feature/pom.xml b/features/apimgt/org.wso2.carbon.apimgt.eventing.hub.feature/pom.xml index 5d839732c0d8..588cb672e340 100644 --- a/features/apimgt/org.wso2.carbon.apimgt.eventing.hub.feature/pom.xml +++ b/features/apimgt/org.wso2.carbon.apimgt.eventing.hub.feature/pom.xml @@ -20,7 +20,7 @@ apimgt-feature org.wso2.carbon.apimgt - 9.28.169-SNAPSHOT + 9.28.172-SNAPSHOT ../pom.xml diff --git a/features/apimgt/org.wso2.carbon.apimgt.feature/pom.xml b/features/apimgt/org.wso2.carbon.apimgt.feature/pom.xml index a737dc0acf73..8f40b2150ec4 100644 --- a/features/apimgt/org.wso2.carbon.apimgt.feature/pom.xml +++ b/features/apimgt/org.wso2.carbon.apimgt.feature/pom.xml @@ -20,7 +20,7 @@ org.wso2.carbon.apimgt apimgt-feature - 9.28.169-SNAPSHOT + 9.28.172-SNAPSHOT ../pom.xml diff --git a/features/apimgt/org.wso2.carbon.apimgt.gateway.feature/pom.xml b/features/apimgt/org.wso2.carbon.apimgt.gateway.feature/pom.xml index cc8b2a204611..9a0b58a5e140 100644 --- a/features/apimgt/org.wso2.carbon.apimgt.gateway.feature/pom.xml +++ b/features/apimgt/org.wso2.carbon.apimgt.gateway.feature/pom.xml @@ -20,7 +20,7 @@ org.wso2.carbon.apimgt apimgt-feature - 9.28.169-SNAPSHOT + 9.28.172-SNAPSHOT ../pom.xml diff --git a/features/apimgt/org.wso2.carbon.apimgt.internal.service.feature/pom.xml b/features/apimgt/org.wso2.carbon.apimgt.internal.service.feature/pom.xml index c150ba78d8a8..4beaa3143697 100644 --- a/features/apimgt/org.wso2.carbon.apimgt.internal.service.feature/pom.xml +++ b/features/apimgt/org.wso2.carbon.apimgt.internal.service.feature/pom.xml @@ -20,7 +20,7 @@ org.wso2.carbon.apimgt apimgt-feature - 9.28.169-SNAPSHOT + 9.28.172-SNAPSHOT ../pom.xml diff --git a/features/apimgt/org.wso2.carbon.apimgt.jms.listener.feature/pom.xml b/features/apimgt/org.wso2.carbon.apimgt.jms.listener.feature/pom.xml index 6dbb5edf3e99..5fa1c173de36 100644 --- a/features/apimgt/org.wso2.carbon.apimgt.jms.listener.feature/pom.xml +++ b/features/apimgt/org.wso2.carbon.apimgt.jms.listener.feature/pom.xml @@ -20,7 +20,7 @@ org.wso2.carbon.apimgt apimgt-feature - 9.28.169-SNAPSHOT + 9.28.172-SNAPSHOT ../pom.xml diff --git a/features/apimgt/org.wso2.carbon.apimgt.keymanager.feature/pom.xml b/features/apimgt/org.wso2.carbon.apimgt.keymanager.feature/pom.xml index b5a5f6afc252..a552c61caf73 100644 --- a/features/apimgt/org.wso2.carbon.apimgt.keymanager.feature/pom.xml +++ b/features/apimgt/org.wso2.carbon.apimgt.keymanager.feature/pom.xml @@ -20,7 +20,7 @@ org.wso2.carbon.apimgt apimgt-feature - 9.28.169-SNAPSHOT + 9.28.172-SNAPSHOT ../pom.xml diff --git a/features/apimgt/org.wso2.carbon.apimgt.persistence.feature/pom.xml b/features/apimgt/org.wso2.carbon.apimgt.persistence.feature/pom.xml index 7e4a1432b931..ae3db7e33a17 100644 --- a/features/apimgt/org.wso2.carbon.apimgt.persistence.feature/pom.xml +++ b/features/apimgt/org.wso2.carbon.apimgt.persistence.feature/pom.xml @@ -20,7 +20,7 @@ org.wso2.carbon.apimgt apimgt-feature - 9.28.169-SNAPSHOT + 9.28.172-SNAPSHOT ../pom.xml diff --git a/features/apimgt/org.wso2.carbon.apimgt.rest.api.admin.feature/pom.xml b/features/apimgt/org.wso2.carbon.apimgt.rest.api.admin.feature/pom.xml index 639b519ce6f6..13c0d39e1d23 100644 --- a/features/apimgt/org.wso2.carbon.apimgt.rest.api.admin.feature/pom.xml +++ b/features/apimgt/org.wso2.carbon.apimgt.rest.api.admin.feature/pom.xml @@ -21,7 +21,7 @@ org.wso2.carbon.apimgt apimgt-feature - 9.28.169-SNAPSHOT + 9.28.172-SNAPSHOT ../pom.xml diff --git a/features/apimgt/org.wso2.carbon.apimgt.rest.api.dcr.feature/pom.xml b/features/apimgt/org.wso2.carbon.apimgt.rest.api.dcr.feature/pom.xml index 07cf41f43b14..89e3306e1539 100644 --- a/features/apimgt/org.wso2.carbon.apimgt.rest.api.dcr.feature/pom.xml +++ b/features/apimgt/org.wso2.carbon.apimgt.rest.api.dcr.feature/pom.xml @@ -21,7 +21,7 @@ org.wso2.carbon.apimgt apimgt-feature - 9.28.169-SNAPSHOT + 9.28.172-SNAPSHOT ../pom.xml diff --git a/features/apimgt/org.wso2.carbon.apimgt.rest.api.devops.feature/pom.xml b/features/apimgt/org.wso2.carbon.apimgt.rest.api.devops.feature/pom.xml index 673e932dec05..6d56f7a2ab3d 100644 --- a/features/apimgt/org.wso2.carbon.apimgt.rest.api.devops.feature/pom.xml +++ b/features/apimgt/org.wso2.carbon.apimgt.rest.api.devops.feature/pom.xml @@ -21,7 +21,7 @@ org.wso2.carbon.apimgt apimgt-feature - 9.28.169-SNAPSHOT + 9.28.172-SNAPSHOT ../pom.xml diff --git a/features/apimgt/org.wso2.carbon.apimgt.rest.api.gateway.feature/pom.xml b/features/apimgt/org.wso2.carbon.apimgt.rest.api.gateway.feature/pom.xml index fb8dc4d3f48d..8854135b7006 100644 --- a/features/apimgt/org.wso2.carbon.apimgt.rest.api.gateway.feature/pom.xml +++ b/features/apimgt/org.wso2.carbon.apimgt.rest.api.gateway.feature/pom.xml @@ -21,7 +21,7 @@ org.wso2.carbon.apimgt apimgt-feature - 9.28.169-SNAPSHOT + 9.28.172-SNAPSHOT ../pom.xml diff --git a/features/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.feature/pom.xml b/features/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.feature/pom.xml index 528e8885690d..0a748f9e0d2f 100644 --- a/features/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.feature/pom.xml +++ b/features/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.feature/pom.xml @@ -21,7 +21,7 @@ org.wso2.carbon.apimgt apimgt-feature - 9.28.169-SNAPSHOT + 9.28.172-SNAPSHOT ../pom.xml diff --git a/features/apimgt/org.wso2.carbon.apimgt.rest.api.service.catalog.feature/pom.xml b/features/apimgt/org.wso2.carbon.apimgt.rest.api.service.catalog.feature/pom.xml index 6dac3739869a..37ec72322fb5 100644 --- a/features/apimgt/org.wso2.carbon.apimgt.rest.api.service.catalog.feature/pom.xml +++ b/features/apimgt/org.wso2.carbon.apimgt.rest.api.service.catalog.feature/pom.xml @@ -21,7 +21,7 @@ org.wso2.carbon.apimgt apimgt-feature - 9.28.169-SNAPSHOT + 9.28.172-SNAPSHOT ../pom.xml diff --git a/features/apimgt/org.wso2.carbon.apimgt.rest.api.store.feature/pom.xml b/features/apimgt/org.wso2.carbon.apimgt.rest.api.store.feature/pom.xml index 1faf5b8e66be..ea6b7459979f 100644 --- a/features/apimgt/org.wso2.carbon.apimgt.rest.api.store.feature/pom.xml +++ b/features/apimgt/org.wso2.carbon.apimgt.rest.api.store.feature/pom.xml @@ -21,7 +21,7 @@ org.wso2.carbon.apimgt apimgt-feature - 9.28.169-SNAPSHOT + 9.28.172-SNAPSHOT ../pom.xml diff --git a/features/apimgt/org.wso2.carbon.apimgt.scxml.feature/pom.xml b/features/apimgt/org.wso2.carbon.apimgt.scxml.feature/pom.xml index a3ab749fbde7..462802d3bdc2 100644 --- a/features/apimgt/org.wso2.carbon.apimgt.scxml.feature/pom.xml +++ b/features/apimgt/org.wso2.carbon.apimgt.scxml.feature/pom.xml @@ -20,7 +20,7 @@ org.wso2.carbon.apimgt apimgt-feature - 9.28.169-SNAPSHOT + 9.28.172-SNAPSHOT ../pom.xml diff --git a/features/apimgt/org.wso2.carbon.apimgt.throttle.policy.deployer.feature/pom.xml b/features/apimgt/org.wso2.carbon.apimgt.throttle.policy.deployer.feature/pom.xml index 53cadd87927a..1ebb9d7a5211 100644 --- a/features/apimgt/org.wso2.carbon.apimgt.throttle.policy.deployer.feature/pom.xml +++ b/features/apimgt/org.wso2.carbon.apimgt.throttle.policy.deployer.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.apimgt apimgt-feature - 9.28.169-SNAPSHOT + 9.28.172-SNAPSHOT ../pom.xml diff --git a/features/apimgt/org.wso2.carbon.apimgt.throttling.siddhi.extension.feature/pom.xml b/features/apimgt/org.wso2.carbon.apimgt.throttling.siddhi.extension.feature/pom.xml index bbf3abb66191..1b29f795a808 100644 --- a/features/apimgt/org.wso2.carbon.apimgt.throttling.siddhi.extension.feature/pom.xml +++ b/features/apimgt/org.wso2.carbon.apimgt.throttling.siddhi.extension.feature/pom.xml @@ -20,7 +20,7 @@ org.wso2.carbon.apimgt apimgt-feature - 9.28.169-SNAPSHOT + 9.28.172-SNAPSHOT ../pom.xml diff --git a/features/apimgt/org.wso2.carbon.apimgt.tokenmgt.feature/pom.xml b/features/apimgt/org.wso2.carbon.apimgt.tokenmgt.feature/pom.xml index f03d71909108..e6f62fa8e01d 100644 --- a/features/apimgt/org.wso2.carbon.apimgt.tokenmgt.feature/pom.xml +++ b/features/apimgt/org.wso2.carbon.apimgt.tokenmgt.feature/pom.xml @@ -20,7 +20,7 @@ org.wso2.carbon.apimgt apimgt-feature - 9.28.169-SNAPSHOT + 9.28.172-SNAPSHOT ../pom.xml diff --git a/features/apimgt/org.wso2.carbon.apimgt.tracing.feature/pom.xml b/features/apimgt/org.wso2.carbon.apimgt.tracing.feature/pom.xml index f7b74925dac9..5bb5f29cbe8e 100644 --- a/features/apimgt/org.wso2.carbon.apimgt.tracing.feature/pom.xml +++ b/features/apimgt/org.wso2.carbon.apimgt.tracing.feature/pom.xml @@ -21,7 +21,7 @@ apimgt-feature org.wso2.carbon.apimgt - 9.28.169-SNAPSHOT + 9.28.172-SNAPSHOT 4.0.0 diff --git a/features/apimgt/pom.xml b/features/apimgt/pom.xml index 0fb6a6b7262a..a1a604deabef 100644 --- a/features/apimgt/pom.xml +++ b/features/apimgt/pom.xml @@ -19,7 +19,7 @@ org.wso2.carbon.apimgt carbon-apimgt - 9.28.169-SNAPSHOT + 9.28.172-SNAPSHOT ../../pom.xml diff --git a/pom.xml b/pom.xml index bfb5e18e1516..5287286c0cab 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ org.wso2.carbon.apimgt carbon-apimgt pom - 9.28.169-SNAPSHOT + 9.28.172-SNAPSHOT WSO2 Carbon - API Management Aggregator POM https://wso2.org @@ -1966,7 +1966,7 @@ 1.3 - 9.28.169-SNAPSHOT + 9.28.172-SNAPSHOT [9.0.0, 10.0.0) 5.3.5 diff --git a/service-stubs/apimgt/org.wso2.carbon.apimgt.keymgt.stub/pom.xml b/service-stubs/apimgt/org.wso2.carbon.apimgt.keymgt.stub/pom.xml index 472da2e4c088..695fb293e3d3 100644 --- a/service-stubs/apimgt/org.wso2.carbon.apimgt.keymgt.stub/pom.xml +++ b/service-stubs/apimgt/org.wso2.carbon.apimgt.keymgt.stub/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.apimgt apimgt-stubs - 9.28.169-SNAPSHOT + 9.28.172-SNAPSHOT ../pom.xml diff --git a/service-stubs/apimgt/pom.xml b/service-stubs/apimgt/pom.xml index 72d6c0f001bc..de391fedce3a 100644 --- a/service-stubs/apimgt/pom.xml +++ b/service-stubs/apimgt/pom.xml @@ -19,7 +19,7 @@ org.wso2.carbon.apimgt carbon-apimgt - 9.28.169-SNAPSHOT + 9.28.172-SNAPSHOT ../../pom.xml