Skip to main content
Moderne OnlyThis recipe is proprietary to Moderne and runs on the Moderne platform or CLI — it isn’t part of the open-source catalog. Available with a Moderne subscription.Contact Sales

Find TLS protocol configuration in properties and YAML

Recipe IDio.moderne.cryptography.pqc.FindTlsPropertyConfiguration
Artifactio.moderne.recipe:rewrite-cryptography

Inventories Spring Boot configuration files that set an embedded server's TLS protocol floor or cipher suites — server.ssl.enabled-protocols, server.ssl.protocol and server.ssl.ciphers, plus any key named in additionalPropertyKeys — and classifies each value by whether TLS 1.3, and therefore JEP 527 hybrid key exchange, remains reachable. A pinned server.ssl.ciphers list with no RFC 8446 suite blocks TLS 1.3 even when the protocol floor allows it. Rows land in the same TLS configuration inventory data table as the Java surface. Keys are matched with relaxed binding, so enabled-protocols, enabledProtocols and ENABLED_PROTOCOLS all match; values may be a single token, a comma-separated string, or a YAML sequence in either flow or block style. Configuration a source scan cannot see — config servers, ConfigMap overlays, environment variables — is out of scope, so an absent row is not evidence of a modern floor.

Single recipeOpenRewriteModerne Proprietary License
Try in PlatformTry this recipe in the Moderne platform. Not a user yet? You’ll get a no-setup demo environment, with nothing to install or configure.

Options

1 parameters
1 optional
ParameterExampleTypeRequired
additionalPropertyKeysmy.service.tls-protocolsListOptional
Configuration keys beyond server.ssl.enabled-protocols and server.ssl.protocol whose values name TLS protocol versions. Matched with Spring relaxed binding, so my.tls.enabled-protocols also matches my.tls.enabledProtocols.

Examples

properties
ParameterValue
additionalPropertyKeysnull
Before
server.ssl.enabled-protocols=TLSv1.2
server.ssl.protocol=TLS
server.port=8443
After
server.ssl.enabled-protocols=~~>TLSv1.2
server.ssl.protocol=~~>TLS
server.port=8443

Usage

Run this recipe

This recipe has no required configuration options. Users of Moderne can run it via the Moderne CLI.

You will need to have configured the Moderne CLI on your machine before you can run the following command.

shell
mod run . --recipe FindTlsPropertyConfiguration

If the recipe is not available locally, then you can install it using:

RELEASE resolves to the newest release and LATEST to the newest build of any kind, including snapshots. Either one lets mod config recipes upgrade pull in later versions without editing this command; a pinned version stays where you put it.

mod config recipes jar install io.moderne.recipe:rewrite-cryptography:RELEASE

Data tables

TLS configuration inventory
io.moderne.cryptography.pqc.table.TlsConfigurationInventoryTable

TLS protocol version and cipher suite configuration detected in Java sources and in Spring Boot .properties/.yaml files, classified by whether TLS 1.3 — and therefore JEP 527 / BouncyCastle 1.81 hybrid key exchange — remains reachable. Non-JSSE TLS stacks (Netty, OkHttp, Tomcat and Jetty server configuration, -D flags in build files and launch scripts) are out of scope, so an absent row is not evidence that a module has no legacy TLS floor.

