exposure-notifications-server: github.com/google/exposure-notifications-server/internal/verification Index | Files | Directories

package verification

import "github.com/google/exposure-notifications-server/internal/verification"

Package verification provides the ability to verify the diagnosis certificates (JWTs) coming from public health authorities that are responsible for verifying diagnosis pin codes and ceritfying the TEKs.

Index

Package Files

config.go phaverify.go

type Config Uses

type Config struct {
    CacheDuration time.Duration `env:"VERIFICATION_CACHE_DURATION, default=5m"`
}

Config represents the available configuration for the public health authority verification piece.

type VerifiedClaims Uses

type VerifiedClaims struct {
    HealthAuthorityID    int64
    ReportType           string // blank indicates no report type was present.
    SymptomOnsetInterval uint32 // 0 indicates no symptom onset interval present. This should be checked for "reasonable" value before application.
}

VerifiedClaims represents the relevant claims extracted from a verified certificate that may need to be applied.

type Verifier Uses

type Verifier struct {
    // contains filtered or unexported fields
}

Verifier can be used to verify public health authority diagnosis verification certificates.

func New Uses

func New(db *database.HealthAuthorityDB, config *Config) (*Verifier, error)

New creates a new verifier, based on this DB handle.

func (*Verifier) VerifyDiagnosisCertificate Uses

func (v *Verifier) VerifyDiagnosisCertificate(ctx context.Context, authApp *aamodel.AuthorizedApp, publish *verifyapi.Publish) (*VerifiedClaims, error)

VerifyDiagnosisCertificate accepts a publish request (from which is extracts the JWT), fully verifies the JWT and signture against what the passed in authorrized app is allowed to use. Returns any transmission risk overrides if they are present.

Directories

PathSynopsis
databasePackage database is a database interface to health authorities.
modelPackage model is a model abstraction of health authorities.

Package verification imports 12 packages (graph) and is imported by 2 packages. Updated 2020-09-27. Refresh now. Tools for package owners.