You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/get-started/pages/release-notes/redpanda.adoc
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -89,6 +89,12 @@ xref:manage:schema-reg/schema-reg-overview.adoc#metadata-properties[Schema Regis
89
89
90
90
You can set metadata when registering a schema using the `POST /subjects/{subject}/versions` endpoint or with the xref:reference:rpk/rpk-registry/rpk-registry-schema-create.adoc[`--metadata-properties`] flag in `rpk registry schema create`. Metadata is returned in `GET /subjects/{subject}/versions/{version}` and `GET /schemas/ids/{id}` responses, and viewable with `rpk registry schema get --print-metadata`. New schema versions automatically inherit metadata from the most recent version of the subject unless you register with an explicit empty `metadata` object.
91
91
92
+
== OIDC authentication with rpk
93
+
94
+
Starting in v26.1.7, `rpk` supports the `OAUTHBEARER` SASL mechanism, so you can authenticate `rpk` to the Kafka API with an OIDC access token issued by your identity provider (IdP) instead of a SASL/SCRAM username and password. Pass the token through xref:reference:rpk/rpk-x-options.adoc#sasl-mechanism[`-X sasl.mechanism=OAUTHBEARER`] and xref:reference:rpk/rpk-x-options.adoc#pass[`-X pass="token:<TOKEN>"`].
95
+
96
+
For end-to-end steps and prerequisites, see xref:manage:security/authentication.adoc#oidc-rpk[Connect to Redpanda with OIDC using rpk].
Copy file name to clipboardExpand all lines: modules/manage/partials/authentication.adoc
+54Lines changed: 54 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1134,6 +1134,60 @@ rpk cluster config set oidc_keys_refresh_interval 3600
1134
1134
----
1135
1135
endif::[]
1136
1136
1137
+
[[oidc-rpk]]
1138
+
===== Connect to Redpanda with OIDC using rpk
1139
+
1140
+
Starting with `rpk` v26.1.7 (also available in v25.3.x and v25.2.x patches), `rpk` supports the `OAUTHBEARER` SASL mechanism for Kafka API authentication. After you enable OIDC on a Kafka listener, you can authenticate `rpk` to Kafka with an OIDC access token issued by your IdP instead of a SASL/SCRAM username and password.
1141
+
1142
+
NOTE: Confirm your `rpk` version with `rpk version`. Earlier versions reject `-X sasl.mechanism=OAUTHBEARER` as an unknown mechanism.
1143
+
1144
+
Before you connect, make sure that:
1145
+
1146
+
* `OAUTHBEARER` is in xref:reference:properties/cluster-properties.adoc#sasl_mechanisms[`sasl_mechanisms`], or is set on the target listener through xref:reference:properties/cluster-properties.adoc#sasl_mechanisms_overrides[`sasl_mechanisms_overrides`].
1147
+
* You have an access token from your IdP whose claims satisfy `oidc_token_audience`, `oidc_discovery_url`, and `oidc_principal_mapping`. For the claims that Redpanda validates, see <<oidc-credentials-flow-and-access-token-validation, OIDC credentials flow and access token validation>>.
1148
+
* xref:manage:security/authorization/index.adoc#acls[ACLs] (or xref:manage:security/authorization/gbac.adoc[GBAC]) grant the principal extracted from the token the operations you intend to run.
1149
+
1150
+
[[oidc-rpk-token]]
1151
+
Pass the token using xref:reference:rpk/rpk-x-options.adoc[`-X` options]. Set `sasl.mechanism=OAUTHBEARER` and supply the token through `pass`, either as a raw value or in `token:<TOKEN>` form:
1152
+
1153
+
[,bash]
1154
+
----
1155
+
export OIDC_TOKEN="<access-token>"
1156
+
1157
+
rpk topic list \
1158
+
-X brokers=<broker-host>:<oidc-listener-port> \
1159
+
-X tls.enabled=true \
1160
+
-X tls.ca=<path-to-ca-cert> \
1161
+
-X sasl.mechanism=OAUTHBEARER \
1162
+
-X pass="token:$OIDC_TOKEN"
1163
+
----
1164
+
1165
+
The same `-X sasl.mechanism` and `-X pass` options work for any `rpk` command that talks to the Kafka API (for example, `rpk topic create`, `rpk topic produce`, `rpk topic consume`, `rpk group list`, `rpk cluster info`, and `rpk security acl list`).
1166
+
1167
+
To avoid repeating connection flags, store them in an xref:reference:rpk/rpk-profile/rpk-profile-create.adoc[`rpk profile`]:
NOTE: With Redpanda, the Admin API can be configured to require basic authentication with your Kafka API SASL credentials. This defaults to `SCRAM-SHA-256` if no mechanism is specified.
244
244
245
+
For `OAUTHBEARER`, set `pass` to an OIDC access token (raw value, or prefixed with `token:`) instead of a SASL password, and leave `user` unset. Support for `OAUTHBEARER` was added in rpk v26.1.7 (also backported to v25.3.x and v25.2.x). For end-to-end steps, see xref:manage:security/authentication.adoc#oidc-rpk[Connect to Redpanda with OIDC using rpk].
0 commit comments