cloudflash-strongswan

cloudflash snort module implements snort configuration on unix systems

cloudflash-strongswan

List of strongswan APIs

VerbURIDescription
POST/strongswanCreate strongswan configuration
GET/strongswan/:idList summary of strongswan configuration by ID
GET/strongswanList summary of strongswan configuration
DELETE/strongswan/:idDelete a strongswan configuration by ID
POST/strongswan/:id/ipsecCreate strongswan ipsec configuration
GET/strongswan/:id/ipsecList summary of strongswan ipsec configuration
GET/strongswan/:id/ipsec/:ipsecidList summary of strongswan ipsec configuration by ID
DELETE/strongswan/:id/ipsec/:ipsecidDelete a strongswan configuration by ID
POST/strongswan/:id/secretsCreate strongswan secrets configuration
GET/strongswan/:id/secretsList summary of strongswan secrets configuration
DELETE/strongswan/:id/secretsDelete a strongswan secrets configuration by ID
POST/strongswan/:sid/ruleCreate strongswan rule configuration
GET/strongswan/:sid/ruleList summary of strongswan rule configuration
GET/strongswan/:sid/rule/:idList summary of strongswan rule configuration by ID
DELETE/strongswan/:sid/rule/:ruleDelete a strongswan rule configuration by ID
Verb      URI                 Description
POST    /strongswan          Create strongswan configuration.

On success it returns JSON data with the UUID for the strongswan configuration.

Example Request and Response

{
"charon": {
    "threads": 16,
    "cisco_unity": "yes",
    "plugins": {
        "sql": {
            "loglevel": "-1"
        }
    }
},
"libstrongswan": {}
}
{
   "id": "67ec9204-23f7-4edd-bcd2-be8d497124f8",
   "config":
   {
       "charon":
       {
           "threads": 16,
           "cisco_unity": "yes",
           "plugins":
           {
               "sql":
               {
                   "loglevel": "-1"
               }
           }
       },
       "libstrongswan":
       {
       }
   }
 }
Verb    URI              Description
GET        /strongswan/:id       List summary of strongswan configuration by ID.

Example Request and Response

Response

{
   "id": "67ec9204-23f7-4edd-bcd2-be8d497124f8",
   "config":
   {
       "charon":
       {
           "threads": 16,
           "cisco_unity": "yes",
           "plugins":
           {
               "sql":
               {
                   "loglevel": "-1"
               }
           }
       },
       "libstrongswan":
       {
       }
   }
}
Verb    URI              Description
GET        /strongswan       List summary of strongswan configuration.

Example Request and Response

Response

Need to implement.
Verb    URI                            Description
DELETE   /strongswan/:id           Delete a strongswan configuration by ID.

Example Request and Response

DELETE /strongswan/67ec9204-23f7-4edd-bcd2-be8d497124f8

Status Code : 204

Verb      URI                  Description
POST    /strongswan/:id/ipsec          Create strongswan ipsec configuration.

On success it returns JSON data with the UUID for the strongswan ipsec configuration.

Example Request and Response

{
  "version" : "2.0",
  "config setup" : {

         "uniqueids": "yes",
         "charondebug": "ike 2, knl 3, cfg 1, net 2, enc 2"
         },

  "include": ["/config/ipsec/cisco-ipsec.conf"]
}
{
   "id": "2e92bf64-a17c-4f6a-9483-b52ec80a4533",
   "config":
   {
       "version": "2.0",
       "config setup":
       {
           "uniqueids": "yes",
           "charondebug": "ike 2, knl 3, cfg 1, net 2, enc 2"
       },
       "include":
       [
           "/config/ipsec/cisco-ipsec.conf"
       ]
   }
}
Verb    URI                              Description
GET        /strongswan/:id/ipsec/:ipsecid        List summary of strongswan ipsec configuration by ID.

Example Request and Response

Response

{
   "id": "2e92bf64-a17c-4f6a-9483-b52ec80a4533",
   "config":
   {
       "version": "2.0",
       "config setup":
       {
           "uniqueids": "yes",
           "charondebug": "ike 2, knl 3, cfg 1, net 2, enc 2"
       },
       "include":
       [
           "/config/ipsec/cisco-ipsec.conf"
       ]
   }
}
Verb    URI                      Description
GET        /strongswan/:id/ipsec         List summary of strongswan ipsec configuration.

Example Request and Response

Response

[
   {
       "id": "2e92bf64-a17c-4f6a-9483-b52ec80a4533",
       "config":
       {
           "version": "2.0",
           "config setup":
           {
               "uniqueids": "yes",
               "charondebug": "ike 2, knl 3, cfg 1, net 2, enc 2"
           },
           "include":
           [
               "/config/ipsec/cisco-ipsec.conf"
           ]
       }
   }
]
Verb    URI                                      Description
DELETE   /strongswan/:id/ipsec/:ipsecid           Delete a strongswan ipsec configuration by ID.

Example Request and Response

DELETE /strongswan/67ec9204-23f7-4edd-bcd2-be8d497124f8/ipsec/2e92bf64-a17c-4f6a-9483-b52ec80a4533

