Creating a Topic in a Kafka cluster is easy and is well documented for kafka-topics.sh
or even the official API documentation.
bin/kafka-topics.sh --help
Tips, Expertise, Articles and Advice from the Pro's for Your Website or Blog to Succeed
Creating a Topic in a Kafka cluster is easy and is well documented for kafka-topics.sh
or even the official API documentation.
bin/kafka-topics.sh --help
Elasticsearch, which is based on Lucene, is a distributed document store. It is a highly effective way of indexing your information for correlation and quick query for analysis. In this blog, I will just walk you through the steps required to create an Index, search, and visualize.
In the context of ES an index is a collection of documents.
Working with Elastic is quite fun. You can simply use a query string URL or compose a Java program using the Java high-level/low-level client to consume and return the results.
In this blog, I am going to write a simple Java service that will expose a specific computation on top of an elastic search query. You can read more at the elastic.io
Having created the Spring rest service in the previous two blogs, it is time to look at the angular based application that will be interacting with those end points. I prefer using angular-cli to create and add features to my application, it is an easy and reliable way of adding stub code which is easier to manage and traverse.
A simple definition from the angular.io website
Now, since we have plugged in the LDAP information, it is time to stitch it with Spring Security. The easiest thing to do is:
@Configuration
@EnableWebSecurity(debug = true)
public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
private static final Logger logger = LoggerFactory.getLogger(WebSecurityConfig.class);
@Autowired
private LdapContextSource ldapContextSource;
@Override
protected void configure(HttpSecurity http) throws Exception {
http.httpBasic().and().authorizeRequests().antMatchers("/users","/").permitAll()
.anyRequest().authenticated().and().csrf().disable();
}
@Override
protected void configure(AuthenticationManagerBuilder auth) throws Exception {
auth.ldapAuthentication().contextSource(ldapContextSource)
.userSearchBase("ou=users")
.groupSearchBase("ou=groups")
.groupSearchFilter("member={0}")
.userDnPatterns("ou=users,dc=example,dc=com")
.userSearchFilter("uid={0}");
}
}