An IAST or RASP agent runs inside your application process, so whoever controls the agent, its configuration or its management console controls code that sees every request your application handles. Instrumentation agents hook into the language runtime, read parameters, queries and responses, and in protection mode can block or alter requests. They report to a management server or SaaS console using agent keys, pull rule and configuration updates, and often feed findings to ticketing and CI/CD tools. This guide is for application security engineers, platform teams and SRE leads who run these agents. It covers the console's admin roles, the agent and integration credentials, the sensitive data the agent collects, the integrity of the agent and its updates, logging, and lifecycle. It is vendor-neutral: confirm the exact setting names in your vendor's documentation. For what IAST and RASP do and how to roll them out, see the Interactive Application Security Testing (IAST) and RASP Guide.
Key takeaways
- The agent is code in your production process. Treat the agent binary, its update channel and its configuration with the same integrity controls as your own application code.
- Protection mode is a privileged setting. Switching rules from block to monitor, or adding an exclusion, silently removes a control, so restrict who can do it and log every change.
- Agent keys are application credentials. Issue one key per application or environment, store it in a secrets manager, never in images or source, and rotate it.
- The agent collects sensitive data. Findings and attack events can contain request bodies, tokens and personal data; configure redaction and limit who can read raw events.
- Plan removal from day one. A tested way to disable or remove the agent quickly protects you from a faulty update as well as from a compromised console.
What makes up the agent's attack surface
Unlike a scanner that sits outside the application, an instrumentation agent shares the process, memory and identity of the workload it protects. NIST SP 800-53 Rev. 5 describes runtime application self-protection as a control enhancement under software, firmware and information integrity (SI-7(17)), which is a useful reminder that the agent is itself an integrity control that needs protecting.
| Component | What it holds or can do | If an attacker controls it | Primary control |
|---|---|---|---|
| Agent library in each application | Runs with the application's privileges; sees requests, queries, file and network calls | Code execution in production, data capture, or a disabled protection | Verified package source, pinned versions, signature or checksum checks in the build |
| Agent configuration (file, environment variables, remote config) | Mode (monitor or block), rule set, exclusions, data collection and redaction settings | Turns blocking off, widens data capture, points the agent at another server | Configuration as code with review; restrict remote configuration changes |
| Management console (SaaS or self-hosted) | Application inventory, findings, attack events, policies, users and integrations | Bulk export of findings (a map of your weaknesses), policy changes across all applications | SSO with phishing-resistant MFA, least-privilege roles, audit log export |
| Agent keys and API tokens | Register agents, upload telemetry, call the console API | Fake agents, poisoned findings, data export through the API | Per-application keys in a secrets manager, scoped API tokens, rotation |
| Integrations (ticketing, CI/CD gates, chat, SIEM) | Tokens into other systems; can fail or pass a build | Suppressed tickets, a CI gate that always passes, data leaving through webhooks | Per-integration credentials with minimal scope; review on change |
Admin roles and console access
Map console roles to duties before the first application is onboarded. Typical duties are platform administrator (tenant settings, users, integrations, keys), policy owner (rule modes and exclusions), application owner (findings for their own applications) and viewer.
- Policy changes are the sensitive right: moving a rule from block to monitor, or adding an exclusion for a path, parameter or source address, creates a permanent gap. Limit this right to a small policy-owner group, require a ticket reference, and set an expiry on every exclusion (our recommendation: 90 days, then review).
- Scope application owners: grant teams access to their own applications only. Findings for every application together describe your exploitable weaknesses, so organisation-wide read access should be rare.
- Authentication: sign in through your identity provider with SSO and phishing-resistant MFA. The CISA and FBI Secure by Demand guide suggests buyers ask whether standards-based SSO is available at no additional cost and whether MFA is enabled by default, so raise these at procurement. Keep one documented break-glass account. See the Break-Glass Account Guide.
- Admin devices: administer the console from managed devices, in line with the NCSC principle of gaining trust in management devices. See the Privileged Access Workstations Guide.
- Review: review role assignments every quarter and on every leaver (our recommendation).
Agent keys, API tokens and integration credentials
The agent needs a credential to register with the console and send telemetry. That credential is usually injected into every container or host that runs the application, which is exactly where secrets leak from.
| Credential | Needs | Avoid | Pattern |
|---|---|---|---|
| Agent registration or telemetry key | Register agents and send events for one application or environment | One organisation-wide key shared by every application; keys baked into images | Per application and environment, injected at runtime from a secrets manager, rotated on a schedule |
| Console API token for automation | Read findings or update policies for defined applications | Personal tokens of an administrator used in pipelines | Service identity with a scoped role, owner and expiry |
| CI/CD gate integration | Query findings for the build being tested | Rights to change policy or mark findings resolved | Read-only token per pipeline; federated pipeline identity where supported |
| Ticketing and chat integrations | Create tickets or messages in one project or channel | Tenant-wide administrator tokens in the ticketing tool | Dedicated integration account with project-level rights |
- Store keys properly: keep agent keys in your secrets manager and inject them at start-up. Scan images and repositories for agent keys as you would any other secret. See the Secrets Management Guide and the API Key Management Guide.
- Rotate and revoke: rotate agent keys on a schedule (our recommendation: at least every 90 days for static keys) and immediately when a key appears in a log, image or repository. Confirm that revocation stops registration of new agents and know whether running agents keep a session.
- Pipeline identities: where the agent is attached during build or deployment, the pipeline identity that injects it is part of the attack surface. See the CI/CD Pipeline Identity Security Guide.
Protecting the data the agent collects
To prove a finding or record an attack, agents capture request data, stack traces, query text and sometimes response fragments. The OWASP Logging Cheat Sheet lists data that should usually not be recorded directly, including session identifiers, access tokens, passwords, encryption keys, database connection strings, payment card data and sensitive personal data, and recommends removing, masking, hashing or encrypting it instead.
- Turn on redaction: configure the agent's redaction or masking settings for headers such as Authorization and Cookie, known secret parameters and personal data fields before production rollout. Test it by sending a synthetic token and confirming it does not appear in the console.
- Minimise capture in production: IAST in test environments can capture more detail; RASP in production should collect only what an analyst needs to act.
- Data residency and retention: confirm where a SaaS console stores events, for how long, and who at the vendor can access them. Set retention to what you need for triage and audit.
- Limit raw event access: restrict full request views to the people who triage attacks, and log every view or export.
See the Privacy in Security Logging and Monitoring Guide.
Agent integrity, updates and hardening
- Trusted source: pull the agent from the vendor's official repository or your internal mirror, pin the version, and verify signatures or checksums where the vendor publishes them. NIST SP 800-53 SI-7(15) covers code authentication before installation.
- Staged updates: test agent upgrades in staging and roll them out in waves, as the IAST and RASP Guide recommends. Avoid automatic production updates of the agent without a canary stage. See the Security Tool Faulty Update Outage Playbook.
- Remote configuration: if the console can change agent mode or rules remotely, decide whether you want that in production. Many teams prefer configuration in code, reviewed and deployed with the application, with remote changes limited to emergencies.
- Self-hosted management server: patch it, put it behind your identity-aware access layer, restrict agent traffic to the ports and networks it needs, and encrypt agent-to-server traffic with TLS. Apply vendor security updates promptly and subscribe to the vendor's security advisories.
- Fail behaviour: know what the agent does if the console is unreachable (keeps last known policy, fails open or fails closed) and choose deliberately for each application.
Logging and monitoring the agent and console
- Export the console audit log: send user sign-ins, role changes, key creation, policy and exclusion changes, mode changes and exports to your SIEM, outside the reach of console administrators. NCSC lists logging and auditing administration activities as a principle of secure system administration.
- Watch agent health: alert when an agent that should be reporting stops, when an application switches from block to monitor, or when the agent version drops below your baseline.
- Watch for fake agents: alert on agents registering from unexpected hosts, environments or networks, which suggests a leaked key.
- Correlate: a spike of blocked attacks followed by a policy change to monitor mode is a pattern worth a human look.
See the Secure Logging Vocabulary and Application Security Events Guide.
Lifecycle: onboarding, change and decommissioning
- Onboard: record each application, environment, agent key, owner and mode in an inventory.
- Change: route policy, mode and exclusion changes through change control, with a second approver for anything that reduces protection (our recommendation).
- Emergency disable: document and test how to switch every agent to monitor or remove it, without the console, in case the console or an update is the problem.
- Decommission an application: revoke its agent key, remove the agent, delete or archive its findings under your retention rules.
- Leave the product: remove agents from every build, revoke all keys and integration tokens, export audit logs you must keep, and obtain written confirmation of data deletion from a SaaS vendor.
Framework mapping
| Control area | NIST SP 800-53 Rev. 5 | NIST CSF 2.0 | ATT&CK threat addressed |
|---|---|---|---|
| Console roles and privileged accounts | AC-2, AC-6, AC-6(5) | PR.AA-05 | T1078 Valid Accounts |
| Agent keys and integration tokens | IA-5 | PR.AA-01 | T1552 Unsecured Credentials |
| Agent integrity and updates | SI-7, SI-7(15), SI-7(17), CM-6 | PR.PS-02 | T1195.002 Compromise Software Supply Chain |
| Audit log protection | AU-6, AU-9, AC-6(9) | PR.PS-04 | T1685 Disable or Modify Tools |
| Vendor and SaaS console | SA-9, SR-3 | GV.SC-07 | T1199 Trusted Relationship |
Common failure patterns
- One key everywhere: a single agent key is baked into a shared base image, ends up in a public registry, and cannot be rotated without redeploying every application.
- Monitor mode forever: blocking was turned off during an incident and never turned back on, and nobody alerts on the mode change.
- Broad exclusions: a path or source address is excluded to quiet false positives and later becomes the route an attacker uses.
- Tokens in findings: redaction was never configured, so the console holds bearer tokens and personal data readable by every developer.
- No way out: a faulty agent update causes errors and the only documented rollback depends on the console.
Practitioner checklist
- Classify the console, agent keys and remote configuration as production-critical and record an owner for each.
- Enforce SSO with phishing-resistant MFA and keep one tested break-glass account.
- Restrict mode changes and exclusions to a small policy-owner group with expiry and a second approver.
- Issue agent keys per application and environment, store them in a secrets manager and rotate them.
- Give CI/CD, ticketing and chat integrations their own scoped credentials.
- Configure and test redaction of tokens, cookies and personal data before production.
- Pin and verify agent versions, and roll out updates in stages.
- Export the console audit log to your SIEM and alert on mode changes, new keys and silent agents.
- Test an emergency disable and a full decommissioning procedure.
Standards and references
- NIST: SP 800-53 Rev. 5 Security and Privacy Controls
- NIST: Cybersecurity Framework 2.0
- OWASP: Logging Cheat Sheet
- NCSC: Secure system administration
- CISA and FBI: Secure by Demand Guide
- NIST: SP 800-218 Secure Software Development Framework
- MITRE ATT&CK: T1685 Disable or Modify Tools
Related NHI Mgmt Group resources: Interactive Application Security Testing (IAST) and RASP Guide · Runtime Application Self-Protection (RASP) · Secrets Management Guide · Securing the identity threat detection and response (ITDR) tool itself