juniper-vpn-py
juniper-vpn-py copied to clipboard
add support for Juniper VPN profiles?
Our site uses Juniper VPN profiles to grant different levels of network access.
E.g., using this profile:
https://juniper-vpn.example.org/admins
…assigns me an address in a different subnet—one whose network ACLs grant access to more networks—than if I do not specify a profile name:
https://juniper-vpn.example.org/
juniper-vpn-py doesn't appear to have any support for profiles.
As a test, I attempted to simply insert the profile name into self.br.open() in the code. E.g.:
# Open landing page
self.r = self.br.open('https://' + self.args.host + '/admins')
…but this simplistic approach fails:
Password:Traceback (most recent call last):
File "./juniper-vpn.py", line 370, in <module>
jvpn.run()
File "./juniper-vpn.py", line 177, in run
self.action_login()
File "./juniper-vpn.py", line 211, in action_login
self.args.password = getpass.getpass('Password:')
File "/usr/lib64/python2.7/getpass.py", line 71, in unix_getpass
passwd = _raw_input(prompt, stream, input=input)
File "/usr/lib64/python2.7/getpass.py", line 133, in _raw_input
line = input.readline()
KeyboardInterrupt
Terminated
Am I missing something? Does juniper-vpn-py already have support for profiles, and I'm just not seeing it?
If not, if someone can point me in the direction of what needs to be done to support profiles, I will attempt to come up with a pull request to add profile support, as we need profile support for our VPN configuration.