Use it before trusting an API endpoint with credentials, when a client reports certificate or handshake errors, or when someone proposes to switch certificate validation off.
HTTPS/TLS
HTTPS/TLS protects API transport; certificate identity validation is needed before trusting the endpoint.
1. openssl s_client -connect host:443 -servername host — certificate chain and TLS version.
2. Allow only TLS 1.2/1.3.
3. Clients must verify the certificate (no --insecure/verify=False).
client resolves the host name → TLS handshake (1.2 or 1.3) → server certificate validated: chain, name, dates → encrypted session → only then credentials and data are sent
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
show running-config | include restconf|ip http secure-serverShow Commands
Read-only Cisco show commands for confirming state, narrowing a fault and interpreting the current boundary.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Read-only Verification Verify boundary
Inspect the actual client TLS validation result and service configuration.
Step 2 Known-good, broken state and proof boundary Verify boundary
Known-good for HTTPS/TLS means the intended object exists in the correct scope, the relevant show running-config | include restconf|ip http secure-server fields agree with desired state, dependencies needed by the flow are reachable/usable, and the original operation succeeds again on the same target. Evidence boundary: show running-config | include restconf|ip http secure-server shows only the fields it exposes at that time; it does not by itself show root cause, hidden provider state or end-to-end success.
Step 3 Observation-driven branch tree Narrow the fault
Troubleshooting branch for HTTPS/TLS: if show running-config | include restconf|ip http secure-server cannot resolve the intended object, verify target identity/context first; if the object resolves but state differs from intended, isolate configuration, precedence and dependency ownership; if local state matches intent but the original operation still fails, move outward to the first adjacent dependency or consumer; if a minimal change alters the symptom without restoring the same failing operation, treat that as a changed failure point rather than closure.
Step 4 Verification & troubleshooting Narrow the fault
1. Verify HTTPS certificate chain, hostname and time.
2. Obtain the least-privileged token securely.
3. Validate method, URI, headers and payload schema.
4. Handle 2xx/4xx/5xx and task state explicitly.
5. Audit, revoke/rotate and verify realized device state.
Step 5 Common mistakes Narrow the fault
- Allowing TLS 1.0/1.1.
- Disabling certificate verification in clients.
A TLS handshake proves a negotiated transport, not operation authorization or payload safety.
openssl s_client -connect host:443 -servername host → protocol version, certificate chain and Verify return code: 0 (ok). curl -v https://host/ → fails on a certificate problem unless validation was disabled. Search automation code for verify=False and --insecure.
ReferenceWhat it is1 section · depth on demand
Direct Answer
HTTPS/TLS protects API transport; certificate identity validation is needed before trusting the endpoint.
ReferenceWhy it matters1 section · depth on demand
When to use it
Use it before network automation reads or changes controller/device state through HTTPS APIs.
ReferenceHow it works2 sections · depth on demand
Technical Mechanics
Use TLS for general TLS and HTTP / HTTPS Management for the Cisco HTTPS service. Confirm protocol/cipher support against the target image and client policy.
How it works
The primary observation show running-config | include restconf|ip http secure-server is a bounded read surface: correlate its fields with the configured intent, dependency state and the consumer that actually experiences the symptom.
ReferenceImportant terms & boundaries4 sections · depth on demand
Official Sources
Proof Boundaries
A TLS handshake proves a negotiated transport, not operation authorization or payload safety.
In depth
Network APIs (RESTCONF, controller and cloud dashboards) carry credentials, tokens and configuration, so they must run over TLS. RFC 8446 describes what TLS 1.3 provides: the server is always authenticated, client authentication is optional, data is confidential to the endpoints (record lengths aren't hidden), and tampering is detectable. All public-key key exchanges in TLS 1.3 provide forward secrecy.
TLS 1.3 changes (RFC 8446)
| Change | Effect |
|---|---|
| Static RSA and static DH removed | Forward secrecy for every session |
| Only AEAD ciphers | Encryption and integrity combined |
| Compression and renegotiation removed | Fewer attack paths |
| Encrypted handshake after ServerHello | Certificates aren't visible to observers |
| 1-RTT handshake | Faster connection setup |
API requirements
| Requirement | Reason |
|---|---|
| HTTPS only; no HTTP fallback | Tokens and passwords never in clear text |
| TLS 1.2 minimum, 1.3 preferred | Old versions removed |
| Validate the server certificate | Prevents interception (RFC 6750 also requires this for bearer tokens) |
| Certificates with correct names | Clients check the host name against the certificate |
| Mutual TLS where clients are machines | Client certificates as an additional factor |
WLC(config)# ip http secure-server
WLC(config)# ip http tls-version TLSv1.2
WLC(config)# restconf
admin$ curl -s --cacert corp-ca.pem -u apiuser https://wlc.example.net/restconf/data/Cisco-IOS-XE-native:native/hostname -H "Accept: application/yang-data+json"
{
"Cisco-IOS-XE-native:hostname": "WLC-9800-1"
}
admin$ openssl s_client -connect wlc.example.net:443 -tls1_3 </dev/null 2>/dev/null | grep -E "Protocol|Cipher"
Protocol : TLSv1.3
Cipher : TLS_AES_256_GCM_SHA384
Common mistakes
| Mistake | Risk |
|---|---|
curl -k / disabled verification in scripts | Interception goes unnoticed |
| Self-signed certificates everywhere | Users and scripts learn to ignore errors |
| Expired certificates | Outages for automation |
Documented example, not captured output.
Quick reference
HTTPS/TLS secures REST APIs on network devices and controllers by encrypting traffic and authenticating the server with its certificate. Clients must validate the certificate chain and hostname; otherwise TLS protects against eavesdropping but not impersonation.
| Practice | Example |
|---|---|
| TLS 1.2/1.3 only | Disable TLS 1.0/1.1 on the device |
| Trusted certificate | Enterprise CA instead of self-signed |
| Client verification | Never use verify=False in automation |
| Mutual TLS (where supported) | Client certificates for service accounts |
openssl s_client -connect sw01.corp.example.com:443 -servername sw01.corp.example.com </dev/null | openssl x509 -noout -subject -dates
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Configuration & expected output
Concrete examples are shown only when the stored reference contains an actual configuration or output shape for this Topic.
Expected output
openssl s_client -connect api.example.net:443 -servername api.example.netExpected state: Chain shown, modern protocol, verification OK.
Certificate chain
0 s:CN = api.example.net
i:CN = Example Issuing CA
---
New, TLSv1.3, Cipher is TLS_AES_256_GCM_SHA384
Verify return code: 0 (ok)
! Illustrative output, not captured Evidence.The server presented a certificate for api.example.net issued by a CA this client trusts, over TLS 1.3. Any other verify return code names the problem — expired, unknown issuer or host name mismatch.Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Security → REST API Security → HTTPS/TLS. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://www.cisco.com/c/en/us/support/ios-nx-os-software/ios-xe-17/series.html · confidence 94%