Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
83a6f12
httpd: added listener index to http request
mmaslankaprv Apr 1, 2021
e667a1b
http: enable specifying a content type on exceptions
jcsp Dec 9, 2021
ef5cda8
http: don't jsonize exception if has content type
jcsp Dec 9, 2021
842e408
http: use base_exception content type in non-json errors
jcsp Dec 9, 2021
4fd4746
metrics: allow multiple metrics::impl instances
Jun 1, 2022
3ac5220
metrics: expose metric impl handle to internal api
Jun 22, 2022
5db62b1
metrics: expose handle in metric_groups_impl
Jul 18, 2022
0154d17
metrics: expose metric impl handle to external api
Jun 22, 2022
c808b5b
metrics: Use handle for impl object
Jun 22, 2022
b11f0e6
prometheus: support multiple metric impls
Jun 1, 2022
d793184
scollectd: select internal metrics implementation
Jun 1, 2022
74842fa
metrics: Expose 'skip_when_empty' for metrics
Jul 7, 2022
6bf71b3
metrics: add helpers for creation of replicas
Jul 12, 2022
df91e5b
metrics: allow for removal of replicated metrics
Jul 11, 2022
2b21b5e
metrics: add metric replication internal interface
Jul 12, 2022
de4f99c
metrics: register replicated metrics dinamically
Jul 11, 2022
a66876a
metrics: public family replication interface
Jul 12, 2022
3373d1e
tests: add metrics replication unit tests
Jul 11, 2022
e9a912b
metrics: Add update_aggregate_labels()
StephanDollberg Oct 19, 2023
d1a05bf
tests: remove unneeded prometheus CMake command
ballard26 Sep 11, 2024
9f55ef0
scheduling_group: expose usage statistics
Aug 8, 2022
0099353
net/dns: fixed socket concurrent access
mmaslankaprv Nov 2, 2022
1115131
http: rename http client logger
dotnwat Apr 18, 2023
d666c35
Revert default backend to aio
travisdowns May 31, 2023
2b4a242
reactor: refactor timers out of stall_detector
ballard26 May 8, 2023
950efcb
tests/unit: refactor stall_detector test functions
ballard26 May 8, 2023
9bbcfd3
make a function inline
travisdowns Jul 12, 2025
a0991d1
core: add required include to circular_buffer_fixed_capacity
ballard26 May 11, 2023
8fd53a6
core: cpu profiler implementation
ballard26 May 8, 2023
66ea479
core/cpu_profiler: avoid taking samples during exception unwinding
ballard26 Aug 28, 2023
f09a701
tests/cpu_profiler: add test to verify that `on_signal` doesn't allocate
ballard26 Aug 28, 2023
ef12542
tests/cpu_profiler: add tests that ensure correct behavior during exc…
ballard26 Aug 30, 2023
0465a9a
core/cpu_profiler: finer-grain stats for why a sample was dropped
ballard26 Aug 28, 2023
ed0e5cc
Store original values from io-priorities yaml
Lazin Sep 25, 2023
928b2e1
core/cpu_profiler: add danger zone escape hatch
rockwotj Apr 4, 2024
1f0dae6
tests: fix cpu_profiler unit tests
ballard26 Jan 10, 2025
b678901
cpu_profiler: disable two tests which are hanging
travisdowns Feb 19, 2025
019837b
cpu_profiler: strip trailing whitespace
travisdowns Feb 18, 2025
5e3ddcb
cpu_profiler: include SG in sample
travisdowns Feb 18, 2025
769a950
cpu_profiler: test for scheduling groups
travisdowns Feb 18, 2025
334871d
stall_detector: fix unused function warning/error
travisdowns Feb 20, 2025
5196e6a
cpu_profiler: fix comment and name
travisdowns Feb 20, 2025
ae033da
cpu_profiler_test: expand accepted sample count
travisdowns Feb 20, 2025
86cf19a
cpu_profiler_test: yet more flakiness reduction
travisdowns Feb 20, 2025
f076662
cpu_profiler: deflake cpu_profiler_test
travisdowns Apr 14, 2025
d4e9b58
cpu_profiler_test: yet more flakiness reduction - again
BenPope Aug 10, 2025
217172b
core/internal: refactor signal_mutex into its own header/object
ballard26 May 20, 2025
853160c
backtrace: guard libgcc's backtrace to avoid concurrent calls
ballard26 May 20, 2025
c6e36e8
backtrace: move guarded_backtrace, build fix
travisdowns Jul 11, 2025
51dbd2a
cpu_profiler_test: disable if backtrace unimplemented
travisdowns Jul 12, 2025
1a69706
internal/timers: Add missing #include <atomic>
BenPope Mar 9, 2024
1e94cef
Revert "util/log: drop unused function"
Apr 25, 2024
6525705
io_queue: add smp header to get full smp def
ballard26 Oct 2, 2024
6206560
treewide: specify ambiguous format calls
ballard26 Oct 2, 2024
5879359
treewide: explicitly ignore write/read results in specific areas
ballard26 Oct 3, 2024
4679e7d
core: make reference counting in deleter atomic
ballard26 Oct 15, 2024
5f3b58f
core: make custom deleter constructor private
ballard26 Oct 31, 2024
8a1fca3
core: make `deleter::append` private
ballard26 Nov 5, 2024
5cfb38e
core: add hdr_hist to temporary_buffer's friends
ballard26 Nov 6, 2024
698b666
net: Modify call to ::format to ::format_to
May 3, 2024
2f8fdbd
demos: Allow for setting additional key settings
michael-redpanda May 29, 2024
79e2b86
http: add `to_reply()` in `httpd::redirect_exception`
WillemKauf Apr 18, 2024
2bdd229
http/client: do not depend on gnutls for error handling
mmaslankaprv May 21, 2025
a161b26
reactor: access sigevent.sigev_notify_thread_id with a macro
a16bitsysop Aug 29, 2023
6ad5d14
tls: Create tls-impl
michael-redpanda Dec 5, 2024
12f2f85
tls: Added OpenSSL implementation
michael-redpanda Dec 6, 2024
f69d6e0
tls: Added tls_logger and log statements
michael-redpanda Dec 4, 2024
caea376
tls/ossl: Improved handling of OpenSSL error conditions
michael-redpanda Jun 26, 2025
26c1e82
test/tls: Using CA extension for generating CA
michael-redpanda Dec 4, 2024
6f69012
tls/test: Updated test_reload_certificates
michael-redpanda Dec 5, 2024
27de1a2
tls(ossl): Made renegotiation disabled by default
michael-redpanda Jun 24, 2025
3aaa5fd
ossl: use raw pointer instead of iterator
rockwotj Feb 17, 2025
67d1f5b
tls: Added support for fetching DN in RFC2253 format
michael-redpanda Feb 28, 2025
d5ef099
GHA-alpine: build with OpenSSL
travisdowns Jul 12, 2025
3dd1fae
GHA: disable modules build
travisdowns Apr 14, 2025
7d04ed2
net/tls: Add reload_callback_with_creds
oleiman Sep 26, 2023
3ff475f
net/tls: Introduce cert_info and accessors
oleiman Sep 26, 2023
d621e9e
net/tls(ossl): Introduce cert_info and accessors
BenPope Aug 5, 2025
8391f9a
tls_test: Add tests for new reload callback and cert_info accessors
oleiman Oct 6, 2023
2f57f10
net/tls: Adjust type for cert_info.serial
oleiman Oct 27, 2023
7b03115
tls: Include trust file contents with reload callback
oleiman Apr 2, 2024
83d10cd
net/tls: Replace cert_info::bytes with vector<byte>
oleiman May 7, 2024
93ae4f7
disable exception interception when ASAN enabled
travisdowns Jul 31, 2025
a194891
treewide: temporarily comment out some deprecated annotations
ballard26 Jan 10, 2025
f6062fb
io-queue: Refactor cost function
StephanDollberg Jul 24, 2025
68c3a6f
io-queue: Use max cost function by default
StephanDollberg Jul 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/alpinelinux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ jobs:
run: |
cmake -B build -G Ninja \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DSeastar_USE_OPENSSL=yes \
-DSeastar_DOCS=OFF

