Member since
09-29-2015
362
Posts
242
Kudos Received
63
Solutions
My Accepted Solutions
| Title | Views | Posted |
|---|---|---|
| 1825 | 03-14-2019 01:00 PM | |
| 2110 | 01-23-2019 04:19 PM | |
| 8612 | 01-15-2019 01:59 PM | |
| 6323 | 01-15-2019 01:57 PM | |
| 15289 | 12-06-2018 02:01 PM |
03-02-2017
09:51 PM
I am glad the configs.py worked for you. I had issues getting it to work properly in Ambari 2.4.2.
... View more
03-02-2017
09:49 PM
Note: the config.py example is for the new (currently unreleased) Ambari 2.5.0. For older versions of Ambari, use the config.sh script at /var/lib/ambari-server/resources/scripts/configs.sh. For example: /var/lib/ambari-server/resources/scripts/configs.sh -u admin -p admin -port 8080 get localhost c1 kerberos-env To set a configuration property, issue a command like /var/lib/ambari-server/resources/scripts/configs.sh -u admin -p admin -port 8080 set localhost c1 kerberos-env ldap_url "ldaps://newhost.example.com:636" Sorry for any confusion I may have caused.
... View more
03-02-2017
09:13 PM
2 Kudos
@dsun Most, if not all of the MIT KDC related properties are editable and viewable in the Kerberos Service configuration page. However some of the Active Directory related properties are not. I keep meaning to file a bug report for this. I think the most obvious deficiency is the lack of the ability to chance the Kerberos-specific LDAP details for the configured Active Directory. In any case, these properties can be updated via the command line using Ambari's configs.py script. This can be found at /var/lib/ambari-server/resources/scripts/configs.py. # /var/lib/ambari-server/resources/scripts/configs.py --help
Usage: configs.py [options]
Options:
-h, --help show this help message and exit
-t PORT, --port=PORT Optional port number for Ambari server. Default is
'8080'. Provide empty string to not use port.
-s PROTOCOL, --protocol=PROTOCOL
Optional support of SSL. Default protocol is 'http'
-a ACTION, --action=ACTION
Script action: <get>, <set>, <delete>
-l HOST, --host=HOST Server external host name
-n CLUSTER, --cluster=CLUSTER
Name given to cluster. Ex: 'c1'
-c CONFIG_TYPE, --config-type=CONFIG_TYPE
One of the various configuration types in Ambari. Ex:
core-site, hdfs-site, mapred-queue-acls, etc.
To specify credentials please use "-e" OR "-u" and "-p'":
-u USER, --user=USER
Optional user ID to use for authentication. Default is
'admin'
-p PASSWORD, --password=PASSWORD
Optional password to use for authentication. Default
is 'admin'
-e CREDENTIALS_FILE, --credentials-file=CREDENTIALS_FILE
Optional file with user credentials separated by new
line.
To specify property(s) please use "-f" OR "-k" and "-v'":
-f FILE, --file=FILE
File where entire configurations are saved to, or read
from. Supported extensions (.xml, .json>)
-k KEY, --key=KEY Key that has to be set or deleted. Not necessary for
'get' action.
-v VALUE, --value=VALUE
Optional value to be set. Not necessary for 'get' or
'delete' actions.
For example, if you wanted to view the current set of properties in the kerberos-env configuration (where most of the KDC configuration values exist) in a cluster named c1 in and Ambari server running on localhost, you would issue the following command: /var/lib/ambari-server/resources/scripts/configs.py --host=localhost --port=8080 --user=admin --password=admin --cluster=c1 --action=get --config-type=kerberos-env If you wanted to update or set a property, like the LDAP URL, you would issue a command like # /var/lib/ambari-server/resources/scripts/configs.py --host=localhost --port=8080 --user=admin --password=admin --cluster=c1 --action=set --config-type=kerberos-env --key=ldap_url --value="ldaps://newhost.example.com:636"
2017-03-02 21:08:39,407 INFO ### Performing "set":
2017-03-02 21:08:39,407 INFO ### new property - "ldap_url":"ldaps://newhost.example.com:636"
2017-03-02 21:08:39,435 INFO ### on (Site:kerberos-env, Tag:version1488487426247)
2017-03-02 21:08:39,451 INFO ### PUTting json into: doSet_version1488488919451669.json
2017-03-02 21:08:39,510 INFO ### NEW Site:kerberos-env, Tag:version1488488919451669 As for setting the administrator credentials, if you created the credential store and choose to save the administrator credentials, you can go to the Kerberos Administrator page (Admin menu -> Kerberos) and click on the "Manage Credentials" button (I think that is the label on the button). Else, the temporary administrator credential will time out after about 90 minutes or if Ambari is restarted. You will then be prompted to set it when performing a Kerberos-related operation.
... View more
02-15-2017
02:52 PM
@Juan Manuel Nieto, Keep mind that the AD domain (aka realm name) is all lowercase characters. By convention, the name should be all uppercase characters. I believe that this is causing the issue since (I think) the underling MIT Kerberos libraries (krb5-libs 1.10.3) assume the uppercase naming convention. Have you successfully integrated with an AD (Windows 2012) that uses a lowercase domain name?
... View more
02-09-2017
07:46 PM
@mthiele Your video is great. I really like the way we can see what is going on in with Ambari, the hosts, and the Active Directory. This is a great addition to the documentation.
... View more
01-24-2017
08:48 PM
This is one way to do it. However, you can create a cluster with Kerberos enabled using Blueprints as described in Automate HDP installation using Ambari Blueprints – Part 5. The method in that other article eliminates the need to manually perform the Kerberos-specific tasks. If you wanted to use custom principal names, you would set the Kerberos descriptor (or simply just the changes to it) in the Cluster Creation Template under the "security" object with the name of "kerberos_descriptor". For example: {
"blueprint": "my_blueprint",
"default_password": "hadoop",
"host_groups": [
-- Host Group Details ---
],
"credentials": [
{
"alias": "kdc.admin.credential",
"principal": "admin/admin",
"key": "hadoop",
"type": "TEMPORARY"
}
],
"security": {
"type": "KERBEROS",
"kerberos_descriptor" : {
-- Kerberos Descriptor Changes ---
}
},
"Clusters": {
"cluster_name": "my_cluster"
}
}
... View more
01-24-2017
03:17 PM
1 Kudo
@Timo Burmeister A new container does not need to be created specifically for the Ambari-managed Kerberos identities; however, it would be recommended since there potentially may be a lot of accounts created for service and user principals in the Active Directory. In any case, there needs to be a container available in the Active Directory that Ambari can create and manage accounts within. The credentials used to access the Active Directory must give access to Ambari so that new accounts can be created for each of the cluster-specific service and user principals. That account must able to able to update the password for each of those accounts. It is recommended that a special account is given access to the container for security purposes and ease-of-mind. You may not want to give out a domain administrator's credentials or give Ambari full rein over the Active Directory - not that Ambari will do anything nefarious.
... View more
01-24-2017
02:35 PM
I am glad you found this article useful. I do not really understand your question, so I hope this helps to clarify things. As of Ambari 2.0, Ambari will automatically create Kerberos identities (principal name and keytab files) for newly added components - whether they are added to existing or new hosts. The new principals and keytab files will be available to the relevant component(s) before they are started or rather just after they are installed. This is, as long as Ambari it setup to manage the Kerberos identities for the cluster - which can be optionally turned off as of some version later and Ambari 2.0. The "Kerberos Identities" API call, does not really come into play when Ambari is managing the cluster's Kerberos identities. However, it can be used for informational purposes for you. When Ambari is not managing the cluster's Kerberos identities, the "Kerberos Identities" API call is useful as it will give you a listing of the principal name and keytab files it expects to exist. You can use this information to manually create the needed data. Unfortunately, though, the returned data does not properly indicate which identity records are _new_. So it is up to the consumer to figure this out.
... View more
01-20-2017
07:42 PM
@Kuldeep Kulkarni.. You might want to fix the file names referenced through out the article. From https://cwiki.apache.org/confluence/display/AMBARI/Blueprints, the hostmapping.json is known as the "cluster creation template" and cluster_configuration.json is known as the "blueprint". This may be confusing to anyone who is familiar with that Wiki article. That said, your file names are ok but they are inconsistent. To register the Blueprint, you reference "cluster_config.json" but the example document you declared was named "cluster_configuration.json". Also, to start the cluster creation process, you reference "hostmap.json" where the example document was named "hostmapping.json". This may lead to some confusion. On a different topic, there is no mention of how to update the stack-default Kerberos descriptor. This can be done within the cluster creation template (or host mapping document, hostmap.json/hostmapping.json) within the "security" section. The child to "security" should be named "kerberos_descriptor" and may be a sparse descriptor declaring only the changes to apply to the stack default. However, the entire Kerberos descriptor may be set there as well. Finally, when setting the KDC administrator credentials, the persisted credential store may be specified as well. The example only shows the temporary storage facility; however, if Ambari's credential store is configured, you can specify "persisted" as the credential "type" to have the specified credential stored there. The difference being that the temporary store holds on to the KDC administrator credential for 90 minutes or until Ambari is restarted and the persisted store holds on to the credential until manually removed. If 90 minutes is not accepted for the temporary storage retention time, the user can set a more desirable retention time by setting the "security.temporary.keystore.retention.minutes" property in the ambari.properties file. Other than that, nice article! We need something like this to show that creating a Kerberized cluster via Blueprints is a viable option.
... View more
01-18-2017
03:28 PM
2 Kudos
I believe that a combination of both @Kuldeep Kulkarni and @Vipin Rathor answers are correct. Combining them and assuming the SPNEGO principals (HTTP/<host>) for the Ranger hosts already exist in the Active Directory: Create the account in the Active Directory for the load balancer host (HTTP/<loadbalancer FQDN>@<realm>) Export the keytab file for the created account Combine the relevant keytab file into a single file using ktutil Do not attempt to export new keytab file for the previously existing SPNEGO principals as this will change the password on the account and invalidate the existing (relevant) keytab files in the cluster. You should find the needed keytab file from the appropriate hosts at /etc/security/keytabs/spnego.service.keytab. Creating the new account in the Active Directory can be done by logging into the Active Directory and using the new user wizard - right mouse click on the LDAP container (aka the "OU") and select "new" and then select "user" from the menus. You can also create a new user in the Active Directory by using LDAP commands from the OpenLDAP packages (ldapadd), but you will need to create a unicode password and an LDIF file - I believe there will be a article on HCC about this in the rather near future courtesy of @dvillarreal with a little help from me. Creating the keytab file can be done using the ktpass utility on the Active Directory host; or, since you might know the password for the account, you can use ktutil to build one on a Linux host.
... View more