Skip to content

Commit 722b308

Browse files
paulohtb6BenPopeFeediver1
authored
properties + sec: broker properties updates (#1298)
Co-authored-by: Ben Pope <[email protected]> Co-authored-by: Joyce Fee <[email protected]>
1 parent 5dbab27 commit 722b308

File tree

13 files changed

+662
-85
lines changed

13 files changed

+662
-85
lines changed

modules/deploy/pages/deployment-option/self-hosted/manual/production/production-deployment.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ endpoint to protect credentials in flight.
192192

193193
=== Configure the seed servers
194194

195-
Seed servers help new brokers join a cluster by directing requests from newly-started brokers to an existing cluster. The xref:reference:node-properties.adoc#seed_servers[seed_servers] broker configuration property controls how Redpanda finds its peers when initially forming a cluster. It is dependent on the xref:reference:node-properties.adoc#empty_seed_starts_cluster[empty_seed_starts_cluster] broker configuration property.
195+
Seed servers help new brokers join a cluster by directing requests from newly-started brokers to an existing cluster. The xref:reference:properties/broker-properties.adoc#seed_servers[`seed_servers`] broker property controls how Redpanda finds its peers when initially forming a cluster. It is dependent on the xref:reference:properties/broker-properties.adoc#empty_seed_starts_cluster[`empty_seed_starts_cluster`] broker property.
196196

197197
Starting with Redpanda version 22.3, you should explicitly set `empty_seed_starts_cluster` to `false` on every broker, and every broker in the cluster should have the same value set for `seed_servers`. With this set of configurations, Redpanda clusters form with these guidelines:
198198

modules/deploy/pages/deployment-option/self-hosted/manual/production/production-readiness.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ LATENCY P50 P90 P99 P999 MAX
402402
[[hostnames-interfaces]]
403403
=== Advertised hostnames use correct interfaces
404404

405-
Check that the advertised hostnames are operating on the correct network interfaces. For clusters with multiple interfaces (for example, a public and private IP address), set `advertised_kafka_api` to the public interface and set `advertised_rpc_api` to the private interface. These should be hostnames, not IP addresses.
405+
Check that the advertised hostnames are operating on the correct network interfaces. For clusters with multiple interfaces (for example, a public and private IP address), set xref:reference:properties/broker-properties.adoc#advertised_kafka_api[`advertised_kafka_api`] to the public interface and set xref:reference:properties/broker-properties.adoc#advertised_rpc_api[`advertised_rpc_api`] to the private interface. These should be hostnames, not IP addresses.
406406

407407
.Example
408408
[source,bash]

modules/develop/partials/http-proxy.adoc

Lines changed: 62 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ NodeJS::
195195
axios
196196
.get(`${base_uri}/topics`)
197197
.then(response => console.log(response.data))
198-
.catch(error => console.log);
198+
.catch(error => console.error(error));
199199
----
200200
201201
Run the application. If your file name is `index.js` for example, you would run the following command:
@@ -290,7 +290,7 @@ let options = { headers: { "Content-Type" : "application/vnd.kafka.json.v2+json"
290290
axios
291291
.post(`${base_uri}/topics/test_topic`, payload, options)
292292
.then(response => console.log(response.data))
293-
.catch(error => console.log);
293+
.catch(error => console.error(error));
294294
----
295295
296296
Run the application:
@@ -362,7 +362,7 @@ let options = {
362362
axios
363363
.get(`${base_uri}/topics/test_topic/partitions/0/records`, options)
364364
.then(response => console.log(response.data))
365-
.catch(error => console.log);
365+
.catch(error => console.error(error));
366366
----
367367
368368
Run the application:
@@ -442,7 +442,7 @@ let options = { headers: { "Content-Type": "application/vnd.kafka.v2+json" }};
442442
axios
443443
.post(`${base_uri}/consumers/test_group`, payload, options)
444444
.then(response => console.log(response.data))
445-
.catch(error => console.log);
445+
.catch(error => console.error(error));
446446
----
447447
448448
Run the application:
@@ -522,7 +522,7 @@ let options = { headers: { "Content-Type": "application/vnd.kafka.v2+json" }};
522522
axios
523523
.post(`${base_uri}/consumers/test_group/instances/test_consumer/subscription`, payload, options)
524524
.then(response => console.log(response.data))
525-
.catch(error => console.log);
525+
.catch(error => console.error(error));
526526
----
527527
528528
Run the application:
@@ -582,7 +582,7 @@ let options = {
582582
axios
583583
.get(`${base_uri}/consumers/test_group/instances/test_consumer/records`, options)
584584
.then(response => console.log(response.data))
585-
.catch(error => console.log);
585+
.catch(error => console.error(error));
586586
----
587587
588588
Run the application:
@@ -732,7 +732,7 @@ let payload = { partitions: [
732732
axios
733733
.post(`${base_uri}/consumers/test_group/instances/test_consumer/offsets`, payload, options)
734734
.then(response => console.log(response.data))
735-
.catch(error => console.log);
735+
.catch(error => console.error(error));
736736
----
737737
738738
Run the application:
@@ -783,7 +783,7 @@ NodeJS::
783783
axios
784784
.get(`${base_uri}/brokers`)
785785
.then(response => console.log(response.data))
786-
.catch(error => console.log);
786+
.catch(error => console.error(error));
787787
----
788788
789789
--
@@ -834,7 +834,7 @@ let options = { headers: { "Content-Type": "application/vnd.kafka.v2+json" }};
834834
axios
835835
.delete(`${base_uri}/consumers/test_group/instances/test_consumer`, options)
836836
.then(response => console.log(response.data))
837-
.catch(error => console.log);
837+
.catch(error => console.error(error));
838838
----
839839
840840
--
@@ -853,7 +853,11 @@ res = requests.delete(
853853

854854
== Authenticate with HTTP Proxy
855855

856-
If the Redpanda HTTP Proxy is configured to use SASL, you can provide the SCRAM username and password as part of the Basic Authentication header in your request. For example, to list topics as an authenticated user:
856+
HTTP Proxy supports authentication using SCRAM credentials or OIDC tokens. The authentication method depends on the xref:reference:properties/broker-properties.adoc#http_proxy_auth_method[`authentication_method`] broker property configuration and the cluster's xref:reference:properties/cluster-properties.adoc#http_authentication[`http_authentication`] settings.
857+
858+
=== SCRAM Authentication
859+
860+
If HTTP Proxy is configured to support SASL, you can provide the SCRAM username and password as part of the Basic Authentication header in your request. For example, to list topics as an authenticated user:
857861

858862
[tabs]
859863
=====
@@ -878,7 +882,7 @@ let options = {
878882
axios
879883
.get(`${base_uri}/topics`, options)
880884
.then(response => console.log(response.data))
881-
.catch(error => console.log);
885+
.catch(error => console.error(error));
882886
----
883887
884888
--
@@ -895,6 +899,52 @@ pretty(res)
895899
--
896900
=====
897901

902+
=== OIDC Authentication
903+
904+
If HTTP Proxy is configured to support OIDC, you can provide an OIDC token in the Authorization header. For example:
905+
906+
[tabs]
907+
=====
908+
curl::
909+
+
910+
--
911+
[,bash]
912+
----
913+
curl -s -H "Authorization: Bearer <oidc-token>" "<host-address>:8082/topics"
914+
----
915+
916+
--
917+
NodeJS::
918+
+
919+
--
920+
[,javascript]
921+
----
922+
let options = {
923+
headers: { Authorization: `Bearer <oidc-token>` },
924+
};
925+
926+
axios
927+
.get(`${base_uri}/topics`, options)
928+
.then(response => console.log(response.data))
929+
.catch(error => console.error(error));
930+
----
931+
932+
--
933+
Python::
934+
+
935+
--
936+
[,python]
937+
----
938+
headers = {"Authorization": "Bearer <oidc-token>"}
939+
res = requests.get(f"{base_uri}/topics", headers=headers).json()
940+
pretty(res)
941+
----
942+
943+
--
944+
=====
945+
946+
For details about configuring OIDC authentication, see xref:manage:security/authentication.adoc#oidc-http[OIDC Authentication].
947+
898948
== Use Swagger with HTTP Proxy
899949

900950
You can use Swagger UI to test and interact with Redpanda HTTP Proxy endpoints.
@@ -919,4 +969,4 @@ Verify that the Docker container has been added and is running:
919969

920970
In a browser, enter `<host-address>` in the address bar to open the Swagger console.
921971

922-
Change the URL to `http://<host-address>:8082/v1`, and click `Explore` to update the page with Redpanda HTTP Proxy endpoints. You can call the endpoints in any application and language that supports web interactions. The following examples show how to call the endpoints using curl, NodeJS, and Python.
972+
Change the URL to `http://<host-address>:8082/v1`, and click `Explore` to update the page with Redpanda HTTP Proxy endpoints. You can call the endpoints in any application and language that supports web interactions. The following examples show how to call the endpoints using curl, NodeJS, and Python.

modules/get-started/pages/release-notes/redpanda.adoc

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,7 @@ The `confluent-kafka-javascript` client is now validated with Redpanda. For a li
4747

4848
== HTTP Proxy authentication changes
4949

50-
[IMPORTANT]
51-
====
5250
include::shared:partial$http-proxy-ephemeral-credentials-breaking-change.adoc[tags=!*;include-config-link]
53-
====
54-
55-
HTTP Proxy previously used automatically-generated ephemeral credentials to authenticate with the Kafka API when the HTTP Proxy listeners specified `authentication_method: none`. To improve security and simplify the authentication model, ephemeral credentials are no longer available.
5651

5752
If you need to maintain the current HTTP Proxy functionality while transitioning to authenticated clients, configure the following HTTP Proxy client properties in your `redpanda.yaml` configuration:
5853

modules/manage/pages/cluster-maintenance/node-property-configuration.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
:page-aliases: cluster-administration:node-property-configuration.adoc, deploy:deployment-option/self-hosted/manual/node-property-configuration.adoc
44
:page-categories: Management
55

6-
When you install Redpanda, a `redpanda.yaml` file is installed on each broker in `/etc/redpanda`. This file contains broker configuration properties. A broker property is one that can be set differently from broker to broker, such as `data_directory` or `node_id` (when specified). See xref:reference:node-properties.adoc[Broker Configuration Properties] for a list of broker properties, their descriptions, and their default values.
6+
When you install Redpanda, a `redpanda.yaml` file is installed on each broker in `/etc/redpanda`. This file contains broker configuration properties. A broker property is one that can be set differently from broker to broker, such as xref:reference:properties/broker-properties.adoc#data_directory[`data_directory`] or xref:reference:properties/broker-properties.adoc#node_id[`node_id`] (when specified). See xref:reference:properties/broker-properties.adoc[Broker Configuration Properties] for a list of broker properties, their descriptions, and their default values.
77

88
The default `redpanda.yaml` file groups broker properties into categories:
99

modules/manage/pages/rack-awareness.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ rack: "A"
4040
. Log in to the remaining brokers and edit their `redpanda.yaml` files. For broker 2, set `rack` to `A`. For brokers 3 and 4, set `rack` to `B`. For brokers 5 and 6, set `rack` to `C`.
4141
. Restart each broker in the cluster for the rack assignments to take effect.
4242

43-
TIP: For high availability, Redpanda recommends adding one or more brokers from each zone to the `seed_servers` configuration.
43+
TIP: For high availability, Redpanda recommends adding one or more brokers from each zone to the xref:reference:properties/broker-properties.adoc#seed_servers[`seed_servers`] configuration.
4444

4545
[NOTE]
4646
====

modules/manage/pages/security/encryption.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -421,9 +421,9 @@ redpanda:
421421
[NOTE]
422422
====
423423
* Remember to replace placeholders in brackets.
424-
* `kafka_api` is the listener declaration. This `name` can have any value.
425-
* `advertised_kafka_api` is the advertised listener. This `name` should match the name of a declared listener. This `address` is the host name clients use to connect to the broker.
426-
* `kafka_api_tls` is the listener's TLS configuration. This `name` must match the corresponding listener's name.
424+
* xref:reference:properties/broker-properties.adoc#kafka_api[`kafka_api`] is the listener declaration. This `name` can have any value.
425+
* xref:reference:properties/broker-properties.adoc#advertised_kafka_api[`advertised_kafka_api`] is the advertised listener. This `name` should match the name of a declared listener. This `address` is the host name clients use to connect to the broker.
426+
* xref:reference:properties/broker-properties.adoc#kafka_api_tls[`kafka_api_tls`] is the listener's TLS configuration. This `name` must match the corresponding listener's name.
427427
====
428428

429429
See also: xref:./listener-configuration.adoc[Configure Listeners]

modules/manage/pages/security/listener-configuration.adoc

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@ redpanda:
5151

5252
== Multiple listeners
5353

54-
You can define multiple Kafka API listeners to support different interfaces, ports, or authentication methods. Each listener must have a unique `name` property, and the same `name` property must be used in the corresponding `advertised_kafka_api` stanza.
54+
You can define multiple Kafka API listeners to support different interfaces, ports, or authentication methods. Each listener must have a unique `name` property, and the same `name` property must be used in the corresponding xref:reference:properties/broker-properties.adoc#advertised_kafka_api[`advertised_kafka_api`] listener definition.
55+
56+
For details about authentication methods, see the xref:reference:properties/broker-properties.adoc#kafka_api_auth_method[`authentication_method`] broker property.
5557

5658
[source,yaml]
5759
----
@@ -77,7 +79,7 @@ redpanda:
7779

7880
== TLS listeners and DNS hostnames
7981

80-
For encrypted connections, you typically advertise a DNS name matching your TLS certificate. Always include a `name` property for the TLS listener and use it in both `kafka_api` and `advertised_kafka_api`.
82+
For encrypted connections, you typically advertise a DNS name matching your TLS certificate. Always include a `name` property for the TLS listener and use it in both xref:reference:properties/broker-properties.adoc#kafka_api[`kafka_api`] and xref:reference:properties/broker-properties.adoc#advertised_kafka_api[`advertised_kafka_api`].
8183

8284
[source,yaml]
8385
----
@@ -106,7 +108,7 @@ Ensure `kafka.example.com` matches the SAN in `broker.crt` and that clients trus
106108

107109
== Mixed-mode authentication with multiple listeners
108110

109-
Redpanda supports running multiple authentication schemes concurrently. Each listener can specify its method, and must define a `name` property.
111+
Redpanda supports running multiple authentication schemes concurrently. Each listener can specify its xref:reference:properties/broker-properties.adoc#kafka_api_auth_method[`authentication_method`], and must define a `name` property.
110112

111113
[source,yaml]
112114
----

0 commit comments

Comments
 (0)