You manage an Azure SQL Database named SalesDB that is used by a sales application. The application connects using a SQL login named 'sales_user' with a password. Recently, the security team discovered that 'sales_user' has been compromised. They have reset the password in Azure SQL Database. However, the application continues to connect successfully using the old credentials. You suspect the application might be caching the password. The security team wants to immediately revoke access for the compromised login and ensure that only a new login with a complex password is used. You also want to minimize downtime. What should you do first?
Trap 1: Revoke the CONNECT permission from 'sales_user' using REVOKE…
Incorrect. REVOKE CONNECT is a database-level permission and cannot be applied to a server login. This command would fail or have no effect on the login's ability to connect.
Trap 2: Change the password again and ensure the application is restarted…
Incorrect. Changing the password again does not terminate existing active sessions, and the application may continue to use cached old credentials until the connection pool is refreshed or restarted, causing delay.
Trap 3: Enable auditing to monitor future logins and leave the login as is.
Incorrect. Auditing only records events; it does not revoke access. The compromised login remains active.
- A
Revoke the CONNECT permission from 'sales_user' using REVOKE CONNECT FROM sales_user; then create a new login and update the application connection string.
Why wrong: Incorrect. REVOKE CONNECT is a database-level permission and cannot be applied to a server login. This command would fail or have no effect on the login's ability to connect.
- B
Change the password again and ensure the application is restarted to clear the cache.
Why wrong: Incorrect. Changing the password again does not terminate existing active sessions, and the application may continue to use cached old credentials until the connection pool is refreshed or restarted, causing delay.
- C
Enable auditing to monitor future logins and leave the login as is.
Why wrong: Incorrect. Auditing only records events; it does not revoke access. The compromised login remains active.
- D
Drop the 'sales_user' login using DROP LOGIN sales_user; then create a new login and update the application.
Correct. Dropping the login immediately removes the compromised credential, terminates existing connections, and prevents new connections. It allows creation of a new login and minimizes downtime.