ByteByteGo 09月25日 18:01
Grab统一认证实践:Dex与OIDC
index_new5.html
../../../zaker_core/zaker_tpl_static/wap/tpl_guoji1.html

 

Grab通过引入Dex和OIDC解决了内部应用认证碎片化问题。原有Concedo系统虽能实现权限矩阵管理,但依赖自定义OAuth导致与第三方平台集成困难。Grab采用OIDC作为标准协议,利用Dex作为身份提供者,实现了单点登录、标准化令牌交换和跨身份提供商容错。Dex的核心特性包括服务间令牌委托、自动故障转移机制,显著提升了认证系统的可用性与安全性,为后续统一授权管理奠定了基础。

🔑 Grab原有Concedo系统采用角色权限矩阵管理权限,但基于自定义OAuth的认证方式导致与外部平台(如Databricks)集成困难,形成认证碎片化。

🌐 Grab选择OIDC作为统一标准,利用Dex作为联邦身份提供者,通过单点登录机制实现用户一次登录即可访问多个应用,提升用户体验。

🔄 Dex引入令牌委托与交换机制,服务间无需使用高权限机器人账户即可传递用户身份信息,既保证权限粒度又避免权限扩散风险。

🔥 Dex支持多身份提供商自动故障转移,当Google等外部认证服务中断时,可无缝切换至Microsoft等备用提供商,确保认证系统高可用性。

🚀 Dex作为开源项目,具备云原生扩展性,符合Grab大规模内部应用与第三方服务的部署需求,同时通过社区协作持续优化性能与安全性。

Build Real-Time IoT with AWS & Redpanda (Sponsored)

IoT devices are producing massive amounts of data every second—but how do you capture, process, and act on that data in real time?

Join AWS and Redpanda experts for a live Tech Talk: Building Real-Time IoT Architectures with Redpanda and AWS.

We’ll walk through practical patterns for streaming data from thousands of devices, building low-latency pipelines, and enabling smarter decision-making at the edge and in the cloud.
Whether you’re working on industrial IoT, smart devices, or connected infrastructure, you’ll leave with a clear blueprint for scaling IoT securely and efficiently.

Register Now


Disclaimer: The details in this post have been derived from the official documentation shared online by the Grab Engineering Team. All credit for the technical details goes to the Grab Engineering Team.  The links to the original articles and sources are present in the references section at the end of the post. We’ve attempted to analyze the details and provide our input about them. If you find any inaccuracies or omissions, please leave a comment, and we will do our best to fix them.

Grab is a superapp, operating in more than 800 cities across eight countries. Through a single app, it offers ride-hailing, food and grocery delivery, payments, financial services, and logistics, making it a core part of everyday life for millions of people in the region. To support all these services, Grab also builds many internal applications used by its employees and business teams.

To make these apps secure, two things are important:

The problem was that Grab didn’t have a single, unified way of handling this. 

Different apps were using different systems. For example, some used Google’s OAuth2.0 in a custom way, while others relied on outside tools like Databricks or Datadog that had their own login methods.

This led to a messy situation:

So, Grab decided they needed one central system that would make authentication and authorization the same across all applications. This would simplify the process, improve security, and make things smoother both for users and for administrators.

Existing Solution - Concedo

Before moving to a new approach, Grab had already built its own internal system called Concedo. 

The idea behind Concedo was to make life easier for developers so they didn’t have to build authentication and authorization features from scratch every time they created a new service.

Concedo worked using something called a Role-to-Permission Matrix (R2PM). This basically means every role in the company (like “engineer,” “manager,” or “analyst”) is mapped to specific permissions (what actions they can or cannot do). For example, a manager might have permission to view financial reports, while an analyst might not.

This setup allowed services at Grab to plug into Concedo quickly and enforce access rules consistently. Developers could focus on building their actual applications instead of worrying about identity and access management.

However, there was a catch: Concedo’s authentication was built on Google OAuth2.0, but with custom changes. These tweaks worked fine inside Grab but made it difficult to integrate with external platforms like Databricks or Datadog, which expected the standard version. That meant users still had a fragmented sign-in experience whenever they needed to use third-party tools.

Evaluation of Industry Standards

When Grab looked for a standard way to fix its messy authentication setup, the team compared a few industry protocols that are widely used for login and access control.

Because of these advantages, Grab chose OIDC as its standard.

