get_authentication_log clearing out Params
gertnerbot opened this issue · 3 comments
From examples/Log_Examples.py, regardless of the params you set in the args, the duo_client/admin.py get_authentication_log method will strip out those set params due to the failed iteration over the kwargs. I tried fixing it myself but gave up and just passed the values into the method directly.
for k in kwargs: if kwargs[k] is not None and k in VALID_AUTHLOG_REQUEST_PARAMS: params[k] = kwargs[k]
You'll have to add log/print statements to see the before and after of the params.
@gertnerbot I'm not sure I'm following you. Can you give me a set of steps (and/or code) that demonstrates the issue?
The intent of the loop over the kwargs in the get_authentication_log method is simply to ignore parameters that don't apply to the API call, but ideally that won't cause any problems or interfere with anything.
@gertnerbot have you had a chance to define some steps to reproduce? I've not been able to recreate any flow where keys are removed from the parameters, since we only manipulate a copy in the api call method, and the original dict is not altered as far as I can tell.
@gertnerbot I've still not been able to cause any problem like this. Feel free to reopen this with steps to reproduce and we'll look into it.