Keycloak is a redhat (and therefore now IBM) product for Identity and Access Management, so you can add authentication to applications and secure services. It's all available out of the box.
If you need an auth service for your app, Keycloak is a perfect candidate.
I like docker compose, so here is how I do it using official example from their repo:
version: '3' volumes: postgres_data: driver: local services: postgres: image: postgres volumes: - postgres_data:/var/lib/postgresql/data environment: POSTGRES_DB: dbname POSTGRES_USER: dbuser POSTGRES_PASSWORD: dbpassword keycloak: image: jboss/keycloak environment: DB_VENDOR: POSTGRES DB_ADDR: postgres DB_DATABASE: dbname DB_USER: dbuser DB_PASSWORD: dbpassword KEYCLOAK_USER: admin KEYCLOAK_PASSWORD: adminpwd ports: - 26000:8080 depends_on: - postgres