- name: Build Seastar
Expand Down
22 changes: 14 additions & 8 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ on:
type: string
default: ''
required: false
crypto_provider:
description: 'cryptographic provider to use'
type: string
default: 'GnuTLS'
required: false

jobs:
test:
Expand Down Expand Up @@ -81,14 +86,15 @@ jobs:
if ${{ inputs.enable-ccache }}; then
MAYBE_CCACHE_OPT="--ccache"
fi
./configure.py \
--c++-standard ${{ inputs.standard }} \
--compiler ${{ inputs.compiler }} \
--c-compiler $CC \
--mode ${{ inputs.mode }} \
$MAYBE_CCACHE_OPT \
${{ inputs.options }} \
${{ inputs.enables }}
./configure.py \
--c++-standard ${{ inputs.standard }} \
--compiler ${{ inputs.compiler }} \
--c-compiler $CC \
--mode ${{ inputs.mode }} \
$MAYBE_CCACHE_OPT \
${{ inputs.options }} \
${{ inputs.enables }} \
--crypto-provider ${{ inputs.crypto_provider }}

- name: Build
run: cmake --build build/${{inputs.mode}}
Expand Down
27 changes: 24 additions & 3 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,22 @@ concurrency:

jobs:
regular_test:
name: "Test (${{ matrix.compiler }}, C++${{ matrix.standard}}, ${{ matrix.mode }})"
name: "Test (${{ matrix.compiler }}, C++${{ matrix.standard}}, ${{ matrix.mode }}, ${{ matrix.crypto_provider }})"
uses: ./.github/workflows/test.yaml
strategy:
fail-fast: false
matrix:
compiler: [clang++, g++]
standard: [20, 23]
mode: [dev, debug, release]
crypto_provider: [GnuTLS, OpenSSL]
with:
compiler: ${{ matrix.compiler }}
standard: ${{ matrix.standard }}
mode: ${{ matrix.mode }}
enables: ${{ matrix.enables }}
options: ${{ matrix.options }}
crypto_provider: ${{ matrix.crypto_provider }}
build_with_dpdk:
name: "Test with DPDK enabled"
uses: ./.github/workflows/test.yaml
Expand All @@ -36,8 +38,8 @@ jobs:
mode: release
enables: --enable-dpdk
options: --cook dpdk
build_with_cxx_modules:
name: "Test with C++20 modules enabled"
build_with_cxx_modules_gnutls:
name: "Test with C++20 modules enabled (GnuTLS)"
uses: ./.github/workflows/test.yaml
strategy:
fail-fast: false
Expand All @@ -47,3 +49,22 @@ jobs:
mode: debug
enables: --enable-cxx-modules
enable-ccache: false
crypto_provider: GnuTLS
# disable modules build as we aren't using module and it is quite
# broken at the moment
if: false
build_with_cxx_modules_openssl:
name: "Test with C++20 modules enabled (OpenSSL)"
uses: ./.github/workflows/test.yaml
strategy:
fail-fast: false
with:
compiler: clang++
standard: 23
mode: debug
enables: --enable-cxx-modules
enable-ccache: false
crypto_provider: OpenSSL
# disable modules build as we aren't using module and it is quite
# broken at the moment
if: false
23 changes: 21 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,16 @@ if (NOT Seastar_SCHEDULING_GROUPS_COUNT MATCHES "^[1-9][0-9]*")
message(FATAL_ERROR "Seastar_SCHEDULING_GROUPS_COUNT must be a positive number (${Seastar_SCHEDULING_GROUPS_COUNT})")
endif ()

