Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Halaman ini memberikan petunjuk tentang tugas umum untuk fitur Redis AUTH
di Memorystore for Redis. Untuk mengetahui detail tentang apa yang disediakan fitur AUTH, lihat Ringkasan fitur AUTH.
Untuk mengetahui daftar izin yang diperlukan pengguna guna menjalankan tugas AUTH di halaman ini, lihat Izin Redis AUTH.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-09-04 UTC."],[],[],null,["# Manage Redis AUTH\n\n| **Note:** If you are looking for the Memorystore for Redis Cluster documentation, see [Manage IAM authentication](/memorystore/docs/cluster/manage-iam-auth).\n\nThis page gives instructions on common tasks for the [Redis AUTH](https://redis.io/commands/auth)\nfeature on Memorystore for Redis. For details on what the AUTH feature\nprovides, see [AUTH feature overview](/memorystore/docs/redis/auth-overview).\n\nFor a list of permissions a user needs in order to perform the AUTH tasks on\nthis page, see [Redis AUTH permissions](/memorystore/docs/redis/access-control#redis_authentication_permissions).\n\nCreating a Redis instance with AUTH enabled\n-------------------------------------------\n\n### Console\n\nWhen you [create a Redis instance](/memorystore/docs/redis/create-manage-instances#creating_a_redis_instance_on_a_vpc_network), select\n**Enable AUTH** .\n\n### gcloud\n\nEnter the following command, replacing \u003cvar translate=\"no\"\u003evariables\u003c/var\u003e with appropriate\nvalues: \n\n```\ngcloud redis instances create instance-id --enable-auth --size=size --region=region --zone=zone --redis-version=version\n```\n\nEnabling/disabling AUTH on an existing Redis instance\n-----------------------------------------------------\n\n**Note:** AUTH string credentials are not confidential when transmitted. See [AUTH feature overview](/memorystore/docs/redis/auth-overview) for more details. \n\n### Console\n\n1. Go to the **Memorystore for Redis** page in the Google Cloud console.\n\n [Memorystore for Redis](https://console.cloud.google.com/memorystore/redis/instances?)\n2. View your instance's *Instance details* page by clicking on your *Instance\n ID*.\n\n3. Click the **Edit** button.\n\n4. Find the AUTH section.\n\n - If you want to enable AUTH, select checkbox labeled **Enable\n AUTH**.\n\n - If you want to disable AUTH, deselect the checkbox labeled\n **Enable AUTH**.\n\n5. Click the **Save** button.\n\n### gcloud\n\n1. Enable AUTH for your instance by running the following command,\n replacing \u003cvar translate=\"no\"\u003evariables\u003c/var\u003e with appropriate values:\n\n ```\n gcloud redis instances update instance-id --enable-auth --region=region\n ```\n2. Disable AUTH for your instance by running the following command,\n replacing \u003cvar translate=\"no\"\u003evariables\u003c/var\u003e with appropriate values:\n\n ```\n gcloud redis instances update instance-id --no-enable-auth --region=region\n ```\n\nGetting the AUTH string\n-----------------------\n\n### Console\n\n1. Go to the **Memorystore for Redis** page in the Google Cloud console.\n\n [Memorystore for Redis](https://console.cloud.google.com/memorystore/redis/instances?)\n2. View your instance's *Instance details* page by clicking on your *Instance\n ID*.\n\n3. Find the **AUTH string** value in the **Security** section.\n\n### gcloud\n\n1. Get the AUTH string by copying it from the response body returned by the\n following command:\n\n ```\n gcloud redis instances get-auth-string instance-id --region=region\n ```\n\nChanging the AUTH string\n------------------------\n\nFollow the steps below to change the AUTH string to a new value:\n\n1. Disable AUTH:\n\n ```\n gcloud redis instances update instance-id --no-enable-auth --region=region\n ```\n2. Enable AUTH:\n\n ```\n gcloud redis instances update instance-id --enable-auth --region=region\n ```\n | **Note:** This step interrupts your client's authenticated connection because a new AUTH string is generated, invalidating the previous AUTH string.\n3. Get the new AUTH string:\n\n ```\n gcloud redis instances get-auth-string instance-id --region=region\n ```\n4. In your application, replace the old AUTH string with the new AUTH string\n and reconnect your client.\n\nConnecting to a Redis instance with AUTH\n----------------------------------------\n\nTo use AUTH and `redis-cli` to connect to your instance, see [Connecting to a Redis instance that uses AUTH](/memorystore/docs/redis/connecting-redis-instance#connecting_to_a_redis_instance_that_uses_auth).\n\nWhat's next\n-----------\n\n- View the [AUTH feature overview](/memorystore/docs/redis/auth-overview)."]]