If you want to set up JAAS configuration for Ambari so that independent access to native Hadoop GUIs like the NameName UI are secure, use the Apache community docs to set up your configurations, and then do the following:
Log into the Ambari server host.
Important Ambari Server should not be running when you do this; either make the edits before you start Ambari Server the first time or bring the server down to make the edits.
Run the special setup command and answer the prompts:
ambari-server setup-security
Select 5 for Setup Ambari kerberos JAAS configuration.
Enter the Kerberos principal name for the Ambari server you set up here.
Enter the path to the keytab for the Ambari principal.
Restart Ambari Server:
ambari-server restart