You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@knox.apache.org by pz...@apache.org on 2026/03/27 15:33:41 UTC
(knox) branch master updated: Revert "KNOX-3279 - REST Catalog dispatch implementation for including configurable metadata as outbound request headers (#1182)" (#1188)
This is an automated email from the ASF dual-hosted git repository.
pzampino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/knox.git
The following commit(s) were added to refs/heads/master by this push:
new a695134ec Revert "KNOX-3279 - REST Catalog dispatch implementation for including configurable metadata as outbound request headers (#1182)" (#1188)
a695134ec is described below
commit a695134ec8e6fdfd46bcade58e25235f538280b5
Author: Phil Zampino <pz...@apache.org>
AuthorDate: Fri Mar 27 11:33:35 2026 -0400
Revert "KNOX-3279 - REST Catalog dispatch implementation for including configurable metadata as outbound request headers (#1182)" (#1188)
* Revert "KNOX-3279 - REST Catalog dispatch implementation for including configurable metadata as outbound request headers (#1182)"
This reverts commit be2b9a41e4a7d89e96870da9cd8928df2d8aa04a.
* KNOX-3290 - Upgrade easymock to 5.6.0
---
.../federation/jwt/filter/JWTFederationFilter.java | 9 +-
.../services/iceberg-rest/0.0.1/service.xml | 5 +-
gateway-service-restcatalog/pom.xml | 75 ---------
.../service/restcatalog/RestCatalogDispatch.java | 52 ------
.../service/restcatalog/RestCatalogHaDispatch.java | 49 ------
.../restcatalog/TokenMetadataHeaderHandler.java | 184 ---------------------
.../i18n/TokenMetadataHandlerMessages.java | 40 -----
.../restcatalog/RestCatalogDispatchTest.java | 128 --------------
.../restcatalog/RestCatalogDispatchTestUtils.java | 152 -----------------
.../restcatalog/RestCatalogHaDispatchTest.java | 182 --------------------
.../gateway/security/CommonTokenConstants.java | 30 ----
gateway-test-release/webhdfs-kerb-test/pom.xml | 4 +
gateway-test-release/webhdfs-test/pom.xml | 4 +
pom.xml | 11 +-
14 files changed, 22 insertions(+), 903 deletions(-)
diff --git a/gateway-provider-security-jwt/src/main/java/org/apache/knox/gateway/provider/federation/jwt/filter/JWTFederationFilter.java b/gateway-provider-security-jwt/src/main/java/org/apache/knox/gateway/provider/federation/jwt/filter/JWTFederationFilter.java
index 92dc22581..88c5ad715 100644
--- a/gateway-provider-security-jwt/src/main/java/org/apache/knox/gateway/provider/federation/jwt/filter/JWTFederationFilter.java
+++ b/gateway-provider-security-jwt/src/main/java/org/apache/knox/gateway/provider/federation/jwt/filter/JWTFederationFilter.java
@@ -22,7 +22,6 @@ import org.apache.commons.lang3.tuple.Pair;
import org.apache.knox.gateway.i18n.messages.MessagesFactory;
import org.apache.knox.gateway.provider.federation.jwt.JWTMessages;
import org.apache.knox.gateway.security.PrimaryPrincipal;
-import org.apache.knox.gateway.security.CommonTokenConstants;
import org.apache.knox.gateway.services.security.token.UnknownTokenException;
import org.apache.knox.gateway.services.security.token.impl.JWT;
import org.apache.knox.gateway.services.security.token.impl.JWTToken;
@@ -55,10 +54,10 @@ public class JWTFederationFilter extends AbstractJWTFilter {
private static final JWTMessages LOGGER = MessagesFactory.get( JWTMessages.class );
/* A semicolon separated list of paths that need to bypass authentication */
public static final String JWT_UNAUTHENTICATED_PATHS_PARAM = "jwt.unauthenticated.path.list";
- public static final String GRANT_TYPE = CommonTokenConstants.GRANT_TYPE;
- public static final String CLIENT_CREDENTIALS = CommonTokenConstants.CLIENT_CREDENTIALS;
- public static final String CLIENT_SECRET = CommonTokenConstants.CLIENT_CREDENTIALS;
- public static final String CLIENT_ID = CommonTokenConstants.CLIENT_ID;
+ public static final String GRANT_TYPE = "grant_type";
+ public static final String CLIENT_CREDENTIALS = "client_credentials";
+ public static final String CLIENT_SECRET = "client_secret";
+ public static final String CLIENT_ID = "client_id";
public static final String INVALID_CLIENT_SECRET = "Error while parsing the received client secret";
public static final String MISMATCHING_CLIENT_ID_AND_CLIENT_SECRET = "Client credentials flow with mismatching client_id and client_secret";
public static final String REFRESH_TOKEN = "refresh_token";
diff --git a/gateway-service-definitions/src/main/resources/services/iceberg-rest/0.0.1/service.xml b/gateway-service-definitions/src/main/resources/services/iceberg-rest/0.0.1/service.xml
index 99dbeaee0..f699b33d8 100644
--- a/gateway-service-definitions/src/main/resources/services/iceberg-rest/0.0.1/service.xml
+++ b/gateway-service-definitions/src/main/resources/services/iceberg-rest/0.0.1/service.xml
@@ -22,11 +22,12 @@
<shortDesc>ICEBERG-REST</shortDesc>
<description>Apache Iceberg REST Catalog API</description>
</metadata>
+
<routes>
<route path="/iceberg-rest/**"/>
</routes>
- <dispatch classname="org.apache.knox.gateway.service.restcatalog.RestCatalogDispatch"
- ha-classname="org.apache.knox.gateway.service.restcatalog.RestCatalogHaDispatch">
+ <dispatch classname="org.apache.knox.gateway.dispatch.ConfigurableDispatch"
+ ha-classname="org.apache.knox.gateway.ha.dispatch.ConfigurableHADispatch">
<param>
<name>shouldIncludePrincipalAndGroups</name>
<value>true</value>
diff --git a/gateway-service-restcatalog/pom.xml b/gateway-service-restcatalog/pom.xml
deleted file mode 100644
index 4f67ee25b..000000000
--- a/gateway-service-restcatalog/pom.xml
+++ /dev/null
@@ -1,75 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.knox</groupId>
- <artifactId>gateway</artifactId>
- <version>3.0.0-SNAPSHOT</version>
- </parent>
-
- <artifactId>gateway-service-restcatalog</artifactId>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.knox</groupId>
- <artifactId>gateway-spi</artifactId>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>javax.servlet-api</artifactId>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.httpcomponents</groupId>
- <artifactId>httpclient</artifactId>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.httpcomponents</groupId>
- <artifactId>httpcore</artifactId>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.knox</groupId>
- <artifactId>gateway-provider-ha</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.knox</groupId>
- <artifactId>gateway-i18n</artifactId>
- </dependency>
- <dependency>
- <groupId>com.github.ben-manes.caffeine</groupId>
- <artifactId>caffeine</artifactId>
- </dependency>
- <dependency>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-http</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.knox</groupId>
- <artifactId>gateway-test-utils</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
-</project>
diff --git a/gateway-service-restcatalog/src/main/java/org/apache/knox/gateway/service/restcatalog/RestCatalogDispatch.java b/gateway-service-restcatalog/src/main/java/org/apache/knox/gateway/service/restcatalog/RestCatalogDispatch.java
deleted file mode 100644
index ca9951d8e..000000000
--- a/gateway-service-restcatalog/src/main/java/org/apache/knox/gateway/service/restcatalog/RestCatalogDispatch.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.knox.gateway.service.restcatalog;
-
-import org.apache.http.client.methods.HttpUriRequest;
-import org.apache.knox.gateway.dispatch.ConfigurableDispatch;
-
-import javax.servlet.FilterConfig;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-
-/**
- * A Dispatch implementation that supports adding token metadata to the outbound request headers.
- */
-public class RestCatalogDispatch extends ConfigurableDispatch {
-
- private final TokenMetadataHeaderHandler headerHandler;
-
- public RestCatalogDispatch(FilterConfig filterConfig) {
- headerHandler = new TokenMetadataHeaderHandler(filterConfig);
- }
-
- @Override
- public void init() {
- super.init();
- }
-
- @Override
- protected void executeRequest(HttpUriRequest outboundRequest,
- HttpServletRequest inboundRequest,
- HttpServletResponse outboundResponse) throws IOException {
- headerHandler.applyHeadersToRequest(inboundRequest, outboundRequest);
- super.executeRequest(outboundRequest, inboundRequest, outboundResponse);
- }
-
-}
diff --git a/gateway-service-restcatalog/src/main/java/org/apache/knox/gateway/service/restcatalog/RestCatalogHaDispatch.java b/gateway-service-restcatalog/src/main/java/org/apache/knox/gateway/service/restcatalog/RestCatalogHaDispatch.java
deleted file mode 100644
index eb0290a29..000000000
--- a/gateway-service-restcatalog/src/main/java/org/apache/knox/gateway/service/restcatalog/RestCatalogHaDispatch.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.knox.gateway.service.restcatalog;
-
-import org.apache.http.client.methods.HttpUriRequest;
-import org.apache.knox.gateway.ha.dispatch.ConfigurableHADispatch;
-
-import javax.servlet.FilterConfig;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-
-public class RestCatalogHaDispatch extends ConfigurableHADispatch {
-
- static final String SERVICE_ROLE = "ICEBERG-REST";
-
- private final TokenMetadataHeaderHandler headerHandler;
-
- public RestCatalogHaDispatch(final FilterConfig filterConfig) {
- setServiceRole(SERVICE_ROLE);
- headerHandler = new TokenMetadataHeaderHandler(filterConfig);
- }
-
- @Override
- public void init() {
- super.init();
- }
-
- @Override
- protected void executeRequest(HttpUriRequest outboundRequest, HttpServletRequest inboundRequest, HttpServletResponse outboundResponse) throws IOException {
- headerHandler.applyHeadersToRequest(inboundRequest, outboundRequest);
- super.executeRequest(outboundRequest, inboundRequest, outboundResponse);
- }
-}
diff --git a/gateway-service-restcatalog/src/main/java/org/apache/knox/gateway/service/restcatalog/TokenMetadataHeaderHandler.java b/gateway-service-restcatalog/src/main/java/org/apache/knox/gateway/service/restcatalog/TokenMetadataHeaderHandler.java
deleted file mode 100644
index 3511efe9c..000000000
--- a/gateway-service-restcatalog/src/main/java/org/apache/knox/gateway/service/restcatalog/TokenMetadataHeaderHandler.java
+++ /dev/null
@@ -1,184 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.knox.gateway.service.restcatalog;
-
-import com.github.benmanes.caffeine.cache.Cache;
-import com.github.benmanes.caffeine.cache.Caffeine;
-import org.apache.http.client.methods.HttpUriRequest;
-import org.apache.knox.gateway.i18n.messages.MessagesFactory;
-import org.apache.knox.gateway.security.CommonTokenConstants;
-import org.apache.knox.gateway.service.restcatalog.i18n.TokenMetadataHandlerMessages;
-import org.apache.knox.gateway.services.GatewayServices;
-import org.apache.knox.gateway.services.ServiceType;
-import org.apache.knox.gateway.services.security.token.TokenMetadata;
-import org.apache.knox.gateway.services.security.token.TokenStateService;
-import org.apache.knox.gateway.services.security.token.UnknownTokenException;
-
-import javax.servlet.FilterConfig;
-import javax.servlet.ServletContext;
-import javax.servlet.ServletRequest;
-import javax.servlet.http.HttpServletRequest;
-import java.util.Base64;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-import static java.nio.charset.StandardCharsets.UTF_8;
-
-public class TokenMetadataHeaderHandler {
- static final String TOKEN_METADATA_PARAM = "token-metadata-headers";
- static final String METADATA_HEADER_PREFIX_PARAM = "metadata-header-prefix";
-
- static final String DEFAULT_HEADER_PREFIX = "X-Knox-Meta-";
-
- private static final TokenMetadataHandlerMessages LOG = MessagesFactory.get(TokenMetadataHandlerMessages.class);
-
- private static final String INVALID_CLIENT_SECRET = "Error while parsing the received client secret";
-
- private final TokenStateService tss;
-
- private final String headerPrefix;
-
- private final Set<String> metadataHeaderConfig = new HashSet<>();
-
- private final Cache<String, TokenMetadata> metadataCache = Caffeine.newBuilder().maximumSize(100).build();
-
- TokenMetadataHeaderHandler(final FilterConfig filterConfig) {
- ServletContext sc = filterConfig.getServletContext();
- GatewayServices gatewayServices = (GatewayServices) sc.getAttribute(GatewayServices.GATEWAY_SERVICES_ATTRIBUTE);
- tss = gatewayServices.getService(ServiceType.TOKEN_STATE_SERVICE);
-
- metadataHeaderConfig.addAll(getMetadataHeaderConfig(filterConfig));
-
- headerPrefix = getMetadataHeaderPrefixConfig(filterConfig);
- }
-
- void applyHeadersToRequest(final HttpServletRequest inboundRequest,
- final HttpUriRequest outboundRequest) {
- final String clientId = getClientID(inboundRequest);
- if (clientId != null) {
- Map<String, String> metadata = getMetadata(tss, clientId);
- for (String key : metadataHeaderConfig) {
- if (metadata.containsKey(key)) {
- outboundRequest.setHeader(headerPrefix + key, metadata.get(key));
- }
- }
- }
- }
-
- private Set<String> getMetadataHeaderConfig(final FilterConfig filterConfig) {
- Set<String> metadataForHeaders = new HashSet<>();
-
- // Add the default metadata element to be included in the outbound request headers
- metadataForHeaders.add("userName");
-
- // Parse the configured token metadata elements which should be included as outbound request headers
- String tokenMetadataHeadersConfig = filterConfig.getInitParameter(TOKEN_METADATA_PARAM);
- String[] tokenMetadataHeaderNames = tokenMetadataHeadersConfig.split(",");
- for (String metadataName : tokenMetadataHeaderNames) {
- metadataForHeaders.add(metadataName.trim());
- }
- return metadataForHeaders;
- }
-
- private String getMetadataHeaderPrefixConfig(final FilterConfig filterConfig) {
- String value = DEFAULT_HEADER_PREFIX;
- String configured = filterConfig.getInitParameter(METADATA_HEADER_PREFIX_PARAM);
- if (configured != null) {
- configured = configured.trim();
- if (!configured.isEmpty()) {
- value = configured;
- }
- }
- return value;
- }
-
- /**
- * Get the clientId from the client credentials in the request body content.
- *
- * @param request The ServletRequest.
- *
- * @return The clientId from the request.
- */
- String getClientID(ServletRequest request) {
- String clientId = null;
-
- String clientSecret = getClientSecretFromRequestBody(request);
- if (clientSecret != null) {
- try {
- final String[] decodedSecret = decodeBase64(clientSecret).split("::");
- clientId = decodeBase64(decodedSecret[0]);
- } catch (Exception e) {
- LOG.invalidClientSecret(e);
- throw new SecurityException(INVALID_CLIENT_SECRET, e);
- }
- }
-
- return clientId;
- }
-
- /**
- * Get the client secret from the request body.
- *
- * @param request The ServletRequest with the body content.
- *
- * @return The client secret.
- */
- private String getClientSecretFromRequestBody(ServletRequest request) {
- final String grantType = request.getParameter(CommonTokenConstants.GRANT_TYPE);
- String clientSecret = null;
- if (CommonTokenConstants.CLIENT_CREDENTIALS.equals(grantType)) {
- clientSecret = request.getParameter(CommonTokenConstants.CLIENT_SECRET);
- }
- return clientSecret;
- }
-
- private String decodeBase64(final String encoded) {
- return new String(Base64.getDecoder().decode(encoded.getBytes(UTF_8)), UTF_8);
- }
-
- /**
- * Get the token metadata associated with the specified clientId.
- *
- * @param clientId The clientId for which the token metadata is requested.
- *
- * @return A map of the associated token metadata.
- */
- private Map<String, String> getMetadata(final TokenStateService tss, final String clientId) {
- Map<String, String> metadata = Collections.emptyMap();
-
- // Get the associated token metadata
- TokenMetadata tm = metadataCache.get(clientId, k -> {
- try {
- return tss.getTokenMetadata(clientId);
- } catch (UnknownTokenException e) {
- LOG.invalidClientId(clientId, e);
- return null;
- }
- });
- if (tm != null) {
- metadata = tm.getMetadataMap();
- } else {
- LOG.noMetadataForClientId(clientId);
- }
-
- return metadata;
- }
-
-}
diff --git a/gateway-service-restcatalog/src/main/java/org/apache/knox/gateway/service/restcatalog/i18n/TokenMetadataHandlerMessages.java b/gateway-service-restcatalog/src/main/java/org/apache/knox/gateway/service/restcatalog/i18n/TokenMetadataHandlerMessages.java
deleted file mode 100644
index 196d1a787..000000000
--- a/gateway-service-restcatalog/src/main/java/org/apache/knox/gateway/service/restcatalog/i18n/TokenMetadataHandlerMessages.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.knox.gateway.service.restcatalog.i18n;
-
-import org.apache.knox.gateway.i18n.messages.Message;
-import org.apache.knox.gateway.i18n.messages.MessageLevel;
-import org.apache.knox.gateway.i18n.messages.Messages;
-import org.apache.knox.gateway.i18n.messages.StackTrace;
-
-@Messages(logger = "org.apache.knox.gateway")
-public interface TokenMetadataHandlerMessages {
-
- @Message(level = MessageLevel.INFO, text = "Configured metadata header prefix: {0}")
- void configuredMetatadataHeaderPrefix(String prefix);
-
- @Message(level = MessageLevel.WARN, text = "There is no metadata associated with client ID: {0}")
- void noMetadataForClientId(String clientId);
-
- @Message(level = MessageLevel.ERROR, text = "Invalid client secret: {0}")
- void invalidClientSecret(@StackTrace(level = MessageLevel.DEBUG) Exception e);
-
- @Message(level = MessageLevel.ERROR, text = "Invalid client ID: {0} ; {1}")
- void invalidClientId(String clientId, @StackTrace(level = MessageLevel.DEBUG) Exception e);
-
-}
diff --git a/gateway-service-restcatalog/src/test/java/org/apache/knox/gateway/service/restcatalog/RestCatalogDispatchTest.java b/gateway-service-restcatalog/src/test/java/org/apache/knox/gateway/service/restcatalog/RestCatalogDispatchTest.java
deleted file mode 100644
index 508d9fde1..000000000
--- a/gateway-service-restcatalog/src/test/java/org/apache/knox/gateway/service/restcatalog/RestCatalogDispatchTest.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.knox.gateway.service.restcatalog;
-
-import org.apache.http.client.methods.HttpUriRequest;
-import org.apache.knox.gateway.security.CommonTokenConstants;
-import org.junit.Test;
-
-import java.util.Collections;
-import java.util.Map;
-import java.util.HashMap;
-
-import static org.junit.Assert.assertEquals;
-
-public class RestCatalogDispatchTest {
-
- private final RestCatalogDispatchTestUtils testUtils = new RestCatalogDispatchTestUtils();
-
- /**
- * If there are no client credentials in the request, then the metadata access and header additions should be
- * skipped altogether.
- *
- * @throws Exception
- */
- @Test
- public void testNoClientCredentialsInRequest() throws Exception {
- HttpUriRequest outboundRequest =
- testUtils.doTest(Collections.emptyMap(), "email,test", null, null, null);
-
- assertEquals("There should be no headers in the outbound request because the inbound request does not include client credentials.",
- 0, outboundRequest.getAllHeaders().length);
- }
-
- /**
- * Verify that metadata items configured for inclusion in outbound requests as headers are indeed included iff the
- * metadata item actually exists for the client_id, and that no other metadata items manifest as headers except the
- * default userName metadata.
- *
- * @throws Exception
- */
- @Test
- public void testIncludeConfiguredMetatadataAsHeaders() throws Exception {
- final String client_id = "4606f5e1-9d02-41a1-9071-26a9e74e4ab9";
- final String clientSecret =
- "TkRZd05tWTFaVEV0T1dRd01pMDBNV0V4TFRrd056RXRNalpoT1dVM05HVTBZV0k1OjpNV1JrWkRBMk1tVXRPV0ppTnkwMFkyWTVMVGxqTUdJdFpqWXhZalV5WTJGa1lURmw";
-
- final String metadata_email = "user@host.com";
- final String metadata_userName = "someuser";
- final String metadata_category = "test category";
- final String metadata_arbitrary = "somevalue";
-
- Map<String, String> metaMap = new HashMap<>();
- metaMap.put("email", metadata_email);
- metaMap.put("userName", metadata_userName);
- metaMap.put("category", metadata_category);
- metaMap.put("arbitrary", metadata_arbitrary);
- metaMap.put("enabled", "true");
-
- HttpUriRequest outboundRequest =
- testUtils.doTest(metaMap, "email, test", CommonTokenConstants.CLIENT_CREDENTIALS, client_id, clientSecret);
-
- assertEquals("Unexpected number of headers in the outbound request",2, outboundRequest.getAllHeaders().length);
- assertEquals("userName is not configured as metadata which should result in an outbound header, but it is included by default.",
- 1, outboundRequest.getHeaders(TokenMetadataHeaderHandler.DEFAULT_HEADER_PREFIX + "userName").length);
- assertEquals("email is configured as metadata which should result in an outbound header.",
- 1, outboundRequest.getHeaders(TokenMetadataHeaderHandler.DEFAULT_HEADER_PREFIX + "email").length);
- assertEquals("Even though the test metadata is configured, there should be no header since there is no actual such metadata.",
- 0,outboundRequest.getHeaders(TokenMetadataHeaderHandler.DEFAULT_HEADER_PREFIX + "arbitrary").length);
- assertEquals("Even though there is metadata by this name, it is not configured to be conveyed as a header, so it should be ignored.",
- 0, outboundRequest.getHeaders(TokenMetadataHeaderHandler.DEFAULT_HEADER_PREFIX + "test").length);
- }
-
- /**
- * Verify that metadata items configured for inclusion in outbound requests as headers are indeed included iff the
- * metadata item actually exists for the client_id, and that no other metadata items manifest as headers except the
- * default userName metadata.
- *
- * @throws Exception
- */
- @Test
- public void testIncludeConfiguredMetatadataAsHeadersWithConfigurablePrefix() throws Exception {
- final String customHeaderPrefix = "Test-Header-Prefix-";
- final String client_id = "4606f5e1-9d02-41a1-9071-26a9e74e4ab9";
- final String clientSecret =
- "TkRZd05tWTFaVEV0T1dRd01pMDBNV0V4TFRrd056RXRNalpoT1dVM05HVTBZV0k1OjpNV1JrWkRBMk1tVXRPV0ppTnkwMFkyWTVMVGxqTUdJdFpqWXhZalV5WTJGa1lURmw";
-
- final String metadata_email = "user@host.com";
- final String metadata_userName = "someuser";
- final String metadata_category = "test category";
- final String metadata_arbitrary = "somevalue";
-
- Map<String, String> metaMap = new HashMap<>();
- metaMap.put("email", metadata_email);
- metaMap.put("userName", metadata_userName);
- metaMap.put("category", metadata_category);
- metaMap.put("arbitrary", metadata_arbitrary);
- metaMap.put("enabled", "true");
-
- HttpUriRequest outboundRequest =
- testUtils.doTest(metaMap, "email,arbitrary", customHeaderPrefix, CommonTokenConstants.CLIENT_CREDENTIALS, client_id, clientSecret);
-
- assertEquals("Unexpected number of headers in the outbound request",3, outboundRequest.getAllHeaders().length);
- assertEquals("userName is not configured as metadata which should result in an outbound header, but it is included by default.",
- 1, outboundRequest.getHeaders(customHeaderPrefix + "userName").length);
- assertEquals("email is configured as metadata which should result in an outbound header.",
- 1, outboundRequest.getHeaders(customHeaderPrefix + "email").length);
- assertEquals("Even though the test metadata is configured, there should be no header since there is no actual such metadata.",
- 0,outboundRequest.getHeaders(customHeaderPrefix + "test").length);
- assertEquals("Since there is metadata by this name, and it is configured to be conveyed as a header, it should be present.",
- 1, outboundRequest.getHeaders(customHeaderPrefix + "arbitrary").length);
- }
-
-}
diff --git a/gateway-service-restcatalog/src/test/java/org/apache/knox/gateway/service/restcatalog/RestCatalogDispatchTestUtils.java b/gateway-service-restcatalog/src/test/java/org/apache/knox/gateway/service/restcatalog/RestCatalogDispatchTestUtils.java
deleted file mode 100644
index 80180ee96..000000000
--- a/gateway-service-restcatalog/src/test/java/org/apache/knox/gateway/service/restcatalog/RestCatalogDispatchTestUtils.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.knox.gateway.service.restcatalog;
-
-import org.apache.http.client.methods.HttpRequestBase;
-import org.apache.http.client.methods.HttpUriRequest;
-import org.apache.knox.gateway.security.CommonTokenConstants;
-import org.apache.knox.gateway.services.GatewayServices;
-import org.apache.knox.gateway.services.ServiceType;
-import org.apache.knox.gateway.services.security.token.TokenMetadata;
-import org.apache.knox.gateway.services.security.token.TokenStateService;
-import org.apache.knox.test.mock.MockHttpServletResponse;
-import org.easymock.EasyMock;
-import org.eclipse.jetty.http.HttpMethod;
-
-import javax.servlet.FilterConfig;
-import javax.servlet.ServletContext;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.util.Map;
-
-import static org.easymock.EasyMock.anyString;
-
-public class RestCatalogDispatchTestUtils {
-
- static FilterConfig createBaseMocks(final Map<String, String> metaMap,
- final String metaConfig,
- final String client_id) throws Exception {
- return createBaseMocks(metaMap, metaConfig, null, client_id);
- }
-
- static FilterConfig createBaseMocks(final Map<String, String> metaMap,
- final String metaConfig,
- final String headerPrefix,
- final String client_id) throws Exception {
- TokenMetadata mockMetadata = EasyMock.createNiceMock(TokenMetadata.class);
- EasyMock.expect(mockMetadata.getMetadataMap()).andReturn(metaMap).anyTimes();
- EasyMock.replay(mockMetadata);
-
- TokenStateService mockTss = EasyMock.createNiceMock(TokenStateService.class);
- if (client_id != null) {
- EasyMock.expect(mockTss.getTokenMetadata(client_id)).andReturn(mockMetadata).anyTimes();
- } else {
- EasyMock.expect(mockTss.getTokenMetadata(anyString())).andReturn(mockMetadata).anyTimes();
- }
- EasyMock.replay(mockTss);
-
- GatewayServices gws = EasyMock.createNiceMock(GatewayServices.class);
- EasyMock.expect(gws.getService(ServiceType.TOKEN_STATE_SERVICE)).andReturn(mockTss).anyTimes();
- EasyMock.replay(gws);
-
- ServletContext sc = EasyMock.createNiceMock(ServletContext.class);
- EasyMock.expect(sc.getAttribute(GatewayServices.GATEWAY_SERVICES_ATTRIBUTE)).andReturn(gws).anyTimes();
- EasyMock.replay(sc);
-
- FilterConfig filterConfig = EasyMock.createNiceMock(FilterConfig.class);
- EasyMock.expect(filterConfig.getServletContext()).andReturn(sc).anyTimes();
- EasyMock.expect(filterConfig.getInitParameter(TokenMetadataHeaderHandler.TOKEN_METADATA_PARAM)).andReturn(metaConfig).anyTimes();
- EasyMock.expect(filterConfig.getInitParameter(TokenMetadataHeaderHandler.METADATA_HEADER_PREFIX_PARAM)).andReturn(headerPrefix).anyTimes();
- EasyMock.replay(filterConfig);
-
- return filterConfig;
- }
-
- /**
- *
- * @param metaMap A Map of test token metadata
- * @param metaConfig The value of the token-metadata-headers service configuration param
- * @param grantType The grant type for the incoming request body
- * @param client_id A client_id for the incoming request body
- * @param clientSecret A client_secret for the incoming request body
- *
- * @return The resulting outbound request object.
- *
- * @throws Exception
- */
- HttpUriRequest doTest(final Map<String, String> metaMap,
- final String metaConfig,
- final String grantType,
- final String client_id,
- final String clientSecret) throws Exception {
- return doTest(metaMap, metaConfig, null, grantType, client_id, clientSecret);
- }
-
- /**
- *
- * @param metaMap A Map of test token metadata
- * @param metaConfig The value of the token-metadata-headers service configuration param
- * @param grantType The grant type for the incoming request body
- * @param client_id A client_id for the incoming request body
- * @param clientSecret A client_secret for the incoming request body
- *
- * @return The resulting outbound request object.
- *
- * @throws Exception
- */
- HttpUriRequest doTest(final Map<String, String> metaMap,
- final String metaConfig,
- final String headerPrefix,
- final String grantType,
- final String client_id,
- final String clientSecret) throws Exception {
- FilterConfig filterConfig = createBaseMocks(metaMap, metaConfig, headerPrefix, client_id);
-
- HttpServletRequest inboundRequest = EasyMock.createNiceMock(HttpServletRequest.class);
- EasyMock.expect(inboundRequest.getParameter(CommonTokenConstants.GRANT_TYPE)).andReturn(grantType).anyTimes();
- EasyMock.expect(inboundRequest.getParameter(CommonTokenConstants.CLIENT_SECRET)).andReturn(clientSecret).anyTimes();
- EasyMock.replay(inboundRequest);
-
- RestCatalogDispatch dispatch = new RestCatalogDispatch(filterConfig);
- dispatch.init();
-
- HttpServletResponse outboundResponse = new MockHttpServletResponse();
- HttpUriRequest outboundRequest = new TestHttpUriRequest();
- try {
- dispatch.executeRequest(outboundRequest, inboundRequest, outboundResponse);
- } catch (Exception e) {
- // Expected since the request is not complete and this test is only concerned with the outbound headers
- }
-
- return outboundRequest;
- }
-
-
- static class TestHttpUriRequest extends HttpRequestBase {
- private HttpMethod method = HttpMethod.GET;
-
- public void setMethod(HttpMethod method) {
- this.method = method;
- }
-
- @Override
- public String getMethod() {
- return method.name();
- }
- }
-}
diff --git a/gateway-service-restcatalog/src/test/java/org/apache/knox/gateway/service/restcatalog/RestCatalogHaDispatchTest.java b/gateway-service-restcatalog/src/test/java/org/apache/knox/gateway/service/restcatalog/RestCatalogHaDispatchTest.java
deleted file mode 100644
index 93f69f390..000000000
--- a/gateway-service-restcatalog/src/test/java/org/apache/knox/gateway/service/restcatalog/RestCatalogHaDispatchTest.java
+++ /dev/null
@@ -1,182 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.knox.gateway.service.restcatalog;
-
-import org.apache.http.Header;
-import org.apache.http.impl.client.CloseableHttpClient;
-import org.apache.http.impl.client.HttpClientBuilder;
-import org.apache.http.params.BasicHttpParams;
-import org.apache.knox.gateway.ha.provider.HaDescriptor;
-import org.apache.knox.gateway.ha.provider.HaProvider;
-import org.apache.knox.gateway.ha.provider.HaServiceConfig;
-import org.apache.knox.gateway.ha.provider.impl.DefaultHaProvider;
-import org.apache.knox.gateway.ha.provider.impl.HaDescriptorFactory;
-import org.apache.knox.gateway.security.CommonTokenConstants;
-import org.easymock.EasyMock;
-import org.easymock.IAnswer;
-import org.junit.Assert;
-import org.junit.Test;
-
-import javax.servlet.FilterConfig;
-import javax.servlet.ServletOutputStream;
-import javax.servlet.WriteListener;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import static org.junit.Assert.assertEquals;
-
-public class RestCatalogHaDispatchTest {
-
- private static final String LOCATION = "Location";
-
- @Test
- public void testConnectivityFailure() throws Exception {
- final URI uri1 = new URI("https://host1.invalid");
- final URI uri2 = new URI("https://host2.invalid");
- final URI uri3 = new URI("https://host3.invalid");
-
- final String client_id = "4606f5e1-9d02-41a1-9071-26a9e74e4ab9";
- final String clientSecret =
- "TkRZd05tWTFaVEV0T1dRd01pMDBNV0V4TFRrd056RXRNalpoT1dVM05HVTBZV0k1OjpNV1JrWkRBMk1tVXRPV0ppTnkwMFkyWTVMVGxqTUdJdFpqWXhZalV5WTJGa1lURmw";
-
- final String metadata_email = "user@host.com";
- final String metadata_userName = "someuser";
- final String metadata_category = "test category";
- final String metadata_arbitrary = "somevalue";
-
- Map<String, String> metaMap = new HashMap<>();
- metaMap.put("email", metadata_email);
- metaMap.put("userName", metadata_userName);
- metaMap.put("category", metadata_category);
- metaMap.put("arbitrary", metadata_arbitrary);
- metaMap.put("enabled", "true");
-
- List<URI> urls = new ArrayList<>();
- urls.add(uri1);
- urls.add(uri2);
- urls.add(uri3);
-
- HaServiceConfig serviceConfig =
- HaDescriptorFactory.createServiceConfig(RestCatalogHaDispatch.SERVICE_ROLE,
- "true",
- "1",
- "1000",
- null,
- null,
- null,
- null,
- null,
- null,
- null);
- HaProvider provider = createProvider(serviceConfig, urls);
- FilterConfig filterConfig =
- RestCatalogDispatchTestUtils.createBaseMocks(metaMap, "email, test", client_id);
-
- RestCatalogDispatchTestUtils.TestHttpUriRequest outboundRequest =
- new RestCatalogDispatchTestUtils.TestHttpUriRequest();
- outboundRequest.setURI(uri1);
- outboundRequest.setParams(new BasicHttpParams());
-
- HttpServletRequest inboundRequest = EasyMock.createNiceMock(HttpServletRequest.class);
- EasyMock.expect(inboundRequest.getParameter(CommonTokenConstants.GRANT_TYPE)).andReturn(CommonTokenConstants.CLIENT_CREDENTIALS).anyTimes();
- EasyMock.expect(inboundRequest.getParameter(CommonTokenConstants.CLIENT_SECRET)).andReturn(clientSecret).anyTimes();
- EasyMock.expect(inboundRequest.getRequestURL()).andReturn(new StringBuffer(uri2.toString())).once();
- EasyMock.expect(inboundRequest.getAttribute("dispatch.ha.failover.counter")).andReturn(new AtomicInteger(0)).once();
- EasyMock.expect(inboundRequest.getAttribute("dispatch.ha.failover.counter")).andReturn(new AtomicInteger(1)).once();
-
- HttpServletResponse outboundResponse = EasyMock.createNiceMock(HttpServletResponse.class);
- EasyMock.expect(outboundResponse.getOutputStream()).andAnswer(new IAnswer<ServletOutputStream>() {
- @Override
- public ServletOutputStream answer() throws Throwable {
- return new ServletOutputStream() {
- @Override
- public void write(int b) throws IOException {
- throw new IOException("unreachable-host.invalid");
- }
-
- @Override
- public void setWriteListener(WriteListener arg0) {
- }
-
- @Override
- public boolean isReady() {
- return false;
- }
- };
- }
- }).once();
- EasyMock.replay(inboundRequest, outboundResponse);
-
- assertEquals(uri1.toString(), provider.getActiveURL(RestCatalogHaDispatch.SERVICE_ROLE));
- RestCatalogHaDispatch dispatch = new RestCatalogHaDispatch(filterConfig);
- HttpClientBuilder builder = HttpClientBuilder.create();
- CloseableHttpClient client = builder.build();
- dispatch.setHttpClient(client);
- dispatch.setHaProvider(provider);
- dispatch.init();
- long startTime = System.currentTimeMillis();
- try {
- dispatch.executeRequest(outboundRequest, inboundRequest, outboundResponse);
- } catch (IOException e) {
- //this is expected after the failover limit is reached
- }
- long elapsedTime = System.currentTimeMillis() - startTime;
- assertEquals(uri3.toString(), provider.getActiveURL(RestCatalogHaDispatch.SERVICE_ROLE));
-
- // Validate the outbound request headers expected from the token metadata
- assertEquals("Unexpected number of headers in the outbound request",2, outboundRequest.getAllHeaders().length);
- Header[] usernameHeaders = outboundRequest.getHeaders(TokenMetadataHeaderHandler.DEFAULT_HEADER_PREFIX + "userName");
- assertEquals("userName is not configured as metadata which should result in an outbound header, but it is included by default.",
- 1, usernameHeaders.length);
- assertEquals(metadata_userName, usernameHeaders[0].getValue());
- Header[] emailHeaders = outboundRequest.getHeaders(TokenMetadataHeaderHandler.DEFAULT_HEADER_PREFIX + "email");
- assertEquals("email is configured as metadata which should result in an outbound header.",
- 1, emailHeaders.length);
- assertEquals(metadata_email, emailHeaders[0].getValue());
- assertEquals("Even though the test metadata is configured, there should be no header since there is no actual such metadata.",
- 0,outboundRequest.getHeaders(TokenMetadataHeaderHandler.DEFAULT_HEADER_PREFIX + "test").length);
- assertEquals("Even though there is metadata by this name, it is not configured to be conveyed as a header, so it should be ignored.",
- 0, outboundRequest.getHeaders(TokenMetadataHeaderHandler.DEFAULT_HEADER_PREFIX + "arbitrary").length);
-
- //test to make sure the sleep took place
- Assert.assertTrue(elapsedTime > 1000);
- }
-
- private HaProvider createProvider(HaServiceConfig serviceConfig, List<URI> urls) throws Exception {
- HaDescriptor descriptor = HaDescriptorFactory.createDescriptor();
- descriptor.addServiceConfig(serviceConfig);
-
- ArrayList<String> urlList = new ArrayList<>();
- for (URI uri : urls) {
- urlList.add(uri.toString());
- }
-
- HaProvider provider = new DefaultHaProvider(descriptor);
- provider.addHaService(RestCatalogHaDispatch.SERVICE_ROLE, urlList);
-
- return provider;
- }
-
-}
diff --git a/gateway-spi/src/main/java/org/apache/knox/gateway/security/CommonTokenConstants.java b/gateway-spi/src/main/java/org/apache/knox/gateway/security/CommonTokenConstants.java
deleted file mode 100644
index 1537f698b..000000000
--- a/gateway-spi/src/main/java/org/apache/knox/gateway/security/CommonTokenConstants.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.knox.gateway.security;
-
-public interface CommonTokenConstants {
-
- String GRANT_TYPE = "grant_type";
-
- String CLIENT_CREDENTIALS = "client_credentials";
-
- String CLIENT_ID = "client_id";
-
- String CLIENT_SECRET = "client_secret";
-
-}
diff --git a/gateway-test-release/webhdfs-kerb-test/pom.xml b/gateway-test-release/webhdfs-kerb-test/pom.xml
index f5b6c1641..8c3b47a69 100644
--- a/gateway-test-release/webhdfs-kerb-test/pom.xml
+++ b/gateway-test-release/webhdfs-kerb-test/pom.xml
@@ -138,6 +138,10 @@
<groupId>org.objenesis</groupId>
<artifactId>objenesis</artifactId>
</exclusion>
+ <exclusion>
+ <groupId>net.bytebuddy</groupId>
+ <artifactId>byte-buddy</artifactId>
+ </exclusion>
</exclusions>
</dependency>
</dependencies>
diff --git a/gateway-test-release/webhdfs-test/pom.xml b/gateway-test-release/webhdfs-test/pom.xml
index aad1a6380..c035ce208 100644
--- a/gateway-test-release/webhdfs-test/pom.xml
+++ b/gateway-test-release/webhdfs-test/pom.xml
@@ -113,6 +113,10 @@
<groupId>org.objenesis</groupId>
<artifactId>objenesis</artifactId>
</exclusion>
+ <exclusion>
+ <groupId>net.bytebuddy</groupId>
+ <artifactId>byte-buddy</artifactId>
+ </exclusion>
</exclusions>
</dependency>
</dependencies>
diff --git a/pom.xml b/pom.xml
index af8547cb8..0b4c87017 100644
--- a/pom.xml
+++ b/pom.xml
@@ -122,7 +122,6 @@
<module>gateway-service-rm</module>
<module>gateway-service-storm</module>
<module>gateway-service-remoteconfig</module>
- <module>gateway-service-restcatalog</module>
<module>gateway-service-definitions</module>
<module>gateway-shell</module>
<module>gateway-shell-launcher</module>
@@ -200,7 +199,7 @@
<hsql.db.version>2.7.1</hsql.db.version>
<dockerfile-maven-plugin.version>1.4.13</dockerfile-maven-plugin.version>
<dom4j.version>2.1.3</dom4j.version>
- <easymock.version>5.2.0</easymock.version>
+ <easymock.version>5.6.0</easymock.version>
<eclipselink.version>2.7.8</eclipselink.version>
<ehcache.version>3.3.1</ehcache.version>
<exec-maven-plugin.version>3.0.0</exec-maven-plugin.version>
@@ -307,7 +306,7 @@
<jakarta.activation.version>2.0.1</jakarta.activation.version>
<jakarta.json.version>2.1.3</jakarta.json.version>
<eclipse.parsson.version>1.1.7</eclipse.parsson.version>
- <objenesis.version>3.3</objenesis.version>
+ <objenesis.version>3.4</objenesis.version>
<moxy.version>4.0.2</moxy.version>
<maven.surefire.plugin.version>3.5.3</maven.surefire.plugin.version>
<maven.failsafe.plugin.version>3.5.3</maven.failsafe.plugin.version>
@@ -2847,7 +2846,11 @@
<groupId>org.objenesis</groupId>
<artifactId>objenesis</artifactId>
</exclusion>
- </exclusions>
+ <exclusion>
+ <groupId>net.bytebuddy</groupId>
+ <artifactId>byte-buddy</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>