ColumnDescription
Configuration surfaceThe API or configuration key that produced the row, e.g. SSLContext.getInstance, SSLContext.getDefault, SSLSocket.setEnabledProtocols, SSLServerSocket.setEnabledProtocols, SSLEngine.setEnabledProtocols, SSLParameters.setProtocols, SSLSocketFactory.getDefault, HttpsURLConnection, HttpClient.newHttpClient, HttpClient.Builder.build, jdk.tls.client.protocols, jdk.tls.server.protocols, https.protocols, AbstractTlsPeer.getSupportedVersions, server.ssl.enabled-protocols, server.ssl.protocol, or a cipher-suite surface: SSLSocket.setEnabledCipherSuites, SSLServerSocket.setEnabledCipherSuites, SSLEngine.setEnabledCipherSuites, SSLParameters.setCipherSuites, jdk.tls.client.cipherSuites, jdk.tls.server.cipherSuites, server.ssl.ciphers, AbstractTlsClient.getSupportedCipherSuites. The token vocabulary is shared with the enforcement table so discovery and transformation rows can be joined.
Protocol nameThe protocol family the configuration applies to: TLS, or DTLS for a datagram context. Maps to AgileSec crypto.protocol.name.
Protocol versionsComma-joined protocol version tokens exactly as written at the site, e.g. TLSv1,TLSv1.1,TLSv1.2. BouncyCastle ProtocolVersion names are translated to their JSSE spelling and downTo ranges are expanded. Empty when nothing is declared (a default-acquisition site) or the value is not statically resolvable. Maps to AgileSec crypto.protocol.version.
Protocol cipher suitesComma-joined cipher suite names exactly as written at the site, e.g. TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256. Filled on cipher-suite configuration rows (setEnabledCipherSuites, SSLParameters.setCipherSuites, jdk.tls.client.cipherSuites, jdk.tls.server.cipherSuites, server.ssl.ciphers, AbstractTlsClient.getSupportedCipherSuites); empty on protocol-version rows. Maps to AgileSec crypto.protocol.ciphers.
ClassificationOne of allows-legacy (SSLv3, TLSv1 or TLSv1.1 is declared), ceiling-below-tls13 (TLS 1.3 is unreachable — a version-specific TLSv1.2 context or a protocol list that stops at TLSv1.2), ceiling-tls13 (a version-specific TLSv1.3 context: TLS 1.3 is reachable but so is everything below it), modern-floor-tls12 (TLSv1.2 and TLSv1.3, no legacy), modern-floor-tls13 (TLSv1.3 alone), ambiguous-default (TLS, SSL or Default: the floor is decided by runtime properties), no-explicit-floor (a default-acquisition site with no protocol configuration in the file), unresolved-value (the protocol or cipher expression is not statically resolvable), dtls (a datagram context, which JEP 527 explicitly excludes), ciphers-allow-tls13 (a pinned cipher list containing at least one RFC 8446 suite), or ciphers-block-tls13 (a pinned cipher list with no RFC 8446 suite, which makes TLS 1.3 unnegotiable even when the protocol floor allows it). Version-specific SSLContext.getInstance algorithm names are ceilings, never floors: on both SunJSSE and BCJSSE they enable everything up to the named version.
PQC readinessWhether JEP 527 / BouncyCastle 1.81+ hybrid key exchange can negotiate under this configuration: blocked (TLS 1.3 is unreachable, or the endpoint is DTLS), capable (TLS 1.3 is reachable — subject to the runtime JDK being 27+ for JSSE or BouncyCastle being 1.81+ for BCJSSE), or unknown (the value is not statically resolvable). Orthogonal to legacy hygiene: a list containing both TLSv1 and TLSv1.3 is allows-legacy and capable.
Library nameThe library providing the configuration surface: JSSE, BouncyCastle, JDK (system-property surface) or Spring Boot (configuration-file surface).
Library languageThe language of the source the row was found in: Java, Properties or YAML.
Code snippetThe source code of the detected API usage, e.g. Cipher.getInstance("DES").
File locationThe path of the source file relative to the repository root.
Start line1-based line of the start of the API usage.
Start column0-based column of the start of the API usage, or -1 when unavailable.
Start offset0-based character offset of the start of the API usage, or -1 when unavailable.
End line1-based line of the end of the API usage.
End column0-based column of the end of the API usage, or -1 when unavailable.
End offset0-based character offset of the end of the API usage, or -1 when unavailable.
Repository nameThe repository name from Git provenance, e.g. payment-service. Empty when unknown.
Scan sourceWhere the source was scanned from, derived from Git provenance, e.g. GitHub, GitLab, Local Repository.
BranchThe branch from Git provenance, e.g. main. Empty when unknown.
Source files that had results
org.openrewrite.table.SourcesFileResults

Source files that were modified by the recipe run.

ColumnDescription
Source path before the runThe source path of the file before the run. null when a source file was created during the run.
Source path after the runA recipe may modify the source path. This is the path after the run. null when a source file was deleted during the run.
Parent of the recipe that made changesIn a hierarchical recipe, the parent of the recipe that made a change. Empty if this is the root of a hierarchy or if the recipe is not hierarchical at all.
Recipe that made changesThe specific recipe that made a change.
Estimated time savingAn estimated effort that a developer to fix manually instead of using this recipe, in unit of seconds.
CycleThe recipe cycle in which the change was made.
Source files that had search results
org.openrewrite.table.SearchResults

Search results that were found during the recipe run.

ColumnDescription
Source path of search result before the runThe source path of the file with the search result markers present.
Source path of search result after run the runA recipe may modify the source path. This is the path after the run. null when a source file was deleted during the run.
ResultThe trimmed printed tree of the LST element that the marker is attached to.
DescriptionThe content of the description of the marker.
Recipe that added the search markerThe specific recipe that added the Search marker.
Source files that errored on a recipe
org.openrewrite.table.SourcesFileErrors

The details of all errors produced by a recipe run.

ColumnDescription
Source pathThe file that failed to parse.
Recipe that made changesThe specific recipe that made a change.
Stack traceThe stack trace of the failure.
Recipe performance
org.openrewrite.table.RecipeRunStats

Statistics used in analyzing the performance of recipes.

ColumnDescription
The recipeThe recipe whose stats are being measured both individually and cumulatively.
Source file countThe number of source files the recipe ran over.
Source file changed countThe number of source files which were changed in the recipe run. Includes files created, deleted, and edited.
Cumulative scanning time (ns)The total time spent across the scanning phase of this recipe.
Max scanning time (ns)The max time scanning any one source file.
Cumulative edit time (ns)The total time spent across the editing phase of this recipe.
Max edit time (ns)The max time editing any one source file.