security-configmap.yaml 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. {{- if .Values.global.enableSecurity }}
  2. apiVersion: v1
  3. kind: ConfigMap
  4. metadata:
  5. name: {{ template "seaweedfs.name" . }}-security-config
  6. namespace: {{ .Release.Namespace }}
  7. labels:
  8. app: {{ template "seaweedfs.name" . }}
  9. chart: {{ template "seaweedfs.chart" . }}
  10. heritage: {{ .Release.Service }}
  11. release: {{ .Release.Name }}
  12. data:
  13. security.toml: |-
  14. # this file is read by master, volume server, and filer
  15. # the jwt signing key is read by master and volume server
  16. # a jwt expires in 10 seconds
  17. [jwt.signing]
  18. key = "{{ randAlphaNum 10 | b64enc }}"
  19. # all grpc tls authentications are mutual
  20. # the values for the following ca, cert, and key are paths to the PERM files.
  21. [grpc]
  22. ca = "/usr/local/share/ca-certificates/ca/tls.crt"
  23. [grpc.volume]
  24. cert = "/usr/local/share/ca-certificates/volume/tls.crt"
  25. key = "/usr/local/share/ca-certificates/volume/tls.key"
  26. [grpc.master]
  27. cert = "/usr/local/share/ca-certificates/master/tls.crt"
  28. key = "/usr/local/share/ca-certificates/master/tls.key"
  29. [grpc.filer]
  30. cert = "/usr/local/share/ca-certificates/filer/tls.crt"
  31. key = "/usr/local/share/ca-certificates/filer/tls.key"
  32. # use this for any place needs a grpc client
  33. # i.e., "weed backup|benchmark|filer.copy|filer.replicate|mount|s3|upload"
  34. [grpc.client]
  35. cert = "/usr/local/share/ca-certificates/client/tls.crt"
  36. key = "/usr/local/share/ca-certificates/client/tls.key"
  37. # volume server https options
  38. # Note: work in progress!
  39. # this does not work with other clients, e.g., "weed filer|mount" etc, yet.
  40. [https.client]
  41. enabled = false
  42. [https.volume]
  43. cert = ""
  44. key = ""
  45. {{- end }}