Skip to content

Commit 1e2f38a

Browse files
author
László Vaskó
committed
Merge remote-tracking branch 'origin/develop'
2 parents 47dfa02 + c92edbe commit 1e2f38a

File tree

5 files changed

+17
-4
lines changed

5 files changed

+17
-4
lines changed

openconnect_sso/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "0.3.0"
1+
__version__ = "0.3.1"
22
__description__ = (
33
"Wrapper script for OpenConnect supporting Azure AD (SAMLv2) authentication"
44
)

openconnect_sso/app.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -115,13 +115,18 @@ def authenticate_to(host, credentials):
115115

116116

117117
async def run_openconnect(auth_info, host, args):
118-
proc = await asyncio.create_subprocess_exec(
118+
command_line = [
119119
"sudo",
120120
"openconnect",
121121
"--cookie-on-stdin",
122122
"--servercert",
123123
auth_info.server_cert_hash,
124124
*args,
125+
]
126+
127+
logger.debug("Starting OpenConnect", command_line=command_line)
128+
proc = await asyncio.create_subprocess_exec(
129+
*command_line,
125130
host.vpn_url,
126131
stdin=asyncio.subprocess.PIPE,
127132
stdout=None,

openconnect_sso/cli.py

+8
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ def create_argparser():
6262
parser.add_argument(
6363
"openconnect_args",
6464
help="Arguments passed to openconnect",
65+
action=StoreOpenConnectArgs,
6566
nargs=argparse.REMAINDER,
6667
)
6768

@@ -72,6 +73,13 @@ def create_argparser():
7273
return parser
7374

7475

76+
class StoreOpenConnectArgs(argparse.Action):
77+
def __call__(self, parser, namespace, values, option_string=None):
78+
if "--" in values:
79+
values.remove("--")
80+
setattr(namespace, self.dest, values)
81+
82+
7583
class LogLevel(enum.IntEnum):
7684
ERROR = logging.ERROR
7785
WARNING = logging.WARNING

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "openconnect-sso"
3-
version = "0.3.0"
3+
version = "0.3.1"
44
description = "Wrapper script for OpenConnect supporting Azure AD (SAMLv2) authentication"
55
authors = ["László Vaskó <[email protected]>"]
66
readme = "README.md"

tests/test_openconnect_sso.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33

44
def test_version():
5-
assert __version__ == '0.3.0'
5+
assert __version__ == '0.3.1'

0 commit comments

Comments
 (0)