Skip to content
This repository was archived by the owner on Jan 24, 2019. It is now read-only.

When asking for the oidc provider, the --oidc-issuer-url is flagged as "not defined" #591

Closed
jgn opened this issue May 13, 2018 · 10 comments

Comments

@jgn
Copy link

jgn commented May 13, 2018

Per the documentation, tried to specify --oidc-issuer-url (with both a single dash and double dash)

But got this: flag provided but not defined: -oidc-issuer-url

Seems like the oidc provider is simply missing.

@ploxiln
Copy link
Contributor

ploxiln commented May 13, 2018

It's in the master branch, but it's not in the v2.2 release (which is over a year old).

@jgn
Copy link
Author

jgn commented May 13, 2018 via email

@ploxiln
Copy link
Contributor

ploxiln commented May 13, 2018

dist.sh does a lot of stuff you don't need. To build oauth2_proxy:

  1. install the "dep" tool from https://github.com/golang/dep (download a stand-alone binary from Releases, put it somewhere in your PATH e.g. /usr/local/bin/, name it dep, make it executable)
  2. checkout the oauth2_proxy repo into your GOPATH, e.g. git clone https://github.com/bitly/oauth2_proxy $HOME/go/src/github.com/bitly/oauth2_proxy
  3. cd into that repo
  4. run dep ensure
  5. run go build
  6. the result is a single stand-alone binary named oauth2_proxy

@jgn
Copy link
Author

jgn commented May 13, 2018 via email

@jgn
Copy link
Author

jgn commented May 14, 2018

$ # cloned to $HOME/src/oauth2_proxy
$ export GOPATH=$HOME
$ cd $GOPATH/src/oauth2_proxy
$ dep ensure
Warning: the following project(s) have [[constraint]] stanzas in Gopkg.toml:

  ✗  github.com/18F/hmacauth

However, these projects are not direct dependencies of the current project:
they are not imported in any .go files, nor are they in the 'required' list in
Gopkg.toml. Dep only applies [[constraint]] rules to direct dependencies, so
these rules will have no effect.

Either import/require packages from these projects so that they become direct
dependencies, or convert each [[constraint]] to an [[override]] to enforce rules
on these projects, if they happen to be transitive dependencies,

Solving failure: No versions of gopkg.in/fsnotify.v1 met constraints:
	v1.2.11: unable to update checked out version: fatal: reference is not a tree: 836bfd95fecc0f1511dd66bdbf2b5b61ab8b00b6
: command failed: [git checkout 836bfd95fecc0f1511dd66bdbf2b5b61ab8b00b6]: exit status 128

@jgn
Copy link
Author

jgn commented May 14, 2018

Closing 'cos original issue might be coming in 2.3. God willing. :-)

@jgn jgn closed this as completed May 14, 2018
@ploxiln
Copy link
Contributor

ploxiln commented May 14, 2018

Yeah ... this repo is not very maintained unfortunately. The build worked for me because of dep's cache. The following change was sufficient to make it work from a fresh state:

--- a/Gopkg.toml
+++ b/Gopkg.toml
@@ -4,7 +4,7 @@
 #
 
 [[constraint]]
-  name = "github.com/18F/hmacauth"
+  name = "github.com/mbland/hmacauth"
   version = "~1.0.1"
 
 [[constraint]]
@@ -37,6 +37,7 @@
 
 [[constraint]]
   name = "gopkg.in/fsnotify.v1"
+  source = "gopkg.in/fsnotify/fsnotify.v1"
   version = "~1.2.0"
 
 [[constraint]]

(fixed in #574 and #577)

@jgn
Copy link
Author

jgn commented May 14, 2018 via email

@ploxiln
Copy link
Contributor

ploxiln commented May 14, 2018

based on what you pasted earlier, it looks like you're putting the oauth2_proxy repo at $GOPATH/src/oauth2_proxy but it really needs to be at $GOPATH/src/github.com/bitly/oauth2_proxy because one part of it imports another part as "github.com/bitly/oauth2_proxy/providers"

@jgn
Copy link
Author

jgn commented May 16, 2018

Thanks. Here's what it took:

git diff a94b0a8b25e553f7333f7b84aeb89d9d18ec259b
diff --git a/Gopkg.lock b/Gopkg.lock
index 5a3758a..1294a90 100644
--- a/Gopkg.lock
+++ b/Gopkg.lock
@@ -131,7 +131,7 @@
   version = "v1.0.0"

 [[projects]]
-  name = "gopkg.in/fsnotify.v1"
+  name = "gopkg.in/fsnotify/fsnotify.v1"
   packages = ["."]
   revision = "836bfd95fecc0f1511dd66bdbf2b5b61ab8b00b6"
   version = "v1.2.11"
@@ -149,6 +149,6 @@
 [solve-meta]
   analyzer-name = "dep"
   analyzer-version = 1
-  inputs-digest = "b502c41a61115d14d6379be26b0300f65d173bdad852f0170d387ebf2d7ec173"
+  inputs-digest = "cfdd05348394cd0597edb858bdba5681665358a963356ed248d98f39373c33b5"
   solver-name = "gps-cdcl"
   solver-version = 1
diff --git a/Gopkg.toml b/Gopkg.toml
index c4005e1..422bd43 100644
--- a/Gopkg.toml
+++ b/Gopkg.toml
@@ -4,7 +4,7 @@
 #

 [[constraint]]
-  name = "github.com/18F/hmacauth"
+  name = "github.com/mbland/hmacauth"
   version = "~1.0.1"

 [[constraint]]
@@ -36,7 +36,7 @@
   name = "google.golang.org/api"

 [[constraint]]
-  name = "gopkg.in/fsnotify.v1"
+  name = "gopkg.in/fsnotify/fsnotify.v1"
   version = "~1.2.0"

 [[constraint]]
diff --git a/watcher.go b/watcher.go
index bedb9f8..9888fe5 100644
--- a/watcher.go
+++ b/watcher.go
@@ -8,7 +8,7 @@ import (
        "path/filepath"
        "time"

-       "gopkg.in/fsnotify.v1"
+       "gopkg.in/fsnotify/fsnotify.v1"
 )

 func WaitForReplacement(filename string, op fsnotify.Op,

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants