Skip to content

Commit

Permalink
Rich UI, validations, improvements, bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
muralibasani committed Nov 13, 2020
1 parent ed3bbb2 commit 50221da
Show file tree
Hide file tree
Showing 152 changed files with 1,746 additions and 2,169 deletions.
146 changes: 145 additions & 1 deletion ReleaseNotes.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,147 @@
Kafkawize 4.4

1. Changes include improved User interface and few bug fixes.
2. Metadata Synchronize option has been removed
3. SSL connectivity to Kafka cluster has been removed
4. Dashboard updated to show logged in Username, Team and Role
5. Users can now only 4 environments DEV, TST, ACC and PRD. Hierarchy is defined in properties file.
6. New model for UserInfo class is introduced to fix a password bug
7. Password is not stored as encrypted text
8. Validations bug in acls and topics requests
9. Connect to Kafka clusters during start of Kafkawize
10. Menu colors are updated

----------------------------------------------------------------

Kafkawize 4.3

Changes include improved User interface and few bug fixes.
Changes include improved User interface and few bug fixes.

----------------------------------------------------------------


Kafkawize 4.2

Changes include
1. Critical bug fix - concurrent user access
1. Ability to have environments DEV, TST, ACC and PRD
2. Ability to request for topics in DTAP environments
3. Ability to view topic overview and subscriptions in one page
4. Ability to view topic partitions and replication factor of all environments in topic overview page
5. Ability to view topics and their existence in all environments
6. Updated dashboard to view your team topics

----------------------------------------------------------------

Kafkawize 4.1

Changes include
1. New Bootstrap 4 User interface with new appealing look and feel
2. New UI/UX - for great user experience
3. Few bug fixes
1. Critical bug fix - concurrent user access

----------------------------------------------------------------

Kafkawize 4.0


Changes include
1. About 320 Unit tests. Above 85% code coverage.
2. Integration tests for both stores Cassandra and Rdbms, with EmbeddedCassandra and Embedded H2 sql database
3. New UI for viewing topics
4. New UI for viewing acls of topic
5. New UI for approving topics
6. New UI for approving acls
7. New UI for login screen
8. New UI for Dashboard, showing cluster api status and kafka cluster statuses
9. Added License key validation
10. Bug fixes and code enhancements

There are several other changes and upgraded dependencies which improved the code quality and efficiency.
1. New Bootstrap 4 User interface with new appealing look and feel
2. New UX - for great user experience
3. Few bug fixes


----------------------------------------------------------------

Kafkawize 3.5

Changes include
1. New page (Admin-ServerConfig) to display server configuration - application properties
2. Default replication factor, default partitions and default max partitions can be configured from Clusters page.
3. Couple of minor bug fixes
1. About 320 Unit tests. Above 85% code coverage.
2. Integration tests for both stores Cassandra and Rdbms, with EmbeddedCassandra and Embedded H2 sql database
3. New UI for viewing topics
4. New UI for viewing acls of topic
5. New UI for approving topics
6. New UI for approving acls
7. New UI for login screen
8. New UI for Dashboard, showing cluster api status and kafka cluster statuses
9. Added License key validation
10. Bug fixes and code enhancements

There are several other changes and upgraded dependencies which improved the code quality and efficiency.


----------------------------------------------------------------

Kafkawize 3.4

Changes include

1. Decline Topic requests
2. Decline Acl requests
3. Bug fix in creating topic request
1. New page (Admin-ServerConfig) to display server configuration - application properties
2. Default replication factor, default partitions and default max partitions can be configured from Clusters page.
3. Couple of minor bug fixes


----------------------------------------------------------------

Kafkawize 3.3

Changes include search features in almost all screens, bug fixes and code improvements.
Changes include
1. Decline Topic requests
2. Decline Acl requests
3. Bug fix in creating topic request

----------------------------------------------------------------

Kafkawize 3.2

Changes include search features in almost all screens, bug fixes and code improvements.

----------------------------------------------------------------

Kafkawize 3.1

New features:
1. Support for RDBMS store like MySql to store meta information. 1.0 only supports Apache Cassandra. It is one of the important feature which will support many customers who already have an SQL based solution.
Changing property db.storetype=rdbms/cassandra will make the difference.

Bug fixes:

There are few bugs which are fixed in Topic requests, acls and schema registry modules.

Changes include search features in almost all screens, bug fixes and code improvements.

----------------------------------------------------------------

Kafkawize 2.0

Kafkawize is a Kafka Topic management tool (A Web application) which automates the process of creating and browsing Kafka components, by introducing roles/authorizations to users of various teams of an organization

Changes include new feature Rdbms support for metastore, package restructuring, jpa/hibernate implementation, improved code quality and bug fixes.

New features:
1. Support for RDBMS store like MySql to store meta information. 1.0 only supports Apache Cassandra. It is one of the important feature which will support many customers who already have an SQL based solution.
Changing property db.storetype=rdbms/cassandra will make the difference.

Bug fixes:

There are few bugs which are fixed in Topic requests, acls and schema registry modules.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>com.kafkamgt.uiapi</groupId>
<artifactId>kafkawize</artifactId>
<version>4.3</version>
<version>4.4</version>

<packaging>jar</packaging>

Expand Down
Binary file modified screenshots/ActivityLog.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshots/AddCluster.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshots/AddTeam.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshots/AddUser.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshots/ApproveACL.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshots/ApproveTopics.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshots/BrowseTopics.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshots/Dashboard.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshots/Environments.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshots/Logout.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshots/MyAclRequests.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshots/MyTopicRequests.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshots/RequestACL.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshots/RequestSchema.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshots/RequestTopic.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshots/ServerConfig.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshots/SynchronizeAcls.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshots/SynchronizeTopics.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshots/ViewAcls.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshots/ViewTeams.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshots/ViewUsers.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshots/login.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
41 changes: 36 additions & 5 deletions src/main/java/com/kafkamgt/uiapi/config/ManageDatabase.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,15 @@
import com.kafkamgt.uiapi.helpers.db.cassandra.HandleDbRequestsCassandra;
import com.kafkamgt.uiapi.helpers.db.rdbms.HandleDbRequestsJdbc;
import com.kafkamgt.uiapi.helpers.db.rdbms.JdbcDataSourceCondition;
import com.kafkamgt.uiapi.service.ClusterApiService;
import com.kafkamgt.uiapi.service.UtilService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Conditional;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.Environment;

import javax.annotation.PostConstruct;
import java.util.ArrayList;
Expand All @@ -22,21 +26,33 @@
@Slf4j
public class ManageDatabase {

@Value("${custom.db.storetype}")
@Value("${kafkawize.db.storetype}")
private
String dbStore;

@Value("${custom.envs.order}")
@Value("${kafkawize.envs.order}")
private String orderOfEnvs;

private HandleDbRequests handleDbRequests;

public static HashMap<String, HashMap<String, List<String>>> envParamsMap;

@Value("${custom.org.name}")
@Autowired
private
UtilService utils;

@Value("${kafkawize.invalidkey.msg}")
private
String invalidKeyMessage;

@Value("${kafkawize.org.name}")
private
String orgName;

@Autowired
private
Environment environment;

@PostConstruct
public void loadDb() throws Exception {

Expand All @@ -45,13 +61,28 @@ public void loadDb() throws Exception {
System.exit(0);
}

HashMap<String, String> licenseMap = utils.validateLicense();
if(! (environment.getActiveProfiles().length >0
&& environment.getActiveProfiles()[0].equals("integrationtest"))) {
if (!licenseMap.get("LICENSE_STATUS").equals(Boolean.TRUE.toString())) {
log.info(invalidKeyMessage);
System.exit(0);
}
}

if (dbStore != null && dbStore.equals("rdbms")) {
handleDbRequests = handleJdbc();
} else
handleDbRequests = handleCassandra();

handleDbRequests.connectToDb("licenseKey");
loadEnvParams();
if(UtilService.licenceLoaded) {
handleDbRequests.connectToDb("licenseKey");
loadEnvParams();
}else
{
log.info(invalidKeyMessage);
System.exit(0);
}

}

Expand Down
40 changes: 26 additions & 14 deletions src/main/java/com/kafkamgt/uiapi/config/SecurityConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import com.kafkamgt.uiapi.dao.UserInfo;
import com.kafkamgt.uiapi.error.KafkawizeException;
import com.kafkamgt.uiapi.service.UtilService;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
Expand All @@ -16,7 +17,6 @@
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.factory.PasswordEncoderFactories;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.security.provisioning.InMemoryUserDetailsManager;
Expand All @@ -34,10 +34,10 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
@Autowired
private UtilService utils;

@Value("${custom.org.name}")
@Value("${kafkawize.org.name}")
private String orgName;

@Value("${custom.invalidkey.msg}")
@Value("${kafkawize.invalidkey.msg}")
private String invalidKeyMessage;

@Autowired
Expand Down Expand Up @@ -69,14 +69,22 @@ protected void configure(HttpSecurity http) throws Exception {
public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
PasswordEncoder encoder =
PasswordEncoderFactories.createDelegatingPasswordEncoder();
List<UserInfo> users = new ArrayList<>();
List<UserInfo> users ;
if(orgName.equals("Your company name."))
{
LOG.error("Invalid organization configured !!");
System.exit(0);
throw new Exception("Invalid organization configured !!");
}

if(! (environment.getActiveProfiles().length >0
&& environment.getActiveProfiles()[0].equals("integrationtest"))) {
HashMap<String, String> licenseMap = utils.validateLicense();
if (!licenseMap.get("LICENSE_STATUS").equals(Boolean.TRUE.toString())) {
LOG.error(invalidKeyMessage);
System.exit(0);
throw new Exception(invalidKeyMessage);
}
}
try {
users = manageTopics.selectAllUsersInfo();
}catch(Exception e){
Expand All @@ -93,17 +101,17 @@ public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception
userDetailsBuilder = auth.inMemoryAuthentication()
.passwordEncoder(encoder)
.withUser(userInfo.getUsername())
.password(encoder.encode(userInfo.getPwd()))
.password(encoder.encode(base64DecodePwd((userInfo.getPwd()))))
.roles(userInfo.getRole());

while(iter.hasNext()){
userInfo = iter.next();
userDetailsBuilder
.and()
.withUser(userInfo.getUsername())
.password(encoder.encode(userInfo.getPwd()))
.roles(userInfo.getRole());
}
userInfo = iter.next();
userDetailsBuilder
.and()
.withUser(userInfo.getUsername())
.password(encoder.encode(base64DecodePwd(userInfo.getPwd())))
.roles(userInfo.getRole());
}

auth.userDetailsService(inMemoryUserDetailsManager());
}
Expand All @@ -118,11 +126,15 @@ public InMemoryUserDetailsManager inMemoryUserDetailsManager() {
PasswordEncoderFactories.createDelegatingPasswordEncoder();
while(iter.hasNext()){
userInfo = iter.next();
globalUsers.put(userInfo.getUsername(),encoder.encode(userInfo.getPwd())+","+
globalUsers.put(userInfo.getUsername(),
encoder.encode(base64DecodePwd(userInfo.getPwd()))+","+
userInfo.getRole()+",enabled");
}

return new InMemoryUserDetailsManager(globalUsers);
}

private String base64DecodePwd(String pwd){
return new String(Base64.getDecoder().decode(pwd));
}
}
10 changes: 0 additions & 10 deletions src/main/java/com/kafkamgt/uiapi/controller/AclController.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@ public ResponseEntity<String> createAcl(@RequestBody AclRequests addAclRequest)
return new ResponseEntity<>(aclControllerService.createAcl(addAclRequest), HttpStatus.OK);
}

