vlaci / openconnect-sso

Wrapper script for OpenConnect supporting Azure AD (SAMLv2) authentication to Cisco SSL-VPNs
GNU General Public License v3.0
278 stars 117 forks source link

Fixing connection issue where vendor doesn't return "auth.message" #175

Open gadikotamohan opened 1 month ago

gadikotamohan commented 1 month ago

when the auth complete response is something like this

<?xml version="1.0" encoding="UTF-8"?>\n
<config-auth client="vpn" type="complete" aggregate-auth-version="2">\n
  <session-id><SESSION ID></session-id>\n
  <session-token><SESSION TOKEN></session-token>\n
  <capabilities>\n
    <crypto-supported>ssl-dhe</crypto-supported>\n
  </capabilities>\n
  <auth id="success">\n
    <banner>WARNING: This system is for the use of authorized clients only. Individuals using the computer network system without authorization, or in excess of their authorization, are subject to having all their activity on this computer network system monitored and recorded by system personnel. Access is restricted to authorized users only. Unauthorized access is a violation of state and federal, civil and criminal laws.</banner>\n
  </auth>\n
  <config client="vpn" type="private">\n
    <vpn-base-config>\n
      <nopkg></nopkg>\n
      <server-cert-hash><CERT SHA></server-cert-hash>\n
    </vpn-base-config>\n
    <opaque is-for="vpn-client">\n
      <custom-attr>\n
        <dynamic-split-include-domains>
          <![CDATA[example.com]]>
        </dynamic-split-include-domains>\n
      </custom-attr>\n
    </opaque>\n
    <vpn-profile-manifest>\n
      <vpn rev="1.0">\n
        <file type="profile" service-type="user">\n
          <uri>/CACHE/stc/profiles/profile.xml</uri>\n
          <hash type="sha1"><SHA STRING></hash>\n
        </file>\n
      </vpn>\n
    </vpn-profile-manifest>\n
  </config>\n
</config-auth>\n

we are getting error and openconnect-sso doesnt' work. I've made a fix to support such XML response

gadikotamohan commented 1 month ago

image

gadikotamohan commented 1 month ago

@vlaci I could close this PR in favor of https://github.com/vlaci/openconnect-sso/pull/161, they both seem to address same issue. ie; https://github.com/vlaci/openconnect-sso/issues/57