> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-detect-table-modification.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 = "lg"}) => {
  const normalizedSize = ["sm", "md", "lg"].includes(size) ? size : "lg";
  return <div className={`ch-image-${normalizedSize}`}>
      <Frame>
        <img src={img} alt={alt} />
      </Frame>
    </div>;
};

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>ベータ</span>
            </a>;
  }
  return <div className="betaBadge">
            <Icon />
            <span>
                ベータ機能です。 
                <u>
                    <a href="/docs/beta-and-experimental-features#beta-features">
                        詳しくはこちら。
                    </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-detect-table-modification/xkZ8XPhBsPAc7Vbw/images/managed-postgres/rbac/usersandroles.webp?fit=max&auto=format&n=xkZ8XPhBsPAc7Vbw&q=85&s=5679b541555815ce893ce3ad98302ca4" alt="「Users and roles」メニュー" size="md" border width="856" height="858" data-path="images/managed-postgres/rbac/usersandroles.webp" />

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

<Image img="https://mintcdn.com/private-7c7dfe99-detect-table-modification/xkZ8XPhBsPAc7Vbw/images/managed-postgres/rbac/postgresentity.webp?fit=max&auto=format&n=xkZ8XPhBsPAc7Vbw&q=85&s=623fae8d8e60583798efe163f21b3305" alt="Postgres Service エンティティの選択" size="md" border width="1198" height="1322" data-path="images/managed-postgres/rbac/postgresentity.webp" />

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

<Image img="https://mintcdn.com/private-7c7dfe99-detect-table-modification/xkZ8XPhBsPAc7Vbw/images/managed-postgres/rbac/newpostgresperms.webp?fit=max&auto=format&n=xkZ8XPhBsPAc7Vbw&q=85&s=f11ca093af5c2921150a5081d5b17e46" alt="ロールの Postgres 権限の設定" size="md" border width="1202" height="922" data-path="images/managed-postgres/rbac/newpostgresperms.webp" />

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

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

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