Skip to content

Add support for Authentication in driver for Sqlserver.php #17942

@metford

Description

@metford

Description

Adding Authentication to the datasource config for SQL Server DSN in

/cakephp/src/Database/Driver/Sqlserver.php

e.g.
$dsn = "sqlsrv:Server={$config['host']}{$port};Database={$config['database']};MultipleActiveResultSets=false;Authentication={$config['authentication']}";

This would potentially enable alternative connection strings to include system managed identities and so on:

https://learn.microsoft.com/en-us/sql/connect/php/azure-active-directory?view=sql-server-ver15

Valid values include:

  • SqlPassword
  • ActiveDirectoryPassword
  • ActiveDirectoryMsi
  • ActiveDirectoryServicePrincipal

Only really affects applications hosted within Azure so possibly limited benefit; but potentially increased security.

CakePHP Version

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions