Skip to content
Software development
ASD ISMISM-2046

ASD ISM 2046 For user impersonation, log no sensitive data and set appropriate permissions

What it says

Where software allows user impersonation, sensitive data is not logged and appropriate permissions are set.

Quoted as published. Everything else on this page is written by Control Stack.

In plain English

Software that lets one user act as another must keep sensitive data out of every log written during impersonation and set appropriate permissions on that feature.

Where software allows user impersonation, letting one user act in it as another (often for support), sensitive data must not be logged and appropriate permissions must be set:

  • Sensitive data is data that would cause damage if compromised, such as the impersonated user's credentials, session tokens or the records viewed while impersonating.
  • Permissions apply to the feature: who may impersonate, which accounts and what an impersonator may do. Appropriate is not defined, so the organisation building the software decides, based on what each role needs.

Why it matters

Impersonation hands one person another user's view and access. If it writes tokens or the user's data to logs, anyone who can read those logs gets them too, and loose permissions turn a support tool into a way into other users' accounts.

How to implement

  1. List every impersonation path in the software.

    Include support 'log in as' or 'view as' functions, administrator switches into a user's session, and service accounts that can act as a user. Each path needs both protections.

  2. Limit who can impersonate, whom and what they can do.

    Grant the right to a named role, not every administrator, refuse impersonation of accounts more privileged than the impersonator, and block actions such as changing credentials during the session. Enforce these checks on the server and ship them switched on, as ISM-2042 requires of built-in security measures.

  3. Keep sensitive data out of every log an impersonation session writes.

    Cover application, audit, debug and error logs. Log the impersonation itself (who acted as whom, and when), which supports ISM-2051, but drop credentials, session tokens and record contents before writing. Encrypting them in the log, which can satisfy ISM-2052, does not meet this control.

  4. Test both protections before each release.

    Impersonate a test account seeded with marker values, such as a known token and dummy personal details, search all log output for them, also after decoding and decrypting fields, and try impersonating from a role without the right. Where a supplier builds the software for you, make these acceptance tests.

Keep it running

Re-run the log and permission tests whenever the impersonation feature, roles or logging change, including a new log destination or debug setting. A request to widen who can impersonate should prompt a fresh decision on what is appropriate.

Evidence and audit

  1. Check 1 of 3What an auditor asks for

    Ask for

    A list of every impersonation path, and a search of the software's code and interfaces for 'log in as', 'act as' and delegation functions.

    Look at

    Whether each path the search finds is on the list and covered by the log and permission tests.

    Good evidence

    Every impersonation path the search finds is on the list, and each has passing tests for both requirements.

  2. Check 2 of 3What an auditor asks for

    Ask for

    Logs from a test impersonation session on an account seeded with marker values, at the production logging level and the most detailed level the software offers.

    Look at

    Every log the software writes, including audit, debug and error logs, searched for the markers, also after decoding Base64 and URL-encoded values and decrypting any encrypted fields.

    Good evidence

    No credential, session token, record content or other marker value from the impersonated account appears in any log at either level, whether in clear, encoded or encrypted form.

  3. Check 3 of 3What an auditor asks for

    Ask for

    The impersonation permission settings in a default installation, and attempts to impersonate from an ordinary account, including by calling the server directly.

    Look at

    Which roles hold the right, which accounts they can impersonate, what an impersonator is allowed to do, and whether the server refuses the unauthorised attempts.

    Good evidence

    The roles holding the right, the accounts they can impersonate and the actions allowed go no further than each role needs, an ordinary user cannot impersonate anyone, and the server refuses every unauthorised attempt, whatever the interface shows.

Mappings

Closest match in ISO/IEC 27001: A.8.26, Application security requirements, which this control partially meets.

ISO 27001

ISO/IEC 27001: 4 mappings

  • A.8.3Information access restrictionPartially overlaps
  • A.8.15LoggingPartially overlaps

Mappings show how controls relate across frameworks. They do not imply full equivalence or certification.