Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementation of session timeout in V1 SASL Authentication #1227

Closed

Conversation

scott-the-programmer
Copy link

Fixes #1093

This PR aims to interpret the session timeout in the SaslAuthenticate V1 Response. Considering that both saslAuthenticateRequestV0 and saslAuthenticateResponseV0 are only used in when we're working with V1 requests, i've decided to rename these to saslAuthenticateRequestV1 and saslAuthenticateResponseV1 and bring in the addition of session_lifetime_ms

V1 Response:

SaslAuthenticate Response (Version: 1) => error_code error_message auth_bytes session_lifetime_ms 
  error_code => INT16
  error_message => NULLABLE_STRING
  auth_bytes => BYTES
  session_lifetime_ms => INT64

https://kafka.apache.org/protocol.html#The_Messages_SaslAuthenticate

I've also taken inspiration from https://github.com/twmb/franz-go/blob/a1a2a452c33e53c177792b251c523786c4d9fa27/pkg/kgo/broker.go#L373 to check the expiry on read, at a staggered interval at around 90-90% of the session_lifetime_ms

@scott-the-programmer
Copy link
Author

Keeping this in draft while I validate MSK / Scram flows

@scott-the-programmer
Copy link
Author

closing in favour of #1230

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Observing "Group Authorization Failed" error for every 12 hours
1 participant