ic

package
v0.9.15 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2021 License: Apache-2.0 Imports: 52 Imported by: 0

Documentation

Overview

Package ic is identity concentrator for GA4GH Passports.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ImportConfig added in v0.8.4

func ImportConfig(store storage.Store, service string, cfgVars map[string]string, importConfig, importSecrets, importPermission bool) (ferr error)

ImportConfig ingests bootstrap configuration files to the IC's storage sytem.

func NewSyncClientsHandler added in v0.8.4

func NewSyncClientsHandler(s *Service) *syncClientsHandler

NewSyncClientsHandler implements the sync Hydra clients RPC method.

Types

type Options

type Options struct {
	// HTTPClient: http client for making http request.
	HTTPClient *http.Client
	// Domain: domain used to host ic service.
	Domain string
	// ServiceName: name of the service including environment (example: "ic-staging")
	ServiceName string
	// AccountDomain: domain used to host service account warehouse.
	AccountDomain string
	// Store: data storage and configuration storage.
	Store storage.Store
	// Encryption: the encryption use for storing tokens safely in database.
	Encryption kms.Encryption
	// Signer: the signer use for signing jwt.
	Signer kms.Signer
	// Logger: audit log logger
	Logger *logging.Client
	// SDLC: gRPC client to StackDriver Logging.
	SDLC lgrpcpb.LoggingServiceV2Client
	// AuditLogProject is the GCP project id where audit logs are written to.
	AuditLogProject string
	// SkipInformationReleasePage: set true if want to skip the information release page.
	SkipInformationReleasePage bool
	// UseHydra: service use hydra integrated OIDC.
	UseHydra bool
	// HydraAdminURL: hydra admin endpoints url.
	HydraAdminURL string
	// HydraPublicURL: hydra public endpoints url.
	HydraPublicURL string
	// HydraPublicProxy: proxy for hydra public endpoint.
	HydraPublicProxy *hydraproxy.Service
	// HydraSyncFreq: how often to allow clients:sync to be called
	HydraSyncFreq time.Duration
	// ConsentDashboardURL is url to frontend consent dashboard, will replace
	// ${USER_ID} with userID.
	ConsentDashboardURL string
}

Options contains parameters to New IC Service.

type Service

type Service struct {
	Handler *ServiceHandler
	// contains filtered or unexported fields
}

func New added in v0.8.5

func New(r *mux.Router, params *Options) *Service

New creats a new IC and registers it on r.

func NewService

func NewService(params *Options) *Service

NewService create new IC service.

func (*Service) AcceptInformationRelease

func (s *Service) AcceptInformationRelease(w http.ResponseWriter, r *http.Request)

AcceptInformationRelease is the HTTP handler for ".../inforelease/accept" endpoint.

func (*Service) AcceptLogin

func (s *Service) AcceptLogin(w http.ResponseWriter, r *http.Request)

AcceptLogin is the HTTP handler for ".../loggedin/{name}" endpoint.

func (*Service) ConfigHistory

func (s *Service) ConfigHistory(w http.ResponseWriter, r *http.Request)

ConfigHistory implements the HistoryConfig RPC method.

func (*Service) ConfigHistoryRevision

func (s *Service) ConfigHistoryRevision(w http.ResponseWriter, r *http.Request)

ConfigHistoryRevision implements the HistoryRevisionConfig RPC method.

func (*Service) ConfigReset

func (s *Service) ConfigReset(w http.ResponseWriter, r *http.Request)

ConfigReset implements the corresponding method in the IC API.

func (*Service) FinishLogin

func (s *Service) FinishLogin(w http.ResponseWriter, r *http.Request)

FinishLogin is the HTTP handler for ".../loggedin" endpoint.

func (*Service) GetStore

func (s *Service) GetStore() storage.Store

func (*Service) HydraConsent

func (s *Service) HydraConsent(w http.ResponseWriter, r *http.Request)

HydraConsent handles consent request from hydra.

func (*Service) HydraLogin

func (s *Service) HydraLogin(w http.ResponseWriter, r *http.Request)

HydraLogin handles login request from hydra.

func (*Service) IdentityProviders

func (s *Service) IdentityProviders(w http.ResponseWriter, r *http.Request)

IdentityProviders returns part of config: Identity Providers

func (*Service) JWKS added in v0.8.4

func (s *Service) JWKS(w http.ResponseWriter, r *http.Request)

JWKS returns the JSON Web Key Set response for visas. Note that this is a different set of keys than what Hydra uses.

func (*Service) LocaleMetadata added in v0.9.8

func (s *Service) LocaleMetadata(w http.ResponseWriter, r *http.Request)

LocaleMetadata implements the corresponding REST API endpoint.

func (*Service) Login

func (s *Service) Login(w http.ResponseWriter, r *http.Request)

Login is the HTTP handler for ".../login/{name}" endpoint.

func (*Service) PassportTranslators

func (s *Service) PassportTranslators(w http.ResponseWriter, r *http.Request)

PassportTranslators returns part of config: Passport Translators

func (*Service) RejectInformationRelease added in v0.8.9

func (s *Service) RejectInformationRelease(w http.ResponseWriter, r *http.Request)

RejectInformationRelease is the HTTP handler for ".../inforelease/reject" endpoint.

func (*Service) Status

func (s *Service) Status(w http.ResponseWriter, r *http.Request)

Status returns information about the job and its services. HTTP Handler for "/"

type ServiceHandler

type ServiceHandler struct {
	Handler *mux.Router
	// contains filtered or unexported fields
}

func (*ServiceHandler) ServeHTTP

func (sh *ServiceHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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