-
Notifications
You must be signed in to change notification settings - Fork 133
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/develop'
- Loading branch information
Showing
8 changed files
with
108 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,31 @@ | ||
# openconnect-sso | ||
Wrapper script for openconnect supporting Azure AD (SAMLv2) authentication | ||
Wrapper script for OpenConnect supporting Azure AD (SAMLv2) authentication | ||
|
||
## TL; DR | ||
```bash | ||
$ pip install openconnect-sso-$VERSION.whl | ||
$ openconnect-sso --server vpn.server.com/group | ||
``` | ||
|
||
## Configuration | ||
If you want to save credentials and get them automatically | ||
injected in the web browser: | ||
```bash | ||
$ openconnect-sso --server vpn.server.com/group --user [email protected] | ||
Password ([email protected]): | ||
[info ] Authenticating to VPN endpoint ... | ||
``` | ||
|
||
User credentials are automatically saved to the users login keyring (if available). | ||
|
||
If you already have Cisco Anyconnect set-up, then `--server` argument is optional. | ||
Also, the last used `--server` address is saved between sessions so there is no need | ||
to always type in the same arguments: | ||
|
||
```bash | ||
$ openconnect-sso | ||
[info ] Authenticating to VPN endpoint ... | ||
``` | ||
|
||
Configuration is saved in `$XDG_CONFIG_HOME/openconnect-sso/config.toml`. On typical | ||
Linux installations it is located under `$HOME/.configopenconnect-sso/config.toml` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
__version__ = "0.1.0" | ||
__version__ = "0.2.0" | ||
__description__ = ( | ||
"Wrapper script for openconnect supporting Azure AD (SAMLv2) authentication" | ||
"Wrapper script for OpenConnect supporting Azure AD (SAMLv2) authentication" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
[tool.poetry] | ||
name = "openconnect-sso" | ||
version = "0.1.0" | ||
description = "Wrapper script for openconnect supporting Azure AD (SAMLv2) authentication" | ||
version = "0.2.0" | ||
description = "Wrapper script for OpenConnect supporting Azure AD (SAMLv2) authentication" | ||
authors = ["László Vaskó <[email protected]>"] | ||
readme = "README.md" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import pytest | ||
|
||
from openconnect_sso.config import HostProfile | ||
|
||
|
||
@pytest.mark.parametrize(("server", "group", "expected_url"), ( | ||
("hostname", "", "https://hostname"), | ||
("hostname", "group", "https://hostname/group"), | ||
("hostname/group", "", "https://hostname/group"), | ||
("https://hostname", "group", "https://hostname/group"), | ||
("https://server.com", "group", "https://server.com/group"), | ||
("https://hostname/group", "", "https://hostname/group"), | ||
("https://hostname:8443/group", "", "https://hostname:8443/group"), | ||
)) | ||
def test_vpn_url(server, group, expected_url): | ||
assert HostProfile(server, group).vpn_url == expected_url | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,4 @@ | |
|
||
|
||
def test_version(): | ||
assert __version__ == '0.1.0' | ||
assert __version__ == '0.2.0' |