Skip to content

Commit 4c9ee77

Browse files
committed
API: libcrmcommon: Deprecate remote-clear-port.
This CIB property is deprecated in favor of remote-tls-port which is more secure and has been supported since at least 2014. For now, it will still be recognized but will log a warning. Also mark it as deprecated in the docs and remove references to it being something that you can use. Ref T961
1 parent 5b1be21 commit 4c9ee77

6 files changed

Lines changed: 17 additions & 10 deletions

File tree

daemons/based/based_remote.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -780,8 +780,9 @@ based_remote_init(void)
780780
port_s = pcmk__xe_get(the_cib, PCMK_XA_REMOTE_CLEAR_PORT);
781781

782782
if ((pcmk__scan_port(port_s, &port) == pcmk_rc_ok) && (port > 0)) {
783-
pcmk__warn("Starting clear-text listener on port %d. This is insecure; "
784-
PCMK_XA_REMOTE_TLS_PORT " is recommended instead.", port);
783+
pcmk__warn("Starting clear-text listener on port %d. This is insecure "
784+
"and will be removed in a future release. Use "
785+
PCMK_XA_REMOTE_TLS_PORT " instead.", port);
785786
remote_fd = init_remote_listener(port);
786787
}
787788
}

doc/sphinx/Pacemaker_Administration/configuring.rst

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -187,11 +187,10 @@ It is possible to run configuration commands from a machine that is not part of
187187
the cluster.
188188

189189
For security reasons, this capability is disabled by default. If you wish to
190-
allow remote access, set the ``remote-tls-port`` (encrypted) or
191-
``remote-clear-port`` (unencrypted) CIB properties (attributes of the ``cib``
192-
element). Encrypted communication can be performed keyless (which makes it
193-
subject to man-in-the-middle attacks), using pre-shared keys (PSK), or TLS
194-
certificates.
190+
allow remote access, set the ``remote-tls-port`` CIB property (attributes of
191+
the ``cib`` element). Encrypted communication can be performed keyless (which
192+
makes it subject to man-in-the-middle attacks), using pre-shared keys (PSK),
193+
or with TLS certificates.
195194

196195
To use PSK, you simply need to generate a key and then distribute it to the
197196
administrator's machine as well as any cluster nodes you wish to have access

doc/sphinx/Pacemaker_Explained/cluster-options.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ holds. So the decision was made to place them in an easy-to-find location.
247247
- If set to a TCP port number, the CIB manager will listen for remote
248248
connections on this port, to allow for CIB administration from hosts not
249249
in the cluster. No encryption is used, so this should be used only on a
250-
protected network.
250+
protected network. *(deprecated since 3.0.2)*
251251
* - .. _cib_last_written:
252252

253253
.. index::

include/crm/common/xml_names.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2004-2025 the Pacemaker project contributors
2+
* Copyright 2004-2026 the Pacemaker project contributors
33
*
44
* The version control history for this file may have further details.
55
*
@@ -376,7 +376,6 @@ extern "C" {
376376
#define PCMK_XA_REFERENCE "reference"
377377
#define PCMK_XA_RELOADABLE "reloadable"
378378
#define PCMK_XA_REMAIN_STOPPED "remain_stopped"
379-
#define PCMK_XA_REMOTE_CLEAR_PORT "remote-clear-port"
380379
#define PCMK_XA_REMOTE_NODE "remote_node"
381380
#define PCMK_XA_REMOTE_TLS_PORT "remote-tls-port"
382381
#define PCMK_XA_REMOVED "removed"
@@ -458,6 +457,9 @@ extern "C" {
458457
#define PCMK_XA_YEARDAYS "yeardays"
459458
#define PCMK_XA_YEARS "years"
460459

460+
//! \deprecated Deprecated since 3.0.2; use \c PCMK_XA_REMOTE_TLS_PORT instead
461+
#define PCMK_XA_REMOTE_CLEAR_PORT "remote-clear-port"
462+
461463
//! \deprecated Deprecated since 3.0.2; look for \c PCMK_XA_REMOVED instead
462464
#define PCMK_XA_ORPHAN "orphan"
463465

lib/cib/cib_remote.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,10 @@ cib_tls_signon(cib_t *cib, pcmk__remote_t *connection, gboolean event_channel)
421421
cib_tls_close(cib);
422422
return -1;
423423
}
424+
} else {
425+
pcmk__warn("Connecting to remote CIB without encryption. This is "
426+
"insecure and will be removed in a future release. Use "
427+
"the " PCMK_XA_REMOTE_TLS_PORT " cluster option instead.");
424428
}
425429

426430
/* Now that the handshake is done, see if any client TLS certificate is

xml/cib-1.2.rng

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
<attribute name="remote-tls-port"><data type="nonNegativeInteger"/></attribute>
1515
</optional>
1616
<optional>
17+
<!-- @COMPAT remote-clear-port is deprecated since 3.0.2 -->
1718
<attribute name="remote-clear-port"><data type="nonNegativeInteger"/></attribute>
1819
</optional>
1920
<optional>

0 commit comments

Comments
 (0)