@PostMapping(value = "/updateSyncAcls")
public ResponseEntity<HashMap<String, String>> updateSyncAcls(@RequestBody List<SyncAclUpdates> syncAclUpdates) {
return new ResponseEntity<>(aclControllerService.updateSyncAcls(syncAclUpdates), HttpStatus.OK);
}

@RequestMapping(value = "/getAclRequests", method = RequestMethod.GET, produces = {MediaType.APPLICATION_JSON_VALUE})
public ResponseEntity<List<AclRequests>> getAclRequests(@RequestParam("pageNo") String pageNo) {
return new ResponseEntity<>(aclControllerService.getAclRequests(pageNo), HttpStatus.OK);
Expand Down Expand Up @@ -67,11 +62,6 @@ public ResponseEntity<TopicOverview> getAcls(@RequestParam(value="topicnamesearc
return new ResponseEntity<>(aclControllerService.getAcls(topicNameSearch), HttpStatus.OK);
}

@RequestMapping(value = "/getSyncAcls", method = RequestMethod.GET, produces = {MediaType.APPLICATION_JSON_VALUE})
public ResponseEntity<List<AclInfo>> getSyncAcls(@RequestParam("env") String env, @RequestParam("pageNo") String pageNo,
@RequestParam(value="topicnamesearch", required=false) String topicNameSearch) throws KafkawizeException {
return new ResponseEntity<>(aclControllerService.getSyncAcls(env, pageNo, topicNameSearch), HttpStatus.OK);
}


}
15 changes: 0 additions & 15 deletions src/main/java/com/kafkamgt/uiapi/controller/TopicController.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,6 @@ public ResponseEntity<String> createTopicsRequest(@RequestBody TopicRequest addT
return new ResponseEntity<>(result, HttpStatus.OK);
}

@PostMapping(value = "/updateSyncTopics")
public ResponseEntity<HashMap<String, String>> updateSyncTopics(@RequestBody List<SyncTopicUpdates> syncTopicUpdates) {
HashMap<String, String> updateSyncTopicsResult = topicControllerService.updateSyncTopics(syncTopicUpdates);
return new ResponseEntity<>(updateSyncTopicsResult, HttpStatus.OK);
}

@RequestMapping(value = "/getTopicRequests", method = RequestMethod.GET, produces = {MediaType.APPLICATION_JSON_VALUE})
public ResponseEntity<List<TopicRequest>> getTopicRequests(@RequestParam("pageNo") String pageNo) {
return new ResponseEntity<>(topicControllerService.getTopicRequests(pageNo), HttpStatus.OK);
Expand Down Expand Up @@ -84,13 +78,4 @@ public ResponseEntity<List<String>> getTopicsOnly() throws Exception {
return new ResponseEntity<>(topicControllerService.getAllTopics(), HttpStatus.OK);
}

@RequestMapping(value = "/getSyncTopics", method = RequestMethod.GET, produces = {MediaType.APPLICATION_JSON_VALUE})
public ResponseEntity<List<TopicRequest>> getSyncTopics(@RequestParam("env") String env, @RequestParam("pageNo") String pageNo,
@RequestParam(value="topicnamesearch",required=false) String topicNameSearch) throws Exception {

return new ResponseEntity<>(topicControllerService.getSyncTopics(env, pageNo, topicNameSearch), HttpStatus.OK);
}



}
Loading

0 comments on commit 50221da

Please sign in to comment.