Concept and mechanism
A security label supplies policy context rather than proving an outcome was enforced. In TrustSec, group identification needs policy definition and verification at enforcement points. Segmentation also does not remove endpoint and application protection needs: permitted flows can carry unwanted content, and local activity remains outside simple path control.
Design should combine responsibilities and evidence appropriate to each layer. Avoid promising absolute prevention merely because a VRF, firewall, or group tag exists. Acceptance needs examples of authorized communication and attempts that should be denied.
Guided application
APIs have similar boundaries. In the scenario where an authenticated identity receives 403 for a change, review authorized scope instead of endlessly retrying a token or granting global privileges. HTTPS protects transport and authenticates the server through the validation used; it does not turn an unprivileged identity into an administrator.
If RESTCONF fails after a server-name change, confirm identity and trust chain and correct configuration. Disabling validation removes a required guarantee. In a fictional remote-management exercise, validate new sessions from the administrative network, denial from other sources, and authorized recovery.
Retain results by rule and source so an aggregate counter or old session is not presented as evidence for every case.
TrustSec: directional matrix and return
In the group design, record source and destination on separate axes. Operations→Services is not automatic permission for Services to initiate a new connection to Operations. In the exercise’s stateless model, allowing TCP destination 443 also creates no state to release the response toward a client ephemeral port.
Draw SYN and SYN-ACK as two flows with concrete ports and directions, then check each policy. A return exception should satisfy the requirement without opening the entire matrix. The carried SGT identifies the source group; the device also determines the destination group to select the applicable relationship.
Retain the actually observed pair and selected rule, including what happens when expected classification is absent.
SXP and the identity lifecycle
SXP distributes IP→SGT mappings when the path does not provide suitable inline tagging. It exchanges context rather than forming an encrypted data tunnel for application payload. If the session is established, still verify the received binding, its origin and the device using it.
In the exercise, 192.0.2.40 belonged to Operations and is reassigned to a guest terminal. Enforcement retains the old group and grants unintended permission. The response starts by updating classification without broadening or deleting the whole matrix.
Prepare three tests: current valid identity, reused address and missing binding. Compare expected and observed policy in each case. Investigate timers or unknown-context policy in the specific release rather than inventing a universal default.
API credentials: transport, validity and recipient
A bearer token should be treated as a reusable credential while the server accepts it. Use the API’s intended channel, protect transport and keep credentials out of URLs and logs. Validity also depends on the recipient: a billing token should not automatically be accepted by inventory.
For JWTs, decoding JSON does not establish signature or trust; an appropriate library needs algorithm policy and validation of applicable claims. The exercise uses dummy opaque tokens and a fixed clock to make expiry reproducible. It does not test JWTs.
As further study, mTLS and DPoP mechanisms can constrain a token to its sender. The decision requires confirming support and the relationship between token and key, rather than merely authenticating a connection with any certificate.
Action, object, property and cost
Authorization asks several questions: may the identity write, may it write this object, and may it change these properties? In the fixture, team-a has read/write for edge-a; that scope does not grant access to team-b’s edge-b. The server also rejects owner in the body even for an otherwise permitted PATCH on edge-a.
An allowlist of mutable properties prevents a legitimate request carrying an unauthorized ownership change. Then check cost: bodies above 256 bytes and descriptions above 40 characters are refused under the teaching contract. These limits were chosen to keep tests small, not as universal recommendations.
A size check does not measure concurrency or capacity. Acceptance must confirm unchanged state after denials and subsequent readback of the authorized update.
Replacement, revocation and decision trail
In the lab, a replacement credential starts working while the old one remains accepted. Only explicit addition to the revocation set makes the old copy fail. The sequence distinguishes replacement from containing a disclosure.
In a real event, the owner should choose a supported mechanism and verify dependent consumers, validity and rejection of the compromised credential. Do not put the token into an evidence ticket. Useful records contain resolved identity, method, resource, outcome and a correlation identifier.
The fixture retains a local list with the first four fields; distributed correlation and persistence are not tested. No-store reduces response storage but does not remove existing copies. Audit should answer who did what without granting every reader a replay credential.
Lab: predict, execute and bound the conclusion
Open content/labs/ccnp-security-contracts/run.py and predict responses before executing: missing token, expired token, wrong audience, own-object read, write with read scope, cross-owner write and body containing owner. Run python3 run.py evidence-local.json in an isolated copy and compare responses with final state.
The script creates an HTTP service and client on 127.0.0.1, uses an OS-assigned port and shuts down its listener afterward. Two preparation runs passed 30 checks and 21 requests each. Also observe that the old token works after replacement issuance, fails after revocation and does not appear in logs.
All tokens are public and fictional. Transport is deliberately local HTTP: it does not validate TLS, full OAuth, JWT, RESTCONF or Cisco devices. There are no external calls, malware or real secrets.
This exercise establishes contract enforcement in the original program; add target-platform rehearsals and specialist review afterward.
Exercise files
Exercise package ccnp-security-contracts, version 2026-10. Extract into a new directory and follow README.en.md. The commands’ content/labs paths are available from the extracted directory. Python 3.13 and permission for a temporary HTTP server on 127.0.0.1. Uses fictional identities and tokens only.
Download ccnp-security-contracts (ZIP)
SHA-256 (ZIP)
f3801dcf4dc438219d90fb34005f00b224b17e4e070ffb5cdf5e7a273ab26d29
An SGT was assigned; policy still needs to be observed permitting and denying intended flows.
Common pitfalls
Label as enforcement; HTTPS as authorization; repeated token as privilege correction; old session as a new-connection test.
Related topics: Architecture and surviving capacity · Virtualization, VRFs, and overlays · Switching and adjacency formation
Each control needs evidence matching its function.
References
- RESTCONF protocol · RFC 8040; consult updates for implementation
- Cisco TrustSec Overview · Catalyst 9600 IOS XE 17.15.x; SGACL classification and enforcement
- Configuring SGT Exchange Protocol · Catalyst 9600 IOS XE 17.15.x; mapping propagation
- OAuth 2.0 Bearer Token Usage · RFC 6750; also consider current security guidance RFC 9700
- Best Current Practice for OAuth 2.0 Security · RFC 9700 January 2025; audience and sender constraints
- JSON Web Token Best Current Practices · RFC 8725; algorithm, issuer and audience validation
- API1 Broken Object Level Authorization · OWASP API Security Top 10 2023
- API3 Broken Object Property Level Authorization · OWASP API Security Top 10 2023
- API4 Unrestricted Resource Consumption · OWASP API Security Top 10 2023