feat(crypto): use passwap for machine and app secrets (#7657)

* feat(crypto): use passwap for machine and app secrets

* fix command package tests

* add hash generator command test

* naming convention, fix query tests

* rename PasswordHasher and cleanup start commands

* add reducer tests

* fix intergration tests, cleanup old config

* add app secret unit tests

* solve setup panics

* fix push of updated events

* add missing event translations

* update documentation

* solve linter errors

* remove nolint:SA1019 as it doesn't seem to help anyway

* add nolint to deprecated filter usage

* update users migration version

* remove unused ClientSecret from APIConfigChangedEvent

---------

Co-authored-by: Livio Spring <livio.a@gmail.com>
This commit is contained in:
Tim Möhlmann
2024-04-05 12:35:49 +03:00
committed by GitHub
parent 5931fb8f28
commit 2089992d75
135 changed files with 2407 additions and 1779 deletions

View File

@@ -108,7 +108,7 @@ func (wm *OAuthIDPWriteModel) NewChanges(
name,
clientID,
clientSecretString string,
secretCrypto crypto.Crypto,
secretCrypto crypto.EncryptionAlgorithm,
authorizationEndpoint,
tokenEndpoint,
userEndpoint,
@@ -278,7 +278,7 @@ func (wm *OIDCIDPWriteModel) NewChanges(
issuer,
clientID,
clientSecretString string,
secretCrypto crypto.Crypto,
secretCrypto crypto.EncryptionAlgorithm,
scopes []string,
idTokenMapping bool,
options idp.Options,
@@ -636,7 +636,7 @@ func (wm *AzureADIDPWriteModel) NewChanges(
name string,
clientID string,
clientSecretString string,
secretCrypto crypto.Crypto,
secretCrypto crypto.EncryptionAlgorithm,
scopes []string,
tenant string,
isEmailVerified bool,
@@ -772,7 +772,7 @@ func (wm *GitHubIDPWriteModel) NewChanges(
name,
clientID,
clientSecretString string,
secretCrypto crypto.Crypto,
secretCrypto crypto.EncryptionAlgorithm,
scopes []string,
options idp.Options,
) ([]idp.GitHubIDPChanges, error) {
@@ -904,7 +904,7 @@ func (wm *GitHubEnterpriseIDPWriteModel) NewChanges(
name,
clientID string,
clientSecretString string,
secretCrypto crypto.Crypto,
secretCrypto crypto.EncryptionAlgorithm,
authorizationEndpoint,
tokenEndpoint,
userEndpoint string,
@@ -1037,7 +1037,7 @@ func (wm *GitLabIDPWriteModel) NewChanges(
name,
clientID,
clientSecretString string,
secretCrypto crypto.Crypto,
secretCrypto crypto.EncryptionAlgorithm,
scopes []string,
options idp.Options,
) ([]idp.GitLabIDPChanges, error) {
@@ -1161,7 +1161,7 @@ func (wm *GitLabSelfHostedIDPWriteModel) NewChanges(
issuer string,
clientID string,
clientSecretString string,
secretCrypto crypto.Crypto,
secretCrypto crypto.EncryptionAlgorithm,
scopes []string,
options idp.Options,
) ([]idp.GitLabSelfHostedIDPChanges, error) {
@@ -1285,7 +1285,7 @@ func (wm *GoogleIDPWriteModel) NewChanges(
name string,
clientID string,
clientSecretString string,
secretCrypto crypto.Crypto,
secretCrypto crypto.EncryptionAlgorithm,
scopes []string,
options idp.Options,
) ([]idp.GoogleIDPChanges, error) {
@@ -1460,7 +1460,7 @@ func (wm *LDAPIDPWriteModel) NewChanges(
userObjectClasses []string,
userFilters []string,
timeout time.Duration,
secretCrypto crypto.Crypto,
secretCrypto crypto.EncryptionAlgorithm,
attributes idp.LDAPAttributes,
options idp.Options,
) ([]idp.LDAPIDPChanges, error) {
@@ -1653,7 +1653,7 @@ func (wm *AppleIDPWriteModel) NewChanges(
teamID string,
keyID string,
privateKey []byte,
secretCrypto crypto.Crypto,
secretCrypto crypto.EncryptionAlgorithm,
scopes []string,
options idp.Options,
) ([]idp.AppleIDPChanges, error) {
@@ -1790,7 +1790,7 @@ func (wm *SAMLIDPWriteModel) NewChanges(
metadata,
key,
certificate []byte,
secretCrypto crypto.Crypto,
secretCrypto crypto.EncryptionAlgorithm,
binding string,
withSignedRequest bool,
options idp.Options,