ancwrd1 / snx-rs

Open source Linux client for Checkpoint VPN tunnels
GNU Affero General Public License v3.0
57 stars 5 forks source link

Possibility to omit saving credentials to keyring for OTP auth #9

Closed nut-3 closed 4 months ago

nut-3 commented 4 months ago

Hi, My company uses OTP for vpn authentication and I have a problem reconnecting, because snx-rs forcibly stores password into keyring in command mode. First problem - password stored even if authentication failed, so following login attempts do not provie password prompt. Second problem - even if authentication was successful, on following connections snx-rs uses old OTP stored in keyring and it fails.

I see several approaches to solving problems above:

[
      {
        "display_name": "RSA",
        "factors": [
          {
            "certificate_storage_type": "",
            "custom_display_labels": {
              "header": "\"Please provide User name, PIN Code and Tokencode from your RSA application\"",
              "password": "\"Pin Code\"",
              "username": "\"User name\""
            },
            "factor_type": "securid",
            "securid_card_type": "keyfob"
          }
        ],
        "id": "vpn_RSA",
        "secondary_realm_hash": "...",
        "show_realm": 1
      },
      {
        "display_name": "Indeed",
        "factors": [
          {
            "certificate_storage_type": "",
            "custom_display_labels": {
              "header": "\"Additional authentication required, please provide password to authenticate\"",
              "password": "\"OTP from your indeed app\"",
              "username": "\"User name\""
            },
            "factor_type": "password",
            "securid_card_type": ""
          },
          {
            "certificate_storage_type": "",
            "custom_display_labels": {
              "header": "\"You must enter your AD account password\"",
              "password": "\"Domain Password\"",
              "username": "\"Domain Password\""
            },
            "factor_type": "password",
            "securid_card_type": ""
          }
        ],
        "id": "vpn_Indeed",
        "secondary_realm_hash": "...",
        "show_realm": 1
      },
      {
        "display_name": "Standard",
        "factors": [
          {
            "certificate_storage_type": "",
            "custom_display_labels": "",
            "factor_type": "securid",
            "securid_card_type": "any"
          }
        ],
        "id": "vpn",
        "secondary_realm_hash": "...",
        "show_realm": 1
      }
    ]

Both Indeed and RSA have OTP auth, but Indeed also requires to provide account password.

ancwrd1 commented 4 months ago

I think an additional option to disable keyring is the simplest one. Checkpoint has a lot of options and I was mostly relying on the implementation we use in the company which is convenient for me personally :)