---
title: "Discussion on \"Spring Security: Custom Pre-Authentication Flow\" | Hashnode"
description: "Discussion on \"Spring Security: Custom Pre-Authentication Flow\". Introduction\nIn one of my project setups, the authentication process is offloaded to Keycloak and set up with an Open Policy Agent sidecar in a typical Kubernetes deployment. Any request that comes to the service, will be pre-authenticated, and all c..."
url: "https://hashnode.com/posts/spring-security-custom-pre-authentication-flow/64aada7369747e86f0b63a89"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Spring Security: Custom Pre-Authentication Flow](https://bwgjoseph.com/spring-security-custom-pre-authentication-flow?utm_source=hashnode&utm_medium=feed)

Introduction In one of my project setups, the authentication process is offloaded to Keycloak and set up with an Open Policy Agent sidecar in a typical Kubernetes deployment. Any request that comes to the service, will be pre-authenticated, and all c...

Jul 9, 2023 · 12 min read · bwgjoseph.com  
Read the article

-   [#spring-security](https://hashnode.com/tag/spring-security)
-   [#java](https://hashnode.com/tag/java)
-   [#authentication](https://hashnode.com/tag/authentication)
-   [#spring-framework](https://hashnode.com/tag/spring-framework)
-   [#springboot](https://hashnode.com/tag/springboot)

## Written by

[Joseph Gan](https://hashnode.com/@bwgjoseph)

@bwgjoseph · Singapore

  
[View profile](https://hashnode.com/@bwgjoseph)

Advocate for better developer's productivity and experience Documenting my learnings and sharing it

## Responses 1

Markdown supported · ⌘↵ to post

[Sithira Munasinghe](https://hashnode.com/@sithira)

[Nov 5, 2023](https://hashnode.com/posts/spring-security-custom-pre-authentication-flow/64aada7369747e86f0b63a89/comment/6547beea08e6f2d0c473c5a9)

Such a valuable post. Please keep writing great posts like this.

This is just 👏👏👏

Thanks for sharing this.

[Joseph Gan](https://hashnode.com/@bwgjoseph)

[Nov 6, 2023](https://hashnode.com/posts/spring-security-custom-pre-authentication-flow/64aada7369747e86f0b63a89/comment/6547beea08e6f2d0c473c5a9#reply-6548f768dd72e8e79477f969)

Thank you for your feedback!
