> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-mintlify-8a08bda2.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Managed Postgres RBAC

> ClickHouse Managed Postgres のロールベースのアクセス制御（RBAC）について説明します

export const Image = ({img, alt, size}) => {
  return <Frame>
      <img src={img} alt={alt} />
    </Frame>;
};

export const galaxyOnClick = eventName => () => {
  try {
    if (typeof window !== "undefined" && window.galaxy && eventName) {
      window.galaxy.track(eventName, {
        interaction: "click"
      });
    }
  } catch (e) {}
};

export const BetaBadge = ({link, galaxyTrack, galaxyEvent}) => {
  if (link) {
    return <a href={link} target="_blank" rel="noopener noreferrer" className="betaBadge" onClick={galaxyTrack && galaxyEvent ? galaxyOnClick(galaxyEvent) : undefined}>
                <Icon />
                <span>Beta</span>
            </a>;
  }
  return <div className="betaBadge">
            <Icon />
            <span>
                Beta feature. 
                <u>
                    <a href="/docs/beta-and-experimental-features#beta-features">
                        Learn more.
                    </a>
                </u>
            </span>
        </div>;
};

ClickHouse Cloud は、Managed Postgres サービスに対するロールベースのアクセス制御 (RBAC) をサポートしています。特定の権限を持つカスタムロールを作成して組織メンバーに割り当てることで、Postgres サービスを表示または管理できるユーザーを制御できます。

<div id="available-permissions">
  ## 利用可能な権限
</div>

Managed Postgres は現在、2 種類の権限をサポートしています。

| 権限                   | 説明                                       |
| -------------------- | ---------------------------------------- |
| **Postgres サービスの表示** | ユーザーが Postgres サービスとその詳細を表示できるようにします。    |
| **Postgres サービスの管理** | ユーザーが Postgres サービスを変更、スケール、設定できるようにします。 |

新しい Postgres サービスを作成するには、既存の **Organization manage** 権限が必要です。上記の権限は、既存のサービスにのみ適用されます。

<Note>
  より細かな権限は、今後のリリースで利用可能になる予定です。
</Note>

<div id="creating-a-custom-role">
  ## カスタムロールの作成
</div>

1. 左側のサイドバーで組織名をクリックし、**Users and roles** を選択します。

<Image img="https://mintcdn.com/private-7c7dfe99-mintlify-8a08bda2/1Ag2q2dX2WMxuS9G/images/managed-postgres/rbac/usersandroles.png?fit=max&auto=format&n=1Ag2q2dX2WMxuS9G&q=85&s=5968c75bcfaab352925ee949d5ed999a" alt="「Users and roles」メニュー" size="md" border width="856" height="858" data-path="images/managed-postgres/rbac/usersandroles.png" />

2. **Roles** タブに切り替え、**Create role** をクリックします。
3. ロール名を入力し、**+ Allow** をクリックして、エンティティ一覧から **Postgres Service** を選択します。

<Image img="https://mintcdn.com/private-7c7dfe99-mintlify-8a08bda2/1Ag2q2dX2WMxuS9G/images/managed-postgres/rbac/postgresentity.png?fit=max&auto=format&n=1Ag2q2dX2WMxuS9G&q=85&s=20c2152cc5d645bc955ed97a3583a085" alt="Postgres Service エンティティの選択" size="md" border width="1198" height="1322" data-path="images/managed-postgres/rbac/postgresentity.png" />

4. ロールの適用対象とする Postgres サービスを選択し、付与する権限を選びます。

<Image img="https://mintcdn.com/private-7c7dfe99-mintlify-8a08bda2/1Ag2q2dX2WMxuS9G/images/managed-postgres/rbac/newpostgresperms.png?fit=max&auto=format&n=1Ag2q2dX2WMxuS9G&q=85&s=9253135722c6b8e15867d8922face831" alt="ロールの Postgres 権限の設定" size="md" border width="1202" height="922" data-path="images/managed-postgres/rbac/newpostgresperms.png" />

5. **Create role** をクリックして保存します。

<div id="assigning-a-role">
  ## ロールの割り当て
</div>

ロールを作成したら、同じ **Users and roles** ページの **Users** タブからユーザーに割り当てます。1人のユーザーに複数のロールを付与でき、ロールを組み合わせることで、必要なアクセスプロファイルを正確に構成できます。
