Add file URI config support for database PASSWD field. #14705

Open
opened 2025-11-02 11:20:42 -06:00 by GiteaMirror · 0 comments
Owner

Originally created by @ksjdragon on GitHub (Jul 4, 2025).

Feature Description

Essentially identical to #25034, it may be good to add support since a database password can sometimes be treated as a secret injected through docker or otherwise.

In other words, PASSWD_URI should be an available configuration option. Based on the pull request #25408 (relevant portion in image) which solved it, I'm assuming it is as simple as adding this before line 67:

Database.Passwd = loadSecret(rootCfg.Section("database"), PASSWD_URI", "PASSWD")
in gitea/modules/setting/database.go

Screenshots

Image
Originally created by @ksjdragon on GitHub (Jul 4, 2025). ### Feature Description Essentially identical to #25034, it may be good to add support since a database password can sometimes be treated as a secret injected through docker or otherwise. In other words, PASSWD_URI should be an available configuration option. Based on the pull request #25408 (relevant portion in image) which solved it, I'm assuming it is as simple as adding this before line 67: `Database.Passwd = loadSecret(rootCfg.Section("database"), PASSWD_URI", "PASSWD")` in [gitea/modules/setting/database.go](https://github.com/go-gitea/gitea/blob/main/modules/setting/database.go) ### Screenshots <img width="765" height="74" alt="Image" src="https://github.com/user-attachments/assets/2d6936f3-224c-4cba-bd35-8597392817ce" />
GiteaMirror added the type/proposal label 2025-11-02 11:20:42 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#14705