Quantcast
Channel: Magnus K Karlsson
Browsing latest articles
Browse All 531 View Live

Image may be NSFW.
Clik here to view.

Spring Boot 3 and Keycloak with Oauth2 Resource Server (JWT) for REST...

IntroductionSpring Security OAuth2 Login does NOT support authentication with Access Token that you might first think....

View Article


Spring Boot 3 and Keycloak with Oauth2 Log in (Authorization Code Grant) for...

IntroductionSee https://magnus-k-karlsson.blogspot.com/2023/08/spring-boot-3-spring-security-6.htmlPrerequisiteJava 17Maven 3.6.3 or laterSpring 3.1.2Spring Security 6.1.2Keycloak. I will use the...

View Article


Spring Boot 3 and Keycloak with Oauth2 Log in (Authorization Code Grant) for...

IntroductionSee Spring Boot 3 and Keycloak with Oauth2 Log in (Authorization Code Grant) for Angular SPASee Spring Boot 3 and Keycloak with Oauth2 Resource Server (JWT) for REST integrationHere we will...

View Article

Spring Boot 3 and Keycloak with Oauth2 Log in (Authorization Code Grant) and...

IntroductionUsing BASIC authentication when requesting Access Token in OAUth 2 Authorization Code Flow is not the safest way. Especially if this password is rarely changed.See Spring Boot 3 and...

View Article

Oauth 2.0 Client Credentials Grant

Used for machine-to-machine communicationClient needs to hold secrets, since Access Token is directly exposedhttps://datatracker.ietf.org/doc/html/rfc6749#section-4.4.2 POST /token HTTP/1.1 Host:...

View Article


Spring Boot 3 with Basic Authentication and JDBC Password Storage

Create new Maven ProjectCreate new project with Spring Initializr (https://start.spring.io/) and add dependency: Spring Data JDBC and MySQL<dependency>...

View Article

Using Java 17 keytool as Root CA to create Server and User Certificate

Referencehttps://docs.oracle.com/en/java/javase/17/docs/specs/man/keytool.htmlhttps://magnus-k-karlsson.blogspot.com/2020/02/x509-certificate-profiles.htmlRoot CAGenerate Self Signed Root CA$ keytool...

View Article

Spring Boot 3 with X509 Authentication and JDBC Storage

Referencehttps://docs.spring.io/spring-security/reference/servlet/authentication/x509.htmlhttps://magnus-k-karlsson.blogspot.com/2023/08/using-java-17-keytool-as-root-ca-to.htmlhttps://magnus-k-karlsso...

View Article


OpenLDAP Image and Custom LDIF with User and Group

Reference: https://hub.docker.com/r/bitnami/openldapLDAP_PORT_NUMBER: The port OpenLDAP is listening for requests. Priviledged port is supported (e.g. 1389). Default: 1389 (non privileged port)....

View Article


Image may be NSFW.
Clik here to view.

Keycloak, User Federation from LDAP and Lesson Learned

LDAPWe are going to use OpenLDAP and setup in previous blog OpenLDAP Image and Custom LDIF with User and Group.$ podman run -d --name openldap \ -e LDAP_ROOT=dc=magnuskkarlsson,dc=se \ -e...

View Article

Spring RestTemplate and WebClient Improvements

 Improvements for reactive WebClienthttps://medium.com/@dixitsatish34/how-to-improve-webclient-response-time-in-spring-boot-3c0c898f06b4Improvements for blocking...

View Article

IPv4 Network Ranges

Example 192.168.0.0/30number of IP addresses = 2 ^ (32–30)which is 2 ^ 2 = 4The IP addresses are thus 192.168.0.0, 192.168.0.1, 192.168.0.2 and 192.168.0.3Example 192.168.0.0/29number of IP addresses =...

View Article

CORS Finally Explained — Simply

https://levelup.gitconnected.com/cors-finally-explained-simply-ae42b52a70a3 

View Article


Installation of HAProxy and Keepalived for High Availability

 https://medium.com/@kemalozz/installation-of-haproxy-and-keepalived-for-high-availability-f1d6e7b8982a

View Article

Differences between Load Balancer, Reverse Proxy and API Gateway

 https://medium.com/codenx/load-balancer-vs-reverse-proxy-vs-api-gateway-fcb79912abbf

View Article


Generic Exception Handling in Spring Boot

 https://blog.stackademic.com/top-10-ways-to-handle-exception-in-springboot-with-coding-examples-ac27fad937ca

View Article

Spring Boot Database Connection Pooling

...

View Article


Swagger Like a Pro with Spring Boot 3 and Java 17

 https://medium.com/@berktorun.dev/swagger-like-a-pro-with-spring-boot-3-and-java-17-49eed0ce1d2f

View Article

Mastering Exception Handling in Spring Boot: A Comprehensive Guide

https://naveen-metta.medium.com/mastering-exception-handling-in-spring-boot-a-comprehensive-guide-fa3f916d1981

View Article

Mastering Lombok in Spring Boot for Efficient Java Development

 https://medium.com/@tecnicorabi/mastering-lombok-in-spring-boot-for-efficient-java-development-8f79828c0519

View Article

Configure mTLS/Two-Way SSL/Client Certificate Authentication with Spring Boot...

IntroductionIn this blog I'm configure mTLS also called Two-Way SSL or Client Certificate Authentication, with self signed certificate.Server Certificate (self signed)$ keytool -genkeypair -alias...

View Article


Writing mTLS/Two-Way SSL/Client Certificate Authentication with Spring Boot 4...

IntroductionIn my previous I setup the server side with mLTS https://magnus-k-karlsson.blogspot.com/2026/04/configure-mtlstwo-way-sslclient.htmlSSL Bundleapplication.properties#...

View Article


Writing mTLS/Two-Way SSL/Client Certificate Authentication with Spring Boot...

IntroductionIn my previous I setup client certification authentication with RestClient https://magnus-k-karlsson.blogspot.com/2026/04/writing-mtlstwo-way-sslclient.htmlHere I will use new Spring Boot 4...

View Article

How to Install Docker CE on Fedora 43

Prerequisite$ cat /etc/os-release ... VERSION="43 (Workstation Edition)" ... Install Docker CE (Community Edition)https://docs.docker.com/engine/install/fedora/Remove possible old version of Docker CE$...

View Article

GIT Rebase

1. Check out your main branch:$ git checkout mainReference: https://docs.gitlab.com/topics/git/git_rebase/2. "Ensure you have the latest contents of the target branch. In this example, the target...

View Article

Browsing latest articles
Browse All 531 View Live


Latest Images