Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warn if dashboard uses auto generated keys #21

Merged
merged 1 commit into from
Mar 3, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ func main() {
autoscalerImage := ""
autoscalerReplicas := 0
dashboardImage := ""
dashboardJWTSecret := false

directFunctions := false
probeFunctions := false
Expand Down Expand Up @@ -368,6 +369,12 @@ func main() {
for _, container := range dep.Spec.Template.Spec.Containers {
if container.Name == "dashboard" {
dashboardImage = container.Image

for _, volumeMount := range container.VolumeMounts {
if volumeMount.Name == "dashboard-jwt" {
dashboardJWTSecret = true
}
}
}
}
}
Expand Down Expand Up @@ -580,6 +587,10 @@ Features detected:
fmt.Printf("⚠️ Non-root flag is not set for the controller/operator\n")
}

if len(dashboardImage) > 0 && dashboardJWTSecret == false {
fmt.Printf("⚠️ Dashboard uses auto generated signing keys: https://docs.openfaas.com/openfaas-pro/dashboard/#create-a-signing-key \n")
}

for _, namespace := range functionNamespaces {
functions, ok := nsFunctions[namespace]
if ok {
Expand Down