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.

wsproxy

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:25Imported by:0

Details

Repository

github.com/coder/coder

Links

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

typeOptions

type Options struct {Loggerslog.LoggerExperimentscodersdk.ExperimentsHTTPClient *http.Client// DashboardURL is the URL of the primary coderd instance.DashboardURL *url.URL// AccessURL is the URL of the WorkspaceProxy.AccessURL *url.URL// TODO: @emyrk We use these two fields in many places with this comment.//Maybe we should make some shared options struct?// AppHostname should be the wildcard hostname to use for workspace// applications INCLUDING the asterisk, (optional) suffix and leading dot.// It will use the same scheme and port number as the access URL.// E.g. "*.apps.coder.com" or "*-apps.coder.com".AppHostnamestring// AppHostnameRegex contains the regex version of options.AppHostname as// generated by httpapi.CompileHostnamePattern(). It MUST be set if// options.AppHostname is set.AppHostnameRegex *regexp.RegexpRealIPConfig *httpmw.RealIPConfigTracingtrace.TracerProviderPrometheusRegistry *prometheus.RegistryAPIRateLimitintSecureAuthCookieboolDisablePathAppsboolProxySessionTokenstring// AllowAllCors will set all CORs headers to '*'.// By default, CORs is set to accept external requests// from the dashboardURL. This should only be used in development.AllowAllCorsbool}

func (*Options)Validate

func (o *Options) Validate()error

typeServer

type Server struct {Options *OptionsHandler chi.RouterDashboardURL *url.URLAppServer    *workspaceapps.Server// Logging/MetricsLoggerslog.LoggerTracerProvidertrace.TracerProviderPrometheusRegistry *prometheus.Registry// SDKClient is a client to the primary coderd instance authenticated with// the moon's token.SDKClient *wsproxysdk.Client// contains filtered or unexported fields}

Server is an external workspace proxy server. This server can communicatedirectly with a workspace. It requires a primary coderd to establish a saidconnection.

funcNew

func New(ctxcontext.Context, opts *Options) (*Server,error)

New creates a new workspace proxy server. This requires a primary coderdinstance to be reachable and the correct authorization access token to beprovided. If the proxy cannot authenticate with the primary, this will fail.

func (*Server)Close

func (s *Server) Close()error

func (*Server)DialCoordinatoradded inv0.26.2

func (s *Server) DialCoordinator(ctxcontext.Context) (agpl.MultiAgentConn,error)

func (*Server)DialWorkspaceAgent

func (s *Server) DialWorkspaceAgent(iduuid.UUID) (*codersdk.WorkspaceAgentConn,error)

typeTokenProvider

type TokenProvider struct {DashboardURL *url.URLAccessURL    *url.URLAppHostnamestringClient      *wsproxysdk.ClientSecurityKeyworkspaceapps.SecurityKeyLoggerslog.Logger}

func (*TokenProvider)FromRequest

Source Files

View all Source files

Directories

PathSynopsis

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