0
0
Hadoopdata~10 mins

Kerberos authentication in Hadoop - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to initialize Kerberos authentication in Hadoop configuration.

Hadoop
conf.set("hadoop.security.authentication", "[1]")
Drag options to blanks, or click blank then click option'
Akerberos
Bsimple
Cnone
Dtoken
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'simple' instead of 'kerberos' disables Kerberos authentication.
Leaving the value empty causes authentication failure.
2fill in blank
medium

Complete the code to login a user from a keytab file using Hadoop's UserGroupInformation.

Hadoop
UserGroupInformation.[1](principal, keytabFilePath)
Drag options to blanks, or click blank then click option'
AsetConfiguration
BloginUserFromTicketCache
CloginUserFromKeytab
DgetCurrentUser
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'loginUserFromTicketCache' instead of keytab login method.
Calling 'setConfiguration' instead of login method.
3fill in blank
hard

Fix the error in the code to set the Kerberos realm in the configuration.

Hadoop
conf.set("[1]", "EXAMPLE.COM")
Drag options to blanks, or click blank then click option'
Ahadoop.security.auth_to_local
Bhadoop.security.krb5.realm
Chadoop.security.krb5.kdc
Dhadoop.security.authentication
Attempts:
3 left
💡 Hint
Common Mistakes
Setting 'hadoop.security.authentication' instead of the realm.
Confusing KDC and realm properties.
4fill in blank
hard

Fill both blanks to create a map of user principals to local usernames using the auth_to_local rules.

Hadoop
conf.set("[1]", "RULE:[1:$1@$0](.*@EXAMPLE.COM)s/@EXAMPLE.COM//")
conf.set("[2]", "kerberos")
Drag options to blanks, or click blank then click option'
Ahadoop.security.auth_to_local
Bhadoop.security.authentication
Chadoop.security.krb5.realm
Dhadoop.security.krb5.kdc
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up realm and auth_to_local properties.
Not setting authentication to kerberos.
5fill in blank
hard

Fill all three blanks to configure Kerberos KDC, realm, and enable authentication in Hadoop configuration.

Hadoop
conf.set("[1]", "kdc.example.com")
conf.set("[2]", "EXAMPLE.COM")
conf.set("[3]", "kerberos")
Drag options to blanks, or click blank then click option'
Ahadoop.security.authentication
Bhadoop.security.krb5.kdc
Chadoop.security.krb5.realm
Dhadoop.security.auth_to_local
Attempts:
3 left
💡 Hint
Common Mistakes
Swapping KDC and realm properties.
Forgetting to enable authentication with 'kerberos'.