Documentation ¶
Overview ¶
Package ga4gh provides primitives for dealing with identities as described by the Global Alliance for Genomics and Healthcare's Data Use and Researcher Identity workstream.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Handler ¶
type Handler struct { // Evaluator is used to provide the parsing and validation logic. Evaluator *Evaluator // Handler is invoked only if the incoming identity could be parsed and // validated. The http.Request will have a ga4gh.Identity associated with it // via NewIdentityContext. Handler http.Handler }
Handler implements an http.Handler that parses an incoming identity, validates it, and then passes it to an underlying http.Handler. The http.Request passed to the underlying handler has an identity associated with it via NewIdentityContext.
type Identity ¶
type Identity struct { Subject string `json:"sub,omitempty"` Issuer string `json:"iss,omitempty"` OriginOrganization []StringValue `json:"ga4gh.IdentityOriginOrganization"` AcademicInstitutionAffiliations []StringValue `json:"ga4gh.AcademicInstitutionAffiliations"` Role []StringValue `json:"ga4gh.Role"` HasAcknowledgedEthicsTerms []StringValue `json:"ga4gh.HasAcknowledgedEthicsTerms"` BonaFide []BoolValue `json:"ga4gh.ResearcherStatus.BonaFide"` }
Identity is a GA4GH identity as described by the Data Use and Researcher Identity stream.
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
Parser parses OIDC bearer tokens into Identity structs.
func NewParser ¶
NewParser constructs a new Parser using shims for translating external identities and issuers as a map of OAuth 2.0 base URLs to client IDs. When parsing an identity token it first tries to use each of the shims in order to perform the conversion. If none of the shims succeed it then checks if the token was issued by any of the OAuth 2.0 providers in issuers, and directly accepting the claims present if it is.
type Shim ¶
Shim is used to convert an HTTP bearer authorization string that is _not_ in the normal Identity format into an Identity. This is useful when interoperating with systems that do not yet provide a GA4GH identity.
type StringValue ¶
StringValue represents a string value and claim source.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package builder provides a way to construct a ga4gh.Evaluator from a protocol buffer description of it.
|
Package builder provides a way to construct a ga4gh.Evaluator from a protocol buffer description of it. |
Package gcp abstracts interacting with certain aspects of Google Cloud Platform, such as creating service account keys and access tokens.
|
Package gcp abstracts interacting with certain aspects of Google Cloud Platform, such as creating service account keys and access tokens. |
internal/appengine
Package appengine provides common functionality for applications running on Google Cloud Platform's appengine.
|
Package appengine provides common functionality for applications running on Google Cloud Platform's appengine. |
key-vendor
The key-vendor daemon returns Google Cloud Platform service account keys for external GA4GH identities.
|
The key-vendor daemon returns Google Cloud Platform service account keys for external GA4GH identities. |
proxy
This package provides a single-host reverse proxy that rewrites bearer tokens in Authorization headers to be Google Cloud Platform access tokens.
|
This package provides a single-host reverse proxy that rewrites bearer tokens in Authorization headers to be Google Cloud Platform access tokens. |
Package shim provides implementations of the ga4gh.Shim interface for shimming between different identity providers and GA4GH identities.
|
Package shim provides implementations of the ga4gh.Shim interface for shimming between different identity providers and GA4GH identities. |
elixir
Package elixir provides a ga4gh.Shim implementation for translating ELIXIR identities into GA4GH identities.
|
Package elixir provides a ga4gh.Shim implementation for translating ELIXIR identities into GA4GH identities. |
Package validator contains implementations of the ga4gh.Validator interface.
|
Package validator contains implementations of the ga4gh.Validator interface. |