• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

block / mysql / 34064809572
85%

Build:
DEFAULT BRANCH: master
Ran 06 Sep 2026 10:44PM UTC
Jobs 5
Files 21
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

06 Sep 2026 10:42PM UTC coverage: 84.528% (+0.1%) from 84.391%
34064809572

push

github

web-flow
Enable TLS automatically for Amazon RDS endpoints (#4)

* Enable TLS automatically for Amazon RDS endpoints

A connection to an *.rds.amazonaws.com address now verifies against Amazon's
RDS root bundle, embedded here, unless the DSN asked for something else.

Three Block repositories had already written this: strata's pkg/mysqlrds,
vitess's go/vt/topo/mysqltopo, and spirit's pkg/dbconn each carry a copy of the
bundle, a hostname regexp, and a RegisterTLSConfig call. They agree on what
should happen and disagree on the details — two of the three regexps require
the leading dot in `.rds.amazonaws.com` and one does not, one pins a TLS
minimum version and two take the Go default, one checks the result of
AppendCertsFromPEM and two discard it, and strata's bundle is three
ca-west-1 roots newer than the other two. Every consumer of the driver has to
get all of that right independently, and getting it wrong by omission produces
an unencrypted connection rather than an error.

The driver is where this belongs: it is the only layer that sees every
connection, and the address is all the input it needs.

Design:

  - The hook is one line in Config.normalize, so it covers both entry points
    (ParseDSN and NewConnector) and everything downstream of them. All the
    logic is in rds.go, a file upstream does not have.

  - It fires only when neither cfg.TLS nor cfg.TLSConfig is set, so anything
    the DSN specifies wins — including tls=false, which is the documented
    opt-out. normalize then fills in ServerName as it does for any other
    config, making this identity verification and not just encryption.

  - The regexp requires the leading dot. Without it `notrds.amazonaws.com`
    matches; that fails safely (verification against RDS roots fails rather
    than trusting the wrong CA) but a confusing handshake error is still worse
    than not matching.

  - MinVersion is TLS 1.2 rather than the Go default, so a future change to
    that default cannot quietly... (continued)

37 of 37 new or added lines in 2 files covered. (100.0%)

3573 of 4227 relevant lines covered (84.53%)

331443.54 hits per line

Jobs
ID Job ID Ran Files Coverage
1 Linux-Go-1.27-DB-8.4 - 34064809572.1 06 Sep 2026 10:44PM UTC 21
81.72
GitHub Action Run
2 Linux-Go-1.27-DB-9.7 - 34064809572.2 06 Sep 2026 10:44PM UTC 21
81.5
GitHub Action Run
3 Linux-Go-1.26-DB-9.7 - 34064809572.3 06 Sep 2026 10:44PM UTC 21
82.8
GitHub Action Run
4 Linux-Go-1.27-DB-8.0 - 34064809572.4 06 Sep 2026 10:44PM UTC 21
81.72
GitHub Action Run
5 Linux-Go-1.25-DB-9.7 - 34064809572.5 06 Sep 2026 10:44PM UTC 21
82.92
GitHub Action Run
Source Files on build 34064809572
  • Tree
  • List 21
  • Changed 5
  • Source Changed 0
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • e2364b6e on github
  • Prev Build on master (#34057418200)
  • Next Build on master (#34064861637)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc