Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Questa pagina fornisce istruzioni sulle attività comuni per la funzionalità Redis AUTH su Memorystore for Redis. Per informazioni dettagliate su cosa offre la funzionalità AUTH, consulta la Panoramica della funzionalità AUTH.
Per un elenco delle autorizzazioni di cui un utente ha bisogno per eseguire le attività AUTH in questa pagina, consulta Autorizzazioni Redis AUTH.
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Difficile da capire","hardToUnderstand","thumb-down"],["Informazioni o codice di esempio errati","incorrectInformationOrSampleCode","thumb-down"],["Mancano le informazioni o gli esempi di cui ho bisogno","missingTheInformationSamplesINeed","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 2025-09-05 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)."]]