Documentation ¶
Index ¶
Constants ¶
View Source
const ( // DexClientAppName is name of the Oauth client app used when registering our app to dex DexClientAppName = "ArgoCD" // DexClientAppID is the Oauth client ID we will use when registering our app to dex DexClientAppID = "argo-cd" )
View Source
const ( // DexReverseProxyAddr is the address of the Dex OIDC server, which we run a reverse proxy against DexReverseProxyAddr = "http://localhost:5556" // DexgRPCAPIAddr is the address to the Dex gRPC API server for managing dex. This is assumed to run // locally (as a sidecar) DexgRPCAPIAddr = "localhost:5557" // DexAPIEndpoint is the endpoint where we serve the Dex API server DexAPIEndpoint = "/api/dex" // LoginEndpoint is ArgoCD's shorthand login endpoint which redirects to dex's OAuth 2.0 provider's consent page LoginEndpoint = "/auth/login" // CallbackEndpoint is ArgoCD's final callback endpoint we reach after OAuth 2.0 login flow has been completed CallbackEndpoint = "/auth/callback" )
Variables ¶
This section is empty.
Functions ¶
func GenerateDexConfigYAML ¶
func GenerateDexConfigYAML(kubeClientset kubernetes.Interface, namespace string) ([]byte, error)
func NewDexHTTPReverseProxy ¶
func NewDexHTTPReverseProxy() func(writer http.ResponseWriter, request *http.Request)
NewDexHTTPReverseProxy returns a reverse proxy to the DEX server. Dex is assumed to be configured with the external issuer URL muxed to the same path configured in server.go. In other words, if ArgoCD API server wants to proxy requests at /api/dex, then the dex config yaml issuer URL should also be /api/dex (e.g. issuer: https://argocd.example.com/api/dex)
Types ¶
type ClientApp ¶
type ClientApp struct { Path string // contains filtered or unexported fields }
func NewClientApp ¶
func NewClientApp(clientBaseURL string, serverSecretKey []byte, tlsConfig *tls.Config) (*ClientApp, error)
NewClientApp will register the ArgoCD client app in Dex and return an object which has HTTP handlers for handling the HTTP responses for login and callback
func (*ClientApp) HandleCallback ¶
func (a *ClientApp) HandleCallback(w http.ResponseWriter, r *http.Request)
func (*ClientApp) HandleLogin ¶
func (a *ClientApp) HandleLogin(w http.ResponseWriter, r *http.Request)
func (*ClientApp) Initialize ¶
Initialize initializes the client app. The OIDC provider must be running
type DexAPIClient ¶
func NewDexClient ¶
func NewDexClient() (*DexAPIClient, error)
func (*DexAPIClient) WaitUntilReady ¶
func (d *DexAPIClient) WaitUntilReady()
WaitUntilReady waits until the dex gRPC server is responding
Click to show internal directories.
Click to hide internal directories.