Courseiva
Java I/O API and Securing ApplicationseasyMultiple ChoiceObjective-mapped

1Z0-829 Security Manager Deprecation Practice Question

Which is the best practice for securing a Java application that reads sensitive configuration files?

⚠ Common exam trap

Candidates may think that using Java's Security Manager with a policy file is the best practice, but in Java 17 it is deprecated. The correct modern approach is to rely on OS-level permissions.

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 access to the file using operating system permissions.

Restricting access to sensitive files using operating system permissions is a fundamental security practice that applies regardless of the Java version. In Java 17, the Security Manager is deprecated for removal (JEP 411), so relying on a Java security policy file (Option B) is no longer considered a best practice. OS-level permissions provide a robust, platform-native access control that does not depend on deprecated features. Options C and D are insufficient: making a file read-only does not prevent unauthorized access, and storing credentials in source code is highly insecure.

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 access to the file using operating system permissions.

    Why this is correct

    Correct. Restricting access via OS permissions is a standard, platform-independent best practice that does not rely on deprecated Java features.

  • Define a Java security policy file with FilePermission for the configuration file.

    Why it's wrong here

    Incorrect. In Java 17, the Security Manager is deprecated for removal, so using a Java policy file is no longer a best practice.

  • Make the file read-only at the OS level.

    Why it's wrong here

    Incorrect. Making a file read-only does not prevent unauthorized users from reading it; proper access control requires restricting who can read the file.

  • Store credentials in the source code and use encryption.

    Why it's wrong here

    Incorrect. Storing credentials in source code is a major security risk, even with encryption, as encryption keys are often stored alongside the code.

About these practice questions

This 1Z0-829 question is part of Courseiva's 513-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

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.