Skip to content

KIP-368 : Allow SASL Connections to Periodically Re-Authenticate#2197

Merged
dnwe merged 1 commit intoIBM:mainfrom
k-wall:kip-368
Apr 13, 2022
Merged

KIP-368 : Allow SASL Connections to Periodically Re-Authenticate#2197
dnwe merged 1 commit intoIBM:mainfrom
k-wall:kip-368

Conversation

@k-wall
Copy link
Copy Markdown
Member

@k-wall k-wall commented Mar 29, 2022

Proposed fix for #2060.

If the server uses KIP-368, the client will cause itself to reauthenticate by emitting the necessary SASL handshake/authenticate with the next client to server interaction.

2022/03/29 18:09:50 Completed pre-auth SASL handshake. Available mechanisms: [PLAIN OAUTHBEARER]
2022/03/29 18:09:50 Session expiration in 299000 ms and session re-authentication on or after 283079 ms

@k-wall
Copy link
Copy Markdown
Member Author

k-wall commented Mar 31, 2022

The tests that are failing on Go 1.18/Kafka 2.8.1

TestFuncConsumerGroupPartitioningStateful
TestFuncConsumerGroupPartitioning

don't appear to be related to my change.

Copy link
Copy Markdown
Contributor

@mimaison mimaison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @k-wall for the PR. It looks good overall, I've left a couple of small suggestions

Comment thread broker.go
}

func currentUnixMilli() int64 {
return time.Now().UnixNano() / int64(time.Millisecond)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The project aims at supporting the last couple of Golang version, so we could use time.Now().UnixMilli() that was introduced in 1.17. That said, it may be preferable to keep the current code for now to support older environments.

Copy link
Copy Markdown
Member Author

@k-wall k-wall Apr 8, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The project is still on go 1.16, so I cannot adopt this API yet. Also, if I understand the project's "two releases and two months" right it'd be too soon to bump Go right now (1.18 only came out last month (March 2022), so it is too soon for the project to adopt 1.17).

Comment thread broker.go Outdated
Comment thread broker.go Outdated
@mimaison mimaison requested a review from dnwe April 6, 2022 14:24
Copy link
Copy Markdown
Collaborator

@dnwe dnwe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent! Thank you for implementing this KIP. LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants