From 58e154f21d07bfa6943452b2927bf054be93cd11 Mon Sep 17 00:00:00 2001 From: p53 Date: Tue, 15 Dec 2020 01:57:02 +0100 Subject: [PATCH] Remove louketo name from code (#16) Co-authored-by: Pavol Ipoth --- .goreleaser.yml | 12 ++++++------ cli.go | 2 +- doc.go | 8 ++++---- e2e_test.go | 6 +++--- forwarding.go | 2 +- go.mod | 2 +- release.sh | 4 ++-- server.go | 4 ++-- store_boltdb.go | 2 +- store_boltdb_test.go | 2 +- tests/ca-csr.json | 4 ++-- utils.go | 2 +- utils_test.go | 6 +++--- 13 files changed, 28 insertions(+), 28 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index a05c8284..dd773d9a 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -1,4 +1,4 @@ -# Mark the release as not ready for production in case there is an +# Mark the release as not ready for production in case there is an # indicator for this in the tag e.g. v1.0.0-rc1 # See: https://goreleaser.com/customization/release/ release: @@ -17,11 +17,11 @@ builds: - id: macos goos: [darwin] goarch: [amd64] - + - id: linux goos: [linux] goarch: [amd64] - + - id: windows goos: [windows] goarch: [amd64] @@ -44,7 +44,7 @@ archives: builds: [macos, linux] # Generate the compresed files based on the following templates name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}" - # All files will be in a single directory. For example: louketo_0.0.1_linux_amd64 + # All files will be in a single directory. For example: gatekeeper_0.0.1_linux_amd64 wrap_in_directory: true # Replacement for the Platform name. Instead of have -darwin, replace by macOS replacements: @@ -52,6 +52,6 @@ archives: format: tar.gz - id: windows builds: [windows] - # All files will be in a single directory. For example: louketo_0.0.1_linux_amd64 + # All files will be in a single directory. For example: gatekeeper_0.0.1_linux_amd64 wrap_in_directory: true - format: zip \ No newline at end of file + format: zip diff --git a/cli.go b/cli.go index 9a33e98b..1142be47 100644 --- a/cli.go +++ b/cli.go @@ -38,7 +38,7 @@ func newOauthProxyApp() *cli.App { app.Author = author app.Email = email app.Flags = getCommandLineOptions() - app.UsageText = "louketo-proxy [options]" + app.UsageText = "gatekeeper [options]" // step: the standard usage message isn't that helpful app.OnUsageError = func(context *cli.Context, err error, isSubcommand bool) error { diff --git a/doc.go b/doc.go index c42c53f0..4b1c9ad7 100644 --- a/doc.go +++ b/doc.go @@ -27,7 +27,7 @@ import ( ) var ( - release = "v2.3.0" + release = "1.1.0" gitsha = "no gitsha provided" compiled = "0" version = "" @@ -36,9 +36,9 @@ var ( type contextKey int8 const ( - prog = "louketo-proxy" - author = "Louketo" - email = "louketo@googlegroups.com" + prog = "gatekeeper" + author = "go-gatekeeper" + email = "" description = "is a proxy using the keycloak service for auth and authorization" authorizationHeader = "Authorization" diff --git a/e2e_test.go b/e2e_test.go index 51a29aec..e90f7e0b 100644 --- a/e2e_test.go +++ b/e2e_test.go @@ -57,7 +57,7 @@ func checkListenOrBail(endpoint string) bool { return limit < maxWaitCycles } -func runTestLouketo(t *testing.T, config *Config) error { +func runTestProxy(t *testing.T, config *Config) error { proxy, err := newProxy(config) if err != nil { return err @@ -140,8 +140,8 @@ func TestCorsWithUpstream(t *testing.T) { // launch fake oauth OIDC server _ = runTestAuth(t) - // launch louketo-proxy proxy - _ = runTestLouketo(t, config) + // launch gatekeeper proxy + _ = runTestProxy(t, config) // ok now exercise the ensemble with a CORS-enabled request client := http.Client{} diff --git a/forwarding.go b/forwarding.go index a9547aba..23e48319 100644 --- a/forwarding.go +++ b/forwarding.go @@ -47,7 +47,7 @@ func (r *oauthProxy) proxyMiddleware(next http.Handler) http.Handler { req.Header.Set("X-Forwarded-Proto", req.Header.Get("X-Forwarded-Proto")) if len(r.config.CorsOrigins) > 0 { - // if CORS is enabled by Louketo Proxy, do not propagate CORS requests upstream + // if CORS is enabled by Gatekeeper, do not propagate CORS requests upstream req.Header.Del("Origin") } // @step: add any custom headers to the request diff --git a/go.mod b/go.mod index 9e0b2a3b..1a237e13 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/louketo/louketo-proxy +module github.com/go-gatekeeper/gatekeeper require ( github.com/PuerkitoBio/purell v1.1.0 diff --git a/release.sh b/release.sh index 4b9eb149..1bb7ebd4 100755 --- a/release.sh +++ b/release.sh @@ -1,5 +1,5 @@ #!/bin/bash -e -NAME="louketo-proxy" +NAME="gatekeeper" PLATFORMS="darwin linux windows" ARCHITECTURES="amd64" GIT_SHA=$(git --no-pager describe --always --dirty) @@ -31,7 +31,7 @@ release() { tar -czvf release/"$NAME-$PLATFORM-$ARCH".tar.gz -C bin/ $NAME$EXT >/dev/null sha1sum release/"$NAME-$PLATFORM-$ARCH".tar.gz | cut -d " " -f1 > release/"$NAME-$PLATFORM-$ARCH".tar.gz.sha1 # Test if tar file is not corrupted - if ! tar -tf release/"$NAME-$PLATFORM-$ARCH".tar.gz &>/dev/null;then + if ! tar -tf release/"$NAME-$PLATFORM-$ARCH".tar.gz &>/dev/null;then echo "Corrupted tar file" exit 1 fi diff --git a/server.go b/server.go index b2ae8bbf..442dc2cf 100644 --- a/server.go +++ b/server.go @@ -390,7 +390,7 @@ func (r *oauthProxy) Run() error { r.listener = listener go func() { - r.log.Info("Louketo proxy service starting", zap.String("interface", r.config.Listen)) + r.log.Info("Gatekeeper proxy service starting", zap.String("interface", r.config.Listen)) if err = server.Serve(listener); err != nil { if err != http.ErrServerClosed { r.log.Fatal("failed to start the http service", zap.Error(err)) @@ -400,7 +400,7 @@ func (r *oauthProxy) Run() error { // step: are we running http service as well? if r.config.ListenHTTP != "" { - r.log.Info("Louketo proxy http service starting", zap.String("interface", r.config.ListenHTTP)) + r.log.Info("Gatekeeper proxy http service starting", zap.String("interface", r.config.ListenHTTP)) httpListener, err := r.createHTTPListener(listenerConfig{ listen: r.config.ListenHTTP, proxyProtocol: r.config.EnableProxyProtocol, diff --git a/store_boltdb.go b/store_boltdb.go index 028d1072..5efc2375 100644 --- a/store_boltdb.go +++ b/store_boltdb.go @@ -25,7 +25,7 @@ import ( ) const ( - dbName = "louketo" + dbName = "gatekeeper" ) var ( diff --git a/store_boltdb_test.go b/store_boltdb_test.go index 1574b334..4c74b78e 100644 --- a/store_boltdb_test.go +++ b/store_boltdb_test.go @@ -39,7 +39,7 @@ func (f *fakeBoltDBStore) close() { } func newTestBoldDB(t *testing.T) *fakeBoltDBStore { - tmpfile, err := ioutil.TempFile("/tmp", "louketo-proxy") + tmpfile, err := ioutil.TempFile("/tmp", "gatekeeper") if err != nil { t.Fatalf("unable to create temporary file, error: %s", err) } diff --git a/tests/ca-csr.json b/tests/ca-csr.json index 6f79875e..ee4096b6 100644 --- a/tests/ca-csr.json +++ b/tests/ca-csr.json @@ -1,5 +1,5 @@ { - "CN": "Louketo Proxy", + "CN": "Gatekeeper", "CA": { "expiry": "87600h" }, @@ -11,7 +11,7 @@ { "C": "GB", "L": "London", - "O": "Louketo Proxy", + "O": "Gatekeeper", "OU": "Dev Environment", "ST": "London" } diff --git a/utils.go b/utils.go index 90431884..b80b66f3 100644 --- a/utils.go +++ b/utils.go @@ -86,7 +86,7 @@ func createCertificate(key *rsa.PrivateKey, hostnames []string, expire time.Dura SignatureAlgorithm: x509.SHA512WithRSA, Subject: pkix.Name{ CommonName: hostnames[0], - Organization: []string{"Louketo Proxy"}, + Organization: []string{"Gatekeeper"}, }, } diff --git a/utils_test.go b/utils_test.go index 05861b2c..9ae99949 100644 --- a/utils_test.go +++ b/utils_test.go @@ -150,12 +150,12 @@ func TestEncryptDataBlock(t *testing.T) { Ok bool }{ { - Text: "hello world, my name is Louketo proxy", + Text: "hello world, my name is Gatekeeper", Key: "DtNMS2eO7Fi5vsuLrW55nrRbir2kPfTw", Ok: true, }, { - Text: "hello world, my name is Louketo proxy", + Text: "hello world, my name is Gatekeeper", Key: "DtNMS2eO7Fi5vsu", }, { @@ -253,7 +253,7 @@ func TestDecryptDataBlock(t *testing.T) { Ok bool }{ { - Text: "hello world, my name is Louketo proxy", + Text: "hello world, my name is Gatekeeper", Key: "DtNMS2eO7Fi5vsuLrW55nrRbir2kPfss", Ok: true, },