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

@@ -63,7 +63,7 @@ func (wm *OrgOAuthIDPWriteModel) NewChangedEvent(
name,
clientID,
clientSecretString string,
secretCrypto crypto.Crypto,
secretCrypto crypto.EncryptionAlgorithm,
authorizationEndpoint,
tokenEndpoint,
userEndpoint,
@@ -173,7 +173,7 @@ func (wm *OrgOIDCIDPWriteModel) NewChangedEvent(
issuer,
clientID,
clientSecretString string,
secretCrypto crypto.Crypto,
secretCrypto crypto.EncryptionAlgorithm,
scopes []string,
idTokenMapping bool,
options idp.Options,
@@ -350,7 +350,7 @@ func (wm *OrgAzureADIDPWriteModel) NewChangedEvent(
name,
clientID,
clientSecretString string,
secretCrypto crypto.Crypto,
secretCrypto crypto.EncryptionAlgorithm,
scopes []string,
tenant string,
isEmailVerified bool,
@@ -426,7 +426,7 @@ func (wm *OrgGitHubIDPWriteModel) NewChangedEvent(
name,
clientID,
clientSecretString string,
secretCrypto crypto.Crypto,
secretCrypto crypto.EncryptionAlgorithm,
scopes []string,
options idp.Options,
) (*org.GitHubIDPChangedEvent, error) {
@@ -492,7 +492,7 @@ func (wm *OrgGitHubEnterpriseIDPWriteModel) NewChangedEvent(
name,
clientID string,
clientSecretString string,
secretCrypto crypto.Crypto,
secretCrypto crypto.EncryptionAlgorithm,
authorizationEndpoint,
tokenEndpoint,
userEndpoint string,
@@ -571,7 +571,7 @@ func (wm *OrgGitLabIDPWriteModel) NewChangedEvent(
name,
clientID,
clientSecretString string,
secretCrypto crypto.Crypto,
secretCrypto crypto.EncryptionAlgorithm,
scopes []string,
options idp.Options,
) (*org.GitLabIDPChangedEvent, error) {
@@ -637,7 +637,7 @@ func (wm *OrgGitLabSelfHostedIDPWriteModel) NewChangedEvent(
issuer,
clientID string,
clientSecretString string,
secretCrypto crypto.Crypto,
secretCrypto crypto.EncryptionAlgorithm,
scopes []string,
options idp.Options,
) (*org.GitLabSelfHostedIDPChangedEvent, error) {
@@ -705,7 +705,7 @@ func (wm *OrgGoogleIDPWriteModel) NewChangedEvent(
name,
clientID,
clientSecretString string,
secretCrypto crypto.Crypto,
secretCrypto crypto.EncryptionAlgorithm,
scopes []string,
options idp.Options,
) (*org.GoogleIDPChangedEvent, error) {
@@ -777,7 +777,7 @@ func (wm *OrgLDAPIDPWriteModel) NewChangedEvent(
userObjectClasses []string,
userFilters []string,
timeout time.Duration,
secretCrypto crypto.Crypto,
secretCrypto crypto.EncryptionAlgorithm,
attributes idp.LDAPAttributes,
options idp.Options,
) (*org.LDAPIDPChangedEvent, error) {
@@ -858,7 +858,7 @@ func (wm *OrgAppleIDPWriteModel) NewChangedEvent(
teamID,
keyID string,
privateKey []byte,
secretCrypto crypto.Crypto,
secretCrypto crypto.EncryptionAlgorithm,
scopes []string,
options idp.Options,
) (*org.AppleIDPChangedEvent, error) {
@@ -924,7 +924,7 @@ func (wm *OrgSAMLIDPWriteModel) NewChangedEvent(
metadata,
key,
certificate []byte,
secretCrypto crypto.Crypto,
secretCrypto crypto.EncryptionAlgorithm,
binding string,
withSignedRequest bool,
options idp.Options,