outposts: send SelectedChallenge when using MFA with Go FlowExecutor

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-11-11 21:27:06 +01:00
parent 8a24ddad28
commit 00324f922d
1 changed files with 2 additions and 1 deletions

View File

@ -130,8 +130,8 @@ func (fe *FlowExecutor) getAnswer(stage StageComponent) string {
// WarmUp Ensure authentik's flow cache is warmed up
func (fe *FlowExecutor) WarmUp() error {
defer fe.sp.Finish()
gcsp := sentry.StartSpan(fe.Context, "authentik.outposts.flow_executor.get_challenge")
defer gcsp.Finish()
req := fe.api.FlowsApi.FlowsExecutorGet(gcsp.Context(), fe.flowSlug).Query(fe.Params.Encode())
_, _, err := req.Execute()
return err
@ -190,6 +190,7 @@ func (fe *FlowExecutor) solveFlowChallenge(depth int) (bool, error) {
}
devId32 := int32(devId)
inner := api.NewAuthenticatorValidationChallengeResponseRequest()
inner.SelectedChallenge = (*api.DeviceChallengeRequest)(deviceChallenge)
inner.Duo = &devId32
responseReq = responseReq.FlowChallengeResponseRequest(api.AuthenticatorValidationChallengeResponseRequestAsFlowChallengeResponseRequest(inner))
case string(StageAccessDenied):