exam questions

Exam CV0-003 All Questions

View all questions & answers for the CV0-003 exam

Exam CV0-003 topic 1 question 235 discussion

Actual exam question from CompTIA's CV0-003
Question #: 235
Topic #: 1
[All CV0-003 Questions]

A systems administrator is writing a script for provisioning nodes in the environment. Which of the following would be BEST for the administrator to use to provision the authentication credentials to the script?

  • A. password='curl https://10.2.3.4/api/sytemops?op=provision'
  • B. password=$env_password
  • C. password=$(cat /opt/app/credentials)
  • D. password="MyS3cretP4sswordIsVeryL0ng"
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
TheGinjaNinja
Highly Voted 1 year, 3 months ago
Selected Answer: B
B. password=$env_password would be the best for the administrator to use to provision the authentication credentials to the script.
upvoted 8 times
...
Pongsathorn
Most Recent 8 months ago
Selected Answer: B
When provisioning authentication credentials for a script, it's essential to consider security and best practices. Storing passwords or sensitive information directly in the script (option D) is generally not recommended because it exposes the credentials in plain text, which can be a security risk. Option A is also not a recommended approach because it retrieves the password from a remote source using curl, which might not be secure and could introduce dependencies or network issues.
upvoted 2 times
Pongsathorn
8 months ago
Option C is better than options A and D as it reads the credentials from a local file, which can be more secure than storing them directly in the script. However, it still requires careful management of the file's permissions to prevent unauthorized access to the credentials. Option B, which uses an environment variable (env_password), is often considered the best practice for providing authentication credentials to scripts. Environment variables can be set outside the script and are typically stored securely. They are accessed within the script without exposing the sensitive information directly in the script's code. This approach provides a good balance between security and convenience.
upvoted 3 times
...
...
Anonimo_R_de_jalisco
8 months, 3 weeks ago
Selected Answer: C
C. This option involves reading the authentication credentials from a file located at /opt/app/credentials. This method is more secure because it keeps the credentials separate from the script and restricts access to the credentials file, improving security.
upvoted 1 times
...
Tomtom11
8 months, 3 weeks ago
Selected Answer: C
I would go with Answer C. If you choose Answer B the Variable is still somewhere in the Script?
upvoted 1 times
...
concepcionz
1 year, 1 month ago
Selected Answer: B
Storing a password in plain text in a script or file (A & C) is not secure.
upvoted 2 times
...
ACunningPlan
1 year, 2 months ago
Selected Answer: C
The question says this is scripted so hopefully no humans are around. At the very least keep the password in a locked down file but better yet a Key Vault. Anything plain text is out because it's not the 1990s anymore.
upvoted 2 times
ACunningPlan
1 year, 2 months ago
FYI: Env variables are not safe because your coworkers are questionable.
upvoted 1 times
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago