curl --request POST \
--url https://app.trustivan.com/api/v1/certificates/endpoints \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"address": "smtp://mail.example.com:2525"
}
'import requests
url = "https://app.trustivan.com/api/v1/certificates/endpoints"
payload = { "address": "smtp://mail.example.com:2525" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({address: 'smtp://mail.example.com:2525'})
};
fetch('https://app.trustivan.com/api/v1/certificates/endpoints', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.trustivan.com/api/v1/certificates/endpoints"
payload := strings.NewReader("{\n \"address\": \"smtp://mail.example.com:2525\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"endpoint": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"host": "<string>",
"port": 123,
"protocol": "",
"source": "manual",
"source_ref": "<string>",
"problems": [
"<string>"
],
"legacy_tls": true,
"cipher_grade": "",
"cipher_suites": [
{
"version": "TLS 1.2",
"suites": [
"TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256"
],
"incomplete": true
}
],
"ssh_host_keys": [
{
"type": "ssh-ed25519",
"bits": 123,
"sha256": "SHA256:uNiVztksCsDhcc0u9e8BujQXVUpKZIDTMczCvj3tD2s"
}
],
"caa_found": true,
"last_checked_at": "2023-11-07T05:31:56Z",
"last_error": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"asset_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"certificate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}Add a TLS endpoint and check it
Adds host, host:port or an https:// URL (port 443 when none is
given), or protocol://host[:port] to name the protocol of a port that
is not its well-known one (smtp, imap, pop3, ldap, ftp,
xmpp or ssh; smtp://mail.example.com:2525), and checks it at
once: passive handshakes only (one per cipher suite the server accepts
at each TLS version, no HTTP request; STARTTLS first on ports 25, 587,
143, 110, 389, 21 and 5222 or on the named protocol; on SSH the
algorithm offer and one key exchange per host key type, no login), so
no proof of ownership is asked for. A private or
loopback address is refused unless the deployment allows private DAST
targets. A check that cannot complete is recorded on the endpoint
(last_error), not returned as an error. Requires assets:write.
curl --request POST \
--url https://app.trustivan.com/api/v1/certificates/endpoints \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"address": "smtp://mail.example.com:2525"
}
'import requests
url = "https://app.trustivan.com/api/v1/certificates/endpoints"
payload = { "address": "smtp://mail.example.com:2525" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({address: 'smtp://mail.example.com:2525'})
};
fetch('https://app.trustivan.com/api/v1/certificates/endpoints', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.trustivan.com/api/v1/certificates/endpoints"
payload := strings.NewReader("{\n \"address\": \"smtp://mail.example.com:2525\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"endpoint": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"host": "<string>",
"port": 123,
"protocol": "",
"source": "manual",
"source_ref": "<string>",
"problems": [
"<string>"
],
"legacy_tls": true,
"cipher_grade": "",
"cipher_suites": [
{
"version": "TLS 1.2",
"suites": [
"TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256"
],
"incomplete": true
}
],
"ssh_host_keys": [
{
"type": "ssh-ed25519",
"bits": 123,
"sha256": "SHA256:uNiVztksCsDhcc0u9e8BujQXVUpKZIDTMczCvj3tD2s"
}
],
"caa_found": true,
"last_checked_at": "2023-11-07T05:31:56Z",
"last_error": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"asset_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"certificate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}