てんこ

ブログ名は愛猫(てん)の愛称です。中身は個人のIT系学習記録です。

AnsibleでFortigateのHA構成を組んでみた。

この記事は、Ansible 2 Advent Calender 2019の15日目の記事です。

昨日の…というか、先週一週間は、@sky_jokerxxさん「Ansible2 Advent Calender 一週間全部俺」の無双をやっていただいてまして、あれだけ引き出しが多いのすごいなあと、ただただ尊敬する次第です。

昨日の記事はこちらです。

さて、私はいつもの通り、AnsibleでFortigateを操作してみた話を書かせていただきます。今回はHAを組むモジュールである、fortios_system_haを使ってみました。

Ansible関連の実践記事一覧はこちら


目的

fortigateを冗長構成(HA)を組むためのPlaybookの書き方や、<your_own_value>を明らかにするため

…そろそろ<your_own_value>との戦いから卒業せねば(汗)

先に結論

  • FortigateのHA設定用モジュールを利用して、HA構成を組むことができた
    • 初回設定のときはfailedになるが、設定は成功している
    • HeartBeat用のインターフェースを指定する場合は注意する
  • internalを分離させるためのvirtual-switchを扱うモジュールは現時点では存在しない。

環境

構成図

このような感じの構成で確認を行いました。

前提条件として、初期設定でFortigate側は初期状態からDMZポートに各々の管理用IPを付与した状態を前提としています。

構成上の注意点

検証で利用しているFortigateは60Dなのですが、スイッチ用のポートとして、「internal」というポートが備わっています。(1-7番ポートまで存在)

HA構成を組む場合、このスイッチポートを分離させて独立したポートにすることが多いです。 実機の設定では、「config system virtual-switch」というConfigで定義されているのがその箇所なのですが、残念ながら現時点では、Ansibleのfortios用のモジュールには、このvirtual-switchに関連するモジュールが存在しません。

今回は可能な限りPlaybookのみで実施しようとしていますので手動での分離などは行っていませんが、手動で分離した場合などについては、また別途記事にしたいと思います。

参考までに、実機で全ポートを独立したポートに分離する場合には、以下の通りのコマンドで実施可能です。

config system virtual-switch
delete 1
end

作成したinventory、group_vars、host_vars、Playbook

モジュールリファレンスを参考にしつつ、まずは以下のような環境設定を定義。

■inventory

[fortigate]
fg_fw01 ansible_host=192.168.10.61
fg_fw02 ansible_host=192.168.10.62

■group_vars

---
ansible_user: admin
ansible_password: password
ansible_network_os: fortios
ansible_connection: httpapi
ansible_httpapi_use_ssl: yes
ansible_httpapi_validate_certs: no
timeout: 600

■FW01用(host_vars/fg_fw01.yml)

---
fw_hostname: fw01
ha_manage_if: dmz
ha_manage_gw: 192.168.10.254
vc1_node_role: master
vc1_priority: 200
vc1_monitor_if: wan1

■FW02用(host_vars/fg_fw02.yml)

---
fw_hostname: fw02
ha_manage_if: dmz
ha_manage_gw: 192.168.10.254
vc1_node_role: backup
vc1_priority: 100
vc1_monitor_if: wan1

基本的には、単純なHA構成だけであれば、Priorityの値だけをホスト毎に変えれば問題ないと思います。

本当はもうちょっとvarsに入れたほうがいいものもあるんですが、時間も足りなくて未整理です。申し訳ありません。 そして、作成したPlaybookがこちら。

■Playbook

---
- hosts: fortigate
  gather_facts: false
  vars:
    vdom: "root"

  tasks:
  - name: Fortigate Hostname Setting # ホスト名の定義
    fortios_system_global:
      system_global:
        hostname: "{{ fw_hostname }}"
        alias: "{{ fw_hostname }}"

  - name: Fortigate HA VC1 Setting # 実際のHA設定
    fortios_system_ha:
      system_ha:
        group_id: "10"
        group_name: "FG_TEST"
        mode: "a-p"
        authentication: "enable"
        password: "hogehoge"
        ha_direct: "enable"
        ha_mgmt_status: "enable"
        ha_mgmt_interfaces:
          - 
            id: "1"
            interface: "{{ ha_manage_if }}"
            dst: "0.0.0.0 0.0.0.0"
            gateway: "{{ ha_manage_gw }}"
        priority: "{{ vc1_priority }}"
        monitor: "{{ vc1_monitor_if }}"
        hbdev: "\"wan2\" 128" # 注意点(後述)
        session_sync_dev: "wan2"
        sync_config: "enable"
        vcluster2: "disable"
        schedule: "none"
        override: "disable"
        vcluster_id: 0
        vdom: "{{ vdom }}"

