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

Add a human readable check error line in the logs when there are no Authentication Methods configured for a DUO User #28

Open
bgironx15 opened this issue Nov 27, 2024 · 0 comments

Comments

@bgironx15
Copy link

bgironx15 commented Nov 27, 2024

Description:

When trying the authentication with a DUO User against the OpenVPN Access Server with AUTOPUSH = True, and the DUO User doesn't have any Authentication Methods configured, it fails, but no human readable check error line in the logs points out where the issue is

Steps to Reproduce:

Setup a new DUO User
Set AUTOPUSH = True in the DUO Script
Add a policy for this user with no Authentication Methods configured for him
Try logging in to the WebGUI to enroll the User
Connection fails and no human readable check error line in the logs points out where the issue is

Logs:

Nov 26 19:39:00 openvpn-access-server-Brandon2XX openvpnas: Duo OpenVPN_AS: initial auth request
Nov 26 19:39:00 openvpn-access-server-Brandon2XX openvpnas: Duo OpenVPN_AS: pre-authentication for brandon.jimenez
Nov 26 19:39:01 openvpn-access-server-Brandon2XX openvpnas: Duo OpenVPN_AS: secondary authentication required for user brandon.jimenez
Nov 26 19:39:01 openvpn-access-server-Brandon2XX openvpnas: Duo OpenVPN_AS: Autopushing user: brandon.jimenez, autopush_factor=None
Nov 26 19:39:01 openvpn-access-server-Brandon2XX openvpnas: Duo OpenVPN_AS: authentication for brandon.jimenez
Nov 26 19:39:01 openvpn-access-server-Brandon2XX openvpnas: Duo OpenVPN_AS: Traceback (most recent call last):#012  File "<string>", line 676, in auth_and_update_result_structure#012  File "<string>", line 647, in auth#012  File "<string>", line 371, in json_api_call#012  File "<string>", line 590, in api_call#012  File "<string>", line 295, in api_call#012  File "<string>", line 222, in sign#012  File "<string>", line 213, in canonicalize#012  File "<string>", line 196, in canon_params#012  File "/usr/lib/python3.8/urllib/parse.py", line 871, in quote#012    return quote_from_bytes(string, safe)#012  File "/usr/lib/python3.8/urllib/parse.py", line 896, in quote_from_bytes#012    raise TypeError("quote_from_bytes() expected bytes")#012TypeError: quote_from_bytes() expected bytes

Proposed Solution:

Add a new log line that explains the issue better. For example:

Nov 27 07:31:08 openvpn-access-server-Brandon2XX openvpnas: Duo OpenVPN_AS: initial auth request
Nov 27 07:31:08 openvpn-access-server-Brandon2XX openvpnas: Duo OpenVPN_AS: pre-authentication for brandon.jimenez
Nov 27 07:31:09 openvpn-access-server-Brandon2XX openvpnas: Duo OpenVPN_AS: secondary authentication required for user brandon.jimenez
Nov 27 07:31:09 openvpn-access-server-Brandon2XX openvpnas: Duo OpenVPN_AS: Autopushing user: brandon.jimenez, autopush_factor=None
Nov 27 07:31:09 openvpn-access-server-Brandon2XX openvpnas: Duo OpenVPN_AS: There are no Authentication Methods configured for user brandon.jimenez. Please check your Policy on DUO Side
Nov 27 07:31:09 openvpn-access-server-Brandon2XX openvpnas: Duo OpenVPN_AS: authentication for brandon.jimenez
Nov 27 07:31:09 openvpn-access-server-Brandon2XX openvpnas: Duo OpenVPN_AS: Traceback (most recent call last):#012  File "<string>", line 676, in auth_and_update_result_structure#012  File "<string>", line 647, in auth#012  File "<string>", line 371, in json_api_call#012  File "<string>", line 590, in api_call#012  File "<string>", line 295, in api_call#012  File "<string>", line 222, in sign#012  File "<string>", line 213, in canonicalize#012  File "<string>", line 196, in canon_params#012  File "/usr/lib/python3.8/urllib/parse.py", line 871, in quote#012    return quote_from_bytes(string, safe)#012  File "/usr/lib/python3.8/urllib/parse.py", line 896, in quote_from_bytes#012    raise TypeError("quote_from_bytes() expected bytes")#012TypeError: quote_from_bytes() expected bytes

I added this line in the DUO Script:

Nov 27 07:31:09 openvpn-access-server-Brandon2XX openvpnas: Duo OpenVPN_AS: There are no Authentication Methods configured for user brandon.jimenez. Please check your Policy on DUO Side

It would be really helpful for troubleshooting to have this line or something similar added in the DUO Script natively

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

No branches or pull requests

1 participant