1
1
mirror of https://github.com/go-gitea/gitea synced 2025-09-28 03:28:13 +00:00

Add simple master key provider for secret encryption

This commit is contained in:
Lauris BH
2021-01-05 17:46:37 +02:00
committed by Jason Song
parent 9647989d99
commit d4e84c0433
12 changed files with 326 additions and 0 deletions

View File

@@ -14,6 +14,7 @@ import (
"code.gitea.io/gitea/modules/setting"
"code.gitea.io/gitea/modules/structs"
"code.gitea.io/gitea/modules/web/middleware"
"code.gitea.io/gitea/services/secrets"
"gitea.com/go-chi/binding"
)
@@ -64,6 +65,7 @@ type InstallForm struct {
NoReplyAddress string
PasswordAlgorithm string
MasterKeyProvider secrets.MasterKeyProviderType `binding:"Required;In(none,plain)"`
AdminName string `binding:"OmitEmpty;Username;MaxSize(30)" locale:"install.admin_name"`
AdminPasswd string `binding:"OmitEmpty;MaxSize(255)" locale:"install.admin_password"`