Skip to content

Instantly share code, notes, and snippets.

@purp
Last active May 14, 2025 18:40
Show Gist options
  • Select an option

  • Save purp/0221fb0c01077934222938a375dfea19 to your computer and use it in GitHub Desktop.

Select an option

Save purp/0221fb0c01077934222938a375dfea19 to your computer and use it in GitHub Desktop.

Revisions

  1. purp revised this gist May 14, 2025. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,5 @@
    # AWS VPN Client Authentication Error in MacOS Safari: This is a non-secure form

    ## Problem

    When attempting to connect to a VPN using AWS VPN Client, the authentication window in Safari shows a dialog stating
  2. purp created this gist May 13, 2025.
    30 changes: 30 additions & 0 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,30 @@
    ## Problem

    When attempting to connect to a VPN using AWS VPN Client, the authentication window in Safari shows a dialog stating
    "This is a non-secure form" and asking for confirmation before sending. When the "Send It" button is clicked, Safari presents
    an error page, stating that Safari can't open the page, stating "Navigation failed because the request was for an HTTP URL with HTTPS-Only enabled"

    ![image](https://gist.github.com/user-attachments/assets/57ad8b4c-b851-4eba-8bd2-9ab0d5dca093)

    ![image](https://gist.github.com/user-attachments/assets/d2860094-128d-4727-bcd6-7e20dd29ab00)

    ### Version Info

    * AWS VPN Client v5.2.0
    * Safari v18.4 (20621.1.15.11.10)
    * MacOS Sequoia 15.4.1 (24E263)

    ## Solution

    If you're getting this error when using AWS VPN Client (and perhaps other OpenVPN clients) with Safari, you can open Safari's preferences, select the Security tab, and disable the "Warn before connecting to a website over HTTP" setting. _You will still get the dialog,_ but clicking the "Send" button will no longer result in an error.

    ## Details
    * (In Safari 18.2 the default was changed)[https://developer.apple.com/documentation/safari-release-notes/safari-18_2-release-notes#Security] from `http:` to `https:`
    * When this change was made, a new "Non-secure site connections" setting was added to Safari's preferences
    * The default of this setting is "Warn before connecting to a website over HTTP"
    * This interferes with the callback from authentication to `http://127.0.0.1:35001` which AWS uses to signal to the AWS VPN client that the authentication has finished
    * This is also (a problem for other OpenVPN clients and Chromium based browsers)[https://issues.chromium.org/issues/330364341]

    ## Sources
    * "(OpenVPN \(AWS VPN\) Authentication fails)[[https://issues.chromium.org/issues/330364341](https://issues.chromium.org/issues/330364341#comment17)]
    * ("How can I enable HTTP in Safari settings")[https://discussions.apple.com/thread/255914488?answerId=261091134022&sortBy=rank#261091134022]