Movatterモバイル変換


[0]ホーム

URL:


Alert GO-2024-3228: Coder vulnerable to post-auth URL redirection to untrusted site ('Open Redirect') in github.com/coder/coder
Notice  The highest tagged major version isv2.

license

package
v0.27.3Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2023 License:AGPL-3.0Imports:11Imported by:0

Details

Repository

github.com/coder/coder

Links

Documentation

Index

Constants

View Source
const (CurrentVersion        = 3HeaderKeyID           = "kid"AccountTypeSalesforce = "salesforce"VersionClaim          = "version")

Variables

View Source
var (ValidMethods = []string{"EdDSA"}ErrInvalidVersion        =xerrors.New("license must be version 3")ErrMissingKeyID          =xerrors.Errorf("JOSE header must contain %s",HeaderKeyID)ErrMissingLicenseExpires =xerrors.New("license missing license_expires"))

Functions

funcEntitlements

func Entitlements(ctxcontext.Context,dbdatabase.Store,loggerslog.Logger,replicaCountint,gitAuthCountint,keys map[string]ed25519.PublicKey,enablements map[codersdk.FeatureName]bool,) (codersdk.Entitlements,error)

Entitlements processes licenses to return whether features are enabled or not.

funcParseRawadded inv0.12.8

func ParseRaw(lstring, keys map[string]ed25519.PublicKey) (jwt.MapClaims,error)

ParseRaw consumes a license and returns the claims.

Types

typeClaims

type Claims struct {jwt.RegisteredClaims// LicenseExpires is the end of the legit license term, and the start of the grace period, if// there is one.  The standard JWT claim "exp" (ExpiresAt in jwt.RegisteredClaims, above) is// the end of the grace period (identical to LicenseExpires if there is no grace period).// The reason we use the standard claim for the end of the grace period is that we want JWT// processing libraries to consider the token "valid" until then.LicenseExpires   *jwt.NumericDate `json:"license_expires,omitempty"`AccountTypestring           `json:"account_type,omitempty"`AccountIDstring           `json:"account_id,omitempty"`Trialbool             `json:"trial"`AllFeaturesbool             `json:"all_features"`Versionuint64           `json:"version"`FeaturesFeatures         `json:"features"`RequireTelemetrybool             `json:"require_telemetry,omitempty"`}

funcParseClaimsadded inv0.12.8

func ParseClaims(rawJWTstring, keys map[string]ed25519.PublicKey) (*Claims,error)

ParseClaims validates a database.License record, and if valid, returns the claims. Ifunparsable or invalid, it returns an error

typeFeatures

type Features map[codersdk.FeatureName]int64

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp