This repository was archived by the owner on Aug 20, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 505
METRON-1774 Allow user to configure JAAS client in Ambari #1192
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
61 changes: 61 additions & 0 deletions
61
...c/main/resources/common-services/METRON/CURRENT/configuration/metron-client-jaas-conf.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| <?xml version="1.0"?> | ||
| <?xml-stylesheet type="text/xsl" href="configuration.xsl"?> | ||
| <!-- | ||
| /** | ||
| * Licensed to the Apache Software Foundation (ASF) under one | ||
| * or more contributor license agreements. See the NOTICE file | ||
| * distributed with this work for additional information | ||
| * regarding copyright ownership. The ASF licenses this file | ||
| * to you under the Apache License, Version 2.0 (the | ||
| * "License"); you may not use this file except in compliance | ||
| * with the License. You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
| --> | ||
| <configuration supports_final="false" supports_adding_forbidden="true"> | ||
| <property> | ||
| <name>content</name> | ||
| <display-name>metron_client_jaas template</display-name> | ||
| <description>Metron client JAAS configuration</description> | ||
| <value> | ||
| StormClient { | ||
| com.sun.security.auth.module.Krb5LoginModule required | ||
| useKeyTab=false | ||
| storeKey=false | ||
| useTicketCache=true | ||
| serviceName="nimbus" | ||
| principal="{{metron_principal_name}}"; | ||
| }; | ||
| Client { | ||
| com.sun.security.auth.module.Krb5LoginModule required | ||
| useKeyTab=true | ||
| keyTab="{{metron_keytab_path}}" | ||
| storeKey=true | ||
| useTicketCache=false | ||
| serviceName="zookeeper" | ||
| principal="{{metron_principal_name}}"; | ||
| }; | ||
| KafkaClient { | ||
| com.sun.security.auth.module.Krb5LoginModule required | ||
| useKeyTab=true | ||
| keyTab="{{metron_keytab_path}}" | ||
| storeKey=true | ||
| useTicketCache=false | ||
| serviceName="kafka" | ||
| principal="{{metron_principal_name}}"; | ||
| }; | ||
| </value> | ||
| <value-attributes> | ||
| <type>content</type> | ||
| <show-property-name>false</show-property-name> | ||
| </value-attributes> | ||
| <on-ambari-upgrade add="false"/> | ||
| </property> | ||
| </configuration> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,6 +16,7 @@ | |
|
|
||
| import os.path | ||
| from resource_management.core.source import Template | ||
| from resource_management.core.source import InlineTemplate | ||
| from resource_management.core.resources.system import Directory, File | ||
| from resource_management.core import global_lock | ||
| from resource_management.core.logger import Logger | ||
|
|
@@ -46,7 +47,7 @@ def storm_security_setup(params): | |
| ) | ||
|
|
||
| File(ambari_format('{client_jaas_path}'), | ||
| content=Template('client_jaas.conf.j2'), | ||
| content=InlineTemplate(params.metron_client_jaas_conf_template), | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Instead of populating the template from the static .j2 file, the template now comes from the configuration. In MPack parlance, its now using an |
||
| owner=params.metron_user, | ||
| group=params.metron_group, | ||
| mode=0755 | ||
|
|
@@ -80,4 +81,3 @@ def kinit(kinit_path_local, keytab_path, principal_name, execute_user=None): | |
| Execute(kinitcmd, user=execute_user) | ||
| finally: | ||
| kinit_lock.release() | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 0 additions & 44 deletions
44
...k/src/main/resources/common-services/METRON/CURRENT/package/templates/client_jaas.conf.j2
This file was deleted.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The template that previously lived in
client_jaas.conf.j2is now here. This allows the user to edit the template in Ambari.