Skip to content

Commit

Permalink
Remove display of SK in logs, disable hypervisor TLS by default.
Browse files Browse the repository at this point in the history
  • Loading branch information
志宇 committed Apr 9, 2020
1 parent 9f1f937 commit 9a3436e
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 7 deletions.
2 changes: 1 addition & 1 deletion cmd/skyconf/skyconf.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func tempFile() (*os.File, error) {
return nil, err
}
name := filepath.Join(os.TempDir(), fmt.Sprintf("skyconf-%d-%d.log", os.Getpid(), time.Now().Unix()))
return os.OpenFile(name, os.O_WRONLY|os.O_CREATE, 0644)
return os.OpenFile(name, os.O_WRONLY|os.O_CREATE, 0644) //nolint:gosec
}

func makeLogger() (*log.Logger, *os.File) {
Expand Down
2 changes: 2 additions & 0 deletions cmd/skyimager-gui/assets/.idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions cmd/skyimager-gui/assets/.idea/assets.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions cmd/skyimager-gui/assets/.idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions cmd/skyimager-gui/assets/.idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions cmd/skyimager-gui/assets/.idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions pkg/boot/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,10 @@ func (bp Params) PrintEnvs(w io.Writer) error {
if err := PrintEnv(w, LocalPKENV, pk.String()); err != nil {
return err
}
if err := PrintEnv(w, LocalSKENV, bp.LocalSK.String()); err != nil {
return err
}
// TODO(evanlinjin): We may need to re-enable this in the future.
//if err := PrintEnv(w, LocalSKENV, bp.LocalSK.String()); err != nil {
// return err
//}
}
if len(bp.HypervisorPKs) > 0 {
list := "("
Expand Down
5 changes: 2 additions & 3 deletions pkg/prepconf/prepare.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func Prepare(logger *log.Logger, conf Config, bp boot.Params) error {
ensureExists := func(name string, genConfig genFn) error {
//// Do nothing if file exists.
if _, err := os.Stat(name); err == nil {
conf, err := ioutil.ReadFile(name)
conf, err := ioutil.ReadFile(name) //nolint:gosec
if err == nil {
logger.Printf("Contents of %q: %q", name, string(conf))
}
Expand Down Expand Up @@ -171,8 +171,7 @@ func generateHypervisorConfig(conf Config, bp boot.Params) (interface{}, error)
out.DmsgDiscovery = skyenv.DefaultDmsgDiscAddr
out.DmsgPort = skyenv.DmsgHypervisorPort
out.HTTPAddr = ":8000"
out.EnableTLS = true
// TODO(evanlinjin): Pass filenames as cli args in 'skyconf'.
out.EnableTLS = false // TODO(evanlinjin): TLS is disabled due to a bug in the skyminer Router.
out.TLSCertFile = conf.TLSCert
out.TLSKeyFile = conf.TLSKey
err = GenCert(out.TLSCertFile, out.TLSKeyFile)
Expand Down

0 comments on commit 9a3436e

Please sign in to comment.