MCQs on Security and Authentication in HDFS | Hadoop HDFS

Explore key concepts of Security and Authentication in HDFS, including Kerberos Authentication, setup in Hadoop, file access control, and HDFS ACLs. Test your knowledge with these 30 multiple-choice questions to master Hadoop security.


Introduction to Kerberos Authentication

  1. Which of the following is a primary purpose of Kerberos in Hadoop?
    • A) File storage
    • B) Data compression
    • C) Authentication and Authorization
    • D) Distributed data processing
  2. Kerberos is based on which type of encryption?
    • A) Symmetric encryption
    • B) Asymmetric encryption
    • C) Hash encryption
    • D) None of the above
  3. In Kerberos, the entity that issues the Ticket Granting Ticket (TGT) is known as:
    • A) Key Distribution Center (KDC)
    • B) Authentication Server (AS)
    • C) Ticket Granting Server (TGS)
    • D) Client
  4. What is the function of the Authentication Server (AS) in Kerberos?
    • A) To issue the TGT to clients
    • B) To distribute data between nodes
    • C) To manage HDFS file access
    • D) To store password hashes
  5. The Ticket Granting Ticket (TGT) is used to:
    • A) Validate users without re-entering credentials
    • B) Authenticate network traffic
    • C) Store encryption keys
    • D) Log user activities
  6. Which file stores the Kerberos configuration on a client node?
    • A) krb5.conf
    • B) kerberos.keytab
    • C) hdfs-site.xml
    • D) core-site.xml
  7. What is the role of the Key Distribution Center (KDC) in Kerberos authentication?
    • A) Encrypt data
    • B) Store credentials
    • C) Issue TGTs and service tickets
    • D) Monitor network traffic
  8. Which of the following is required to configure Kerberos for Hadoop?
    • A) SSL certificate
    • B) Kerberos server
    • C) HDFS configuration files
    • D) Java Runtime Environment
  9. Which Hadoop component requires Kerberos authentication to access HDFS securely?
    • A) MapReduce
    • B) YARN
    • C) HDFS
    • D) Hive
  10. What happens if a client loses its Ticket Granting Ticket (TGT)?
    • A) The client can still access Hadoop services
    • B) The client needs to request a new TGT
    • C) The client’s session expires permanently
    • D) The client can access data without authentication

Setting Up Kerberos in Hadoop

  1. Which configuration file in Hadoop defines the Kerberos principal and keytab file?
    • A) hdfs-site.xml
    • B) core-site.xml
    • C) mapred-site.xml
    • D) krb5.conf
  2. Which command is used to generate a Kerberos keytab file for a service principal in Hadoop?
    • A) kinit
    • B) ktutil
    • C) hadoop-kerberos
    • D) klist
  3. What is the purpose of the kinit command in Kerberos authentication?
    • A) Generate Kerberos keytab
    • B) Obtain a TGT
    • C) Refresh the TGT
    • D) Check the status of Kerberos tickets
  4. Which command can you use to verify Kerberos authentication in a Hadoop cluster?
    • A) klist
    • B) kinit
    • C) kerberos-status
    • D) hdfs kerberos-check
  5. To configure Kerberos authentication, which Hadoop file must include the KDC address?
    • A) krb5.conf
    • B) hdfs-site.xml
    • C) core-site.xml
    • D) yarn-site.xml
  6. What should be done after setting up Kerberos for Hadoop to ensure secure authentication?
    • A) Disable all security protocols
    • B) Restart Hadoop daemons
    • C) Rebuild the Hadoop cluster
    • D) Remove all keytab files
  7. How can a Hadoop service access Kerberos without manual authentication?
    • A) By using a shared keytab file
    • B) By using a public key infrastructure
    • C) By requiring manual password input
    • D) By relying on an SSL certificate
  8. Which component requires its own Kerberos principal for authentication in Hadoop?
    • A) HDFS NameNode
    • B) ResourceManager
    • C) MapReduce JobTracker
    • D) All of the above
  9. What is a keytab file in Kerberos?
    • A) A list of all Kerberos users
    • B) A cache for encrypted data
    • C) A file storing Kerberos credentials for automated authentication
    • D) A backup file for user passwords
  10. After setting up Kerberos, which Hadoop component needs to be restarted to apply changes?
    • A) HDFS DataNode
    • B) HDFS NameNode
    • C) YARN ResourceManager
    • D) All of the above

