Skip to contentSkip to conversation

make possible to use alternative auth group with 2nd password

PATCH In review Lukáš Karas 2 participants 5 messages Aug 4, 2021 – Aug 30, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 make possible to use alternative auth group with 2nd password

Some servers are configured with multiple authentication groups. OpenConnect request just authentication entries that are valid for specific group (process_auth_form method). So, authentication group have to setup first, and new form have to be requested then.

Some authentication groups may require secondary password. For example one-time password from Google Authenticator app.

Lukas

From 775bfdb98cfd0d61a502399389ec68d5284a2af2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Karas?= <[email protected]>
Date: Tue, 3 Aug 2021 17:00:26 +0200
Subject: [PATCH] make possible to use alternative auth group with 2nd password

Some servers are configured with multiple authentication groups. OpenConnect request just authentication entries that are valid for specific group (process_auth_form method). So, authentication group have to setup first, and new form have to be requested then.

Some authentication groups may require secondary password. For example one-time password from Google Authenticator app.

---
 client/agent.c            |  1 +
 vpn/plugins/openconnect.c | 79 ++++++++++++++++++++++++++++++++++++++-
 2 files changed, 78 insertions(+), 2 deletions(-)
client/agent.c +1 -0
index 1cad3e03..abede4c6 100644
@@ -102,6 +102,7 @@ static struct agent_input_data vpnagent_input_handler[] = {
 	  request_input_string_return },
 	{ "Username", false, "VPN username? ", request_input_string_return },
 	{ "Password", false, "VPN password? ", request_input_string_return },
+	{ "OpenConnect.SecondPassword", false, "VPN one-time password? ", request_input_string_return },
 	{ },
 };
 
vpn/plugins/openconnect.c +77 -2

152 lines not on this page · raw message

Signature · 1 line
2.27.0
#1 lore raw

Hi Lukas,

Quoted 7 lines · Lukáš Karas

Some servers are configured with multiple authentication groups. OpenConnect request just authentication entries that are valid for specific group (process_auth_form method). So, authentication group have to setup first, and new form have to be requested then.

Some authentication groups may require secondary password. For example one-time password from Google Authenticator app.

From my quick glance it looks reasonable.

@Santtu, as you have done some serious work recently on the plugin, do have any objections?

Daniel

#2 lore raw

Hello guys.

Did you find some time to look at this patch? It would be great to support openconnect with second factor authentication and alternative groups.

Btw, if I understand the code, connman form API doesn't support updating of form fields dynamically right? (After change of openconnect group)

Lukas

Dne čtvrtek 5. srpna 2021 8:14:57 CEST Daniel Wagner napsal(a):

Quoted 17 lines

Hi Lukas,

Quoted 7 lines · Lukáš Karas

Some servers are configured with multiple authentication groups. OpenConnect request just authentication entries that are valid for specific group (process_auth_form method). So, authentication group have to setup first, and new form have to be requested then.

Some authentication groups may require secondary password. For example one-time password from Google Authenticator app.

From my quick glance it looks reasonable.

@Santtu, as you have done some serious work recently on the plugin, do have any objections?

Daniel

#3 lore raw

Hi Lukáš,

Quoted 2 lines · Lukáš Karas

Did you find some time to look at this patch? It would be great to support openconnect with second factor authentication and alternative groups.

Ah completely forgot about this patch. Thanks for the reminder.

IIRC, I had no objection on the patch, just asked for a second opinion. There was enough time to complain, I'll queue it up tonight.

Quoted 2 lines

Btw, if I understand the code, connman form API doesn't support updating of form fields dynamically right? (After change of openconnect group)

No idea, I haven't done anything with openconnect so far.

Daniel

#4 lore raw
In reply to Lukáš Karas

Hi Lukáš,

Quoted 7 lines · Lukáš Karas

Some servers are configured with multiple authentication groups. OpenConnect request just authentication entries that are valid for specific group (process_auth_form method). So, authentication group have to setup first, and new form have to be requested then.

Some authentication groups may require secondary password. For example one-time password from Google Authenticator app.

I've updated the patch slightly (whitespace fixes, reordering, indention, etc) and applied it. Nothing terrible dangerous.

Could you also send a patch updating the documentation?

doc/vpn-agent-api.txt

Thanks,
Daniel