Skip to content

Instantly share code, notes, and snippets.

View erebe's full-sized avatar
🎏
loading life ...

Erèbe - Romain Gerard erebe

🎏
loading life ...
  • Paris
  • 07:05 (UTC +02:00)
View GitHub Profile
@erebe
erebe / oauth_proxy.rs
Created June 19, 2026 08:58
oauth_proxy.rs
/// Oauth2Service is a service that handles the proxying of oauth2 requests in the case of MCP server
/// We use/forward to Auth0 behind the scene but we need to intercept because:
/// * We don't want to support dynamic client registration in auth0, as we should enable it for the whole tenant and it causes security implications
/// *but* we wants users to use it without having to give them our oauth2 client and secret id before hands
/// *thus* we need to fake it in this server and returns our static creds. So it provides a smooth experience. Other implementations seems to do it too
/// There is new rfc/spec in progress to paliate to this https://auth0.com/blog/cimd-vs-dcr-mcp-registration/
///
/// * Auth0 is not Oauth2 MCP compliant by default. It uses `audience` as a parameter in the token request, but MCP/oauth2 expects `resource`
/// * We want users to generate a token for the audience/api of the CORE, *but* it is not possible by default as client check the audience/resource is the same
/// as the

Last Christmas, I bought my wife “Explain the cloud like I am 10” [http://highscalability.com/blog/2017/12/18/explain-the-cloud-like-im-10.html] after she raised many times that it was hard for her to relate to what I am doing in my daily work at Qovery. While so far, I have been the sole reader to enjoy the book, I was wondering during my lecture if there were any resources to explain how to build all that.

I reached https://github.com/codecrafters-io/build-your-own-x expecting to find some treasure to undig, but end-up disappointed to find nothing related to infrastructure/cloud at all, most topics are software oriented.

So in today article, I am going to explain how to build your own cloud network 🎊

Hold the door a minute before rushing out, the cloud term is wide https://www.cloudflare.com/learning/cloud/what-is-the-cloud/ and relate to many concepts like scalability, reliability, availability, elasticity, on-demand, …

Those are too many concepts at once, so I am going to narrow down the definition fo

@erebe
erebe / Common Mistake in Async Rust.md
Last active December 14, 2023 19:27
Common Mistake in Async Rust

At Qovery, we start to have our fair share of Async Rust and to say the least it is not without caveats. Let’s be honest, Async Rust is hard. It has many more rough edges than Sync Rust and requires a different mindset, but it solves a problem space well, that is hard to tackle otherwise. It allows safer network concurrency than C++ Boost.Asio and I would start this post by giving a big thanks to the Tokio team & ecosystem for the amazing work they provide to the community.

So this post is not to rant about Async Rust or to talk about an Async ecosystem fracture, but to share common mistakes to raise awareness and, in turn, help you avoid them.

Forgetting about task cancellation

Let’s start with the root of all evil in async: task cancellation!

async fn spawn_tasks() {

A Journey into Haskell and Open Source

I want to write something to celebrate the latest and I hope the last release of wstunnel, a TCP/UDP tunneling websocket tool, and share with you at the same time my story with Haskell and OpenSource projects.

A venture into Haskell

This open source project is not my only one, but is found to my hearth because it brought me joy, despair, proud, shame and further reach that I wasn't even expecting at first. If you have not noticed, the program is written in Haskell. I started learning it, well 8 years ago now..., when I was studying abroad in South Korea. At the time I was struggling with the feeling that I was not enough, I already knew C++ and Java, but was feeling like stagnating while there was so much more that I wasn't knowing. I wanted to be more and thus I needed to dedicate myself to learn more in order to be better. This fear of stagnation is still present in me even today, and if you are working as a programmer, I t