Authentication and Authorization for Java Microservices with Keycloak, Quarkus and Microprofile

In this blog post I want to point out that I created a 18 min YouTube video related to the newly created workshop Get started with security for your Java Microservices made by Harald, Niklas and me .

I focus in that video on the topics authentication and authorization for Java Microservices with Keycloak, Quarkus and Microprofile. Have fun 😉


I hope this was useful for you and let’s see what’s next?

Greetings,

Thomas

#Authorization, #Authentication, #Java, #Microprofile, #Quarkus, #Keycloak

Get your Java microservice up and running

In this blog post I want to highlight the news, that our tutorial Get your Java Microservice up and running is now available on IBM Developer.

After you complete this workshop, you will:

  • Understand the Java implementation of a cloud-native RESTful Java microservice built on the open technologies Eclipse MicroProfile and Open Liberty
  • Be able to describe how to effectively build and run a microservice on a local machine in a container
  • Understands the steps needed to deploy a single microservice to Kubernetes and on the IBM Cloud Kubernetes service

I hope this was useful for you and let’s see what’s next?

Greetings,

Thomas

#Java, #Microprofile, #Kubernetes, #Docker, #IBMCloud

Get your Java Microservice up and running!

In this blog post I want to highlight the hands-on workshop “Get your Java Microservice up and running!“, now available in GitBook . That workshop demonstrates how to build a Microservice with Java and how to deploy the Microservice Kubernetes on the IBM Cloud. The Microservice in this workshop is kept as simple as possible, so that it can be used as a starting point for other Microservices. The Microservice has been developed with Java EE, OpenLiberty and Eclipse MicroProfile.

The workshop is a part of the open source project Cloud Native Starter, which contains sample code that demonstrates how to get started with cloud-native applications and Microservice based architectures.
The Workshop has a related badge called Cloud Native Starter Level 1. This badge is available at Acclaim. In the related quiz you can verify your knowledge you achieved in the workshop.

The gif below show some major steps in the hands-on workshop. You will develop locally a Java Microservice and deploy that Microservice to a free Kubernetes Cluster on IBM Cloud.

microservice docker java kubernetes deployment

I hope this was useful for you and let’s see what’s next?

Greetings,

Thomas

#microprofile, #java, #ibmcloud, #openliberty, #microservices, #kubernetes

Reactive programming is about messages, futures, events, channels and streams

In this blog post I want to point out the topic of the open sourced Reactive Cloud Native Starter example with Java backend Microservices and a Vue.js frontend web application. The gif below shows the example application. The application simply displays Articles and Authors information on a web page. You also see the creation of Articles with cURL commands in a terminal session and the UI is updated automatically.
(the gif is from the Cloud Native Starter project)

reactive demo
That example was mainly developed by Niklas Heidloff. He wrote a lot of very useful blog posts like Development of Reactive Applications with Quarkus related to that topic.

In this blog post I show, what could be useful to know, when you start with this Cloud Native Starter example for reactive programming to create and consume reactive RESTful APIs in an asynchronous way. I will also give a brief overview of the steps to create an article in the example application.

Continue reading

Getting started to secure a simple Java Microservice with Keycloak, MicroProfile and OpenLiberty

‌

Invoke reactive Endpoints with Quarkus and MicroProfile

In this blog post I want to point out that I just created a 15 min YouTube video related to the great Hands-on workshop: Reactive Endpoints with Quarkus on OpenShift. In this video you can watch and follow the steps of the exercise 3 “Invoke Endpoints reactively”. Niklas wrote a great blog post about the topic of that exercise. This is the name and link of his blog post Invoking REST APIs asynchronously with Quarkus.

Continue reading

Write and execute a JUnit test for a Java microservice based on MicroProfile and run both in the OpenLiberty development mode

This blog post has the focus on: how to develop a JUnit test for the Authors microservice from the Cloud Native Starter example and run both the Authors microservice and the JUnit test on OpenLiberty in the development mode.

That blog post hasn’t the objective to be a blueprint or a ‘how to guide’ for writing JUnit tests,  JUnit test organization, test strategy and so on. The objective is to get technically started along one concrete microservice example from the Cloud Native Starter project. Here is the GitHub project with the source code for this blog post.

The Authors microservice has one RESTful api endpoint called getAuthor. The endpoint provides one parameter for the Author name. The endpoint returns Author data in a JSON format.

Keep the end in mind: The gif shows a sample JUnit test execution for the Author microservice using OpenLiberty in the Visual Studio Code editor:

junit-on-openliberty-run-test

Note: As an alternative or in addition, you can also visit the OpenLiberty tutorial “MicroProfile or Jakarta EE application” to start with that topic.

Let’s start with: What do we need and how do we realize the implementation?

We need to ..

    •  invoke the REST endpoint of the Authors microservice with a REST Client.
    •  transform the JSON response of the REST endpoint to an Author data class
    •  handle different values to invoke the REST Endpoint parameter for the Author name to run tests with variations of the Author name.
    • compare the actual response value with an expected value and document the result.

Continue reading