Professional Security Operations Engineer Practice Questions

Google Cloud Professional Security Operations Engineer exam preparation

Professional Security Operations Engineer practice questions in English: 180 questions with explanations. The mock exam has 60 questions and 120 minutes.

Professional Security Operations Engineer free question 6 / 10 · Domain 4: Detection engineering

In events, you want to concatenate a user identifier and a domain with strings.concat and assign the result to a placeholder. Which expression meets the constraints for assigning a function result to a placeholder?

  1. $u = strings.concat($e1.principal.user.userid, $e2.principal.administrative_domain)
  2. $u = strings.concat($e.principal.user.userid, $e.principal.administrative_domain)
  3. $u = strings.concat("svc-investigator", "example.internal")
  4. $p = strings.concat($e.target.user.userid, "@"), then $u = strings.concat($p, "example.internal")
Show the answer and explanation

Answer: B

Why this is correct
Assigning a function result to a placeholder has two constraints: the placeholder must be assigned an expression that contains an event field, and the function call must depend on exactly one event. Using several fields of the same event as arguments is allowed, so the expression that passes the userid and administrative_domain of $e satisfies both.

Why the other options are wrong
"$u = strings.concat($e1.principal.user.userid, $e2.principal.administrative_domain)" … This passes fields of two events, $e1 and $e2, to one function. A function call must depend on exactly one event.
"$u = strings.concat("svc-investigator", "example.internal")" … This expression has only constants and contains no event field. A placeholder must be assigned an expression that contains an event field.
"$p = strings.concat($e.target.user.userid, "@"), then $u = strings.concat($p, "example.internal")" … $p is assigned an expression with an event field, but the expression assigned to $u uses only $p and a constant, which is the same shape as the documented invalid example. Every placeholder must be assigned an expression that contains an event field.

Key point
A placeholder is a user-defined variable with a $ prefix, such as $user. It holds values taken from events or function output and can be referenced from match, condition, and outcome.

Go to the Professional Security Operations Engineer practice app (10 free questions; purchase unlocks all questions)

See the full practice set