Lessons learnt: Of Spring Boot + OAuth2 + redirect URIs

TL;DR: make sure NGINX is setup correctly (proxy_set_header) before messing around with your code. Scenario: Deploying a Spring Boot micro-service behind an NGINX reverse proxy gave us issues when using default Google OAuth2 configuration as described here , basically showing the "Redirect URI Mismatch" mentioned at the very end of the linked article Trying the solution based … Continue reading Lessons learnt: Of Spring Boot + OAuth2 + redirect URIs

Advertisements

Reactive Spring: Webflux Multipart File Upload

A clear, simple example of multipart file upload using Reactive Spring Spring Boot v2.0.3.RELEASE Coding using reactive functional style (as opposed to annotation-based) Spring Initializr Dependencies: "Reactive Web" Language: Kotlin Notes follow after the code: https://gist.github.com/dvas0004/fdb63086cd77869066e83a1ca25757d9 Notes: Spring Webflux makes it extremely easy to build reactive web services - but it takes a while to … Continue reading Reactive Spring: Webflux Multipart File Upload

Elasticsearch & Java: Tips for faster re-indexing

Notes based on some feedback: Elasticsearch seem to be pushing the REST client rather than using the native Java client... to future proof your code you may be better off going down this route. Why not just use the Re-Index API? Although it's still considered experimental, this may be a good option if you dont have … Continue reading Elasticsearch & Java: Tips for faster re-indexing

Proxy re-encryption

What is proxy re-encryption? Proxy re-encryption lets Alice send Bob a message (M) via a semi-trusted proxy, without revealing Alice's private key to either the proxy or Bob, and without revealing the secret message to the proxy. As Wikipedia puts it: "Proxy re-encryption schemes are cryptosystems which allow third parties (proxies) to alter a ciphertext … Continue reading Proxy re-encryption

Using Let’s Encrypt manual mode

Let's Encrypt is a service sponsored by web giants such as Facebook, Google Chrome, and Cisco (https://letsencrypt.org/). Let's Encrypt has recently gone into public beta and is extremely easy to use. It has some modules already built in to integrate directly with popular webservers like Apache. In my case, I had two use cases where … Continue reading Using Let’s Encrypt manual mode

Data mining firewall logs : Principal Component Analysis

In this article we'll explore how Principal Component Analysis [PCA] [1] - a popular data reduction technique - can help a busy security or network administrator. Any such administrator has often been faced with a daunting problem... going through reams of firewall or router connection logs trying to figure out if any of the thousands … Continue reading Data mining firewall logs : Principal Component Analysis

BLE Health Devices: First Steps with Android

Bluetooth Low Energy (also known as Bluetooth v4) is the current standard in Bluetooth Technology. It is particularly interesting to me when applied to healthcare devices, for a number of reasons: No pairing necessary. These healthcare devices are normally handled by carers or vulnerable people who do not want to go through the hassle of … Continue reading BLE Health Devices: First Steps with Android