Skip to content

Commit

Permalink
generate/kmsg/kversion: support KIP-373
Browse files Browse the repository at this point in the history
  • Loading branch information
twmb committed Aug 5, 2022
1 parent f0eeccd commit d7904cc
Show file tree
Hide file tree
Showing 9 changed files with 234 additions and 15 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@ generation.
| [KIP-361](https://cwiki.apache.org/confluence/display/KAFKA/KIP-361%3A+Add+Consumer+Configuration+to+Disable+Auto+Topic+Creation) — Allow disable auto topic creation | 2.3 | Supported |
| [KIP-368](https://cwiki.apache.org/confluence/display/KAFKA/KIP-368%3A+Allow+SASL+Connections+to+Periodically+Re-Authenticate) — Periodically reauthenticate SASL | 2.2 | Supported |
| [KIP-369](https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=89070828) — An always round robin produce partitioner | 2.4 | Supported |
| [KIP-373](https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=93324147) — Users can create delegation tokens for others | 3.3 | Supported |
| [KIP-380](https://cwiki.apache.org/confluence/display/KAFKA/KIP-380%3A+Detect+outdated+control+requests+and+bounced+brokers+using+broker+generation) — Inter-broker protocol changes | 2.2 | Supported |
| [KIP-389](https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=89070828) — Group max size error | 2.2 | Supported |
| [KIP-392](https://cwiki.apache.org/confluence/display/KAFKA/KIP-392%3A+Allow+consumers+to+fetch+from+closest+replica) — Closest replica fetching w/ rack | 2.2 | Supported |
Expand Down
2 changes: 1 addition & 1 deletion generate/definitions/29_describe_acls
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// "types" of filters in this request: the resource filter and the entry
// filter, with entries corresponding to users. The first three fields form the
// resource filter, the last four the entry filter.
DescribeACLsRequest => key 29, max version 2, flexible v2+
DescribeACLsRequest => key 29, max version 3, flexible v2+
// ResourceType is the type of resource to describe.
ResourceType: enum-ACLResourceType
// ResourceName is the name to filter out. For the CLUSTER resource type,
Expand Down
2 changes: 1 addition & 1 deletion generate/definitions/30_create_acls
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//
// See the DescribeACLsRequest documentation for more descriptions of what
// valid values for the fields in this request are.
CreateACLsRequest => key 30, max version 2, flexible v2+
CreateACLsRequest => key 30, max version 3, flexible v2+
Creations: [=>]
// ResourceType is the type of resource this acl entry will be on.
// It is invalid to use UNKNOWN or ANY.
Expand Down
2 changes: 1 addition & 1 deletion generate/definitions/31_delete_acls
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// DeleteACLsRequest deletes acls. This request works on filters the same way
// that DescribeACLsRequest does. See DescribeACLsRequest for documentation of
// the fields.
DeleteACLsRequest => key 31, max version 2, flexible v2+
DeleteACLsRequest => key 31, max version 3, flexible v2+
// Filters are filters for acls to delete.
Filters: [=>]
ResourceType: enum-ACLResourceType
Expand Down
12 changes: 11 additions & 1 deletion generate/definitions/38_create_delegation_token
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,13 @@
//
// Delegation tokens live inside of Kafka and use SASL SCRAM-SHA-256 for
// authorization.
CreateDelegationTokenRequest => key 38, max version 2, flexible v2+
CreateDelegationTokenRequest => key 38, max version 3, flexible v2+
// The principal type of the owner of the token. If null, this defaults
// to the token request principal.
OwnerPrincipalType: nullable-string // v3+
// Principal name of the owner of the token. If null, this defaults to
// the token request principal.
OwnerPrincipalName: nullable-string // v3+
// Renewers is a list of who can renew this delegation token. If empty, the
// default is the principal (user) who created the token.
Renewers: [=>]
Expand All @@ -33,6 +39,10 @@ CreateDelegationTokenResponse =>
// PrincipalName is the name of the principal that granted this delegation
// token.
PrincipalName: string
// The principal type of the requester of the token.
TokenRequesterPrincipalType: string // v3+
// The principal name of the requester token.
TokenRequesterPrincipalName: string // v3+
// IssueTimestamp is the millisecond timestamp this delegation token was
// issued.
IssueTimestamp: int64
Expand Down
6 changes: 5 additions & 1 deletion generate/definitions/41_describe_delegation_token
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// DescribeDelegationTokenRequest is a request to describe delegation tokens.
DescribeDelegationTokenRequest => key 41, max version 2, flexible v2+
DescribeDelegationTokenRequest => key 41, max version 3, flexible v2+
// Owners contains owners to describe delegation tokens for, or null for all.
// If non-null, only tokens created from a matching principal type, name
// combination are printed.
Expand All @@ -22,6 +22,10 @@ DescribeDelegationTokenResponse =>
PrincipalType: string
// PrincipalName is the principal name of who created this token.
PrincipalName: string
// The principal type of the requester of the token.
TokenRequesterPrincipalType: string // v3+
// The principal name of the requester token.
TokenRequesterPrincipalName: string // v3+
// IssueTimestamp is the millisecond timestamp of when this token was issued.
IssueTimestamp: int64
// ExpiryTimestamp is the millisecond timestamp of when this token will expire.
Expand Down
3 changes: 3 additions & 0 deletions generate/definitions/enums
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ ACLResourceType int8 (
4: CLUSTER
5: TRANSACTIONAL_ID
6: DELEGATION_TOKEN
7: USER
)

// ACLResourcePatternType is how an acl's ResourceName is understood.
Expand Down Expand Up @@ -101,6 +102,8 @@ ACLOperation int8 (
10: DESCRIBE_CONFIGS
11: ALTER_CONFIGS
12: IDEMPOTENT_WRITE
13: CREATE_TOKENS
14: DESCRIBE_TOKENS
)

//////////
Expand Down
Loading

0 comments on commit d7904cc

Please sign in to comment.