METRON-1774 Allow user to configure JAAS client in Ambari#1192
METRON-1774 Allow user to configure JAAS client in Ambari#1192nickwallen wants to merge 1 commit intoapache:masterfrom
Conversation
|
CI failed due to unrelated transient test failure... |
|
CI failed due to unrelated transient test failure... I am going to take a look at this failure (outside of this PR) |
|
Took a look over the source and looks good to me there. I do want to spin this up in full dev before I give it my +1. One question regarding the change from j2/Jinja templates. Just curious, was that necessary to make the jaas config available for user modification in a text field in Ambari or for other reasons? |
Yes, that is the only way I've seen it done. Its similar in the other Mpacks, like Kafka, etc. |
|
Hey @nickwallen, I see a number of exceptions in the metron-rest.log. It dies shortly thereafter. |
|
I think I see the problem. Is this meant to be only tied to a specific topology(ies) restarting to get deployed? There were some errors during service restart after Kerberos deployed which required me to restart a number of services manually. Since I'm running in full dev I only restarted a few necessary services, including REST and the UIs. Neither seems to have forced the jaas file to deploy. |
|
I restarted indexing and the jaas shows up. I think this may just be missing a couple extra service dependencies, but it's close. |
|
@mmiklavc Nothing changed about how the JAAS template gets deployed (like which service triggers the deployment). The template gets deployed when any service calls The UIs and REST never triggered a deployment of the JAAS template. I assume because they don't directly use it. |
| <property> | ||
| <name>content</name> | ||
| <display-name>metron_client_jaas template</display-name> | ||
| <description>Metron client JAAS configuration</description> |
There was a problem hiding this comment.
The template that previously lived in client_jaas.conf.j2 is now here. This allows the user to edit the template in Ambari.
|
|
||
| File(ambari_format('{client_jaas_path}'), | ||
| content=Template('client_jaas.conf.j2'), | ||
| content=InlineTemplate(params.metron_client_jaas_conf_template), |
There was a problem hiding this comment.
Instead of populating the template from the static .j2 file, the template now comes from the configuration. In MPack parlance, its now using an InlineTemplate.
|
It sounds like this may be an existing bug. That stacktrace makes it pretty clear that the REST api wants the jaas file for configuring the zkClient. |
|
Right. So probably only shows up because kerberization in Full Dev never comes up cleanly (mainly because of the Elasticsearch service check always fails; ES is 'yellow' not 'green'). I could add the |
|
@nickwallen - sounds great to me. Can you create a Jira to track that and link it to this PR? +1 |
Right now, the user can only configure Metron's client JAAS in limited ways. They can configure the principal name and key tab path, but few other things. For example, I cannot easily turn on debugging today. If I make a change to
$METRON_HOME/client_jaas.confto setdebug=true, Ambari will overwrite my change when any of the topologies are restarted.With this PR the user can now edit a template in Ambari that is used to generate
$METRON_HOME/client_jaas.conf. This allows user to turn on debug logs, change the service name, or add additional options required by their environment.Testing
Stand-up a development environment.
Ensure alerts are visible in the Alerts UI.
Kerberize that development environment.
Ensure alerts are visible in the Alerts UI.
Ensure that Metron's
client_jaas.confwas created correctly.In Ambari, go to Metron > Configs > Advanced > Advanced metron-client-jaas-conf and alter the template in some way. For example, you could add
debug=trueto each stanza.Restart the Enrichment topology.
Validate that Metron's
client_jaas.confwas updated based on the changes you made in Ambari.Pull Request Checklist