Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
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
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,12 @@ build-iPhoneSimulator/

# Temp stuff ...
/plc4go/.idea/

# Binaries left behind by building the in-repo Go tools directly ("go build ./tools/...").
# Nothing needs them checked in: go.mod declares them with 'tool' directives, so
# "go tool plc4xGenerator" compiles them from source on demand.
/plc4go/plc4xGenerator
/plc4go/plc4xLicencer
plc4j/examples/hello-storage-elasticsearch/.factorypath


Expand Down
116 changes: 111 additions & 5 deletions RELEASE_NOTES
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,112 @@ New Features
Incompatible changes
--------------------

- Configuration parameters now use one vocabulary across PLC4J and PLC4Go.
A duration in milliseconds ends in "-ms", TLS settings live under "tls.",
and a parameter aimed at a transport no longer repeats that transport's
code. Old names are removed rather than deprecated: supplying one is
reported as an unknown parameter, naming the replacement, and the setting
does not apply. The full table is below.

Durations:

request-timeout -> request-timeout-ms
timeout-request (ads) -> request-timeout-ms
connect-timeout -> connect-timeout-ms
read-timeout -> read-timeout-ms
write-timeout -> write-timeout-ms
session-timeout -> session-timeout-ms
channel-lifetime -> channel-lifetime-ms
min-channel-lifetime -> min-channel-lifetime-ms
ha-heartbeat-interval -> ha-heartbeat-interval-ms
ha-failover-timeout -> ha-failover-timeout-ms

Establishing a socket and completing a protocol handshake are two
settings, not one, so they now have two names. "connect-timeout-ms" is
the socket connect; the COTP handshake and the OPC UA negotiation steps
are "handshake-timeout-ms":

cotp.cotp-connection-timeout -> cotp.handshake-timeout-ms
negotiation-timeout (opcua) -> handshake-timeout-ms

Transport parameters no longer repeat their transport's code, which the
prefix already supplies:

tcp.tcp-no-delay -> tcp.no-delay
cotp.cotp-tpdu-size -> cotp.tpdu-size
tls.tls-version -> tls.version

TLS settings are addressed under "tls.":

tls.verify-ssl -> tls.verify
key-store-file (opcua) -> tls.keystore
key-store-password -> tls.keystore-password
key-store-type -> tls.keystore-type
trust-store-file -> tls.trust-store
trust-store-password -> tls.trust-store-password
trust-store-type -> tls.trust-store-type

The trust store drops "-file" for the same reason the key store does:
every one of these names a store, so saying so adds nothing. The TLS
transport already spelled them "tls.trust-store-file"; that becomes
"tls.trust-store" too, so the opcua and ctrlx drivers, which declare
their own, now agree with it.

A name a protocol specification fixes keeps its own spelling and units:
SLMP's "monitoring-timer" is a field of the 3E request frame in the
protocol's own units, not a value in milliseconds, so it is unchanged and
carries a comment at its declaration saying why.

- The OPC UA driver's "insecure-certificate-verification" became
"tls.verify", with the opposite sense. A connection that set
"insecure-certificate-verification=true" must now set "tls.verify=false".
This one is not just a rename: if it is missed, the new default applies,
which is to verify the server certificate. That fails loudly against a
server whose certificate does not validate rather than connecting
insecurely, but it is a behaviour change and not a silent one.

- An unrecognised connection-string parameter is now reported in PLC4Go as
well as PLC4J, naming the parameter and, where it can, the nearest known
one. It remains a warning: a stray parameter does not fail a connection
that would otherwise work. PLC4Go's OPC UA driver previously *refused*
the connection on an unknown option; it now warns like every other
driver, so a connection string accepted by PLC4J is no longer rejected
there.

In PLC4Go this covers the drivers that parse their configuration in one
place: ab-eth, bacnet-ip, c-bus, EtherNet/IP, firmata, IEC 60870-5-104,
Modbus, OPC UA, S7, SLMP and UMAS. The ADS, KNXnet/IP and simulated
drivers read their options where they are used rather than parsing a
configuration, so there is no point at which the leftovers are known;
they are unchanged and still report nothing.

A suggestion is offered only among the names the consumer that reported
actually read, so a parameter belonging to a transport is named as
unknown with nothing to suggest. PLC4J does better here: it draws the
known names from the driver, the transport, the audit log and the
connection-control options, and matches on the last segment, so a
missing prefix is recognised for what it is.

- Configuration values carrying secrets are marked at their declaration -
"@Secret" in PLC4J, a `secret:"true"` struct tag in PLC4Go - and render
as "<redacted>" wherever a configuration is rendered. This replaces
guessing from parameter names, which could only ever be one parameter
behind: a pre-shared key was logged in clear until its name was added to
the list by hand. A name-based check remains for parameters no
configuration declares, since a credential passed under an unknown name
is still a credential.

- PLC4Go's S7 driver reads the rack and slot as "cotp.local-rack",
"cotp.local-slot", "cotp.remote-rack" and "cotp.remote-slot". It read
them unprefixed, while PLC4J declares them on the COTP transport's
configuration and every S7 example in the documentation spells them with
the prefix - so the documented connection string set nothing in PLC4Go
and said so nowhere. The unprefixed names are now reported as unknown.

- Fixed PLC4Go logging connection strings verbatim. A password in a Go
connection string reached the log in clear at debug level, at twenty
call sites across the driver manager and the connection cache. They are
redacted now, along with credentials in a URI's userinfo.
- The connection-creating methods of the API moved from
"PlcConnectionManager" to a new "PlcConnectionFactory"
interface, which the "PlcDriverManager" hands out via
Expand Down Expand Up @@ -185,7 +291,7 @@ Incompatible changes
Together this means a connection that names no certificate now
fails where it previously came up unprotected. Name one with
"server-certificate-file", or a trust store with
"trust-store-file"; or set "discovery=false" if the endpoint needs
"tls.trust-store"; or set "discovery=false" if the endpoint needs
no discovery; or ask for "security-policy=NONE" to accept an
unprotected channel as before.
Note that a protected channel also needs a client key pair:
Expand Down Expand Up @@ -219,8 +325,8 @@ Incompatible changes
now fail. The new "allow-factory-default-certificate" parameter
restores the old behaviour, with a warning; alternatively
"server-certificate-file" names a single PEM certificate to
trust, or "trust-store-file" (with "trust-store-password" and
"trust-store-type") a key store of them, matching the names used
trust, or "tls.trust-store" (with "tls.trust-store-password" and
"tls.trust-store-type") a key store of them, matching the names used
by the OPC UA driver and the TLS transport.
"ignore-common-name" is also available if the certificate is
trusted but names a different host.
Expand All @@ -235,8 +341,8 @@ Incompatible changes
than the address it is reached at will now fail where it
previously succeeded.
Two new parameters make the check usable where a device carries
its own certificate: "trust-store-file" (with
"trust-store-password" and "trust-store-type") names the
its own certificate: "tls.trust-store" (with
"tls.trust-store-password" and "tls.trust-store-type") names the
certificates to trust instead of the public authorities the JVM
ships with. Previously the only way past a private CA was
"verify-ssl=false", which turns off both the chain check and
Expand Down
Loading
Loading