AlterUserScramCredentials
This page encodes the smallest legal instance of the request and the response: numeric fields are zero, strings and byte arrays are empty, every array carries exactly one sample element, and any records field holds one empty 61-byte RecordBatch v2. Version 0 is a flexible version, so every struct is terminated by a uvarint tagged-field count and strings and arrays carry compact length-plus-one prefixes. Sizes below include the leading int32 size prefix.
- API key
- 51
- Encoded at
- v0
- Flexible versions
- 0+
- Headers
- req v2, resp v1
- Request versions
- 0
- Response versions
- 0
- Request size
- 30 bytes
- Response size
- 20 bytes
framerpc headerrequest bodyRecordBatchRecordresponse bodytagged_fields
Request
AlterUserScramCredentialsRequest v0, request header v2, 30 bytes on the wire
byte layout (30 bytes, 16 bytes per row)
0
1
2
3
4
5
6
7
8
9
A
B
C
D
E
F
0000
0010
object tree
AlterUserScramCredentialsRequest message v0 [0x0000, 30B] +-- Frame [0x0000, 4B] length-delimited framing | +-- size int32 = 26 [0x0000, 4B] number of bytes that follow, patched after encoding +-- RequestHeader v2 [0x0004, 11B] common request header | +-- request_api_key int16 = 51 (AlterUserScramCredentials) [0x0004, 2B] numeric id of the API being invoked | +-- request_api_version int16 = 0 [0x0006, 2B] version of the API being invoked | +-- correlation_id int32 = 0 [0x0008, 4B] echoed back by the broker in the response | +-- client_id nullable_string = "" (int16 len=0) [0x000c, 2B] always a non-flexible int16-prefixed string | +-- tagged_fields uvarint = 0 [0x000e, 1B] number of tagged fields in the header +-- AlterUserScramCredentialsRequest struct [0x000f, 15B] message body, version 0 +-- Deletions []ScramCredentialDeletion = 1 element [0x000f, 4B] The SCRAM credentials to remove. | +-- length uvarint = 2 (compact, n+1) [0x000f, 1B] one sample element follows | +-- ScramCredentialDeletion[0] ScramCredentialDeletion = struct [0x0010, 3B] | +-- Name string = "" (compact, len+1=1) [0x0010, 1B] The user name. | +-- Mechanism int8 = 0 [0x0011, 1B] The SCRAM mechanism. | +-- tagged_fields uvarint = 0 [0x0012, 1B] number of tagged fields in this struct +-- Upsertions []ScramCredentialUpsertion = 1 element [0x0013, 10B] The SCRAM credentials to update/insert. | +-- length uvarint = 2 (compact, n+1) [0x0013, 1B] one sample element follows | +-- ScramCredentialUpsertion[0] ScramCredentialUpsertion = struct [0x0014, 9B] | +-- Name string = "" (compact, len+1=1) [0x0014, 1B] The user name. | +-- Mechanism int8 = 0 [0x0015, 1B] The SCRAM mechanism. | +-- Iterations int32 = 0 [0x0016, 4B] The number of iterations. | +-- Salt bytes = empty (compact, len+1=1) [0x001a, 1B] A random salt generated by the client. | +-- SaltedPassword bytes = empty (compact, len+1=1) [0x001b, 1B] The salted password. | +-- tagged_fields uvarint = 0 [0x001c, 1B] number of tagged fields in this struct +-- tagged_fields uvarint = 0 [0x001d, 1B] number of tagged fields in this struct
kafka message schema (.json)
{ "apiKey": 51, "type": "request", "listeners": ["broker", "controller"], "name": "AlterUserScramCredentialsRequest", "validVersions": "0", "flexibleVersions": "0+", "fields": [ { "name": "Deletions", "type": "[]ScramCredentialDeletion", "versions": "0+", "about": "The SCRAM credentials to remove.", "fields": [ { "name": "Name", "type": "string", "versions": "0+", "about": "The user name." }, { "name": "Mechanism", "type": "int8", "versions": "0+", "about": "The SCRAM mechanism." } ]}, { "name": "Upsertions", "type": "[]ScramCredentialUpsertion", "versions": "0+", "about": "The SCRAM credentials to update/insert.", "fields": [ { "name": "Name", "type": "string", "versions": "0+", "about": "The user name." }, { "name": "Mechanism", "type": "int8", "versions": "0+", "about": "The SCRAM mechanism." }, { "name": "Iterations", "type": "int32", "versions": "0+", "about": "The number of iterations." }, { "name": "Salt", "type": "bytes", "versions": "0+", "about": "A random salt generated by the client." }, { "name": "SaltedPassword", "type": "bytes", "versions": "0+", "about": "The salted password." } ]} ] }
Response
AlterUserScramCredentialsResponse v0, response header v1, 20 bytes on the wire
byte layout (20 bytes, 16 bytes per row)
0
1
2
3
4
5
6
7
8
9
A
B
C
D
E
F
0000
0010
object tree
AlterUserScramCredentialsResponse message v0 [0x0000, 20B] +-- Frame [0x0000, 4B] length-delimited framing | +-- size int32 = 16 [0x0000, 4B] number of bytes that follow, patched after encoding +-- ResponseHeader v1 [0x0004, 5B] common response header | +-- correlation_id int32 = 0 [0x0004, 4B] matches the correlation_id of the request | +-- tagged_fields uvarint = 0 [0x0008, 1B] number of tagged fields in the header +-- AlterUserScramCredentialsResponse struct [0x0009, 11B] message body, version 0 +-- ThrottleTimeMs int32 = 0 [0x0009, 4B] The duration in milliseconds for which the request was throttled due to a q... +-- Results []AlterUserScramCredentialsResult = 1 element [0x000d, 6B] The results for deletions and alterations, one per affected user. | +-- length uvarint = 2 (compact, n+1) [0x000d, 1B] one sample element follows | +-- AlterUserScramCredentialsResult[0] AlterUserScramCredentialsResult = struct [0x000e, 5B] | +-- User string = "" (compact, len+1=1) [0x000e, 1B] The user name. | +-- ErrorCode int16 = 0 [0x000f, 2B] The error code. | +-- ErrorMessage string = "" (compact, len+1=1) [0x0011, 1B] The error message, if any. | +-- tagged_fields uvarint = 0 [0x0012, 1B] number of tagged fields in this struct +-- tagged_fields uvarint = 0 [0x0013, 1B] number of tagged fields in this struct
kafka message schema (.json)
{ "apiKey": 51, "type": "response", "name": "AlterUserScramCredentialsResponse", "validVersions": "0", "flexibleVersions": "0+", "fields": [ { "name": "ThrottleTimeMs", "type": "int32", "versions": "0+", "about": "The duration in milliseconds for which the request was throttled due to a quota violation, or zero if the request did not violate any quota." }, { "name": "Results", "type": "[]AlterUserScramCredentialsResult", "versions": "0+", "about": "The results for deletions and alterations, one per affected user.", "fields": [ { "name": "User", "type": "string", "versions": "0+", "about": "The user name." }, { "name": "ErrorCode", "type": "int16", "versions": "0+", "about": "The error code." }, { "name": "ErrorMessage", "type": "string", "versions": "0+", "nullableVersions": "0+", "about": "The error message, if any." } ]} ] }