mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-15 20:38:00 +00:00
7caa43ab23
# Which Problems Are Solved The action v2 messages were didn't contain anything providing security for the sent content. # How the Problems Are Solved Each Target now has a SigningKey, which can also be newly generated through the API and returned at creation and through the Get-Endpoints. There is now a HTTP header "Zitadel-Signature", which is generated with the SigningKey and Payload, and also contains a timestamp to check with a tolerance if the message took to long to sent. # Additional Changes The functionality to create and check the signature is provided in the pkg/actions package, and can be reused in the SDK. # Additional Context Closes #7924 --------- Co-authored-by: Livio Spring <livio.a@gmail.com>
34 lines
885 B
Go
34 lines
885 B
Go
package domain
|
|
|
|
//go:generate enumer -type SecretGeneratorType -transform snake -trimprefix SecretGeneratorType
|
|
type SecretGeneratorType int32
|
|
|
|
const (
|
|
SecretGeneratorTypeUnspecified SecretGeneratorType = iota
|
|
SecretGeneratorTypeInitCode
|
|
SecretGeneratorTypeVerifyEmailCode
|
|
SecretGeneratorTypeVerifyPhoneCode
|
|
SecretGeneratorTypeVerifyDomain
|
|
SecretGeneratorTypePasswordResetCode
|
|
SecretGeneratorTypePasswordlessInitCode
|
|
SecretGeneratorTypeAppSecret
|
|
SecretGeneratorTypeOTPSMS
|
|
SecretGeneratorTypeOTPEmail
|
|
SecretGeneratorTypeInviteCode
|
|
SecretGeneratorTypeSigningKey
|
|
|
|
secretGeneratorTypeCount
|
|
)
|
|
|
|
func (t SecretGeneratorType) Valid() bool {
|
|
return t > SecretGeneratorTypeUnspecified && t < secretGeneratorTypeCount
|
|
}
|
|
|
|
type SecretGeneratorState int32
|
|
|
|
const (
|
|
SecretGeneratorStateUnspecified SecretGeneratorState = iota
|
|
SecretGeneratorStateActive
|
|
SecretGeneratorStateRemoved
|
|
)
|