blog.broncotoxique.com

Juste another geek’s website

  • Get size of a postgres database

    Request that will give you the size of the DATA_BASE_NAME of your PostGRES instance.

  • Deploy micro-gpodder-server on Clever-Cloud

    Let say you want to deploy a micro-gpodder-server, you can use clever-cloud to do so, it’s pretty simple. Let’s go ! First, one of the best working idea is to deploying from a Git repository. Clever-Cloud provid you many ways to deploy from git, like, pushing to a remote, pulling from your github/gitlab, etc. Choose…

  • Deploy phpBB3 on Clever-Cloud

    Let say you want to deploy phpBB on Clever-Cloud. This example is based on phpBB 3.3.11. First, for now, as far as I know phpBB can’t be deployed immutable way, so you’ll need the equivalent of a server deployment, witch mean : file-storage + data-base + php-runtime. Tools : you’ll just need a text editor…

  • Deploy Keycloak on Clever-Cloud

    This blog post is a small how-to deploy a Keycloak server using Clever-Cloud. This post is a kind of extension/complement of the official Clever-Cloud blog post How to deploy Keycloak on Clever-Cloud ? I suggest you read it before continuing here. In order to run a keycloak on Clever-Cloud, you’ll have to: Download the Keycloak…

  • Spring-Boot – Custom Actuator

    Let say you need a specific actuator for your Spring-Boot backend. This small post show you how to extend the interface HealthIndicator to create your custom actuator. First you’ll have implement the HealthIndicator interface: Now you will try to make your custom actuator load at the start of you application, here is the “auto-configuration” you…

  • Spring-Boot 3 – register an OIDC token provider

    Let say you have a Spring-Boot application and you need a token in order to authenticate/authorize a call made by your application targeting another app. Since Spring-Boot 3, and Spring 6, the spring-security packages handle the OIDC mechanism with built-in code. Also their is a common part in registration of OIDC provider used to authenticate/authorize…

  • Spring 6 – Oauthenticated http call

    Let’s say you have a Spring backend app, and you need to make some http(s) call from that backend to any web-service you want without configuring a global WebClient. Doing that you’ll face three possibly to authenticate your http call: – forward the token of the current user; – get a new token to authenticate…

  • Spring – BeanPostProcessor

    BeanPostProcessor is a factory hook that allows the Spring framework to customize and modify Bean instances when they are newly created. For example: by checking it’s marked interface or using a proxy to wrap it. The application context will automatically detect BeanPostProcessors from the Bean definition and apply them to any beans created subsequently. On…

  • How to Json logging with: Spring-Boot 2.x.x Slf4j 2.17.x Logback 1.2.x

    In some ELK logging context you’ll want to have you log message formated as Json. Since Spring use Slf4J + LogBack as default logging engine, this blog post explain you hos to Json log using Slf4j and Logback. First of all you’ll need to add the following dependency to you project. Other needed dependencies are…

  • Spring Boot 3 – multitenant OIDC with Keycloak

    Naturally Spring Security 3 allow you to do some kind of multi-tenant autentication, but you can’t use more than one OIDC tenant. Let say you are building a Spring Boot App with Spring-Boot 3.x.x and you use Keycloak as OpenID Connect provider, ans you need to validate some tokens from more than one OIDC tenant.…