Courseiva
Question 489 of 513
Java I/O API and Securing ApplicationshardMultiple SelectObjective-mapped

1Z0-829 Java I/O API and Securing Applications Practice Question

Which THREE are recommended practices to prevent privilege escalation when using doPrivileged in a security-sensitive Java application?

⚠ Common exam trap

Many candidates confuse the mechanism (SecurityManager) with a preventive practice, or think that SubjectDomainCombiner is a security control when it actually aggregates permissions and can inadvertently widen the privilege scope.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Restrict the codebase URLs in policy files to only trusted code locations.

Restricting codebase URLs in policy files to only trusted code locations limits the sources from which privileged code can be loaded. This prevents an attacker from injecting malicious code from an untrusted URL that could otherwise be granted elevated permissions via doPrivileged. By narrowing the codebase, you reduce the attack surface for privilege escalation attacks.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Restrict the codebase URLs in policy files to only trusted code locations.

    Why this is correct

    Limiting which code can be granted privileges reduces attack surface.

  • Use SubjectDomainCombiner to merge multiple protection domains.

    Why it's wrong here

    SubjectDomainCombiner is for combining subjects, not directly for preventing privilege escalation.

  • Always use a SecurityManager to enforce the policy.

    Why it's wrong here

    SecurityManager is a framework but does not by itself prevent escalation; proper policy configuration is needed.

  • Sign JARs and verify signatures to ensure code integrity.

    Why this is correct

    Code signing prevents tampering and ensures trusted origin.

  • Use AccessController.checkPermission to explicitly check permissions before privileged operations.

    Why this is correct

    Explicit permission checks reduce the risk of unintended privileged actions.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 25, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This 1Z0-829 practice question is part of Courseiva's free Oracle certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the 1Z0-829 exam.