1.1.2 • Published 11 years ago

cloudflash-strongswan v1.1.2

Weekly downloads
39
License
-
Repository
github
Last release
11 years ago

cloudflash-strongswan

List of strongswan APIs

Create strongswan configuration

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

Request JSON

{
"charon": {
    "threads": 16,
    "cisco_unity": "yes",
    "plugins": {
        "sql": {
            "loglevel": "-1"
        }
    }
},
"libstrongswan": {}
}

Response JSON

{
   "id": "67ec9204-23f7-4edd-bcd2-be8d497124f8",
   "config":
   {
       "charon":
       {
           "threads": 16,
           "cisco_unity": "yes",
           "plugins":
           {
               "sql":
               {
                   "loglevel": "-1"
               }
           }
       },
       "libstrongswan":
       {
       }
   }
 }

List strongswan configuration by ID

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":
       {
       }
   }
}

List strongswan configuration

Verb	URI	             Description
GET	       /strongswan	     List summary of strongswan configuration.

Example Request and Response

Response

Need to implement.

Delete strongswan configuration

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

Example Request and Response

Request Headers

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

Response Header

Status Code : 204

Create strongswan ipsec configuration

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

Request JSON

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

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

  "include": ["/config/ipsec/cisco-ipsec.conf"]
}

Response JSON

{
   "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"
       ]
   }
}

List strongswan ipsec configuration by ID

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"
       ]
   }
}



 

List strongswan ipsec configuration

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"
           ]
       }
   }
]

Delete strongswan ipsec configuration

Verb    URI                                      Description
DELETE   /strongswan/:id/ipsec/:ipsecid           Delete a strongswan ipsec configuration by ID.

Example Request and Response

Request Headers

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

Response Header

Status Code : 204

Create strongswan secrets configuration

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

Request JSON

{
   "key-path": "RSA /etc/identity/snap.key",
   "clearpathnet": "XAUTH \"password\""
}

Response JSON

{
   "id": "3c99eaf4-e1b8-44cd-9a6a-1c1452f3ef1e",
   "config":
   {
       "key-path": "RSA /etc/identity/snap.key",
       "clearpathnet": "XAUTH "password""
   }
}

List strongswan secrets configuration

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""
       }
   }
]



 

Delete strongswan secrets configuration

Verb    URI                                      Description
DELETE   /strongswan/:id/secrets           Delete a strongswan secrets configuration.

Example Request and Response

Request Headers

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

Response Header

Status Code : 204

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

Create strongswan rule configuration

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

Request JSON

{
"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"
]
}

Response JSON

{
   "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"
       ]
   }
}

List strongswan rule configuration

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"
           ]
       }
   }
 ]

List strongswan rule configuratioin by ID

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"
       ]
   }
}

Delete strongswan rule configuration

Verb     URI                                    Description
DELETE   /strongswan/:sid/rule/:rule            Delete a strongswan rule configuration.

Example Request and Response

Request Headers

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

Response Header

Status Code : 204

1.1.2

11 years ago

1.1.1

11 years ago

1.1.0

11 years ago

1.0.9

11 years ago

1.0.8

11 years ago

1.0.7

11 years ago

1.0.6

11 years ago

1.0.5

11 years ago

1.0.4

11 years ago

1.0.3

11 years ago

1.0.2

11 years ago

1.0.1

11 years ago

1.0.0

11 years ago