冗長を組むと、さすがにホスト名を定義しないと区別が難しくなるため、ha設定を行う前に、hostnameの定義などを行っています。

このPlaybookを実行すると、以下のようにHA設定の部分はfailedになります。

しかしながら、WebUIなどで覗いてみると、意図した通りの設定になっていることが確認できます。

なぜfailedになるのに設定は完了しているのかについてですが、failedの要因は応答待ちのtimeoutです。 この辺りは機器の仕様もあると思いますが、HAの設定操作を行ったHTTPコネクションでは、HA設定に関しては応答を返せないのかな、と推測しています。

ちなみに、すでにHA構成が組まれているホストに対しての設定変更を行うPlaybookであれば、応答は返ってきます。

Playbook作成上の注意点

このあたりが<your_own_value>との戦いである所以なのですが、Playbook上にコメントした、hddev: のところで少しハマりました。

以下の画像は、モジュールリファレンスのサンプルの記述です。

hbdev:の部分は、目的は「Heart Beat パケットをやりとりするインターフェース(デバイス)を指定する」箇所です。

CLIなどで設定している人は良くご存じかもしれませんが、この設定においては、インターフェース名だけを指定するだけではなく、その「プライオリティ」を定義する必要があります。

記述方法が ”<インターフェース名>" <プライオリティ値> という指定をする必要があるため、ダブルクォーテーションもパラメータとして必要になります。

そのため、エスケープ文字を挟み、このように書く必要があります。

        hbdev: "\"wan2\" 128" # 注意点(後述)

まとめ

「先に結論」の個所でも書きましたが、以下のような結果になりました。

  • FortigateのHA設定用モジュールを利用して、HA構成を組むことができた
    • 初回設定のときはfailedになるが、設定は成功している
    • HeartBeat用のインターフェースを指定する場合は注意する
  • internalを分離させるためのvirtual-switchを扱うモジュールは現時点では存在しない。

リファレンスの<your_own_value>と戦いは、以下のような流れでやっています。

  • とりあえずCLIで最低ラインを探してみる
  • WebUIでも設定を実施してみる
  • uriモジュールを利用した汎用Playbookで設定後の状態をJSONで取得する
    • 今回のものは、cmdb/system/haで取得が可能
  • Playbookに落としこむ

楽しくはあるんですが、時間が限られたときにやるものではないですね…

また今度、今回作成したPlaybookを生かして、この構成を使った運用のつらみだったり、複数のVDOM Cluster構成を組むようなPlaybookにチャレンジしたいと思います。

バトンリレー

なんとか前走者から渡されたバトンを落とさず、ブログを書くことができました。

お次のssato1138さんにバトンをつなぎます。

よろしくお願いいたします!

AnsibleでFortigateをファームアップしてみた

Advent Calenderの時期で、私もAnsible 2 Advent Calender 2019にエントリしていますが、空気を読まずに通常投稿!!

先日の記事にも書きましたが、我が家の検証用のFortigateが2台構成になりました。

最終的にHAを組むつもりなので、各々のバージョンを合わせるために、Ansibleでファームアップを試みてみましたので、それを記録しておきます。

Ansible関連の実践記事一覧はこちら


目的

AnsibleによるFortigateのファームアップにおけるPlaybookに必要なパラメータを明らかにするため

モジュールのリファレンス<your_own_value>ばかりで困るんです…

環境

※途中の過程でFortios5.6でも試しかけましたが、fortios_factsすら通らなかったので断念。

fortios_system_firmware_upgradeの手法毎の結果

source: usbの場合

事前準備として、ファームアップ用のファイル(.outファイル)をUSBメモリに入れ、本体に接続します。

その後、以下のようなPlaybookで、問題なくファームアップが実施できました。

最後にdebug仕込んでますが、Reboot入ってしまうのでエラーになります。(うろ覚えなので、確認後修正するかもしれません。)

ただ、処理はちゃんと実行されていて、Reboot後には新しいファームで起動してきます。

---
- hosts: fortigate
  gather_facts: false
  vars:
    vdom: "root"

  tasks:

  - name: Perform firmware upgrade with firmware file on USB.
    fortios_system_firmware_upgrade:
      vdom:  "{{ vdom }}"
      system_firmware:
        filename: "FGT_60D-v6-build0303-FORTINET.out" #USBメモリ上のファイル名を入れる
        format_partition: "yes"
        source: "usb"
    register: fortios_system_firmware_upgrade_result
  
  - name: Debug
    debug:
      var: fortios_system_firmware_upgrade_result

source: fortiguardの場合

事前準備として、ファームアップ用のファイル名が必要になります。