option (Seastar_USE_OPENSSL
"Use OpenSSL rather than GnuTLS for cryptographic operations, including TLS"
OFF)

if (Seastar_USE_OPENSSL)
set (Seastar_USE_GNUTLS OFF)
else ()
set (Seastar_USE_GNUTLS ON)
endif ()

#
# Add a dev build type.
#
Expand Down Expand Up @@ -677,6 +687,7 @@ add_library (seastar
src/core/reactor_backend.cc
src/core/thread_pool.cc
src/core/app-template.cc
src/core/cpu_profiler.cc
src/core/disk_params.cc
src/core/dpdk_rte.cc
src/core/exception_hacks.cc
Expand Down Expand Up @@ -709,6 +720,7 @@ add_library (seastar
src/core/io_queue.cc
src/core/semaphore.cc
src/core/condition-variable.cc
src/core/signal_mutex.cc
src/http/api_docs.cc
src/http/common.cc
src/http/file_handler.cc
Expand Down Expand Up @@ -736,13 +748,16 @@ add_library (seastar
src/net/native-stack-impl.hh
src/net/native-stack.cc
src/net/net.cc
$<$<BOOL:${Seastar_USE_OPENSSL}>:src/net/ossl.cc>
src/net/packet.cc
src/net/posix-stack.cc
src/net/proxy.cc
src/net/socket_address.cc
src/net/stack.cc
src/net/tcp.cc
src/net/tls.cc
$<$<BOOL:${Seastar_USE_GNUTLS}>:src/net/tls.cc>
src/net/tls-impl.cc
src/net/tls-impl.hh
src/net/udp.cc
src/net/unix_address.cc
src/net/virtio.cc
Expand Down Expand Up @@ -840,7 +855,9 @@ target_link_libraries (seastar
SourceLocation::source_location
PRIVATE
${CMAKE_DL_LIBS}
GnuTLS::gnutls
$<$<BOOL:${Seastar_USE_GNUTLS}>:GnuTLS::gnutls>
$<$<BOOL:${Seastar_USE_OPENSSL}>:OpenSSL::SSL>
$<$<BOOL:${Seastar_USE_OPENSSL}>:OpenSSL::Crypto>
StdAtomic::atomic
lksctp-tools::lksctp-tools
protobuf::libprotobuf
Expand Down Expand Up @@ -892,6 +909,8 @@ include (CTest)
target_compile_definitions(seastar
PUBLIC
SEASTAR_API_LEVEL=${Seastar_API_LEVEL}
$<$<BOOL:${Seastar_USE_OPENSSL}>:SEASTAR_USE_OPENSSL>
$<$<BOOL:${Seastar_USE_GNUTLS}>:SEASTAR_USE_GNUTLS>
$<$<BOOL:${BUILD_SHARED_LIBS}>:SEASTAR_BUILD_SHARED_LIBS>)

target_compile_features(seastar
Expand Down
7 changes: 6 additions & 1 deletion cmake/SeastarDependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,12 @@ macro (seastar_find_dependencies)
endif()
seastar_find_dep (fmt 8.1.1 REQUIRED)
seastar_find_dep (lz4 1.7.3 REQUIRED)
seastar_find_dep (GnuTLS 3.3.26 REQUIRED)
if (Seastar_USE_GNUTLS)
seastar_find_dep (GnuTLS 3.3.26 REQUIRED)
endif()
if (Seastar_USE_OPENSSL)
seastar_find_dep (OpenSSL 3.0.0 REQUIRED)
endif()
if (Seastar_IO_URING)
seastar_find_dep (LibUring 2.0 REQUIRED)
endif()
Expand Down
7 changes: 7 additions & 0 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ def standard_supported(standard, compiler='g++'):
arg_parser.add_argument('--verbose', dest='verbose', action='store_true', help='Make configure output more verbose.')
arg_parser.add_argument('--scheduling-groups-count', action='store', dest='scheduling_groups_count', default='16',
help='Number of available scheduling groups in the reactor')
arg_parser.add_argument('--crypto-provider', dest='crypto_provider', choices=seastar_cmake.SUPPORTED_CRYPTO_PROVIDERS,
default='GnuTLS', help='The cryptographic provider ot use')
arg_parser.add_argument('--openssl-root-dir', dest='openssl_root_dir', help="Root directory for OpenSSL library")

add_tristate(
arg_parser,
Expand Down Expand Up @@ -191,6 +194,7 @@ def configure_mode(mode):
'-DBUILD_SHARED_LIBS={}'.format('yes' if mode in ('debug', 'dev') else 'no'),
'-DSeastar_API_LEVEL={}'.format(args.api_level),
'-DSeastar_SCHEDULING_GROUPS_COUNT={}'.format(args.scheduling_groups_count),
'-DSeastar_USE_OPENSSL={}'.format('yes' if args.crypto_provider == 'OpenSSL' else 'no'),
tr(args.exclude_tests, 'EXCLUDE_TESTS_FROM_ALL'),
tr(args.exclude_apps, 'EXCLUDE_APPS_FROM_ALL'),
tr(args.exclude_demos, 'EXCLUDE_DEMOS_FROM_ALL'),
Expand All @@ -211,6 +215,9 @@ def configure_mode(mode):
tr(args.debug_shared_ptr, 'DEBUG_SHARED_PTR', value_when_none='default'),
]

if args.openssl_root_dir is not None:
TRANSLATED_ARGS.appen(f'-DOPENSSL_ROOT_DIR={args.openssl_root_dir}')

ingredients_to_cook = set(args.cook)

if args.dpdk:
Expand Down
124 changes: 70 additions & 54 deletions demos/tls_echo_server.hh
Original file line number Diff line number Diff line change
Expand Up @@ -46,70 +46,86 @@ class echoserver {
seastar::gate _gate;
bool _stopped = false;
bool _verbose = false;

future<stop_iteration> run_once() {
if (_stopped) {
return make_ready_future<stop_iteration>(stop_iteration::yes);
}
return with_gate(_gate, [this] {
return _socket.accept().then([this](accept_result ar) {
::connected_socket s = std::move(ar.connection);
socket_address a = std::move(ar.remote_address);
if (_verbose) {
std::cout << "Got connection from "<< a << std::endl;
}
auto strms = make_lw_shared<streams>(std::move(s));
return repeat([strms, this]() {
return strms->in.read().then([this, strms](temporary_buffer<char> buf) {
if (buf.empty()) {
if (_verbose) {
std::cout << "EOM" << std::endl;
}
return make_ready_future<stop_iteration>(stop_iteration::yes);
}
sstring tmp(buf.begin(), buf.end());
if (_verbose) {
std::cout << "Read " << tmp.size() << "B" << std::endl;
}
return strms->out.write(tmp).then([strms]() {
return strms->out.flush();
}).then([] {
return make_ready_future<stop_iteration>(stop_iteration::no);
});
});
}).then([strms]{
return strms->out.close();
}).handle_exception([](auto ep) {
std::cout << "Exception: " << ep << std::endl;
}).finally([this, strms]{
if (_verbose) {
std::cout << "Ending session" << std::endl;
}
return strms->in.close();
});
}).handle_exception([this](auto ep) {
if (!_stopped) {
std::cerr << "Error: " << ep << std::endl;
}
}).then([this] {
return make_ready_future<stop_iteration>(_stopped ? stop_iteration::yes : stop_iteration::no);
});
});
}
public:
echoserver(bool verbose = false)
: _certs(make_shared<tls::server_credentials>(make_shared<tls::dh_params>()))
, _verbose(verbose)
{}

future<> listen(socket_address addr, sstring crtfile, sstring keyfile, tls::client_auth ca = tls::client_auth::NONE) {
_certs->set_client_auth(ca);
return _certs->set_x509_key_file(crtfile, keyfile, tls::x509_crt_format::PEM).then([this, addr] {
::listen_options opts;
opts.reuse_address = true;
future<> listen(socket_address addr, sstring crtfile, sstring keyfile, sstring cafile) {
_certs->set_dn_verification_callback([](seastar::tls::session_type, sstring subject, sstring issuer){
std::cout << "DN Verification callback, subject: " << subject << " issuer: " << issuer << std::endl;
});
auto f = make_ready_future();
auto cauth = tls::client_auth::NONE;
if (cafile != "") {
cauth = tls::client_auth::REQUIRE;
f = _certs->set_x509_trust_file(cafile, tls::x509_crt_format::PEM);
}
_certs->set_client_auth(cauth);
return f.then([this, addr, crtfile, keyfile] {
return _certs->set_x509_key_file(crtfile, keyfile, tls::x509_crt_format::PEM).then([this, addr] {
::listen_options opts;
opts.reuse_address = true;

_socket = tls::listen(_certs, addr, opts);
_socket = tls::listen(_certs, addr, opts);

// Listen in background.
(void)repeat([this] {
if (_stopped) {
return make_ready_future<stop_iteration>(stop_iteration::yes);
}
return with_gate(_gate, [this] {
return _socket.accept().then([this](accept_result ar) {
::connected_socket s = std::move(ar.connection);
socket_address a = std::move(ar.remote_address);
if (_verbose) {
std::cout << "Got connection from "<< a << std::endl;
}
auto strms = make_lw_shared<streams>(std::move(s));
return repeat([strms, this]() {
return strms->in.read().then([this, strms](temporary_buffer<char> buf) {
if (buf.empty()) {
if (_verbose) {
std::cout << "EOM" << std::endl;
}
return make_ready_future<stop_iteration>(stop_iteration::yes);
}
sstring tmp(buf.begin(), buf.end());
if (_verbose) {
std::cout << "Read " << tmp.size() << "B" << std::endl;
}
return strms->out.write(tmp).then([strms]() {
return strms->out.flush();
}).then([] {
return make_ready_future<stop_iteration>(stop_iteration::no);
});
});
}).then([strms]{
return strms->out.close();
}).handle_exception([](auto ep) {
}).finally([this, strms]{
if (_verbose) {
std::cout << "Ending session" << std::endl;
}
return strms->in.close();
});
}).handle_exception([this](auto ep) {
if (!_stopped) {
std::cerr << "Error: " << ep << std::endl;
}
}).then([this] {
return make_ready_future<stop_iteration>(_stopped ? stop_iteration::yes : stop_iteration::no);
// Listen in background.
(void)repeat([this] {
return run_once();
});
});
return make_ready_future();
});
return make_ready_future();
});
}

Expand Down
4 changes: 3 additions & 1 deletion demos/tls_echo_server_demo.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ int main(int ac, char** av) {
app.add_options()
("port", bpo::value<uint16_t>()->default_value(10000), "Server port")
("address", bpo::value<std::string>()->default_value("127.0.0.1"), "Server address")
("ca,a", bpo::value<std::string>()->default_value(""), "Server CA chain file")
("cert,c", bpo::value<std::string>()->required(), "Server certificate file")
("key,k", bpo::value<std::string>()->required(), "Certificate key")
("verbose,v", bpo::value<bool>()->default_value(false)->implicit_value(true), "Verbose")
Expand All @@ -46,6 +47,7 @@ int main(int ac, char** av) {
seastar_apps_lib::stop_signal stop_signal;
auto&& config = app.configuration();
uint16_t port = config["port"].as<uint16_t>();
auto ca = config["ca"].as<std::string>();
auto crt = config["cert"].as<std::string>();
auto key = config["key"].as<std::string>();
auto addr = config["address"].as<std::string>();
Expand All @@ -61,7 +63,7 @@ int main(int ac, char** av) {
auto stop_server = deferred_stop(server);

try {
server.invoke_on_all(&echoserver::listen, socket_address(ia), sstring(crt), sstring(key), tls::client_auth::NONE).get();
server.invoke_on_all(&echoserver::listen, socket_address(ia), sstring(crt), sstring(key),sstring(ca)).get();
} catch (...) {
std::cerr << "Error: " << std::current_exception() << std::endl;
return 1;
Expand Down
Loading