---
title: "Role-Based Authentication for Self-Hosted Temporal"
description: "Learn how to implement role-based authentication for self-hosted Temporal. Use custom claim mappers and authorizers to enhance security and access control for your workflows."
canonical: "https://temporal.io/code-exchange/role-based-authentication-for-self-hosted-temporal.md"
source: "https://temporal.io/code-exchange/role-based-authentication-for-self-hosted-temporal"
published: "2025-02-03"
authors:
  - "Matt Chaffe"
company: "Bitovi"
languages:
  - "Go"
tags:
  - "authentication"
  - "security"
reviewed_by_temporal: false
community_contribution: true
---

# Role-Based Authentication for Self-Hosted Temporal

Learn how to implement role-based authentication for self-hosted Temporal. Use custom claim mappers and authorizers to enhance security and access control for your workflows.

- [View repo](https://github.com/bitovi/temporal-auth)
- [View blog](https://www.bitovi.com/blog/implementing-role-based-authentication-for-self-hosted-temporal)

How to secure your self-hosted cluster with role-based auth.

Temporal is a powerhouse for orchestrating workflows, offering durability and reliability out of the box. But when you’re running a [self-hosted Temporal](https://www.bitovi.com/blog/leveraging-temporal-cloud-in-fedramp-compliant-organizations) deployment, security becomes a critical consideration. How do you ensure that only authorized users and services can access specific workflows? The answer lies in implementing robust role-based authentication.

We show how to add custom authentication layer to secure your self-hosted Temporal deployments by enforcing role-based access control, integrating OpenID Connect (OIDC) for authentication, and maintaining robust security without affecting Temporal’s inherent reliability.

See our [Blog](https://www.bitovi.com/blog/implementing-role-based-authentication-for-self-hosted-temporal) for a more detailed walk through.