この「ファイル名」が曲者でして。「オンラインなのにファイル名…?」となりました。バージョンの指定とかならわかるんですが。

  • USBでやったときの結果と同じファイル名でやってみる→NG ( "FGT_60D-v6-build0303-FORTINET.out" )
  • ターゲットにしているバージョンを入れてみる→NG ( "v6.0.8" )

■NG時の出力(Playbookの実行結果のstateとしてはokになります)

"results": {
    "error": "download_failed",
    "status": "error"
},

頭を悩ませていたんですが、fortios_factsに「system_firmware_select」というfactがあったことを思い出しまして、以下のPlaybookを実行。

■fortios_facts実行用のPlaybook

---
- hosts: fortigate
  gather_facts: false

  tasks:
  - name: Get Facts.
    fortios_facts:
      gather_subset:
        - fact: 'system_firmware_select'
    register: getfact_result

  - name: Debug
    debug: 
      var: getfact_result

その結果、以下のようなJSON形式の情報が戻ってきました。

■fortios_factsの出力結果

"results": {
"available": [
    {
        "branch-point": 303,
        "build": 303,
        "id": "06000000FIMG0009900008",
        "major": 6,
        "minor": 0,
        "name": "FortiOS",
        "notes": "http://docs.fortinet.com/d/fortios-6.0.8-release-notes/download",
        "patch": 8,
        "release-type": "GA",
        "source": "fortiguard",
        "version": "v6.0.8"
    },
    {
        "branch-point": 302,
        "build": 302,
        "id": "06000000FIMG0009900007",
        "major": 6,
        "minor": 0,
        "name": "FortiOS",
        "notes": "http://docs.fortinet.com/d/fortios-6.0.7-release-notes/download",
        "patch": 7,
        "release-type": "GA",
        "source": "fortiguard",
        "version": "v6.0.7"
    },
(中略)
],
"current": {
    "branch-point": 231,
    "build": 231,
    "id": "current",
    "major": 6,
    "minor": 0,
    "name": "FortiOS",
    "notes": "http://docs.fortinet.com/d/fortios-6.0.4-release-notes/download",
    "patch": 4,
    "platform-id": "FGT60D",
    "release-type": "GA",
    "source": "current",
    "version": "v6.0.4"
}

この中のどれかか…とあたりを付け、ファイル名になりそうな「id」という情報を試しに入れてみました。

結果、Playbookの実行が即download_Failed などにはならず、待ち状態→Timeoutっぽい形でfailedになりました。

■作成したPlaybook

---
- hosts: fortigate
  gather_facts: false
  vars:
    vdom: "root"

  tasks:

  - name: Perform firmware upgrade with firmware on fortiguard.
    fortios_system_firmware_upgrade:
      vdom:  "{{ vdom }}"
      system_firmware:
        filename: "06000000FIMG0009900008" #v6.0.8の場合の「ID」の値を記載
        format_partition: "yes"
        source: "fortiguard"
    register: fortios_system_firmware_upgrade_result
  
  - name: Debug
    debug:
      var: fortios_system_firmware_upgrade_result

しばらく放置すると、コンソール画面に変化が現れ、ファームアップのシーケンスに入ってくれて、その後自動で再起動→ファームアップが完了しました!!

というわけで、【source: fortiguardを利用する場合のfilenameにはfortios_factsで取得できる対象ファームウェアの「id」を入れればいい】ということがわかりました。

これも最後にdebug仕込んでますが、ファームウェアのダウンロード中の段階でTimeoutを迎えてエラーになります。ただ、処理はちゃんと実行されていて、Reboot後には新しいファームで起動してきます。

試しにPlaybook実行時に--timeout=6000 とオプションを入れてみましたが変わりませんでした。

httpapiのtimeout値をいじればもしかしたら戻りが取れるのかもしれません。また調べてみようと思います。

ダウングレードの場合

試しに、6.0.8->6.0.7を同じやり方で試してみたんですが、ダウングレードは始まりませんでした。

ファームウェア関連は、WebUIで見ると、こんな画面になります。(System -> Firmware )

上手く行かない理由は、この部分の「Confirm version downgrade」に当たる部分がモジュール上存在しないからかな、と予想してます。

(WebUIでやる場合には、問題なくダウングレードも実施可能です)

source: uploadの場合(未達成)

おそらく、Ansibleを使う時点でUSBはないな、と思ってます。そうすると、本命はfortiguardか、このupload。

なんですが。

なぜbase64エンコードをする必要があるのか…

モジュール側で処理してくれればいいのにと思いながら、ちょっと試してみましたが、上手く行かず。

■作成したPlaybook(失敗してます)

---
- hosts: fortigate
  gather_facts: false
  vars:
    vdom: "root"

  tasks:
  - name: Perform firmware upgrade with firmware file Upload File.
    fortios_system_firmware_upgrade:
      vdom:  "{{ vdom }}"
      system_firmware:
        file_content: lookup('file', '/home/ansible/ansible-playbook/fortigate/F60Dv608_base64')
        filename: "FGT_60D-v6-build0303-FORTINET.out"
        format_partition: "yes"
        source: "upload"
    register: fortios_system_firmware_upgrade_result
  
  - name: Debug
    debug:
      var: fortios_system_firmware_upgrade_result

外部でbase64化したものをlookupで読ませたんですが、失敗してます。

これは余裕がある時にもう少し別の方法を試してみます。

まとめ

最後の「upload」はまだ未完了ですが、FortigateのファームアップもAnsibleで実行できることが確認できました。

uploadのものも、fortiguardほどはわからなくはないと思いますので、また折を見てやってみます。

●残課題

  • uploadでのbase64での実践
  • fortiguard/uploadで発生するtimeoutを伸ばして、処理結果を取得する方法

ラボ環境がちょっとパワーアップしました。

いつもAnsibleで検証してるFortigateが2台構成になり、HAが組めるように…これで色々捗りそうです!!

配線は仮なので見直す予定。

12/5 見直し完了!!これで捗る予感!

  • 2PortのLANスイッチャ(左端に見える白い箱)で、1/2号機のFortigateのコンソール接続を切り替えられるように整備
  • LAN配線を全体的に短いケーブルへ移行
  • 純正電源ケーブルが長すぎるため、ミッキータイプの短い電源ケーブルに換装

AnsibleでFortigateのConfigをバックアップしてみた。

Ansibleのfortios用のモジュールには、バックアップモジュールはありません。

実際には、fortios_configというモジュールで取得ができたようなのですが、pyFGが必要なようです。

自分の環境ではpyFGが入らないので、うーんと思っていました。(細かい原因は追ってません…)

先日書いた汎用のuriを、こちらのブログを参考にして少しいじったら、バックアップを取得することができました。

参考にしたブログではAPI_KEYを利用されていましたが、現時点ではセッションのCookieでも取得は可能でした。(将来が若干不安ではありますが…)

Ansible関連の実践記事一覧はこちら


作成したPlaybook

---
- hosts: fortigate  
  gather_facts: false

  vars:
    api_type: "monitor"
    api_path: "system"
    api_name: "config"

  tasks:
  - name: Login
    uri:
      url: https://{{ ansible_host }}/logincheck
      validate_certs: no
      method : "POST"
      force_basic_auth: yes
      body_format: "form-urlencoded"
      url_username: "{{ ansible_user }}"
      url_password: "{{ ansible_password }}"
      body:
        - [ username, "{{ ansible_user }}" ]
        - [ secretkey, "{{ ansible_password }}" ]
        - [ ajax, "1" ]
    register: http_response
    
  - name: GET Config Backup
    uri:
      url: https://{{ ansible_host }}/api/v2/{{ api_type }}/{{ api_path }}/{{ api_name }}/backup?scope=global
      validate_certs: no
      method: "GET"
      headers:
        Cookie: "{{ http_response.set_cookie }}"
      return_content: yes
    register: get_obj

  - name: Backup File
    copy:
      content: "{{ get_obj.content }}"
      dest: ./backup.txt # バックアップ出力先指定

取得できたバックアップ

2バイト文字もばっちり。

うーん、この参考にしたブログの方はAPIリファレンスお持ちなのかな…

やっぱりフル活用するにはAPIリファレンスが読みたいなあ…

AnsibleでFortigateのオブジェクト情報をGETしてみた(汎用版)

別記事でFortigateのポリシーをGETしてみたというのを書きましたが、それの汎用版です。

エンドポイントの指定にはAPIの種類であるtypeと、pathnameというのが必要そうな感じなので、それで大体どんなのが取れるのというのもメモ書きでまとめておきます。

fortios のものはわかりやすいのですが、"_" が3つ、4つなどのものもあるため、試してみたものを徐々に更新します。

理想は、これをuriで書くことなく、標準モジュールのGETメソッドにしてくれると嬉しいんですが…

Ansible関連の実践記事一覧はこちら


汎用Playbook

group_varsで認証情報を指定し、fortiosモジュールの動作を参考にしてuriモジュールでREST APIを利用する形にしています。

---
- hosts: fortigate  
  gather_facts: false

  vars:
    api_type: "cmdb" # cmdb/monitorの2種類があるようです。
    api_path: "system" #必要に応じてここを書き換えたり-eしたりSurveyしたり
    api_name: "ha" #必要に応じてここを書き換えたり-eしたりSurveyしたり

  tasks:
  - name: Login
    uri:
      url: https://{{ ansible_host }}/logincheck
      validate_certs: no
      method : "POST"
      force_basic_auth: yes
      body_format: "form-urlencoded"
      url_username: "{{ ansible_user }}"
      url_password: "{{ ansible_password }}"
      body:
        - [ username, "{{ ansible_user }}" ]
        - [ secretkey, "{{ ansible_password }}" ]
        - [ ajax, "1" ]
    register: http_response
    
  - name: GET Object
    uri:
      url: https://{{ ansible_host }}/api/v2/{{ api_type }}/{{ api_path }}/{{ api_name }}
      validate_certs: no
      method: "GET"
      headers:
        Cookie: "{{ http_response.set_cookie }}"
      return_content: yes
    register: get_obj

  - name: Debug Object
    debug:
      var: get_obj.json.results
      

typeとpath、nameの組み合わせ表

type path name 概要 備考
cmdb firewall policy ファイアウォールのポリシー設定が取得可能 /firewall/policy/1などとするとポリシーIDを限定可能
monitor firewall policy ファイアウォールのポリシー毎のActiveセッションや転送バイト数が取得可能
cmdb firewall address ファイアウォールのアドレスオブジェクトが取得可能 -
cmdb firewall addrgrp ファイアウォールのアドレスグループオブジェクトが取得可能 -
cmdb firewall internet-service ファイアウォールのインターネットサービスオブジェクトが取得可能 -
cmdb system interface 物理IFの各種設定が取得可能。多すぎ… -
monitor system interface 物理IFのIPやTX/RXバイト、エラー数が取得可能 fortios_factsの”system_interface_select”と同じだが、あちらはfilter設定で要素を追加可能な模様。
cmdb dlp sensor DLPセンサー設定が取得可能 -
cmdb ips rule 現在のIPSのシグネチャ情報が取得可能 LTでは、このネタにtemplateを組み合わせてcsv出力した
cmdb firewall ssl-ssh-profile SSLSSHプロファイル情報が取得可能

実際のログ

cmdb/firewall/ssl-ssh-profile

詳細はここをクリック

        "results": [
            {
                "caname": "Fortinet_CA_SSL",
                "comment": "Read-only SSL handshake inspection profile.",
                "ftps": {
                    "allow-invalid-server-cert": "disable",
                    "client-cert-request": "bypass",
                    "ports": [
                        990
                    ],
                    "status": "disable",
                    "unsupported-ssl": "bypass",
                    "untrusted-cert": "allow"
                },
                "https": {
                    "allow-invalid-server-cert": "disable",
                    "client-cert-request": "bypass",
                    "ports": [
                        443
                    ],
                    "status": "certificate-inspection",
                    "unsupported-ssl": "bypass",
                    "untrusted-cert": "allow"
                },
                "imaps": {
                    "allow-invalid-server-cert": "disable",
                    "client-cert-request": "inspect",
                    "ports": [
                        993
                    ],
                    "status": "disable",
                    "unsupported-ssl": "bypass",
                    "untrusted-cert": "allow"
                },
                "mapi-over-https": "disable",
                "name": "certificate-inspection",
                "pop3s": {
                    "allow-invalid-server-cert": "disable",
                    "client-cert-request": "inspect",
                    "ports": [
                        995
                    ],
                    "status": "disable",
                    "unsupported-ssl": "bypass",
                    "untrusted-cert": "allow"
                },
                "q_origin_key": "certificate-inspection",
                "rpc-over-https": "disable",
                "server-cert": "Fortinet_SSL",
                "server-cert-mode": "re-sign",
                "smtps": {
                    "allow-invalid-server-cert": "disable",
                    "client-cert-request": "inspect",
                    "ports": [
                        465
                    ],
                    "status": "disable",
                    "unsupported-ssl": "bypass",
                    "untrusted-cert": "allow"
                },
                "ssh": {
                    "inspect-all": "disable",
                    "ports": [
                        22
                    ],
                    "ssh-algorithm": "compatible",
                    "ssh-policy-check": "disable",
                    "ssh-tun-policy-check": "disable",
                    "status": "disable",
                    "unsupported-version": "bypass"
                },
                "ssl": {
                    "allow-invalid-server-cert": "disable",
                    "client-cert-request": "bypass",
                    "inspect-all": "disable",
                    "unsupported-ssl": "bypass",
                    "untrusted-cert": "allow"
                },
                "ssl-anomalies-log": "enable",
                "ssl-exempt": [],
                "ssl-exemptions-log": "disable",
                "ssl-server": [],
                "untrusted-caname": "Fortinet_CA_Untrusted",
                "use-ssl-server": "disable",
                "whitelist": "disable"
            },
            {
                "caname": "Fortinet_CA_SSL",
                "comment": "Customizable deep inspection profile.",
                "ftps": {
                    "allow-invalid-server-cert": "disable",
                    "client-cert-request": "bypass",
                    "ports": [
                        990
                    ],
                    "status": "deep-inspection",
                    "unsupported-ssl": "bypass",
                    "untrusted-cert": "allow"
                },
                "https": {
                    "allow-invalid-server-cert": "disable",
                    "client-cert-request": "bypass",
                    "ports": [
                        443
                    ],
                    "status": "deep-inspection",
                    "unsupported-ssl": "bypass",
                    "untrusted-cert": "allow"
                },
                "imaps": {
                    "allow-invalid-server-cert": "disable",
                    "client-cert-request": "inspect",
                    "ports": [
                        993
                    ],
                    "status": "deep-inspection",
                    "unsupported-ssl": "bypass",
                    "untrusted-cert": "allow"
                },
                "mapi-over-https": "disable",
                "name": "custom-deep-inspection",
                "pop3s": {
                    "allow-invalid-server-cert": "disable",
                    "client-cert-request": "inspect",
                    "ports": [
                        995
                    ],
                    "status": "deep-inspection",
                    "unsupported-ssl": "bypass",
                    "untrusted-cert": "allow"
                },
                "q_origin_key": "custom-deep-inspection",
                "rpc-over-https": "disable",
                "server-cert": "",
                "server-cert-mode": "re-sign",
                "smtps": {
                    "allow-invalid-server-cert": "disable",
                    "client-cert-request": "inspect",
                    "ports": [
                        465
                    ],
                    "status": "deep-inspection",
                    "unsupported-ssl": "bypass",
                    "untrusted-cert": "allow"
                },
                "ssh": {
                    "inspect-all": "disable",
                    "ports": [
                        22
                    ],
                    "ssh-algorithm": "compatible",
                    "ssh-policy-check": "disable",
                    "ssh-tun-policy-check": "disable",
                    "status": "deep-inspection",
                    "unsupported-version": "bypass"
                },
                "ssl": {
                    "allow-invalid-server-cert": "disable",
                    "client-cert-request": "bypass",
                    "inspect-all": "disable",
                    "unsupported-ssl": "bypass",
                    "untrusted-cert": "allow"
                },
                "ssl-anomalies-log": "enable",
                "ssl-exempt": [
                    {
                        "address": "",
                        "address6": "",
                        "fortiguard-category": 31,
                        "id": 1,
                        "q_origin_key": 1,
                        "regex": "",
                        "type": "fortiguard-category",
                        "wildcard-fqdn": ""
                    },
                    {
                        "address": "",
                        "address6": "",
                        "fortiguard-category": 33,
                        "id": 2,
                        "q_origin_key": 2,
                        "regex": "",
                        "type": "fortiguard-category",
                        "wildcard-fqdn": ""
                    },
                    {
                        "address": "",
                        "address6": "",
                        "fortiguard-category": 0,
                        "id": 3,
                        "q_origin_key": 3,
                        "regex": "",
                        "type": "wildcard-fqdn",
                        "wildcard-fqdn": "adobe"
                    }
                ],
                "ssl-exemptions-log": "disable",
                "ssl-server": [],
                "untrusted-caname": "Fortinet_CA_Untrusted",
                "use-ssl-server": "disable",
                "whitelist": "disable"
            },
            {
                "caname": "Fortinet_CA_SSL",
                "comment": "Read-only deep inspection profile.",
                "ftps": {
                    "allow-invalid-server-cert": "disable",
                    "client-cert-request": "bypass",
                    "ports": [
                        990
                    ],
                    "status": "deep-inspection",
                    "unsupported-ssl": "bypass",
                    "untrusted-cert": "allow"
                },
                "https": {
                    "allow-invalid-server-cert": "disable",
                    "client-cert-request": "bypass",
                    "ports": [
                        443
                    ],
                    "status": "deep-inspection",
                    "unsupported-ssl": "bypass",
                    "untrusted-cert": "allow"
                },
                "imaps": {
                    "allow-invalid-server-cert": "disable",
                    "client-cert-request": "inspect",
                    "ports": [
                        993
                    ],
                    "status": "deep-inspection",
                    "unsupported-ssl": "bypass",
                    "untrusted-cert": "allow"
                },
                "mapi-over-https": "disable",
                "name": "deep-inspection",
                "pop3s": {
                    "allow-invalid-server-cert": "disable",
                    "client-cert-request": "inspect",
                    "ports": [
                        995
                    ],
                    "status": "deep-inspection",
                    "unsupported-ssl": "bypass",
                    "untrusted-cert": "allow"
                },
                "q_origin_key": "deep-inspection",
                "rpc-over-https": "disable",
                "server-cert": "",
                "server-cert-mode": "re-sign",
                "smtps": {
                    "allow-invalid-server-cert": "disable",
                    "client-cert-request": "inspect",
                    "ports": [
                        465
                    ],
                    "status": "deep-inspection",
                    "unsupported-ssl": "bypass",
                    "untrusted-cert": "allow"
                },
                "ssh": {
                    "inspect-all": "disable",
                    "ports": [
                        22
                    ],
                    "ssh-algorithm": "compatible",
                    "ssh-policy-check": "disable",
                    "ssh-tun-policy-check": "disable",
                    "status": "deep-inspection",
                    "unsupported-version": "bypass"
                },
                "ssl": {
                    "allow-invalid-server-cert": "disable",
                    "client-cert-request": "bypass",
                    "inspect-all": "disable",
                    "unsupported-ssl": "bypass",
                    "untrusted-cert": "allow"
                },
                "ssl-anomalies-log": "enable",
                "ssl-exempt": [
                    {
                        "address": "",
                        "address6": "",
                        "fortiguard-category": 31,
                        "id": 1,
                        "q_origin_key": 1,
                        "regex": "",
                        "type": "fortiguard-category",
                        "wildcard-fqdn": ""
                    },
                    {
                        "address": "",
                        "address6": "",
                        "fortiguard-category": 33,
                        "id": 2,
                        "q_origin_key": 2,
                        "regex": "",
                        "type": "fortiguard-category",
                        "wildcard-fqdn": ""
                    },
                    {
                        "address": "",
                        "address6": "",
                        "fortiguard-category": 0,
                        "id": 3,
                        "q_origin_key": 3,
                        "regex": "",
                        "type": "wildcard-fqdn",
                        "wildcard-fqdn": "adobe"
                    },
                    {
                        "address": "",
                        "address6": "",
                        "fortiguard-category": 0,
                        "id": 4,
                        "q_origin_key": 4,
                        "regex": "",
                        "type": "wildcard-fqdn",
                        "wildcard-fqdn": "Adobe Login"
                    },
                    {
                        "address": "",
                        "address6": "",
                        "fortiguard-category": 0,
                        "id": 5,
                        "q_origin_key": 5,
                        "regex": "",
                        "type": "wildcard-fqdn",
                        "wildcard-fqdn": "android"
                    },
                    {
                        "address": "",
                        "address6": "",
                        "fortiguard-category": 0,
                        "id": 6,
                        "q_origin_key": 6,
                        "regex": "",
                        "type": "wildcard-fqdn",
                        "wildcard-fqdn": "apple"
                    },
                    {
                        "address": "",
                        "address6": "",
                        "fortiguard-category": 0,
                        "id": 7,
                        "q_origin_key": 7,
                        "regex": "",
                        "type": "wildcard-fqdn",
                        "wildcard-fqdn": "appstore"
                    },
                    {
                        "address": "",
                        "address6": "",
                        "fortiguard-category": 0,
                        "id": 8,
                        "q_origin_key": 8,
                        "regex": "",
                        "type": "wildcard-fqdn",
                        "wildcard-fqdn": "auth.gfx.ms"
                    },
                    {
                        "address": "",
                        "address6": "",
                        "fortiguard-category": 0,
                        "id": 9,
                        "q_origin_key": 9,
                        "regex": "",
                        "type": "wildcard-fqdn",
                        "wildcard-fqdn": "citrix"
                    },
                    {
                        "address": "",
                        "address6": "",
                        "fortiguard-category": 0,
                        "id": 10,
                        "q_origin_key": 10,
                        "regex": "",
                        "type": "wildcard-fqdn",
                        "wildcard-fqdn": "dropbox.com"
                    },
                    {
                        "address": "",
                        "address6": "",
                        "fortiguard-category": 0,
                        "id": 11,
                        "q_origin_key": 11,
                        "regex": "",
                        "type": "wildcard-fqdn",
                        "wildcard-fqdn": "eease"
                    },
                    {
                        "address": "",
                        "address6": "",
                        "fortiguard-category": 0,
                        "id": 12,
                        "q_origin_key": 12,
                        "regex": "",
                        "type": "wildcard-fqdn",
                        "wildcard-fqdn": "firefox update server"
                    },
                    {
                        "address": "",
                        "address6": "",
                        "fortiguard-category": 0,
                        "id": 13,
                        "q_origin_key": 13,
                        "regex": "",
                        "type": "wildcard-fqdn",
                        "wildcard-fqdn": "fortinet"
                    },
                    {
                        "address": "",
                        "address6": "",
                        "fortiguard-category": 0,
                        "id": 14,
                        "q_origin_key": 14,
                        "regex": "",
                        "type": "wildcard-fqdn",
                        "wildcard-fqdn": "googleapis.com"
                    },
                    {
                        "address": "",
                        "address6": "",
                        "fortiguard-category": 0,
                        "id": 15,
                        "q_origin_key": 15,
                        "regex": "",
                        "type": "wildcard-fqdn",
                        "wildcard-fqdn": "google-drive"
                    },
                    {
                        "address": "",
                        "address6": "",
                        "fortiguard-category": 0,
                        "id": 16,
                        "q_origin_key": 16,
                        "regex": "",
                        "type": "wildcard-fqdn",
                        "wildcard-fqdn": "google-play2"
                    },
                    {
                        "address": "",
                        "address6": "",
                        "fortiguard-category": 0,
                        "id": 17,
                        "q_origin_key": 17,
                        "regex": "",
                        "type": "wildcard-fqdn",
                        "wildcard-fqdn": "google-play3"
                    },
                    {
                        "address": "",
                        "address6": "",
                        "fortiguard-category": 0,
                        "id": 18,
                        "q_origin_key": 18,
                        "regex": "",
                        "type": "wildcard-fqdn",
                        "wildcard-fqdn": "Gotomeeting"
                    },
                    {
                        "address": "",
                        "address6": "",
                        "fortiguard-category": 0,
                        "id": 19,
                        "q_origin_key": 19,
                        "regex": "",
                        "type": "wildcard-fqdn",
                        "wildcard-fqdn": "icloud"
                    },
                    {
                        "address": "",
                        "address6": "",
                        "fortiguard-category": 0,
                        "id": 20,
                        "q_origin_key": 20,
                        "regex": "",
                        "type": "wildcard-fqdn",
                        "wildcard-fqdn": "itunes"
                    },
                    {
                        "address": "",
                        "address6": "",
                        "fortiguard-category": 0,
                        "id": 21,
                        "q_origin_key": 21,
                        "regex": "",
                        "type": "wildcard-fqdn",
                        "wildcard-fqdn": "microsoft"
                    },
                    {
                        "address": "",
                        "address6": "",
                        "fortiguard-category": 0,
                        "id": 22,
                        "q_origin_key": 22,
                        "regex": "",
                        "type": "wildcard-fqdn",
                        "wildcard-fqdn": "skype"
                    },
                    {
                        "address": "",
                        "address6": "",
                        "fortiguard-category": 0,
                        "id": 23,
                        "q_origin_key": 23,
                        "regex": "",
                        "type": "wildcard-fqdn",
                        "wildcard-fqdn": "softwareupdate.vmware.com"
                    },
                    {
                        "address": "",
                        "address6": "",
                        "fortiguard-category": 0,
                        "id": 24,
                        "q_origin_key": 24,
                        "regex": "",
                        "type": "wildcard-fqdn",
                        "wildcard-fqdn": "verisign"
                    },
                    {
                        "address": "",
                        "address6": "",
                        "fortiguard-category": 0,
                        "id": 25,
                        "q_origin_key": 25,
                        "regex": "",
                        "type": "wildcard-fqdn",
                        "wildcard-fqdn": "Windows update 2"
                    },
                    {
                        "address": "",
                        "address6": "",
                        "fortiguard-category": 0,
                        "id": 26,
                        "q_origin_key": 26,
                        "regex": "",
                        "type": "wildcard-fqdn",
                        "wildcard-fqdn": "live.com"
                    },
                    {
                        "address": "",
                        "address6": "",
                        "fortiguard-category": 0,
                        "id": 27,
                        "q_origin_key": 27,
                        "regex": "",
                        "type": "wildcard-fqdn",
                        "wildcard-fqdn": "google-play"
                    },
                    {
                        "address": "",
                        "address6": "",
                        "fortiguard-category": 0,
                        "id": 28,
                        "q_origin_key": 28,
                        "regex": "",
                        "type": "wildcard-fqdn",
                        "wildcard-fqdn": "update.microsoft.com"
                    },
                    {
                        "address": "",
                        "address6": "",
                        "fortiguard-category": 0,
                        "id": 29,
                        "q_origin_key": 29,
                        "regex": "",
                        "type": "wildcard-fqdn",
                        "wildcard-fqdn": "swscan.apple.com"
                    },
                    {
                        "address": "",
                        "address6": "",
                        "fortiguard-category": 0,
                        "id": 30,
                        "q_origin_key": 30,
                        "regex": "",
                        "type": "wildcard-fqdn",
                        "wildcard-fqdn": "autoupdate.opera.com"
                    }
                ],
                "ssl-exemptions-log": "disable",
                "ssl-server": [],
                "untrusted-caname": "Fortinet_CA_Untrusted",
                "use-ssl-server": "disable",
                "whitelist": "disable"
            }
        ],
        "revision": "156.0.2.661485498.1576996671",
        "serial": "FGT6xxxxxx",
        "status": "success",
        "vdom": "root",
        "version": "v6.0.8"
    }
}