이 문서에서는 Pub/Sub Lite의 액세스 제어 옵션을 설명합니다.
Pub/Sub Lite는 액세스 제어를 위해 ID 및 액세스 관리를 사용합니다.
사용자 또는 애플리케이션이 Pub/Sub Lite 리소스에 액세스할 수 있도록 하려면 애플리케이션이 사용하는 사용자 또는 서비스 계정에 하나 이상의 사전 정의된 역할 또는 커스텀 역할을 부여합니다. 역할에는 Pub/Sub Lite 리소스에서 특정 작업을 수행할 수 있는 권한이 포함됩니다.
사전 정의된 역할
다음 표에는 Pub/Sub Lite 리소스에 대한 액세스 권한을 부여하는 사전 정의된 역할이 나와 있습니다.
역할
제목
설명
권한
roles/pubsublite.admin
Pub/Sub Lite 관리자
라이트 주제 및 라이트 구독에 대한 전체 액세스 권한입니다.
pubsublite.*
roles/pubsublite.editor
Pub/Sub Lite 편집자
라이트 주제 및 라이트 구독을 수정하고 라이트 주제에 메시지를 게시하며 라이트 구독에서 메시지를 수신합니다.
pubsublite.*
roles/pubsublite.publisher
Pub/Sub Lite 게시자
라이트 주제에 메시지를 게시합니다.
pubsublite.topics.getPartitions
pubsublite.topics.publish
pubsublite.locations.openKafkaStream
roles/pubsublite.subscriber
Pub/Sub Lite 구독자
라이트 구독에서 메시지를 수신합니다.
pubsublite.operations.get
pubsublite.subscriptions.getCursor
pubsublite.subscriptions.seek
pubsublite.subscriptions.setCursor
pubsublite.subscriptions.subscribe
pubsublite.topics.computeHeadCursor
pubsublite.topics.computeMessageStats
pubsublite.topics.computeTimeCursor
pubsublite.topics.getPartitions
pubsublite.topics.subscribe
pubsublite.locations.openKafkaStream
roles/pubsublite.viewer
Pub/Sub Lite 뷰어
라이트 주제 및 라이트 구독을 봅니다.
pubsublite.operations.get
pubsublite.operations.list
pubsublite.subscriptions.get
pubsublite.subscriptions.getCursor
pubsublite.subscriptions.list
pubsublite.topics.get
pubsublite.topics.getPartitions
pubsublite.topics.list
pubsublite.topics.listSubscriptions
커스텀 역할
커스텀 역할에는 사용자가 지정하는 모든 권한이 포함될 수 있습니다. 라이트 주제 업데이트 또는 라이트 구독 삭제와 같은 특정 관리 작업을 수행할 수 있는 권한이 포함된 커스텀 역할을 만들 수 있습니다. 커스텀 역할을 만들려면 커스텀 역할 만들기 및 관리를 참조하세요.
다음 표에는 커스텀 역할의 예시가 나와 있습니다.
설명
권한
라이트 예약 만들기 및 관리
pubsublite.reservations.create
pubsublite.reservations.update
pubsublite.reservations.get
pubsublite.reservations.list
pubsublite.reservations.delete
라이트 주제를 만들고 관리합니다.
pubsublite.topics.create
pubsublite.topics.update
pubsublite.topics.get
pubsublite.topics.getPartitions
pubsublite.topics.list
pubsublite.topics.listSubscriptions
pubsublite.topics.delete
라이트 구독을 만들고 관리합니다.
pubsublite.subscriptions.create
pubsublite.topics.subscribe
pubsublite.subscriptions.update
pubsublite.subscriptions.get
pubsublite.subscriptions.list
pubsublite.subscriptions.delete
라이트 주제 및 라이트 구독을 만듭니다.
pubsublite.topics.create
pubsublite.subscriptions.create
pubsublite.topics.subscribe
라이트 주제 및 라이트 구독을 수정합니다.
pubsublite.topics.update
pubsublite.subscriptions.update
라이트 주제 및 라이트 구독을 삭제합니다.
pubsublite.topics.delete
pubsublite.subscriptions.delete
역할 부여
프로젝트 수준에서 Pub/Sub Lite 리소스에 액세스하는 역할을 부여할 수 있습니다. 예를 들어 서비스 계정에 프로젝트의 라이트 주제를 볼 수 있는 액세스 권한은 부여할 수 있지만 단일 라이트 주제를 볼 수 있는 액세스 권한은 부여할 수 없습니다.
프로젝트에 대한 역할을 부여하려면 Google Cloud 콘솔 또는 Google Cloud CLI를 사용하면 됩니다.
현재 IAM 정책으로 JSON 또는 YAML 파일을 가져오고 파일에 여러 역할 또는 구성원을 추가한 다음 정책을 업데이트할 수도 있습니다.
정책을 읽고 관리하려면 Google Cloud CLI, IAM API, IAM을 사용합니다. 자세한 내용은 프로그래매틱 방식으로 액세스 제어하기를 참조하세요.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2024-12-22(UTC)"],[],[],null,["# Access control with IAM\n\n| **Note:** Pub/Sub Lite is deprecated. Effective March 18, 2026, Pub/Sub Lite will be turned down. \n|\n| - Current customers: Pub/Sub Lite remains functional until March 18, 2026. \n| If you have not used Pub/Sub Lite within the 90-day period preceding July 15, 2025 (April 15, 2025 - July 15, 2025), you won't be able to access Pub/Sub Lite starting on July 15, 2025.\n| - New customers: Pub/Sub Lite is no longer available for new customers after September 24, 2024.\n|\n| You can migrate your Pub/Sub Lite service to\n| [Google Cloud Managed Service for Apache Kafka](/pubsub/lite/docs/migrate-pubsub-lite-to-managed-service-for-apache-kafka)\n| or [Pub/Sub](/pubsub/lite/docs/migrate-pubsub-lite-to-pubsub).\n\nThis document describes the access control options for Pub/Sub Lite.\nPub/Sub Lite uses [Identity and Access Management](/iam/docs) for access control.\n\nTo give a user or application access to Pub/Sub Lite resources, grant\nat least one [predefined](#predefined_roles) or [custom](#custom_roles) role to\nthe user or the service account that the application uses. The roles include\npermissions to perform specific actions on Pub/Sub Lite resources.\n\nPredefined roles\n----------------\n\nThe following table lists the predefined roles that give you access to\nPub/Sub Lite resources:\n\nCustom roles\n------------\n\nCustom roles can include any permissions that you specify. You can create custom\nroles that include permissions to perform specific administrative operations,\nlike updating Lite topics or deleting Lite subscriptions. To create custom\nroles, see [Creating and managing custom\nroles](/iam/docs/creating-custom-roles).\n\nThe following table lists examples of custom roles:\n\nGranting roles\n--------------\n\nYou can grant roles to access Pub/Sub Lite resources at the project\nlevel. For example, you can give a service account access to view any Lite topic\nin a project, but you can't give a service account access to view a single Lite topic.\n\nTo grant a role on a project, you can use the Google Cloud console or the\nGoogle Cloud CLI. \n\n### Console\n\nTo grant a role to a user, service account, or other member, follow these\nsteps:\n\n1. In the Google Cloud console, go to the IAM page.\n\n[Go to IAM](https://console.cloud.google.com/iam-admin)\n\n1. Click **Add**.\n\n2. Enter the email address of a user, service account, or other member.\n\n3. Select a role.\n\n4. Click **Save**.\n\n### gcloud\n\nTo grant a role to a user, service account, or other member, run the\n[`gcloud projects\nadd-iam-policy-binding`](/sdk/gcloud/reference/projects/add-iam-policy-binding)\ncommand: \n\n```bash\ngcloud projects add-iam-policy-binding PROJECT_ID \\\n--member=MEMBER \\\n--role=ROLE_ID\n```\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eMEMBER\u003c/var\u003e: an [identifier for the\n member](/iam/docs/reference/rest/v1/Policy#Binding), like `serviceAccount:test123@example.domain.com`\n- \u003cvar translate=\"no\"\u003eROLE_ID\u003c/var\u003e: the name of the [predefined](#predefined_roles) or [custom](#custom_role) role\n\nYou can also get a JSON or YAML file with the current IAM\npolicy, add multiple roles or members to the file, and then update the policy.\nTo read and manage the policy, use the Google Cloud CLI, the IAM API,\nor the IAM. For details, see [Controlling access\nprogrammatically](/iam/docs/granting-changing-revoking-access#programmatic).\n\nWhat's next\n-----------\n\n- Get an [overview of IAM](/iam/docs/overview).\n- Refer to the [authentication methods that Pub/Sub Lite\n supports](/pubsub/lite/docs).\n- Learn more about [managing access to\n resources](/iam/docs/granting-changing-revoking-access)."]]