Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
19c34bd1
Commit
19c34bd1
authored
May 13, 2020
by
Chuck Schweizer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update to set default CipherSuites
The default CipherSuites need to be set to disable the insecure TLS 1.2 TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 Cipher
parent
689c2726
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
4 deletions
+15
-4
server.go
pkg/cli/server/server.go
+15
-4
No files found.
pkg/cli/server/server.go
View file @
19c34bd1
...
@@ -190,13 +190,24 @@ func run(app *cli.Context, cfg *cmds.Server) error {
...
@@ -190,13 +190,24 @@ func run(app *cli.Context, cfg *cmds.Server) error {
return
errors
.
Wrapf
(
err
,
"Invalid TLS Version %s: %v"
,
TLSMinVersion
,
err
)
return
errors
.
Wrapf
(
err
,
"Invalid TLS Version %s: %v"
,
TLSMinVersion
,
err
)
}
}
// TLS config based on mozilla ssl-config generator
// https://ssl-config.mozilla.org/#server=golang&version=1.13.6&config=intermediate&guideline=5.4
// Need to disable the TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 Cipher for TLS1.2
TLSCipherSuites
:=
[]
string
{
getArgValueFromList
(
"tls-cipher-suites"
,
cfg
.
ExtraAPIArgs
)}
TLSCipherSuites
:=
[]
string
{
getArgValueFromList
(
"tls-cipher-suites"
,
cfg
.
ExtraAPIArgs
)}
if
len
(
TLSCipherSuites
)
!=
0
&&
TLSCipherSuites
[
0
]
!=
""
{
if
len
(
TLSCipherSuites
)
==
0
||
TLSCipherSuites
[
0
]
==
""
{
serverConfig
.
ControlConfig
.
TLSCipherSuites
,
err
=
kubeapiserverflag
.
TLSCipherSuites
(
TLSCipherSuites
)
TLSCipherSuites
=
[]
string
{
if
err
!=
nil
{
"TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384"
,
return
errors
.
Wrapf
(
err
,
"Invalid TLS Cipher Suites %s: %v"
,
TLSCipherSuites
,
err
)
"TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384"
,
"TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256"
,
"TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256"
,
"TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305"
,
"TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305"
,
}
}
}
}
serverConfig
.
ControlConfig
.
TLSCipherSuites
,
err
=
kubeapiserverflag
.
TLSCipherSuites
(
TLSCipherSuites
)
if
err
!=
nil
{
return
errors
.
Wrapf
(
err
,
"Invalid TLS Cipher Suites %s: %v"
,
TLSCipherSuites
,
err
)
}
logrus
.
Info
(
"Starting k3s "
,
app
.
App
.
Version
)
logrus
.
Info
(
"Starting k3s "
,
app
.
App
.
Version
)
notifySocket
:=
os
.
Getenv
(
"NOTIFY_SOCKET"
)
notifySocket
:=
os
.
Getenv
(
"NOTIFY_SOCKET"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment