[GH-ISSUE #3257] [Feature Request] env var secrets (certs) #2608

Closed
opened 2026-05-05 13:40:57 -06:00 by gitea-mirror · 2 comments
Owner

Originally created by @jamesla on GitHub (Jan 17, 2023).
Original GitHub issue: https://github.com/fatedier/frp/issues/3257

Describe the feature request

I am wanting to provide a certificate to FRP via an environment variable rather than a path to a file that exists on disk. This has multiple benefits such as:

a) the cert sits in memory rather than on the disk which is protected against various file system attacks.
b) makes containerisation much easier since you don't have to deal with container state (volumes)

Instead of:

export CERT=/tmp/mycert.crt
export DASHBOARD_USER=user
export DASHBOARD_PASS=pass
export PORT=2000

./frps

I would like to do something like this:

export CERT=-----BEGIN CERTIFICATE-----
MIIDazCCAlOgAwIBAgIUetgifRZPmdu1KTF/4XQVgpvjyiIwDQYJKoZIhvcNAQEL
BQAwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoM
GEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDAeFw0yMzAxMTcyMTU4NTFaFw0yNDAx
MTcyMTU4NTFaMEUxCzAJBgNVBAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEw
HwYDVQQKDBhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQwggEiMA0GCSqGSIb3DQEB
AQUAA4IBDwAwggEKAoIBAQCychzox8DHBXznMCwcvhe0cOPKNfAZW3cD3vnN8EZn
lEEIwXminnWZ2ZyCUhORszzrq6t7p/I8WnGEXtBtvvfgFlXvaK4T6lIhBbapsLc1
UOkYz/cz+hrekXKtOFin4kTlkLhIL15MzH6hadXkuHL7TPy6HDQKetKYDcBdN8jn
ZxynQgae4Jt2AuyvE3O0TqySDoEhN9jzJmLjWZ5M3AJOMQqXoLoYFHEJZonWo+Y4
Jcas4EktUlZC2Y7XOAr/s3AQL5iZQGUqensICf00LFIP7LyMZ+PghGfukvP+NQRB
FEruYn55Ih0MyynaYSbvVr/04Wtmzpo3cG1FhGVrM1vvAgMBAAGjUzBRMB0GA1Ud
DgQWBBRA7o4by1mpPEM9rSi8qTbc04LT7DAfBgNVHSMEGDAWgBRA7o4by1mpPEM9
rSi8qTbc04LT7DAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQCD
Raj5lv8y4fmbupH71CCWm0DfqYyiYuEqJahhUYCeuzmP6Ug6zLzIQMBqBRgnYwub
K4SSsj/CqUfpapZFrUlyhQCzVwPMDNM55ybJWqz4SaT06Y6aHNZOnoARgieidDgt
LF3dQgBQHgqtyED5jKP26QKPov1kRE6Rmse1dW0X5Xhal1pnVg6y7ILps9qGRiYP
j+i8irPiY6eDG4/4ikyQh2igg6Vbkwgao4ILW57qoZbUAN43CKct+lg51IE0CXpo
7hs6yIyzM+FdkhQixw99184m1cBN0t0s2O9m/uFhEllfohiVOeUn5KMX9saEZ/pQ
O3Kwde9V1JLqpueJvPib
-----END CERTIFICATE-----
export DASHBOARD_USER=user
export DASHBOARD_PASS=pass
export PORT=2000

./frps

Is this possible with FRPs current configuration options?

Describe alternatives you've considered

No response

Affected area

  • Docs
  • Installation
  • Performance and Scalability
  • Security
  • User Experience
  • Test and Release
  • Developer Infrastructure
  • Client Plugin
  • Server Plugin
  • Extensions
  • Others
Originally created by @jamesla on GitHub (Jan 17, 2023). Original GitHub issue: https://github.com/fatedier/frp/issues/3257 ### Describe the feature request I am wanting to provide a certificate to FRP via an environment variable rather than a path to a file that exists on disk. This has multiple benefits such as: a) the cert sits in memory rather than on the disk which is protected against various file system attacks. b) makes containerisation much easier since you don't have to deal with container state (volumes) Instead of: ```bash export CERT=/tmp/mycert.crt export DASHBOARD_USER=user export DASHBOARD_PASS=pass export PORT=2000 ./frps ``` I would like to do something like this: ```bash export CERT=-----BEGIN CERTIFICATE----- MIIDazCCAlOgAwIBAgIUetgifRZPmdu1KTF/4XQVgpvjyiIwDQYJKoZIhvcNAQEL BQAwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoM GE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ARD_PASS=pass export PORT=2000 ./frps ``` Is this possible with FRPs current configuration options? ### Describe alternatives you've considered _No response_ ### Affected area - [ ] Docs - [ ] Installation - [ ] Performance and Scalability - [ ] Security - [ ] User Experience - [ ] Test and Release - [ ] Developer Infrastructure - [ ] Client Plugin - [ ] Server Plugin - [ ] Extensions - [ ] Others
gitea-mirror 2026-05-05 13:40:57 -06:00
Author
Owner

@fatedier commented on GitHub (Jan 18, 2023):

Are there other projects that do like this?

<!-- gh-comment-id:1386392954 --> @fatedier commented on GitHub (Jan 18, 2023): Are there other projects that do like this?
Author
Owner

@github-actions[bot] commented on GitHub (Feb 18, 2023):

Issues go stale after 30d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.

<!-- gh-comment-id:1435423489 --> @github-actions[bot] commented on GitHub (Feb 18, 2023): Issues go stale after 30d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/frp#2608
No description provided.