IAM 데이터베이스 인증이 더 안전하고 안정적이지만 기본 제공되는 인증 또는 두 가지 인증 유형이 모두 포함된 하이브리드 인증 모델을 사용하는 것이 좋습니다.
특정 사용자 또는 애플리케이션이 데이터베이스에 액세스할 수 있도록 데이터베이스 내에서 로컬로 로컬 데이터베이스 사용자를 만들고 관리합니다. 이러한 데이터베이스 사용자는 데이터베이스에서 만든 객체를 소유합니다. Cloud SQL은 기본 제공되는 안전한 비밀번호 시행을 제공합니다. 비밀번호 정책을 통해 이러한 시행을 정의하고 사용 설정할 수 있습니다.
[[["이해하기 쉬움","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-08-13(UTC)"],[],[],null,["# Cloud SQL built-in database authentication\n\n\u003cbr /\u003e\n\n[MySQL](/sql/docs/mysql/built-in-authentication \"View this page for the MySQL database engine\") \\| PostgreSQL \\| SQL Server\n\n\u003cbr /\u003e\n\nThis page describes how built-in authentication works on Cloud SQL instances\nand how database administrators can set password policies for local database users.\n\nIntroduction\n------------\n\nAuthentication is the process of verifying the identity of a user who is\nattempting to access an instance. Cloud SQL uses the following types of\nauthentication for database users:\n\n- The database's built-in authentication uses a username and a password to authenticate local database users. The current page describes this type of authentication.\n- IAM database authentication uses IAM to authenticate a user. For more information, see [Overview of Cloud SQL IAM database authentication](/sql/docs/postgres/authentication).\n\nAlthough IAM database authentication is more secure and reliable, you might prefer to use\nbuilt-in authentication or a hybrid authentication model that includes\nboth authentication types.\n\nYou might create and manage local database users locally within a database to\nallow specific persons or applications to access a database. Such database users\nown the objects they create in the database. Cloud SQL offers strong\nbuilt-in password enforcement. You can define and enable such enforcement\nthrough password policies.\n| **Note:** Password policies don't apply to hashed passwords.\n\nInstance password policies\n--------------------------\n\nYou can set a password policy at the instance level when\nyou [create an instance](/sql/docs/postgres/create-instance).\n\nA password policy for an instance can include the following options:\n\n- **Minimum length**: specify the minimum number of characters that the password must have.\n- **Password complexity**: check if the password is a combination of lowercase, uppercase, numeric, and non-alphanumeric characters.\n- **Restrict password reuse**: specify the number of previous passwords that you can't reuse.\n- **Disallow username**: prevent the use of the username in the password.\n- **Set password change interval**: specify the minimum duration after which you can change the password.\n\n\u003cbr /\u003e\n\nYou need to explicitly enable a password policy at the instance level. You can\nmodify it later by [editing the instance](/sql/docs/postgres/edit-instance).\n| **Note:** When you enable a password policy, due to password policy verification, statements that create users or change user passwords cause additional latency usually spanning less than 200ms.\n\nUser password policies\n----------------------\n\nWhile [creating a user](/sql/docs/postgres/create-manage-users#creating),\nyou can set the following password usage restrictions:\n\n- **Set password to expire**: specify the number of days after which the password expires and you need to create a new one.\n- **Lock after failed attempts**: specify the number of times that you can try the password incorrectly before the account is locked.\n\nYou can also modify user password policies.\n\nThe status of a user, indicating whether their password has expired or they're\nlocked out, is visible when you [list the users](/sql/docs/postgres/create-manage-users#list_users)\nof the instance. You can unlock users and change the password from the Users page.\n\nCloud SQL built-in authentication for read replicas\n---------------------------------------------------\n\nYou manage password policies for replicas on the primary instance.\nYou can't separately modify password policies for read replicas.\n\nWhen you promote an instance, you need to re-enable the instance password policy,\nalong with the policy options.\n\nWhat's next\n-----------\n\n- [Create an instance and set the password policy](/sql/docs/postgres/create-instance).\n- [Create users with built-in authentication](/sql/docs/postgres/create-manage-users)."]]