Status Code : 204

Verb        URI                         Description
POST    /strongswan/:id/secrets          Create strongswan secrets configuration.

On success it returns JSON data with the UUID for the strongswan secrets configuration.

Example Request and Response

{
   "key-path": "RSA /etc/identity/snap.key",
   "clearpathnet": "XAUTH \"password\""
}
{
   "id": "3c99eaf4-e1b8-44cd-9a6a-1c1452f3ef1e",
   "config":
   {
       "key-path": "RSA /etc/identity/snap.key",
       "clearpathnet": "XAUTH "password""
   }
}
Verb    URI                      Description
GET        /strongswan/:id/secrets       List summary of strongswan secrets configuration.

Example Request and Response

Response

[
   {
       "id": "3c99eaf4-e1b8-44cd-9a6a-1c1452f3ef1e",
       "config":
       {
           "key-path": "RSA /etc/identity/snap.key",
           "clearpathnet": "XAUTH "password""
       }
   }
]
Verb    URI                                      Description
DELETE   /strongswan/:id/secrets           Delete a strongswan secrets configuration.

Example Request and Response

DELETE /strongswan/67ec9204-23f7-4edd-bcd2-be8d497124f8/secrets

Status Code : 204

================

Verb        URI                         Description
POST    /strongswan/:sid/rule          Create strongswan rule configuration.

On success it returns JSON data with the UUID for the strongswan rule configuration.

Example Request and Response

{
"left": "/%defaultroute",
"leftsubnet": "0.0.0.0/0",
"leftfirewall": "yes",
"leftcert": "/etc/identity/snap.cert",
"right": "/%any",
"rightsubnet": "169.254.253.0/24",
"rightsourceip": "169.254.253.2/24",
"auto": "add",
"xauth": "server",
"authby": "xauthrsasig",
"keyexchange": "ikev1",
"dpdaction": "clear",
"dpddelay": 30,
"dpdtimeout": 300,
"fragmentation": "yes",
"rightdns": [
    "8.8.8.8",
    "4.2.2.2"
]
}
{
   "id": "28163f1e-00a6-44b0-9106-b48e5c94cd2e",
   "config":
   {
       "left": "/%defaultroute",
       "leftsubnet": "0.0.0.0/0",
       "leftfirewall": "yes",
       "leftcert": "/etc/identity/snap.cert",
       "right": "/%any",
       "rightsubnet": "169.254.253.0/24",
       "rightsourceip": "169.254.253.2/24",
       "auto": "add",
       "xauth": "server",
       "authby": "xauthrsasig",
       "keyexchange": "ikev1",
       "dpdaction": "clear",
       "dpddelay": 30,
       "dpdtimeout": 300,
       "fragmentation": "yes",
       "rightdns":
       [
           "8.8.8.8",
           "4.2.2.2"
       ]
   }
}
Verb    URI                      Description
GET        /strongswan/:sid/rule         List summary of strongswan rule configuration.

Example Request and Response

Response

 [
   {
       "id": "28163f1e-00a6-44b0-9106-b48e5c94cd2e",
       "config":
       {
           "left": "/%defaultroute",
           "leftsubnet": "0.0.0.0/0",
           "leftfirewall": "yes",
           "leftcert": "/etc/identity/snap.cert",
           "right": "/%any",
           "rightsubnet": "169.254.253.0/24",
           "rightsourceip": "169.254.253.2/24",
           "auto": "add",
           "xauth": "server",
           "authby": "xauthrsasig",
           "keyexchange": "ikev1",
           "dpdaction": "clear",
           "dpddelay": 30,
           "dpdtimeout": 300,
           "fragmentation": "yes",
           "rightdns":
           [
               "8.8.8.8",
               "4.2.2.2"
           ]
       }
   }
 ]
Verb    URI                              Description
GET        /strongswan/:sid/rule/:id         List summary of strongswan rule configuration by ID.

Example Request and Response

Response

{
   "id": "28163f1e-00a6-44b0-9106-b48e5c94cd2e",
   "config":
   {
       "left": "/%defaultroute",
       "leftsubnet": "0.0.0.0/0",
       "leftfirewall": "yes",
       "leftcert": "/etc/identity/snap.cert",
       "right": "/%any",
       "rightsubnet": "169.254.253.0/24",
       "rightsourceip": "169.254.253.2/24",
       "auto": "add",
       "xauth": "server",
       "authby": "xauthrsasig",
       "keyexchange": "ikev1",
       "dpdaction": "clear",
       "dpddelay": 30,
       "dpdtimeout": 300,
       "fragmentation": "yes",
       "rightdns":
       [
           "8.8.8.8",
           "4.2.2.2"
       ]
   }
}
Verb     URI                                    Description
DELETE   /strongswan/:sid/rule/:rule            Delete a strongswan rule configuration.

Example Request and Response

DELETE /strongswan/67ec9204-23f7-4edd-bcd2-be8d497124f8/rule/28163f1e-00a6-44b0-9106-b48e5c94cd2e

Status Code : 204