outposts: send SelectedChallenge when using MFA with Go FlowExecutor
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
8a24ddad28
commit
00324f922d
|
@ -130,8 +130,8 @@ func (fe *FlowExecutor) getAnswer(stage StageComponent) string {
|
||||||
|
|
||||||
// WarmUp Ensure authentik's flow cache is warmed up
|
// WarmUp Ensure authentik's flow cache is warmed up
|
||||||
func (fe *FlowExecutor) WarmUp() error {
|
func (fe *FlowExecutor) WarmUp() error {
|
||||||
defer fe.sp.Finish()
|
|
||||||
gcsp := sentry.StartSpan(fe.Context, "authentik.outposts.flow_executor.get_challenge")
|
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())
|
req := fe.api.FlowsApi.FlowsExecutorGet(gcsp.Context(), fe.flowSlug).Query(fe.Params.Encode())
|
||||||
_, _, err := req.Execute()
|
_, _, err := req.Execute()
|
||||||
return err
|
return err
|
||||||
|
@ -190,6 +190,7 @@ func (fe *FlowExecutor) solveFlowChallenge(depth int) (bool, error) {
|
||||||
}
|
}
|
||||||
devId32 := int32(devId)
|
devId32 := int32(devId)
|
||||||
inner := api.NewAuthenticatorValidationChallengeResponseRequest()
|
inner := api.NewAuthenticatorValidationChallengeResponseRequest()
|
||||||
|
inner.SelectedChallenge = (*api.DeviceChallengeRequest)(deviceChallenge)
|
||||||
inner.Duo = &devId32
|
inner.Duo = &devId32
|
||||||
responseReq = responseReq.FlowChallengeResponseRequest(api.AuthenticatorValidationChallengeResponseRequestAsFlowChallengeResponseRequest(inner))
|
responseReq = responseReq.FlowChallengeResponseRequest(api.AuthenticatorValidationChallengeResponseRequestAsFlowChallengeResponseRequest(inner))
|
||||||
case string(StageAccessDenied):
|
case string(StageAccessDenied):
|
||||||
|
|
Reference in a new issue