mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Secrets storage with SecretKey encrypted (#22142)
Fork of #14483, but [gave up MasterKey](https://github.com/go-gitea/gitea/pull/14483#issuecomment-1350728557), and fixed some problems. Close #12065. Needed by #13539. Featrues: - Secrets for repo and org, not user yet. - Use SecretKey to encrypte/encrypt secrets. - Trim spaces of secret value. - Add a new locale ini block, to make it easy to support secrets for user. Snapshots: Repo level secrets:  Rrg level secrets  Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
This commit is contained in:
@@ -774,6 +774,12 @@ func RegisterRoutes(m *web.Route) {
|
||||
m.Post("/initialize", web.Bind(forms.InitializeLabelsForm{}), org.InitializeLabels)
|
||||
})
|
||||
|
||||
m.Group("/secrets", func() {
|
||||
m.Get("", org.Secrets)
|
||||
m.Post("", web.Bind(forms.AddSecretForm{}), org.SecretsPost)
|
||||
m.Post("/delete", org.SecretsDelete)
|
||||
})
|
||||
|
||||
m.Route("/delete", "GET,POST", org.SettingsDelete)
|
||||
|
||||
m.Group("/packages", func() {
|
||||
@@ -912,6 +918,10 @@ func RegisterRoutes(m *web.Route) {
|
||||
m.Combo("").Get(repo.DeployKeys).
|
||||
Post(web.Bind(forms.AddKeyForm{}), repo.DeployKeysPost)
|
||||
m.Post("/delete", repo.DeleteDeployKey)
|
||||
m.Group("/secrets", func() {
|
||||
m.Post("", web.Bind(forms.AddSecretForm{}), repo.SecretsPost)
|
||||
m.Post("/delete", repo.DeleteSecret)
|
||||
})
|
||||
})
|
||||
|
||||
m.Group("/lfs", func() {
|
||||
|
Reference in New Issue
Block a user