However, OIDC isn’t perfect. It depends on external identity providers (like Google or Microsoft). If one of them goes down, users might lose access. Also, if someone’s credentials are stolen, attackers could use them to access multiple systems at once. So, Grab had to think about mitigation strategies like fallback options and scoping tokens carefully to reduce the risks.

Adoption of Dex (Open Source)

Once Grab decided to adopt OpenID Connect (OIDC) as its standard, the next question was around implementation.

Instead of building a whole new identity system from scratch, Grab looked into existing open-source projects. That’s when the team found Dex, a project under the Cloud Native Computing Foundation (CNCF).

Dex is a federated OpenID Connect (OIDC) provider. That means it acts like a bridge or middleman between Grab’s applications and various identity providers (IdPs) such as Google, Microsoft, or any other login system.

Here’s how it works in practice:

See the diagram below:

Dex was the right choice for Grab for the following reasons:

In short, Dex gave Grab exactly what they needed: a flexible, standardised, and scalable identity layer that sits neatly between their apps and multiple login systems, while also ensuring developers don’t need to reinvent authentication every time.

Key Features in Grab’s Dex Implementation

The main features are as follows:

Token Delegation & Exchange

In Grab’s systems, it’s common for one service (say Service A) to call another service (Service B). However, Service B needs to know who exactly is making the request to decide what’s allowed.

Traditionally, companies solve this using service accounts (sometimes called robot accounts). These are special accounts with high-level permissions that a service uses to “log in” to another service. 

However, there were a couple of problems with this:

Dex introduces a smarter way called token exchange. Instead of using fixed service accounts, the following approach is used:

See the diagram below:

The benefits are as follows:

Kill Switch (IdP Failover)

Another big issue with OIDC is its reliance on external identity providers (IdPs) like Google or Microsoft. If an IdP goes down, every service relying on it might be blocked from authenticating users, which could cause massive downtime.

Dex’s solution was a multi-IdP failover (a “kill switch”) that works as follows:

See the diagram below:

This matters because of the following reasons:

This design provides Grab with resilience and reliability guarantees, which are crucial when authentication underpins everything from ride-hailing to financial services.

Conclusion

Grab has already achieved a big milestone by unifying authentication through Dex, but the journey isn’t finished yet. 

While users now enjoy a consistent and secure way of proving who they are, the question of what they are allowed to do (authorization) remains scattered and complicated across different systems. Today, each service may have its own way of defining permissions, managing roles, and enforcing rules, which leads to inefficiencies and even security gaps.

The next step is to build a unified authorization model on top of the solid identity foundation provided by Dex. This means bringing all policies together under a central framework, standardising how access control is handled across applications, and making it much simpler to manage user permissions. By consolidating the rules, Grab can reduce complexity for developers, provide a smoother experience for users, and strengthen overall security. The long-term vision is a seamless combination of identity and authorization, where logging in and accessing resources across Grab’s ecosystem feels effortless, reliable, and consistent.

In conclusion, the adoption of Dex has already transformed authentication at Grab, turning a fragmented experience into a unified one that works across both internal and external applications. By extending this approach to authorization, Grab is setting the stage for an even stronger and more secure access management system. This evolution will not only improve developer productivity and reduce administrative burden but also deliver a smoother, safer experience for every user across Grab’s wide range of services.

References:


ByteByteGo Technical Interview Prep Kit

Launching the All-in-one interview prep. We’re making all the books available on the ByteByteGo website.

What's included:

Launch sale: 50% off


SPONSOR US

Get your product in front of more than 1,000,000 tech professionals.

Our newsletter puts your products and services directly in front of an audience that matters - hundreds of thousands of engineering leaders and senior engineers - who have influence over significant tech decisions and big purchases.

Space Fills Up Fast - Reserve Today

Ad spots typically sell out about 4 weeks in advance. To ensure your ad reaches this influential audience, reserve your space now by emailing sponsorship@bytebytego.com.

Fish AI Reader

Fish AI Reader

AI辅助创作,多种专业模板,深度分析,高质量内容生成。从观点提取到深度思考,FishAI为您提供全方位的创作支持。新版本引入自定义参数,让您的创作更加个性化和精准。

FishAI

FishAI

鱼阅,AI 时代的下一个智能信息助手,助你摆脱信息焦虑

联系邮箱 441953276@qq.com

相关标签

Grab Dex OIDC 身份认证 单点登录 企业级安全
相关文章