HDFS Permissions and File Access Control

  1. In HDFS, who can set file permissions?
    • A) Only the HDFS administrator
    • B) Any user with write access
    • C) The file owner and superusers
    • D) Any user with read access
  2. What are the default file permissions in HDFS when a file is created?
    • A) rw-r–r–
    • B) rwxrwxrwx
    • C) rw-rw-rw-
    • D) rwx——
  3. Which of the following can HDFS permissions be applied to?
    • A) Files only
    • B) Directories only
    • C) Both files and directories
    • D) None of the above
  4. Which command would you use to change file permissions in HDFS?
    • A) chmod
    • B) hdfs-permission
    • C) hdfs-chmod
    • D) setfacl
  5. In HDFS, who is the default owner of a file?
    • A) The administrator
    • B) The user who created the file
    • C) The Hadoop service account
    • D) The superuser
  6. Which of the following is true about HDFS file permissions?
    • A) It only supports read and write access
    • B) It uses the Linux file permission model
    • C) It ignores user and group ownership
    • D) Permissions cannot be modified after file creation
  7. HDFS permissions are based on which of the following models?
    • A) ACLs
    • B) User, group, and others
    • C) File encryption
    • D) Role-based access control
  8. What happens if you try to access a file in HDFS without sufficient permissions?
    • A) Access is granted with limited features
    • B) Access is denied and an error is returned
    • C) The file is automatically decrypted
    • D) The system logs the attempt and proceeds
  9. Who can change the ownership of a file in HDFS?
    • A) Only the file owner
    • B) The Hadoop administrator
    • C) Anyone with read access
    • D) Anyone with write access
  10. Which command in HDFS shows the file permissions of a directory or file?
    • A) hdfs ls
    • B) hdfs permissions
    • C) hdfs stat
    • D) hdfs view

HDFS ACLs (Access Control Lists)

  1. What is the purpose of Access Control Lists (ACLs) in HDFS?
    • A) Encrypt file data
    • B) Grant more granular permissions than traditional HDFS permissions
    • C) Compress file storage
    • D) Monitor file access logs
  2. Which command would you use to modify an ACL for a file in HDFS?
    • A) hdfs setacl
    • B) hdfs acl modify
    • C) hdfs acl add
    • D) setfacl
  3. Which of the following does HDFS ACLs allow that traditional permissions do not?
    • A) The ability to set permissions for a specific user, group, or other
    • B) The ability to track file usage
    • C) The ability to encrypt files
    • D) The ability to change the file owner
  4. How are ACLs applied to a file in HDFS?
    • A) By modifying the file metadata
    • B) Through the file’s encryption settings
    • C) By adding entries for each user and group
    • D) Through a background service
  5. What does the “default” ACL in HDFS control?
    • A) Permissions on a file after it is created
    • B) The encryption of the file contents
    • C) The storage location of the file
    • D) The network access to the file

Answer Key

QnoAnswer (Option with the text)
1C) Authentication and Authorization
2A) Symmetric encryption
3A) Key Distribution Center (KDC)
4A) To issue the TGT to clients
5A) Validate users without re-entering credentials
6A) krb5.conf
7C) Issue TGTs and service tickets
8B) Kerberos server
9C) HDFS
10B) The client needs to request a new TGT
11B) core-site.xml
12B) ktutil
13B) Obtain a TGT
14A) klist
15A) krb5.conf
16B) Restart Hadoop daemons
17A) By using a shared keytab file
18D) All of the above
19C) A file storing Kerberos credentials for automated authentication
20D) All of the above
21C) The file owner and superusers
22A) rw-r–r–
23C) Both files and directories
24A) chmod
25B) The user who created the file
26B) It uses the Linux file permission model
27B) User, group, and others
28B) Access is denied and an error is returned
29B) The Hadoop administrator
30A) hdfs ls
31B) Grant more granular permissions than traditional HDFS permissions
32A) hdfs setacl
33A) The ability to set permissions for a specific user, group, or other
34A) By modifying the file metadata
35A) Permissions on a file after it is created

Use a Blank Sheet, Note your Answers and Finally tally with our answer at last. Give Yourself Score.

X
error: Content is protected !!
Scroll to Top