-
Notifications
You must be signed in to change notification settings - Fork 103
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
presence detection callback #2048
base: main
Are you sure you want to change the base?
presence detection callback #2048
Conversation
@@ -222,6 +226,14 @@ func (e *kryptoEcMiddleware) Wrap(next http.Handler) http.Handler { | |||
// so just add the session id manually | |||
context.WithValue(callbackReq.Context(), multislogger.KolideSessionIdKey, kolideSessionId[0]), | |||
) | |||
|
|||
// here we want to create an additional callback for presence detection, but it's only going to be valid if we have the session (saml) id |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume this is true? maybe ... I dunno, K2 could always look up the request ID
@@ -459,3 +475,110 @@ func (bhr *bufferedHttpResponse) WriteHeader(code int) { | |||
func (bhr *bufferedHttpResponse) Bytes() []byte { | |||
return bhr.buf.Bytes() | |||
} | |||
|
|||
func (e *kryptoEcMiddleware) presenceDetectionCallback(callbackReq *http.Request, cmdReq v2CmdRequestType, challengeBox *challenge.OuterChallenge, kolideSessionId []string) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
*kryptoEcMiddleware
is pretty big. Does this need to hang inside that struct?
@@ -222,6 +226,14 @@ func (e *kryptoEcMiddleware) Wrap(next http.Handler) http.Handler { | |||
// so just add the session id manually | |||
context.WithValue(callbackReq.Context(), multislogger.KolideSessionIdKey, kolideSessionId[0]), | |||
) | |||
|
|||
// here we want to create an additional callback for presence detection, but it's only going to be valid if we have the session (saml) id | |||
presenceDetectionCallbackReq := callbackReq.Clone(context.WithoutCancel(callbackReq.Context())) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if the rails side would be easier if we used a different URL. Probably okay to try either way
No description provided.