-
Notifications
You must be signed in to change notification settings - Fork 163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updated to new kafka client version with an option to connect to secured kafka cluster #30
base: master
Are you sure you want to change the base?
Conversation
Secured kafka
minor change in high level consumer
Secured kafka
src/main/java/com/homeadvisor/kafdrop/service/KafkaHighLevelConsumer.java
Outdated
Show resolved
Hide resolved
can you let me know when is the functionality available for secured cluster connectivity? |
@dhayha Any plans to merge this pull request?. |
can i vote for merging this ? would make kafdrop even more useful in a SASL_SCRAM env |
happy to help with any testing etc. |
String path; | ||
|
||
if (isSecured) { | ||
if ((env.equalsIgnoreCase("stage") || env.equalsIgnoreCase("prod") || env.equalsIgnoreCase("local"))) { |
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.
Is there something special about these particular environment names? Would rather not dictate how folks organize their environments. There's already a check for a non-null environment, so couldn't this just use the environment name as provided?
Boolean isSecured = environment.getProperty("kafka.isSecured", Boolean.class); | ||
LOG.info("env: {} .Issecured kafka: {}", env, isSecured); | ||
if (isSecured && Strings.isNullOrEmpty(env)) { | ||
throw new RuntimeException("'env' cannot be null if connecting to secured kafka."); |
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.
Seems like IllegalArgumentException
or IllegalStateException
would be a more appropriate exception here.
|
||
@ResponseStatus(HttpStatus.OK) | ||
@RequestMapping("/health_check") | ||
public void healthCheck() |
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.
Spring Boot already provides a health status endpoint. What is this endpoint needed for?
|
||
public Map<Integer, TopicPartitionVO> getPartitionMap() | ||
{ | ||
return partitions; |
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.
If we're going to expose this map, let's make it unmodifiable (e.g. Collections.unmodifiableMap(partitions)
)
.page-header { |
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.
I think something didn't merge right. CSS doesn't belong in a JS file.
Made changes to support new kafka client versions. Has an ability to connect to secured kafka cluster using JaaS configuration file.
Following are the changes:
Added following properties to application.yml
To run the application jaas file should be present in the user.dir. jaas config file is picked up based on the env specified in kafka.evn property. Ex if env=local then "kaas_local_jaas.conf" will be used for authentication.