Posts by Tim te Beek

Adding Spring Security

Posted on by  
Tim te Beek

Adding Spring Security to an existing application can be quite a daunting prospect. Merely adding the required dependencies to your project sets off a chain of events which can break your application and tests.

Continue reading →

Spring Security: Custom Permission Evaluator

Posted on by  
Tim te Beek

Often you’ll find access decisions move beyond simplistic ownership or having a certain role, for instance when users share domain objects with other users. In such cases it’s common to separate permission to view an instance from being able to make changes to the same instance. When your access rules are relatively straightforward, Spring Security offers the PermissionEvaluator interface to secure instance access.

Continue reading →

Spring Security: Securing Spring Data methods

Posted on by  
Tim te Beek

Spring Data repositories allow you to easily query your entities with method names such as findByUserName(String name). However, it can get cumbersome to always retrieve, pass and match on the active user. Luckily Spring Security integrates well with Spring Data to minimize the overhead.

Continue reading →

Distributed Tracing with Kafka Streams

Posted on by  
Tim te Beek

Distributed tracing is a method used to profile and monitor applications, especially those built using a microservices architecture. Distributed tracing helps pinpoint where failures occur and what causes poor performance.[1] Applied to Kafka Streams it allows us to trace and visualize our messages by propagating diagnostic information within message headers.

Continue reading →

Slicing Kibana logs with Vue.js

Posted on by  
Tim te Beek

Nowadays we frequently see companies adopting the Elastic Stack to search, analyze and visualize application data in real time. While the scope of application data ingested these days is broadening, it’s already quite common to monitor aggregated application logs in Kibana. Because of this, I frequently find myself coming back to Kibana to slice and filter the logs to monitor how our application deployments progress through deployments. In this blogpost, I’ll outline a small Vue.js web application I wrote to more easily access our application logs.

Continue reading →

Cucumber-JVM plugin to find unused steps

Posted on by  
Tim te Beek

Cucumber-JVM is a framework for writing end to end tests in natural language, with each line backed by a Java method. Each Java method has a regular expression of natural language lines to match, and lines should only match one such pattern. On a recent assignment I was tasked with modernizing a fairly large cucumber test suite, and going through the steps I found a lot of Java methods that were not being called from the natural language feature files anymore. To identify and remove these unused steps, and prevent any new unused steps in the future, I contributed the following plugin to Cucumber 4.4.0 through: - https://github.com/cucumber/cucumber-jvm/pull/1648 - https://github.com/cucumber/cucumber-jvm/pull/1634

Continue reading →

shadow-left