From 3ebb818063d6dfb6183ce79ddea36367dc389e77 Mon Sep 17 00:00:00 2001
From: ale <ale@incal.net>
Date: Mon, 20 Nov 2017 22:12:08 +0000
Subject: [PATCH] Make cookie auth/enc keys strings

Or the yaml module will become confused.
---
 proxy/proxy.go | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/proxy/proxy.go b/proxy/proxy.go
index f7aa72f..09bd2e3 100644
--- a/proxy/proxy.go
+++ b/proxy/proxy.go
@@ -117,9 +117,9 @@ func loadCA(path string) (*x509.CertPool, error) {
 
 // Configuration for the proxy.
 type Configuration struct {
-	SessionAuthKey []byte `yaml:"session_auth_key"`
-	SessionEncKey  []byte `yaml:"session_enc_key"`
-	CA             string `yaml:"ca"`
+	SessionAuthKey string `yaml:"session_auth_key"`
+	SessionEncKey  string `yaml:"session_enc_key"`
+	//CA             string `yaml:"ca"`
 
 	SSOLoginServerURL string `yaml:"sso_server_url"`
 	SSOPublicKeyFile  string `yaml:"sso_public_key_file"`
@@ -165,7 +165,7 @@ func NewProxy(config *Configuration) (http.Handler, error) {
 		return nil, err
 	}
 
-	w, err := httpsso.NewSSOWrapper(config.SSOLoginServerURL, pkey, config.SSODomain, config.SessionAuthKey, config.SessionEncKey)
+	w, err := httpsso.NewSSOWrapper(config.SSOLoginServerURL, pkey, config.SSODomain, []byte(config.SessionAuthKey), []byte(config.SessionEncKey))
 	if err != nil {
 		return nil, err
 	}
-- 
GitLab