Rest-server: how to disable TLS < 1.2?

I am running:
rest-server version rest-server 0.13.0 compiled with go1.22.5 on linux/amd64

My CERT finds the fault the server is accepting TLS 1.0 and 1.1 and also the ciphers
TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA and TLS_RSA_WITH_3DES_EDE_CBC_SHA
which are not allowed any more at our site.

How can I disable them?

rest-server should only offer TLS 1.2 and 1.3

1 Like

Hmm. I guess that means “no” :sweat_smile:

There’s no option exposed by the rest-server to influence the TLS ciphers.

What’s weird is that go1.22 should by default already disable TLS before 1.2:

But I just gave it a try using testssl.sh and apparently TLS 1.0 is still offered.

The 3DES ciphers should be disable with go 1.23 (see crypto/tls in the release notes ), but that yields the same unexpected behavior. Based on a quick glance at the rest-server code, I don’t see why that is happening.I guess I’ll need to have a closer look.

Ah, setting the environment variable GODEBUG=tls10server=0,tls3des=0 does the trick. tls3des only works when rest-server is compiled with go 1.23.

rest-server still has go 1.18 in its go.mod file. This lets the GODEBUG options match the behavior of that go version. That is, both TLS options are by default enabled.

1 Like

Ok, I have set export GODEBUG='tls10server=0,tls3des=0' and restarted rest-server:

root@obertux:~# testssl rs1.tik.uni-stuttgart.de:8008 | grep offered
 SSLv2      not offered (OK)
 SSLv3      not offered (OK)
 TLS 1      not offered
 TLS 1.1    not offered
 TLS 1.2    offered (OK)
 TLS 1.3    offered (OK): final
 NPN/SPDY   not offered
 ALPN/HTTP2 h2, http/1.1 (offered)
 NULL ciphers (no encryption)                  not offered (OK)
 Anonymous NULL Ciphers (no authentication)    not offered (OK)
 Export ciphers (w/o ADH+NULL)                 not offered (OK)
 LOW: 64 Bit + DES, RC[2,4] (w/o export)       not offered (OK)
 Triple DES Ciphers / IDEA                     offered
 Obsolete CBC ciphers (AES, ARIA etc.)         offered
 Strong encryption (AEAD ciphers)              offered (OK)
 PFS is offered (OK)          TLS_AES_256_GCM_SHA384 TLS_CHACHA20_POLY1305_SHA256 ECDHE-RSA-AES256-GCM-SHA384 ECDHE-RSA-AES256-SHA
 Elliptic curves offered:     prime256v1 secp384r1 secp521r1 X25519
 OCSP stapling                not offered
 DNS CAA RR (experimental)    not offered
 Strict Transport Security    not offered
 TLS_FALLBACK_SCSV (RFC 7507)              No fallback possible (OK), no protocol below TLS 1.2 offered

but DES ciphers are still offered.

So it’s kind of expected that DES is still offered, isn’t it? Or did you recompile with a newer Go version?

I think you have to rebuilt server with go 1.23

I have from Release v0.13.0 · restic/rest-server · GitHub

root@rs1:~# /opt/rest-server/rest-server --version
rest-server version rest-server 0.13.0 compiled with go1.22.5 on linux/amd64

It is go 1.22… you have.

Build it yourself using the latest go.