Skip to content

added CredentialProvider#308

Open
kratkyzobak wants to merge 25 commits intonette:masterfrom
kratkyzobak:credential-provider
Open

added CredentialProvider#308
kratkyzobak wants to merge 25 commits intonette:masterfrom
kratkyzobak:credential-provider

Conversation

@kratkyzobak
Copy link

Adds support for dynamic passwords in connection level. Dynamic passwords are supported in various Cloud SQL solutions (Google Cloud SQL, Azure Database For MySQL etc). Usually works as OIDC tokens, which are considered more secure since their short time expiration. "Negative" consequence of short time expiration are lazy instances with statically set password in long running jobs. Password can expire before connection is initialized.

We used "hack" to change password by reflection, but since 3.2.2 is password readonly property, there is no other "simple" solution.
Other solutions mentioned in issue 229 are hard to write in legacy code. This PR uses non-BC way to improve security (by removing static passwords) for legacy codes with simple solution.

PR does not anyhow propose, how should anyone obtain token as it is highly dependent on environment. So password now can be either string (as usuall) or Nette\Database\CredentialProvider interface.

@kratkyzobak kratkyzobak force-pushed the credential-provider branch 4 times, most recently from 5dad961 to 2fc38e1 Compare June 14, 2024 07:43
@kratkyzobak kratkyzobak force-pushed the credential-provider branch from 2fc38e1 to 9bf1d51 Compare June 14, 2024 08:07
@dg dg force-pushed the master branch 26 times, most recently from 0c81232 to cd9e82d Compare August 19, 2024 18:20
@dg dg force-pushed the master branch 4 times, most recently from 166a2cf to 374653b Compare August 27, 2024 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants