Skip to content
New issue

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

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

Already on GitHub? # to your account

Remove blacklisted FIPS ciphersuites, fix local_auth #3100

Merged
merged 1 commit into from
Oct 23, 2019
Merged
Show file tree
Hide file tree
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
7 changes: 6 additions & 1 deletion lib/auth/methods.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,12 @@ func (s *AuthServer) AuthenticateWebUser(req AuthenticateUserRequest) (services.
if err != nil {
return nil, trace.Wrap(err)
}
if clusterConfig.GetLocalAuth() == false {

// Disable all local auth requests,
// except session ID renewal requests that are using the same method.
// This condition uses Session as a blanket check, because any new method added
// to the local auth will be disabled by default.
if clusterConfig.GetLocalAuth() == false && req.Session == nil {
s.emitNoLocalAuthEvent(req.Username)
return nil, trace.AccessDenied(noLocalAuth)
}
Expand Down
14 changes: 12 additions & 2 deletions lib/defaults/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -525,8 +525,18 @@ const WindowsOpenSSHNamedPipe = `\\.\pipe\openssh-ssh-agent`
var (
// FIPSCipherSuites is a list of supported FIPS compliant TLS cipher suites.
FIPSCipherSuites = []uint16{
tls.TLS_RSA_WITH_AES_128_GCM_SHA256,
tls.TLS_RSA_WITH_AES_256_GCM_SHA384,
//
// These two cipers suites:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cipher

//
// tls.TLS_RSA_WITH_AES_128_GCM_SHA256
// tls.TLS_RSA_WITH_AES_256_GCM_SHA384
//
// although supported by FIPS, are blacklisted in http2 spec:
//
// https://tools.ietf.org/html/rfc7540#appendix-A
//
// therefore we do not include them in this list.
//
tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,
tls.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,
Expand Down
2 changes: 2 additions & 0 deletions lib/web/apiserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,8 @@ func NewHandler(cfg Config, opts ...HandlerOption) (*RewritingHandler, error) {
if err == nil {
session.Session = base64.StdEncoding.EncodeToString(out)
}
} else {
log.WithError(err).Debugf("Could not authenticate.")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't we stipulate that error messages should be in lower case?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not an error message though, it's a debug log entry that is a proper english sentence. Error is a WithError fileld

}
}
httplib.SetIndexHTMLHeaders(w.Header())
Expand Down