mirror of
https://github.com/portainer/portainer.git
synced 2025-08-05 05:45:22 +02:00
feat(api): support AGENT_SECRET environment variable (#2486)
This commit is contained in:
parent
fe8dfee69a
commit
d03fd5805a
7 changed files with 28 additions and 9 deletions
|
@ -2,6 +2,7 @@ package main // import "github.com/portainer/portainer"
|
|||
|
||||
import (
|
||||
"encoding/json"
|
||||
"os"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
|
@ -88,7 +89,7 @@ func initJWTService(authenticationEnabled bool) portainer.JWTService {
|
|||
}
|
||||
|
||||
func initDigitalSignatureService() portainer.DigitalSignatureService {
|
||||
return &crypto.ECDSAService{}
|
||||
return crypto.NewECDSAService(os.Getenv("AGENT_SECRET"))
|
||||
}
|
||||
|
||||
func initCryptoService() portainer.CryptoService {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue