Memorystore는 IAM을 활용하는 Identity and Access Management (IAM) 인증 기능을 제공하여 사용자 및 서비스 계정의 로그인 액세스를 보다 효과적으로 관리하는 데 도움이 됩니다. IAM 기반 인증은 Redis AUTH와 통합되어 정적 비밀번호를 사용하지 않고도 사용자 인증 정보 (IAM 토큰)를 원활하게 순환할 수 있습니다.
Memorystore 클러스터의 IAM 인증 설정에 관한 안내는 IAM 인증 관리를 참고하세요.
Redis용 IAM 인증
IAM 인증을 사용하는 경우 Memorystore 클러스터에 액세스할 수 있는 권한은 최종 사용자에게 직접 부여되지 않습니다. 대신 권한이 역할로 그룹화되고 역할은 주 구성원에게 부여됩니다. 자세한 내용은 IAM 개요를 참조하세요.
IAM으로 인증하는 관리자는 Memorystore IAM 인증을 사용하여 IAM 정책을 통해 인스턴스에 대한 액세스 제어를 중앙에서 관리할 수 있습니다.
IAM 정책에는 다음 항목이 포함됩니다.
주 구성원. Memorystore에서는 사용자 계정과 서비스 계정(애플리케이션용) 등 두 가지 유형의 주 구성원을 사용할 수 있습니다. Google 그룹스, Google Workspace 도메인 또는 Cloud ID 도메인과 같은 다른 주 구성원 유형은 아직 IAM 인증에서 지원되지 않습니다. 자세한 내용은 ID와 관련된 개념을 참조하세요.
역할. Memorystore IAM 인증의 경우 클러스터에 인증하려면 사용자에게 redis.clusters.connect 권한이 필요합니다. 이 권한을 얻으려면 사용자 또는 서비스 계정을 사전 정의된 Redis 클러스터 DB 연결 사용자(roles/redis.dbConnectionUser) 역할에 바인딩합니다. IAM 역할에 대한 자세한 내용은 역할을 참조하세요.
리소스. 주 구성원이 액세스하는 리소스는 Memorystore 클러스터입니다. 기본적으로 IAM 정책 바인딩은 프로젝트 수준에서 적용되므로 주 구성원이 프로젝트의 모든 Memorystore 인스턴스에 대한 역할 권한을 받습니다. 하지만 IAM 정책 바인딩을 특정 클러스터로 제한할 수 있습니다. 자세한 내용은 IAM 인증 권한 관리를 참고하세요.
Redis AUTH 명령어
IAM 인증 기능은 Redis AUTH 명령어를 사용하여 IAM과 통합됩니다. 이를 통해 데이터에 대한 액세스를 허용하기 전에 클라이언트가 Memorystore 클러스터에서 확인할 IAM 액세스 토큰을 제공할 수 있습니다.
모든 명령어와 마찬가지로 전송 중인 데이터 암호화가 사용 설정되어 있지 않는 한 AUTH 명령어는 암호화되지 않은 상태로 전송됩니다.
인증의 일부로 가져오는 IAM 액세스 토큰은 기본적으로 가져오고 1시간 후에 만료됩니다. 또는 액세스 토큰을 생성할 때 액세스 토큰 만료 시간을 정의할 수 있습니다.
새 Redis 연결을 설정할 때는 AUTH 명령어를 사용하여 유효한 액세스 토큰을 제시해야 합니다. 토큰이 만료되면 새 연결을 설정하기 위해 새 토큰을 가져와야 합니다. 하지만 기존 연결을 이미 인증한 경우 토큰이 만료되더라도 계속 작동합니다.
인증된 연결 종료
연결을 종료하려면 Redis CLIENT KILL 명령어를 사용합니다. 종료할 연결을 찾으려면 먼저 클라이언트 연결을 오래된 순으로 반환하는 CLIENT LIST를 실행합니다. 그런 다음 CLIENT KILL을 실행하여 연결을 종료할 수 있습니다.
IAM 인증 사용 설정
IAM 인증을 사용 설정해도 정상 상태 성능이 저하되지 않습니다. 하지만 연결을 설정할 수 있는 속도에는 영향을 미칩니다.
IAM 인증을 사용 설정하면 매초 설정되는 클라이언트 연결 속도가 제한됩니다. 이는 Google Cloud의 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"]],["최종 업데이트: 2025-09-08(UTC)"],[],[],null,["# About IAM authentication\n\nMemorystore provides the Identity and Access Management (IAM) authentication\nfeature that leverages IAM to help you better manage\nlogin access for users and service accounts. IAM-based\nauthentication integrates with Redis AUTH, letting you seamlessly rotate\ncredentials (IAM tokens) without relying on static passwords.\n\nFor instructions on setting up IAM authentication for your\nMemorystore cluster, see [Manage IAM authentication](/memorystore/docs/cluster/manage-iam-auth).\n\nIAM authentication for Redis\n----------------------------\n\nWhen using IAM authentication, permission to access a Memorystore cluster\nisn't granted directly to the end user. Instead, permissions are grouped into\nroles, and roles are granted to principals. For more information, see the\n[IAM overview](/iam/docs/overview).\n| **Note:** Memorystore lets you restrict access to a cluster by granting the **roles/redis.dbConnectionUser** role the users you choose. For information about limiting user access on a per-cluster basis, see [Grant access to a group of resources based on resource name prefixes](/iam/docs/configuring-resource-based-access#resource-name-instance). For more information about granting permissions for IAM authentication, see [Grant permissions for IAM authentication](/memorystore/docs/cluster/manage-iam-auth#grant_permissions_for_iam_authentication).\n\nAdministrators who authenticate with IAM can use\nMemorystore IAM authentication to centrally manage\naccess control to their instances using IAM policies.\nIAM policies involve the following entities:\n\n- *Principals* . In Memorystore, you can use two types of principals:\n A user account, and a service account (for applications). Other principal types,\n such as Google groups, Google Workspace domains, or Cloud Identity domains are\n not yet supported for IAM authentication. For more information,\n see [Concepts related to identity](/iam/docs/overview#concepts_related_identity).\n\n- *Roles* . For Memorystore IAM authentication, a\n user requires the **redis.clusters.connect** permission to authenticate with a\n cluster. To get this permission, you can bind the user or service account to the\n predefined Redis Cluster DB Connection User\n (**roles/redis.dbConnectionUser** ) role. For more information about\n IAM roles, see [Roles](/iam/docs/overview#roles).\n\n- *Resources* . The resources that principals access are Memorystore\n clusters. By default, IAM policy bindings are applied at the\n project-level, such that principals receive role permissions for all\n Memorystore instances in the project. However, IAM\n policy bindings can be restricted to a particular cluster. For instructions, see\n [Manage permissions for IAM authentication](/memorystore/docs/cluster/manage-iam-auth#manage_permissions_for_iam_authentication).\n\nRedis AUTH command\n------------------\n\nThe IAM authentication feature uses the Redis AUTH command to\nintegrate with IAM, allowing clients to provide an\nIAM access token that will be verified by the\nMemorystore cluster before allowing access to data.\n\nLike every command, the AUTH command is sent unencrypted unless [In Transit Encryption](/memorystore/docs/cluster/about-in-transit-encryption) is enabled.\n\nFor an example of what the AUTH command can look like, see [Connecting to a Redis cluster that uses IAM authentication](/memorystore/docs/cluster/manage-iam-auth#connect_to_a_cluster_that_uses_iam_authentication).\n\n### IAM access token time frame\n\nBy default, the IAM access token that you retrieve as a part of\nauthentication expires one hour after it's retrieved. Alternatively, when you [generate the access token](/iam/docs/create-short-lived-credentials-direct#create-access),\nyou can define the access token expiration time.\n\nWhen you establish a new Redis connection, you must present a valid access token by\nusing the `AUTH` command. If the token expires, then you must get a new\ntoken to establish new connections. However, if you already authenticated an existing connection, then it continues to work, even if the token expires.\n| **Note:** We strongly recommend that you [automate access token retrieval](/memorystore/docs/cluster/manage-iam-auth#automate_access_token_retrieval) in your application. You can't hardcode an access token because of its short lifetime.\n\n### End an authenticated connection\n\nIf you want to end the connection, then use the Redis `CLIENT KILL`\ncommand. To find the connection that you want to end, first run `CLIENT LIST`,\nwhich returns client connections in order of age. You can then run `CLIENT KILL`\nto end the connection.\n\n### Enable IAM authentication\n\nEnabling IAM authentication doesn't degrade steady state\nperformance. However, it does affect the rate that you can establish a\nconnection.\n\nEnabling IAM authentication throttles the rate of client\nconnections that are established every second. This is because Google Cloud's\nIAM authentication must authenticate each new connection. In\nsteady state, an application enables connection pools so this impact is\nnegligible. However, when client applications are refreshed through deployments\nor bounce processing, there might be an influx of connections established again.\nIf you update your clients gradually and you implement exponential backoffs,\nthen you can absorb this reduced rate.\n\nTo view a code sample of how to use IAM authentication, see\n[IAM authentication and in-transit encryption code sample](/memorystore/docs/cluster/client-library-connection#iam-auth-in-transit-encryption).\n\nSecurity and privacy\n--------------------\n\nIAM authentication helps you ensure that your Redis cluster is\nonly accessible by authorized IAM principals. TLS encryption is\nnot provided unless [In Transit Encryption](/memorystore/docs/cluster/about-in-transit-encryption)\nenabled. For this reason, it is recommended that In Transit Encryption\nbe turned on when using IAM authentication.\n\nConnect with a Compute Engine VM\n--------------------------------\n\nIf you are using a Compute Engine VM to [Connect to an instance that uses IAM authentication](/memorystore/docs/cluster/manage-iam-auth#connect_to_an_instance_that_uses_iam_authentication) you must enable the following access scopes and APIs for your project:\n\n- **Cloud Platform API scope** . For instructions on enabling this scope, see [Attach the service account and update the access scope](/compute/docs/instances/change-service-account#changeserviceaccountandscopes). For a description of best practices for this access scope, see [Scopes best practice](/compute/docs/access/service-accounts#scopes_best_practice).\n\n- **Memorystore for Redis Cluster API** . For a link to enable the API, click the following button:\n\n [Memorystore for Redis Cluster](https://console.cloud.google.com/apis/library/redis.googleapis.com)"]]