server

package
v1.10.0-rc2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 3, 2020 License: Apache-2.0 Imports: 39 Imported by: 8

Documentation

Index

Constants

View Source
const (
	// DisableAuthenticationEnvVar specifies an environment variable that, if set, causes
	// Pachyderm authentication to ignore github and authmatically generate a
	// pachyderm token for any username in the AuthenticateRequest.GitHubToken field
	DisableAuthenticationEnvVar = "PACHYDERM_AUTHENTICATION_DISABLED_FOR_TESTING"

	// SamlPort is the port where SAML ID Providers can send auth assertions
	SamlPort = 654
)

Variables

View Source
var DefaultAuthConfig = auth.AuthConfig{
	LiveConfigVersion: 1,
	IDProviders: []*auth.IDProvider{
		&auth.IDProvider{
			Name:        "GitHub",
			Description: "oauth-based authentication with github.com",
			GitHub:      &auth.IDProvider_GitHubOptions{},
		},
	},
}

DefaultAuthConfig is the default config for the auth API server

View Source
var DefaultDashRedirectURL = &url.URL{
	Scheme: "http",
	Host:   "localhost:30080",

	Path: path.Join("/", "auth", "autologin"),
}

DefaultDashRedirectURL is the default URL used for redirecting the dashboard

Functions

func GitHubTokenToUsername added in v1.6.0

func GitHubTokenToUsername(ctx context.Context, oauthToken string) (string, error)

GitHubTokenToUsername takes a OAuth access token issued by GitHub and uses it discover the username of the user who obtained the code (or verify that the code belongs to githubUsername). This is how Pachyderm currently implements authorization in a production cluster

Types

type APIServer added in v1.8.8

type APIServer interface {
	auth.APIServer
	txnenv.AuthTransactionServer
}

APIServer represents an auth api server

func NewAuthServer

func NewAuthServer(
	env *serviceenv.ServiceEnv,
	txnEnv *txnenv.TransactionEnv,
	etcdPrefix string,
	public bool,
) (APIServer, error)

NewAuthServer returns an implementation of auth.APIServer.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL