檢視端點評級

POST
https://daas.digicert.com/apicontroller/v1/sslrating/getServerRating

取得透過 CertCentral Discovery 掃描找到的 IP 位址的整體伺服器安全評級和已知風險與問題。此端點要求允許終端使用者深入瞭解或跨連結到安全評級,以及決定整體評級的所有相關元素。

cURL
curl -X POST \
  https://daas.digicert.com/apicontroller/v1/sslrating/getServerRating \
  -H 'Content-Type: application/json' \
  -H 'X-DC-DEVKEY: {{api_key}}' \
  -d '{
    "ip": "digicert.com",
    "port": "443",
    "accountId": "126993",
    "divisionIds": [],
    "scanId": "",
    "source": null,
    "serverId": "{{SERVER_ID}}"
}'
Python
import requests

url = "https://daas.digicert.com/apicontroller/v1/sslrating/getServerRating"

payload = "{\n    \"ip\": \"digicert.com\",\n    \"port\": \"443\",\n    \"accountId\": \"126993\",\n    \"divisionIds\": [],\n    \"scanId\": \"\",\n    \"source\": null,\n    \"serverId\": \"{{SERVER_ID}}\"\n}"
headers = {
    'X-DC-DEVKEY': "{{api_key}}",
    'Content-Type': "application/json",
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)
Go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://daas.digicert.com/apicontroller/v1/sslrating/getServerRating"

	payload := strings.NewReader("{\n    \"ip\": \"digicert.com\",\n    \"port\": \"443\",\n    \"accountId\": \"\"126993\"\",\n    \"divisionIds\": [],\n    \"scanId\": \"\",\n    \"source\": null,\n    \"serverId\": \"{{SERVER_ID}}\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("X-DC-DEVKEY", "{{api_key}}")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
NodeJS
var request = require("request");

var options = { method: 'POST',
  url: 'https://daas.digicert.com/apicontroller/v1/sslrating/getServerRating',
  headers: 
   { 'Content-Type': 'application/json',
     'X-DC-DEVKEY': '{{api_key}}' },
  body: '{"ip":digicert.com,"port":443,"accountId":"126993","divisionIds":[],"scanId":,"source":null,"serverId":{{SERVER_ID}}}' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
200 OK
{
    "data": {
        "categories": [
		    {
				"name":"ServerTlsCategory",
				"criteria":[
			    	{
				    	"name":"CipherAlgKeyLength",
						"value":"256",
						"issues":null,
						"colorCode":null,
						"message":null,
						"data":null,
						"suggestion":null,
						"kbLink":null
					},
					{
						"name":"CipherAlgorithm",
						"value":"AES",
						"issues":null,
						"colorCode":null,
						"message":null,
						"data":null,
						"suggestion":null,
						"kbLink":null
					},
					{
						"name":"TransportLayerSecurity",
						"value":"TLSv1.2,TLSv1",
						"issues":null,
						"colorCode":null,
						"message":null,
						"data":null,
						"suggestion":null,
						"kbLink":null
					}
				]
			},
			{
				"name":"SecurityHeadersCategory",
				"criteria":[
					{
						"name":"Strict-Transport-Security",
						"value":"",
						"issues":"true",
						"colorCode":2,
						"message":"Missing security header.",
						"data":null,
						"suggestion":null,
						"kbLink":null
					},
					{
						"name":"Content-Security-Policy",
						"value":"",
						"issues":null,
						"colorCode":null,
						"message":"Missing security header.",
						"data":null,
						"suggestion":null,
						"kbLink":null
					},
					{
						"name":"X-Content-Type-Options",
						"value":"",
						"issues":null,
						"colorCode":null,
						"message":"Missing security header.",
						"data":null,
						"suggestion":null,
						"kbLink":null
					},
					{
						"name":"Feature-Policy",
						"value":"",
						"issues":null,
						"colorCode":null,
						"message":"Missing security header.",
						"data":null,
						"suggestion":null,
						"kbLink":null
					},
					{
						"name":"Referrer-Policy",
						"value":"",
						"issues":null,
						"colorCode":null,
						"message":"Missing security header.",
						"data":null,
						"suggestion":null,
						"kbLink":null
					},
					{
						"name":"X-Frame-Options",
						"value":"SAMEORIGIN",
						"issues":null,
						"colorCode":null,
						"message":null,
						"data":null,
						"suggestion":null,
						"kbLink":null
					},
					{
						"name":"X-XSS-Protection",
						"value":"",
						"issues":null,
						"colorCode":null,
						"message":"Missing security header.",
						"data":null,
						"suggestion":null,
						"kbLink":null
					},
					{
						"name":"Public-Key-Pins",
						"value":"",
						"issues":null,
						"colorCode":null,
						"message":"Missing security header.",
						"data":null,
						"suggestion":null,
						"kbLink":null
					},
					{
						"name":"Expect-CT",
						"value":"",
						"issues":null,
						"colorCode":null,
						"message":"Missing security header.",
						"data":null,
						"suggestion":null,
						"kbLink":null
					},
					{
						"name":"Location",
						"value":"",
						"issues":null,
						"colorCode":null,
						"message":null,
						"data":null,
						"suggestion":null,
						"kbLink":null
					},
					{
						"name":"Status",
						"value":"200 OK",
						"issues":null,
						"colorCode":null,
						"message":null,
						"data":null,
						"suggestion":null,
						"kbLink":null
					},
					{
						"name":"X-Permitted-Cross-Domain-Policies",
						"value":"",
						"issues":null,
						"colorCode":null,
						"message":"Missing security header.",
						"data":null,
						"suggestion":null,
						"kbLink":null
					}
				]
			},
			{
				"name":"HttpResponseHeadersCategory",
				"criteria":[
					{
						"name":"HttpResponseHeaders",
						"value":"",
						"issues":null,
						"colorCode":null,
						"message":null,
						"data":[
							{
								"name":"Version",
								"value":"HTTP/1.1",
								"issues":null,
								"colorCode":null
							},
							{
								"name":"Status",
								"value":"200 OK",
								"issues":null,
								"colorCode":null
							},
							{
								"name":"Server",
								"value":"Apache/2.4.39 (Unix) Communique/4.2.3",
								"issues":null,
								"colorCode":null
							},
							{
								"name":"Access-Control-Allow-Origin",
								"value":"*",
								"issues":null,
								"colorCode":null
							},
							{
								"name":
								"Access-Control-Allow-Methods",
								"value":"GET,POST~GET,POST",
								"issues":null,
								"colorCode":null
							},
							{
								"name":"Connection",
								"value":"keep-alive",
								"issues":null,
								"colorCode":null
							},
							{
								"name":"Pragma",
								"value":"no-cache",
								"issues":null,"colorCode":null
							},
							{
								"name":"Last-Modified",
								"value":"Mon, 13 May 2019 08:57:02 GMT",
								"issues":null,
								"colorCode":null
							},
							{
								"name":"Date",
								"value":"Mon, 13 May 2019 09:06:26 GMT",
								"issues":null,
								"colorCode":null
							},
							{
								"name":"Access-Control-Allow-Headers",
								"value":"X-Requested-With, Content-Type, Origin, Authorization, Accept, Client-Security-Token, Accept-Encoding",
								"issues":null,
								"colorCode":null
							},
							{
								"name":"Accept-Ranges",
								"value":"bytes",
								"issues":null,
								"colorCode":null
							},
							{
								"name":"Cache-Control",
								"value":"no-cache, no-store, must-revalidate~private, max-age=604800",
								"issues":null,
								"colorCode":null
							},
							{
								"name":"ETag",
								"value":"\"43ef6-588c119939675\"",
								"issues":null,
								"colorCode":null
							},
							{
								"name":"Set-Cookie",
								"value":"AKA_A2=A; expires=Mon, 13-May-2019 10:06:26 GMT; path=/; domain=symantec.com; secure; HttpOnly",
								"issues":null,
								"colorCode":null
							},
							{
								"name":"Set-Cookie",
								"value":"spk=1894745231; path=/; secure",
								"issues":null,
								"colorCode":null
							},
							{
								"name":"Expires",
								"value":"0",
								"issues":null,
								"colorCode":null
							},
							{
								"name":"Content-Length",
								"value":"276799",
								"issues":null,
								"colorCode":null
							},
							{
								"name":"Access-Control-Max-Age",
								"value":"1000~1000",
								"issues":null,
								"colorCode":null
							},
							{
								"name":"Link",
								"value":"<https://web-analytics.example.m>;rel=\"preconnect\",<https://j.web.m>;rel=\"preconnect\",<https://nxs.example.com>;rel=\"preconnect\",<https://tracker.mrexample.m>;rel=\"preconnect\"",
								"issues":null,
								"colorCode":null
							},
							{
								"name":"Content-Type",
								"value":"text/html; charset=utf-8",
								"issues":null,
								"colorCode":null
							}
						],
						"suggestion":null,
						"kbLink":null
					}
				]
			}
		],
		"rating":"Not secure",
		"certChainInfo":{
			"certChainId":4752752,
			"noOfCertChainFound":2,
			"status":"Invalid-certificate is expired",
			"isSelfSigned":false,
			"certChainDetails":{
				"certChainDetailsList":[
					{
						"certDetailsList":[
							{
								"status":"Valid",
								"expirationDate":1855828800000,
								"keyAlgorithm":"RSA2048",
								"algorithmType":"SHA256withRSA",
								"issueDate":1382443200000,
								"issuerDN":"CN=DigiCert High Assurance EV Root CA, OU=www.digicert.com, O=DigiCert Inc, C=US",
								"subject":null,
								"errors":null
							},
							{
								"status":"Expired",
								"expirationDate":null,
								"keyAlgorithm":null,
								"algorithmType":null,
								"issueDate":null,
								"issuerDN":null,
								"subject":"CN=www.exampleca.com,OU=Corp Mktg & Comms - Online Exp,O=Symantec Corporation,L=Mountain View,ST=California,C=US,2.5.4.5=#130732313538313133,1.3.6.1.4.1.311.60.2.1.2=#130844656c6177617265,1.3.6.1.4.1.311.60.2.1.3=#13025553,2.5.4.15=#0c1450726976617465204f7267616e697a6174696f6e(end-entity)",
								"errors":[
									"This certificate has expired. Replace the expired certificate with a valid certificate."
								]
							}
						],
						"overallStatus":"Primary Chain (Invalid-  certificate is expired)",
						"isAdditionalCertChain":null,
						"isValidChain":false
					}
				]
			}
		},
		"criticalTlsIssues":[],
		"nonCriticalTlsIssues":[],
		"protocolCiphersInfoList":[],
		"serverConfigList":[
			{
				"protocol":"TLSv1.2",
				"keySize":128,
				"cipherAlgorithm":"AES"
			}
		],
		"tlsIssuesFound":false,
		"vulnerabilityScanEnabled":false
	}
}

要求參數

名稱 必填/選填 類型 說明
ip 必填 string 您要取得評級的端點的 IP 位址。
port 必填 string 您要取得評級的端點的連接埠。
accountId 必填 string 帳戶 ID。
divisionIds 選填 array 分區 ID。
scanId 選填 string CertCentral Discovery 掃描的唯一 ID,掃描和擷取用於端點的詳細資料。
scanName 篩選器套用在端點檢視上,或使用者從掃描詳細資料導覽到憑證檢視時所需。
source 選填 string 掃描將使用者重新導向的來源名稱。
serverId 選填 string 伺服器 ID (如果有)。

回應參數

名稱 類型 說明
data object 容器。
.. categories array 決定安全評級的評估條件的容器。
.. .. name string 評估類別的名稱。
.. .. criteria array 決定安全評級的詳細資料的容器。
.. .. .. name string 評估條件。
.. .. .. value string 條件值。
.. .. .. issues bool 是否存在此條件的已知值。
.. .. .. colorCode string 警告層級。
可能的值:1=有風險 (高),2=警告 (中),null
.. .. .. message string 摘要。
.. .. .. data array 子類別的容器。
.. .. .. .. name string 評估條件。
.. .. .. .. value string 條件值。
.. .. .. .. issues bool 是否存在此條件的已知值。
.. .. .. .. colorCode string 警告層級。
可能的值:1=有風險 (高),2=警告 (中),null
.. .. .. suggestion string 詳細資料和/或解決方法。
.. .. .. kbLink string 到其他資訊的連結。
.. rating string 伺服器安全評級,基於端點的通訊和安全設定。
.. certChainInfo object 中繼 CA 憑證資訊的容器。
.. .. certChainId string 憑證鏈 ID。
.. .. noOfCertChainFound int 找到的憑證鏈數目。
.. .. status string 鏈狀態。
.. .. isSelfSigned bool 鏈是否是自我簽署。
.. .. certChainDetails object 憑證鏈詳細資料容器。
.. .. .. certChainDetailsList array 憑證鏈詳細資料容器。
.. .. .. .. certDetailsList array 中繼或根憑證詳細資料。
.. .. .. .. .. status string 憑證狀態。
.. .. .. .. .. expirationDate string 到期日。
.. .. .. .. .. keyAlgorithm string 加密演算法。
.. .. .. .. .. algorithmType string SHA 類型。
.. .. .. .. .. issueDate string 發行日期。
.. .. .. .. .. issuerDN string 發行者名稱。
.. .. .. .. .. subject string 憑證主體。
.. .. .. .. .. errors array 錯誤訊息。
.. .. .. .. overallStatus string 整體憑證鏈狀態。
.. .. .. .. isAdditionalCertChain bool 無論是否找到預期的憑證鏈以外的憑證鏈。
.. .. .. .. isValidChain bool 無論鏈是否有效。
.. criticalTlsIssues array 與端點上的 TLS 實行有關的重大問題。
.. nonCriticalTlsIssues array 與端點上的 TLS 實實行有關的非重大問題。
.. protocolCiphersInfoList array 端點上有加密套件。
.. serverConfigList object 伺服器的通訊安全設定。
.. .. protocol string 通訊安全協定。
.. .. keySize string 加密金鑰大小。
.. .. cipherAlgorithm string 加密演算法。
.. tlsIssuesFound bool 無論端點上是否存在 TLS 問題。
.. vulnerabilityScanEnabled bool 是否開啟用於端點的漏洞掃描。