{"id":16119823,"url":"https://github.com/piomin/sample-spring-security-microservices","last_synced_at":"2025-04-05T02:11:23.859Z","repository":{"id":72152266,"uuid":"302636528","full_name":"piomin/sample-spring-security-microservices","owner":"piomin","description":"Demo illustrating the usage of Spring Security in microservices built on top of Spring Boot and Spring Cloud ","archived":false,"fork":false,"pushed_at":"2025-03-21T12:45:28.000Z","size":160,"stargazers_count":109,"open_issues_count":1,"forks_count":57,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-29T01:14:04.032Z","etag":null,"topics":["keycloak","microservices","oauth2","spring-boot","spring-cloud-gateway","spring-security","spring-security-oauth2"],"latest_commit_sha":null,"homepage":"https://piotrminkowski.com","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/piomin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-10-09T12:36:00.000Z","updated_at":"2025-03-21T12:45:31.000Z","dependencies_parsed_at":"2024-03-28T00:29:08.134Z","dependency_job_id":"a1a912fa-5ae5-4a7d-b152-0ec2025710d1","html_url":"https://github.com/piomin/sample-spring-security-microservices","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piomin%2Fsample-spring-security-microservices","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piomin%2Fsample-spring-security-microservices/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piomin%2Fsample-spring-security-microservices/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piomin%2Fsample-spring-security-microservices/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/piomin","download_url":"https://codeload.github.com/piomin/sample-spring-security-microservices/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247276189,"owners_count":20912288,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["keycloak","microservices","oauth2","spring-boot","spring-cloud-gateway","spring-security","spring-security-oauth2"],"created_at":"2024-10-09T20:55:13.575Z","updated_at":"2025-04-05T02:11:23.846Z","avatar_url":"https://github.com/piomin.png","language":"Java","funding_links":["https://ko-fi.com/piotrminkowski"],"categories":[],"sub_categories":[],"readme":"# Example Project for Security in Spring Boot and Microservices [![Twitter](https://img.shields.io/twitter/follow/piotr_minkowski.svg?style=social\u0026logo=twitter\u0026label=Follow%20Me)](https://twitter.com/piotr_minkowski)\n\n[![CircleCI](https://circleci.com/gh/piomin/sample-spring-security-microservices.svg?style=svg)](https://circleci.com/gh/piomin/sample-spring-security-microservices)\n\n[![SonarCloud](https://sonarcloud.io/images/project_badges/sonarcloud-black.svg)](https://sonarcloud.io/dashboard?id=piomin_sample-spring-security-microservices)\n[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=piomin_sample-spring-security-microservices\u0026metric=bugs)](https://sonarcloud.io/dashboard?id=piomin_sample-spring-security-microservices)\n[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=piomin_sample-spring-security-microservices\u0026metric=coverage)](https://sonarcloud.io/dashboard?id=piomin_sample-spring-security-microservices)\n[![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=piomin_sample-spring-security-microservices\u0026metric=ncloc)](https://sonarcloud.io/dashboard?id=piomin_sample-spring-security-microservices)\n\nIn this project I'm demonstrating you the most interesting features of [Spring Cloud Project](https://spring.io/projects/spring-cloud) for building microservice-based architecture.\n\n-----\n\nI'm publishing on my blog and maintaining example repositories just as a hobby. But if you feel it's worth donating:\n\n[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/piotrminkowski)\n\n1. How to renew certificates in your Spring Boot apps on Kubernetes with **Cert Manager** and **Stakater Reloader**. The example is available in the branch [master](https://github.com/piomin/sample-spring-security-microservices/tree/master).  A detailed guide may be found in the following article: [Renew Certificates on Kubernetes with Cert Manager and Reloader](https://piotrminkowski.com/2022/12/02/renew-certificates-on-kubernetes-with-cert-manager-and-reloader/) \n2. How to reload `SslBundles` with Spring Boot and run the apps on Kubernetes. A detailed guide may be found in the following article: [Spring Boot SSL Hot Reload on Kubernetes](https://piotrminkowski.com/2024/02/19/spring-boot-ssl-hot-reload-on-kubernetes/)\n3. How to use OAuth2 with Spring Cloud and integrate Spring Boot app with **Keycloak**. A detailed guide may be found in the following article: [Microservices with Spring Cloud Gateway, OAuth2 and Keycloak](https://piotrminkowski.com/2024/03/01/microservices-with-spring-cloud-gateway-oauth2-and-keycloak/)\n4. How to use SAML2 with Spring Boot and integrate it with **Keycloak** through the OpenSAML **Shibboleth** library. A detailed guide may be found in the following article: [Spring Boot with SAML2 and Keycloak](https://piotrminkowski.com/2024/10/28/spring-boot-with-saml2-and-keycloak/)\n\n\n## Getting Started\n\n### SSL\n\nTo access an example with Spring Boot `SSLBundle` go to the `ssl` directory.\nFirst, run the `secure-callme-bundle` app:\n```shell\ncd ssl/secure-callme-bundle\nmvn spring-boot:run\n```\n\nFirst, run the `secure-caller-bundle` app:\n```shell\ncd ssl/secure-caller-bundle\nmvn spring-boot:run\n```\n\nThen call the endpoint exposed by the with the curl command:\n```shell\ncurl https://localhost:8444/caller/ping --insecure\n```\n\n### SAML2\n\nTo access an example with Spring Boot SAML 2.0 example go to the `saml` directory.\nFirst, run the Keycloak container:\n```shell\ncd saml\ndocker compose up\n```\n\nOnce the Keycloak is started go to `callme-saml` and run the app:\n```shell\ncd callme-saml\nmvn spring-boot:run\n```\n\n### OAuth2\n\nTo access an example with Spring Boot OAuth2 example go to the `oauth` directory.\nWhile building the `gateway` app it runs Testcontainer with Keycloak and simulates a downstream service:\n```shell\ncd oauth/gateway\nmvn clean package\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpiomin%2Fsample-spring-security-microservices","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpiomin%2Fsample-spring-security-microservices","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpiomin%2Fsample-spring-security-microservices/lists"}