Compare commits

...
3 Commits
15 changed files with 35 additions and 46 deletions

No files matched your search

+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<groupId>timely</groupId>
<artifactId>timely</artifactId>
<version>2.2.3</version>
<version>2.2.5</version>
</parent>
<artifactId>timely-analytics</artifactId>
<!--
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<groupId>timely</groupId>
<artifactId>timely</artifactId>
<version>2.2.3</version>
<version>2.2.5</version>
</parent>
<artifactId>timely-balancer</artifactId>
<description>Timely Balancer</description>
@@ -419,7 +419,7 @@ public class Balancer {
@Override
protected void initChannel(SocketChannel ch) {
ch.pipeline().addLast("nonsslforbidden", new NonSslForbiddenHandler(balancerHttpProperties, sslCtx));
ch.pipeline().addLast("nonsslforbidden", new NonSslForbiddenHandler(sslCtx));
ch.pipeline().addLast("encoder", new HttpResponseEncoder());
ch.pipeline().addLast("strict", new HttpStrictTransportSecurityHandler(balancerHttpProperties));
ch.pipeline().addLast("decoder", new HttpRequestDecoder(4096, 32768, 8192, true, 128));
+2 -2
View File
@@ -4,13 +4,13 @@
<parent>
<groupId>timely</groupId>
<artifactId>timely</artifactId>
<version>2.2.3</version>
<version>2.2.5</version>
</parent>
<artifactId>timely-client</artifactId>
<properties>
<!-- PEP 440 compliant version gets substituted into src/main/python/template/setup.py -->
<!-- use .dev0 instead of -SNAPSHOT -->
<python.client.version>2.2.3</python.client.version>
<python.client.version>2.2.5</python.client.version>
</properties>
<dependencies>
<dependency>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<groupId>timely</groupId>
<artifactId>timely</artifactId>
<version>2.2.3</version>
<version>2.2.5</version>
</parent>
<artifactId>timely-collectd</artifactId>
<dependencies>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<groupId>timely</groupId>
<artifactId>timely</artifactId>
<version>2.2.3</version>
<version>2.2.5</version>
</parent>
<artifactId>timely-common</artifactId>
<dependencies>
@@ -4,24 +4,21 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import io.netty.buffer.Unpooled;
import io.netty.channel.ChannelFutureListener;
import io.netty.channel.ChannelHandler;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundHandlerAdapter;
import io.netty.handler.codec.http.DefaultFullHttpResponse;
import io.netty.handler.codec.http.FullHttpResponse;
import io.netty.handler.codec.http.HttpResponseEncoder;
import io.netty.handler.codec.http.HttpResponseStatus;
import io.netty.handler.codec.http.HttpVersion;
import io.netty.handler.ssl.OptionalSslHandler;
import io.netty.handler.ssl.SslContext;
import timely.common.configuration.HttpProperties;
import io.netty.util.CharsetUtil;
import io.netty.util.ReferenceCountUtil;
import timely.netty.Constants;
public class NonSslForbiddenHandler extends OptionalSslHandler implements TimelyHttpHandler {
public class NonSslForbiddenHandler extends OptionalSslHandler {
private static final Logger log = LoggerFactory.getLogger(NonSslForbiddenHandler.class);
public NonSslForbiddenHandler(HttpProperties httpProperties, SslContext sslContext) {
public NonSslForbiddenHandler(SslContext sslContext) {
super(sslContext);
}
@@ -32,24 +29,24 @@ public class NonSslForbiddenHandler extends OptionalSslHandler implements Timely
@Override
protected String newNonSslHandlerName() {
return "ssl";
return "nonSslForbidden";
}
@Override
protected ChannelHandler newNonSslHandler(ChannelHandlerContext context) {
return new ChannelInboundHandlerAdapter() {
private HttpResponseEncoder encoder = new HttpResponseEncoder();
@Override
public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
log.trace("Received non-SSL request, returning redirect");
FullHttpResponse response = new DefaultFullHttpResponse(HttpVersion.HTTP_1_1, HttpResponseStatus.FORBIDDEN, Unpooled.EMPTY_BUFFER);
log.trace(Constants.LOG_RETURNING_RESPONSE, response);
encoder.write(ctx, response, ctx.voidPromise());
ctx.flush();
public void channelRead(ChannelHandlerContext ctx, Object msg) {
try {
log.trace("Received non-SSL request, returning forbidden");
String response = "HTTP/1.1 403 Forbidden\r\nContent-Length: 0\r\n\r\n";
log.trace(Constants.LOG_RETURNING_RESPONSE, response);
ctx.writeAndFlush(Unpooled.copiedBuffer(response, CharsetUtil.UTF_8)).addListener(ChannelFutureListener.CLOSE);
} finally {
ReferenceCountUtil.release(msg);
}
}
};
}
}
@@ -15,10 +15,6 @@
*/
package timely.netty.http;
import static io.netty.handler.codec.http.HttpHeaderNames.CONTENT_TYPE;
import static io.netty.handler.codec.http.HttpResponseStatus.NOT_FOUND;
import static io.netty.handler.codec.http.HttpVersion.HTTP_1_1;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -29,8 +25,10 @@ import io.netty.channel.SimpleChannelInboundHandler;
import io.netty.handler.codec.http.DefaultFullHttpResponse;
import io.netty.handler.codec.http.FullHttpRequest;
import io.netty.handler.codec.http.FullHttpResponse;
import io.netty.handler.codec.http.HttpHeaderNames;
import io.netty.handler.codec.http.HttpHeaderValues;
import io.netty.handler.codec.http.HttpResponseStatus;
import io.netty.util.CharsetUtil;
import io.netty.handler.codec.http.HttpVersion;
import timely.netty.Constants;
public class NotFoundHandler extends SimpleChannelInboundHandler<FullHttpRequest> implements TimelyHttpHandler {
@@ -40,15 +38,9 @@ public class NotFoundHandler extends SimpleChannelInboundHandler<FullHttpRequest
@Override
public void channelRead0(ChannelHandlerContext ctx, FullHttpRequest request) throws Exception {
// if the request reaches this handler, it means that no other handler has processed it, so we return a 404 Not Found response
sendError(ctx, NOT_FOUND);
}
private static void sendError(ChannelHandlerContext ctx, HttpResponseStatus status) {
FullHttpResponse response = new DefaultFullHttpResponse(HTTP_1_1, status, Unpooled.copiedBuffer("Failure: " + status + "\r\n", CharsetUtil.UTF_8));
response.headers().set(CONTENT_TYPE, "text/plain; charset=UTF-8");
// Close the connection as soon as the error message is sent.
ctx.writeAndFlush(response).addListener(ChannelFutureListener.CLOSE);
FullHttpResponse response = new DefaultFullHttpResponse(HttpVersion.HTTP_1_1, HttpResponseStatus.NOT_FOUND, Unpooled.EMPTY_BUFFER);
response.headers().set(HttpHeaderNames.CONTENT_LENGTH, 0);
log.trace(Constants.LOG_RETURNING_RESPONSE, response);
ctx.writeAndFlush(response).addListener(ChannelFutureListener.CLOSE);
}
}
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<groupId>timely</groupId>
<artifactId>timely</artifactId>
<version>2.2.3</version>
<version>2.2.5</version>
</parent>
<artifactId>timely-datasource</artifactId>
<packaging>pom</packaging>
+1 -1
View File
@@ -31,7 +31,7 @@
}
],
"screenshots": [],
"version": "2.2.3",
"version": "2.2.5",
"updated": "2026-10-19"
},
"dependencies": {
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "timely",
"version": "2.2.3",
"version": "2.2.5",
"scripts": {
"build": "webpack -c ./.config/webpack/webpack.config.ts --env production",
"dev": "webpack -w -c ./.config/webpack/webpack.config.ts --env development",
+1 -1
View File
@@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>timely</groupId>
<artifactId>timely</artifactId>
<version>2.2.3</version>
<version>2.2.5</version>
<packaging>pom</packaging>
<name>Timely</name>
<description>A secure and scalable time series database based on Apache Accumulo</description>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<groupId>timely</groupId>
<artifactId>timely</artifactId>
<version>2.2.3</version>
<version>2.2.5</version>
</parent>
<artifactId>timely-server</artifactId>
<description>Timely Server</description>
@@ -488,7 +488,7 @@ public class Server {
protected void setupHttpSocketChannel(SocketChannel ch, MetaCache metaCache, TimelyProperties timelyProperties, HttpProperties httpProperties,
SslContext sslCtx) {
ch.pipeline().addLast("nonsslforbidden", new NonSslForbiddenHandler(httpProperties, sslCtx));
ch.pipeline().addLast("nonsslforbidden", new NonSslForbiddenHandler(sslCtx));
ch.pipeline().addLast("encoder", new HttpResponseEncoder());
ch.pipeline().addLast("strict", new HttpStrictTransportSecurityHandler(httpProperties));
ch.pipeline().addLast("decoder", new HttpRequestDecoder(4096, 32768, 8192, true, 128));
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<groupId>timely</groupId>
<artifactId>timely</artifactId>
<version>2.2.3</version>
<version>2.2.5</version>
</parent>
<artifactId>timely-test</artifactId>
<properties>