mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-18 16:26:38 +00:00
Merge remote-tracking branch 'origin/prototype/reverse-proxy' into prototype/reverse-proxy
This commit is contained in:
@@ -398,7 +398,7 @@ func (p *Provider) Stop(ctx context.Context) error {
|
|||||||
|
|
||||||
// EnsureDefaultClients creates dashboard and CLI OAuth clients
|
// EnsureDefaultClients creates dashboard and CLI OAuth clients
|
||||||
// Uses Dex's storage.Client directly - no custom wrappers
|
// Uses Dex's storage.Client directly - no custom wrappers
|
||||||
func (p *Provider) EnsureDefaultClients(ctx context.Context, dashboardURIs, cliURIs, proxyURIs []string) error {
|
func (p *Provider) EnsureDefaultClients(ctx context.Context, dashboardURIs, cliURIs []string) error {
|
||||||
clients := []storage.Client{
|
clients := []storage.Client{
|
||||||
{
|
{
|
||||||
ID: "netbird-dashboard",
|
ID: "netbird-dashboard",
|
||||||
@@ -412,12 +412,6 @@ func (p *Provider) EnsureDefaultClients(ctx context.Context, dashboardURIs, cliU
|
|||||||
RedirectURIs: cliURIs,
|
RedirectURIs: cliURIs,
|
||||||
Public: true,
|
Public: true,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
ID: "netbird-proxy",
|
|
||||||
Name: "NetBird Proxy",
|
|
||||||
RedirectURIs: proxyURIs,
|
|
||||||
Public: true,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, client := range clients {
|
for _, client := range clients {
|
||||||
|
|||||||
@@ -95,8 +95,8 @@ func (d *DexIdP) Stop(ctx context.Context) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// EnsureDefaultClients creates the default NetBird OAuth clients
|
// EnsureDefaultClients creates the default NetBird OAuth clients
|
||||||
func (d *DexIdP) EnsureDefaultClients(ctx context.Context, dashboardURIs, cliURIs, proxyURIs []string) error {
|
func (d *DexIdP) EnsureDefaultClients(ctx context.Context, dashboardURIs, cliURIs []string) error {
|
||||||
return d.provider.EnsureDefaultClients(ctx, dashboardURIs, cliURIs, proxyURIs)
|
return d.provider.EnsureDefaultClients(ctx, dashboardURIs, cliURIs)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Storage exposes Dex storage for direct user/client/connector management
|
// Storage exposes Dex storage for direct user/client/connector management
|
||||||
|
|||||||
@@ -146,7 +146,7 @@ func (m *managerImpl) CreateReverseProxy(ctx context.Context, accountID, userID
|
|||||||
return nil, fmt.Errorf("failed to create setup key for reverse proxy: %w", err)
|
return nil, fmt.Errorf("failed to create setup key for reverse proxy: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
m.proxyGRPCServer.SendReverseProxyUpdate(reverseProxy.ToProtoMapping(reverseproxy.Create, key.Key))
|
m.proxyGRPCServer.SendReverseProxyUpdate(reverseProxy.ToProtoMapping(reverseproxy.Create, key.Key, m.proxyGRPCServer.GetOIDCValidationConfig()))
|
||||||
|
|
||||||
return reverseProxy, nil
|
return reverseProxy, nil
|
||||||
}
|
}
|
||||||
@@ -192,7 +192,7 @@ func (m *managerImpl) UpdateReverseProxy(ctx context.Context, accountID, userID
|
|||||||
|
|
||||||
m.accountManager.StoreEvent(ctx, userID, reverseProxy.ID, accountID, activity.ReverseProxyUpdated, reverseProxy.EventMeta())
|
m.accountManager.StoreEvent(ctx, userID, reverseProxy.ID, accountID, activity.ReverseProxyUpdated, reverseProxy.EventMeta())
|
||||||
|
|
||||||
m.proxyGRPCServer.SendReverseProxyUpdate(reverseProxy.ToProtoMapping(reverseproxy.Update, ""))
|
m.proxyGRPCServer.SendReverseProxyUpdate(reverseProxy.ToProtoMapping(reverseproxy.Update, "", m.proxyGRPCServer.GetOIDCValidationConfig()))
|
||||||
|
|
||||||
return reverseProxy, nil
|
return reverseProxy, nil
|
||||||
}
|
}
|
||||||
@@ -226,7 +226,7 @@ func (m *managerImpl) DeleteReverseProxy(ctx context.Context, accountID, userID,
|
|||||||
|
|
||||||
m.accountManager.StoreEvent(ctx, userID, reverseProxyID, accountID, activity.ReverseProxyDeleted, reverseProxy.EventMeta())
|
m.accountManager.StoreEvent(ctx, userID, reverseProxyID, accountID, activity.ReverseProxyDeleted, reverseProxy.EventMeta())
|
||||||
|
|
||||||
m.proxyGRPCServer.SendReverseProxyUpdate(reverseProxy.ToProtoMapping(reverseproxy.Delete, ""))
|
m.proxyGRPCServer.SendReverseProxyUpdate(reverseProxy.ToProtoMapping(reverseproxy.Delete, "", m.proxyGRPCServer.GetOIDCValidationConfig()))
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -69,6 +69,13 @@ type AuthConfig struct {
|
|||||||
LinkAuth *LinkAuthConfig `json:"link_auth,omitempty" gorm:"serializer:json"`
|
LinkAuth *LinkAuthConfig `json:"link_auth,omitempty" gorm:"serializer:json"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type OIDCValidationConfig struct {
|
||||||
|
Issuer string
|
||||||
|
Audiences []string
|
||||||
|
KeysLocation string
|
||||||
|
MaxTokenAgeSeconds int64
|
||||||
|
}
|
||||||
|
|
||||||
type ReverseProxyMeta struct {
|
type ReverseProxyMeta struct {
|
||||||
CreatedAt time.Time
|
CreatedAt time.Time
|
||||||
CertificateIssuedAt time.Time
|
CertificateIssuedAt time.Time
|
||||||
@@ -165,7 +172,7 @@ func (r *ReverseProxy) ToAPIResponse() *api.ReverseProxy {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r *ReverseProxy) ToProtoMapping(operation Operation, setupKey string) *proto.ProxyMapping {
|
func (r *ReverseProxy) ToProtoMapping(operation Operation, setupKey string, oidcConfig OIDCValidationConfig) *proto.ProxyMapping {
|
||||||
pathMappings := make([]*proto.PathMapping, 0, len(r.Targets))
|
pathMappings := make([]*proto.PathMapping, 0, len(r.Targets))
|
||||||
for _, target := range r.Targets {
|
for _, target := range r.Targets {
|
||||||
if !target.Enabled {
|
if !target.Enabled {
|
||||||
@@ -204,7 +211,10 @@ func (r *ReverseProxy) ToProtoMapping(operation Operation, setupKey string) *pro
|
|||||||
|
|
||||||
if r.Auth.BearerAuth != nil && r.Auth.BearerAuth.Enabled {
|
if r.Auth.BearerAuth != nil && r.Auth.BearerAuth.Enabled {
|
||||||
auth.Oidc = &proto.OIDC{
|
auth.Oidc = &proto.OIDC{
|
||||||
DistributionGroups: r.Auth.BearerAuth.DistributionGroups,
|
Issuer: oidcConfig.Issuer,
|
||||||
|
Audiences: oidcConfig.Audiences,
|
||||||
|
KeysLocation: oidcConfig.KeysLocation,
|
||||||
|
MaxTokenAge: oidcConfig.MaxTokenAgeSeconds,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"net/netip"
|
"net/netip"
|
||||||
"slices"
|
"slices"
|
||||||
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
grpcMiddleware "github.com/grpc-ecosystem/go-grpc-middleware/v2"
|
grpcMiddleware "github.com/grpc-ecosystem/go-grpc-middleware/v2"
|
||||||
@@ -94,7 +95,7 @@ func (s *BaseServer) EventStore() activity.Store {
|
|||||||
|
|
||||||
func (s *BaseServer) APIHandler() http.Handler {
|
func (s *BaseServer) APIHandler() http.Handler {
|
||||||
return Create(s, func() http.Handler {
|
return Create(s, func() http.Handler {
|
||||||
httpAPIHandler, err := nbhttp.NewAPIHandler(context.Background(), s.AccountManager(), s.NetworksManager(), s.ResourcesManager(), s.RoutesManager(), s.GroupsManager(), s.GeoLocationManager(), s.AuthManager(), s.Metrics(), s.IntegratedValidator(), s.ProxyController(), s.PermissionsManager(), s.PeersManager(), s.SettingsManager(), s.ZonesManager(), s.RecordsManager(), s.NetworkMapController(), s.IdpManager(), s.ReverseProxyManager(), s.ReverseProxyDomainManager(), s.AccessLogsManager())
|
httpAPIHandler, err := nbhttp.NewAPIHandler(context.Background(), s.AccountManager(), s.NetworksManager(), s.ResourcesManager(), s.RoutesManager(), s.GroupsManager(), s.GeoLocationManager(), s.AuthManager(), s.Metrics(), s.IntegratedValidator(), s.ProxyController(), s.PermissionsManager(), s.PeersManager(), s.SettingsManager(), s.ZonesManager(), s.RecordsManager(), s.NetworkMapController(), s.IdpManager(), s.ReverseProxyManager(), s.ReverseProxyDomainManager(), s.AccessLogsManager(), s.ReverseProxyGRPCServer())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalf("failed to create API handler: %v", err)
|
log.Fatalf("failed to create API handler: %v", err)
|
||||||
}
|
}
|
||||||
@@ -161,7 +162,7 @@ func (s *BaseServer) GRPCServer() *grpc.Server {
|
|||||||
|
|
||||||
func (s *BaseServer) ReverseProxyGRPCServer() *nbgrpc.ProxyServiceServer {
|
func (s *BaseServer) ReverseProxyGRPCServer() *nbgrpc.ProxyServiceServer {
|
||||||
return Create(s, func() *nbgrpc.ProxyServiceServer {
|
return Create(s, func() *nbgrpc.ProxyServiceServer {
|
||||||
proxyService := nbgrpc.NewProxyServiceServer(s.Store(), s.AccountManager(), s.AccessLogsManager())
|
proxyService := nbgrpc.NewProxyServiceServer(s.Store(), s.AccountManager(), s.AccessLogsManager(), s.proxyOIDCConfig())
|
||||||
s.AfterInit(func(s *BaseServer) {
|
s.AfterInit(func(s *BaseServer) {
|
||||||
proxyService.SetProxyManager(s.ReverseProxyManager())
|
proxyService.SetProxyManager(s.ReverseProxyManager())
|
||||||
})
|
})
|
||||||
@@ -169,6 +170,27 @@ func (s *BaseServer) ReverseProxyGRPCServer() *nbgrpc.ProxyServiceServer {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s *BaseServer) proxyOIDCConfig() nbgrpc.ProxyOIDCConfig {
|
||||||
|
return Create(s, func() nbgrpc.ProxyOIDCConfig {
|
||||||
|
// TODO: this is weird, double check
|
||||||
|
// Build callback URL - this should be the management server's callback endpoint
|
||||||
|
// For embedded IdP, derive from issuer. For external, use a configured value or derive from issuer.
|
||||||
|
// The callback URL should be registered in the IdP's allowed redirect URIs for the dashboard client.
|
||||||
|
callbackURL := strings.TrimSuffix(s.Config.HttpConfig.AuthIssuer, "/oauth2")
|
||||||
|
callbackURL = callbackURL + "/api/oauth/callback"
|
||||||
|
|
||||||
|
return nbgrpc.ProxyOIDCConfig{
|
||||||
|
Issuer: s.Config.HttpConfig.AuthIssuer,
|
||||||
|
ClientID: "netbird-dashboard", // Reuse dashboard client
|
||||||
|
Scopes: []string{"openid", "profile", "email"},
|
||||||
|
CallbackURL: callbackURL,
|
||||||
|
HMACKey: []byte(s.Config.DataStoreEncryptionKey), // Use the datastore encryption key for OIDC state HMACs, this should ensure all management instances are using the same key.
|
||||||
|
Audience: s.Config.HttpConfig.AuthAudience,
|
||||||
|
KeysLocation: s.Config.HttpConfig.AuthKeysLocation,
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
func (s *BaseServer) AccessLogsManager() accesslogs.Manager {
|
func (s *BaseServer) AccessLogsManager() accesslogs.Manager {
|
||||||
return Create(s, func() accesslogs.Manager {
|
return Create(s, func() accesslogs.Manager {
|
||||||
accessLogManager := accesslogsmanager.NewManager(s.Store(), s.PermissionsManager(), s.GeoLocationManager())
|
accessLogManager := accesslogsmanager.NewManager(s.Store(), s.PermissionsManager(), s.GeoLocationManager())
|
||||||
|
|||||||
@@ -2,25 +2,44 @@ package grpc
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"crypto/hmac"
|
||||||
|
"crypto/sha256"
|
||||||
"crypto/subtle"
|
"crypto/subtle"
|
||||||
|
"encoding/base64"
|
||||||
|
"encoding/hex"
|
||||||
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"net/url"
|
||||||
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/coreos/go-oidc/v3/oidc"
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
|
"golang.org/x/oauth2"
|
||||||
"google.golang.org/grpc/codes"
|
"google.golang.org/grpc/codes"
|
||||||
"google.golang.org/grpc/peer"
|
"google.golang.org/grpc/peer"
|
||||||
"google.golang.org/grpc/status"
|
"google.golang.org/grpc/status"
|
||||||
|
|
||||||
"github.com/netbirdio/netbird/management/server/activity"
|
|
||||||
|
|
||||||
"github.com/netbirdio/netbird/management/internals/modules/reverseproxy"
|
"github.com/netbirdio/netbird/management/internals/modules/reverseproxy"
|
||||||
"github.com/netbirdio/netbird/management/internals/modules/reverseproxy/accesslogs"
|
"github.com/netbirdio/netbird/management/internals/modules/reverseproxy/accesslogs"
|
||||||
|
"github.com/netbirdio/netbird/management/server/activity"
|
||||||
"github.com/netbirdio/netbird/management/server/store"
|
"github.com/netbirdio/netbird/management/server/store"
|
||||||
"github.com/netbirdio/netbird/management/server/types"
|
"github.com/netbirdio/netbird/management/server/types"
|
||||||
"github.com/netbirdio/netbird/shared/management/proto"
|
"github.com/netbirdio/netbird/shared/management/proto"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type ProxyOIDCConfig struct {
|
||||||
|
Issuer string
|
||||||
|
ClientID string
|
||||||
|
Scopes []string
|
||||||
|
CallbackURL string
|
||||||
|
HMACKey []byte
|
||||||
|
|
||||||
|
Audience string
|
||||||
|
KeysLocation string
|
||||||
|
}
|
||||||
|
|
||||||
type reverseProxyStore interface {
|
type reverseProxyStore interface {
|
||||||
GetReverseProxies(ctx context.Context, lockStrength store.LockingStrength) ([]*reverseproxy.ReverseProxy, error)
|
GetReverseProxies(ctx context.Context, lockStrength store.LockingStrength) ([]*reverseproxy.ReverseProxy, error)
|
||||||
GetAccountReverseProxies(ctx context.Context, lockStrength store.LockingStrength, accountID string) ([]*reverseproxy.ReverseProxy, error)
|
GetAccountReverseProxies(ctx context.Context, lockStrength store.LockingStrength, accountID string) ([]*reverseproxy.ReverseProxy, error)
|
||||||
@@ -58,6 +77,12 @@ type ProxyServiceServer struct {
|
|||||||
|
|
||||||
// Manager for reverse proxy operations
|
// Manager for reverse proxy operations
|
||||||
reverseProxyManager reverseProxyManager
|
reverseProxyManager reverseProxyManager
|
||||||
|
|
||||||
|
// OIDC configuration for proxy authentication
|
||||||
|
oidcConfig ProxyOIDCConfig
|
||||||
|
|
||||||
|
// TODO: use database to store these instead?
|
||||||
|
pkceVerifiers sync.Map
|
||||||
}
|
}
|
||||||
|
|
||||||
// proxyConnection represents a connected proxy
|
// proxyConnection represents a connected proxy
|
||||||
@@ -72,12 +97,13 @@ type proxyConnection struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// NewProxyServiceServer creates a new proxy service server
|
// NewProxyServiceServer creates a new proxy service server
|
||||||
func NewProxyServiceServer(store reverseProxyStore, keys keyStore, accessLogMgr accesslogs.Manager) *ProxyServiceServer {
|
func NewProxyServiceServer(store reverseProxyStore, keys keyStore, accessLogMgr accesslogs.Manager, oidcConfig ProxyOIDCConfig) *ProxyServiceServer {
|
||||||
return &ProxyServiceServer{
|
return &ProxyServiceServer{
|
||||||
updatesChan: make(chan *proto.ProxyMapping, 100),
|
updatesChan: make(chan *proto.ProxyMapping, 100),
|
||||||
reverseProxyStore: store,
|
reverseProxyStore: store,
|
||||||
keyStore: keys,
|
keyStore: keys,
|
||||||
accessLogManager: accessLogMgr,
|
accessLogManager: accessLogMgr,
|
||||||
|
oidcConfig: oidcConfig,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -186,6 +212,7 @@ func (s *ProxyServiceServer) sendSnapshot(ctx context.Context, conn *proxyConnec
|
|||||||
rp.ToProtoMapping(
|
rp.ToProtoMapping(
|
||||||
reverseproxy.Create, // Initial snapshot, all records are "new" for the proxy.
|
reverseproxy.Create, // Initial snapshot, all records are "new" for the proxy.
|
||||||
key.Key,
|
key.Key,
|
||||||
|
s.GetOIDCValidationConfig(),
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
}); err != nil {
|
}); err != nil {
|
||||||
@@ -379,3 +406,113 @@ func protoStatusToInternal(protoStatus proto.ProxyStatus) reverseproxy.ProxyStat
|
|||||||
return reverseproxy.StatusError
|
return reverseproxy.StatusError
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s *ProxyServiceServer) GetOIDCURL(ctx context.Context, req *proto.GetOIDCURLRequest) (*proto.GetOIDCURLResponse, error) {
|
||||||
|
redirectURL, err := url.Parse(req.GetRedirectUrl())
|
||||||
|
if err != nil {
|
||||||
|
// TODO: log
|
||||||
|
return nil, status.Errorf(codes.InvalidArgument, "failed to parse redirect url: %v", err)
|
||||||
|
}
|
||||||
|
// Validate redirectURL against known proxy endpoints to avoid abuse of OIDC redirection.
|
||||||
|
proxies, err := s.reverseProxyStore.GetAccountReverseProxies(ctx, store.LockingStrengthNone, req.GetAccountId())
|
||||||
|
if err != nil {
|
||||||
|
// TODO: log
|
||||||
|
return nil, status.Errorf(codes.FailedPrecondition, "failed to get reverse proxy from store: %v", err)
|
||||||
|
}
|
||||||
|
var found bool
|
||||||
|
for _, proxy := range proxies {
|
||||||
|
if proxy.Domain == redirectURL.Hostname() {
|
||||||
|
found = true
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if !found {
|
||||||
|
// TODO: log
|
||||||
|
return nil, status.Errorf(codes.FailedPrecondition, "reverse proxy not found in store")
|
||||||
|
}
|
||||||
|
|
||||||
|
provider, err := oidc.NewProvider(ctx, s.oidcConfig.Issuer)
|
||||||
|
if err != nil {
|
||||||
|
// TODO: log
|
||||||
|
return nil, status.Errorf(codes.FailedPrecondition, "failed to create OIDC provider: %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
scopes := s.oidcConfig.Scopes
|
||||||
|
if len(scopes) == 0 {
|
||||||
|
scopes = []string{oidc.ScopeOpenID, "profile", "email"}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Using an HMAC here to avoid redirection state being modified.
|
||||||
|
// State format: base64(redirectURL)|hmac
|
||||||
|
hmacSum := s.generateHMAC(redirectURL.String())
|
||||||
|
state := fmt.Sprintf("%s|%s", base64.URLEncoding.EncodeToString([]byte(redirectURL.String())), hmacSum)
|
||||||
|
|
||||||
|
codeVerifier := oauth2.GenerateVerifier()
|
||||||
|
s.pkceVerifiers.Store(state, codeVerifier)
|
||||||
|
|
||||||
|
return &proto.GetOIDCURLResponse{
|
||||||
|
Url: (&oauth2.Config{
|
||||||
|
ClientID: s.oidcConfig.ClientID,
|
||||||
|
Endpoint: provider.Endpoint(),
|
||||||
|
RedirectURL: s.oidcConfig.CallbackURL,
|
||||||
|
Scopes: scopes,
|
||||||
|
}).AuthCodeURL(state, oauth2.S256ChallengeOption(codeVerifier)),
|
||||||
|
}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetOIDCConfig returns the OIDC configuration for token validation.
|
||||||
|
func (s *ProxyServiceServer) GetOIDCConfig() ProxyOIDCConfig {
|
||||||
|
return s.oidcConfig
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetOIDCValidationConfig returns the OIDC configuration for token validation
|
||||||
|
// in the format needed by ToProtoMapping.
|
||||||
|
func (s *ProxyServiceServer) GetOIDCValidationConfig() reverseproxy.OIDCValidationConfig {
|
||||||
|
return reverseproxy.OIDCValidationConfig{
|
||||||
|
Issuer: s.oidcConfig.Issuer,
|
||||||
|
Audiences: []string{s.oidcConfig.Audience},
|
||||||
|
KeysLocation: s.oidcConfig.KeysLocation,
|
||||||
|
MaxTokenAgeSeconds: 0, // No max token age by default
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *ProxyServiceServer) generateHMAC(input string) string {
|
||||||
|
mac := hmac.New(sha256.New, s.oidcConfig.HMACKey)
|
||||||
|
mac.Write([]byte(input))
|
||||||
|
return hex.EncodeToString(mac.Sum(nil))
|
||||||
|
}
|
||||||
|
|
||||||
|
// ValidateState validates the state parameter from an OAuth callback.
|
||||||
|
// Returns the original redirect URL if valid, or an error if invalid.
|
||||||
|
func (s *ProxyServiceServer) ValidateState(state string) (verifier, redirectURL string, err error) {
|
||||||
|
v, ok := s.pkceVerifiers.LoadAndDelete(state)
|
||||||
|
if !ok {
|
||||||
|
return "", "", errors.New("no verifier for state")
|
||||||
|
}
|
||||||
|
verifier, ok = v.(string)
|
||||||
|
if !ok {
|
||||||
|
return "", "", errors.New("invalid verifier for state")
|
||||||
|
}
|
||||||
|
|
||||||
|
parts := strings.Split(state, "|")
|
||||||
|
if len(parts) != 2 {
|
||||||
|
return "", "", errors.New("invalid state format")
|
||||||
|
}
|
||||||
|
|
||||||
|
encodedURL := parts[0]
|
||||||
|
providedHMAC := parts[1]
|
||||||
|
|
||||||
|
redirectURLBytes, err := base64.URLEncoding.DecodeString(encodedURL)
|
||||||
|
if err != nil {
|
||||||
|
return "", "", fmt.Errorf("invalid state encoding: %w", err)
|
||||||
|
}
|
||||||
|
redirectURL = string(redirectURLBytes)
|
||||||
|
|
||||||
|
expectedHMAC := s.generateHMAC(redirectURL)
|
||||||
|
|
||||||
|
if !hmac.Equal([]byte(providedHMAC), []byte(expectedHMAC)) {
|
||||||
|
return "", "", fmt.Errorf("invalid state signature")
|
||||||
|
}
|
||||||
|
|
||||||
|
return verifier, redirectURL, nil
|
||||||
|
}
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ import (
|
|||||||
"github.com/netbirdio/netbird/management/internals/modules/reverseproxy/accesslogs"
|
"github.com/netbirdio/netbird/management/internals/modules/reverseproxy/accesslogs"
|
||||||
"github.com/netbirdio/netbird/management/internals/modules/reverseproxy/domain"
|
"github.com/netbirdio/netbird/management/internals/modules/reverseproxy/domain"
|
||||||
reverseproxymanager "github.com/netbirdio/netbird/management/internals/modules/reverseproxy/manager"
|
reverseproxymanager "github.com/netbirdio/netbird/management/internals/modules/reverseproxy/manager"
|
||||||
|
nbgrpc "github.com/netbirdio/netbird/management/internals/shared/grpc"
|
||||||
idpmanager "github.com/netbirdio/netbird/management/server/idp"
|
idpmanager "github.com/netbirdio/netbird/management/server/idp"
|
||||||
|
|
||||||
"github.com/netbirdio/management-integrations/integrations"
|
"github.com/netbirdio/management-integrations/integrations"
|
||||||
@@ -43,6 +44,7 @@ import (
|
|||||||
"github.com/netbirdio/netbird/management/server/http/handlers/networks"
|
"github.com/netbirdio/netbird/management/server/http/handlers/networks"
|
||||||
"github.com/netbirdio/netbird/management/server/http/handlers/peers"
|
"github.com/netbirdio/netbird/management/server/http/handlers/peers"
|
||||||
"github.com/netbirdio/netbird/management/server/http/handlers/policies"
|
"github.com/netbirdio/netbird/management/server/http/handlers/policies"
|
||||||
|
"github.com/netbirdio/netbird/management/server/http/handlers/proxy"
|
||||||
"github.com/netbirdio/netbird/management/server/http/handlers/routes"
|
"github.com/netbirdio/netbird/management/server/http/handlers/routes"
|
||||||
"github.com/netbirdio/netbird/management/server/http/handlers/setup_keys"
|
"github.com/netbirdio/netbird/management/server/http/handlers/setup_keys"
|
||||||
"github.com/netbirdio/netbird/management/server/http/handlers/users"
|
"github.com/netbirdio/netbird/management/server/http/handlers/users"
|
||||||
@@ -64,7 +66,7 @@ const (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// NewAPIHandler creates the Management service HTTP API handler registering all the available endpoints.
|
// NewAPIHandler creates the Management service HTTP API handler registering all the available endpoints.
|
||||||
func NewAPIHandler(ctx context.Context, accountManager account.Manager, networksManager nbnetworks.Manager, resourceManager resources.Manager, routerManager routers.Manager, groupsManager nbgroups.Manager, LocationManager geolocation.Geolocation, authManager auth.Manager, appMetrics telemetry.AppMetrics, integratedValidator integrated_validator.IntegratedValidator, proxyController port_forwarding.Controller, permissionsManager permissions.Manager, peersManager nbpeers.Manager, settingsManager settings.Manager, zManager zones.Manager, rManager records.Manager, networkMapController network_map.Controller, idpManager idpmanager.Manager, reverseProxyManager reverseproxy.Manager, reverseProxyDomainManager domain.Manager, reverseProxyAccessLogsManager accesslogs.Manager) (http.Handler, error) {
|
func NewAPIHandler(ctx context.Context, accountManager account.Manager, networksManager nbnetworks.Manager, resourceManager resources.Manager, routerManager routers.Manager, groupsManager nbgroups.Manager, LocationManager geolocation.Geolocation, authManager auth.Manager, appMetrics telemetry.AppMetrics, integratedValidator integrated_validator.IntegratedValidator, proxyController port_forwarding.Controller, permissionsManager permissions.Manager, peersManager nbpeers.Manager, settingsManager settings.Manager, zManager zones.Manager, rManager records.Manager, networkMapController network_map.Controller, idpManager idpmanager.Manager, reverseProxyManager reverseproxy.Manager, reverseProxyDomainManager domain.Manager, reverseProxyAccessLogsManager accesslogs.Manager, proxyGRPCServer *nbgrpc.ProxyServiceServer) (http.Handler, error) {
|
||||||
|
|
||||||
// Register bypass paths for unauthenticated endpoints
|
// Register bypass paths for unauthenticated endpoints
|
||||||
if err := bypass.AddBypassPath("/api/instance"); err != nil {
|
if err := bypass.AddBypassPath("/api/instance"); err != nil {
|
||||||
@@ -80,6 +82,10 @@ func NewAPIHandler(ctx context.Context, accountManager account.Manager, networks
|
|||||||
if err := bypass.AddBypassPath("/api/users/invites/nbi_*/accept"); err != nil {
|
if err := bypass.AddBypassPath("/api/users/invites/nbi_*/accept"); err != nil {
|
||||||
return nil, fmt.Errorf("failed to add bypass path: %w", err)
|
return nil, fmt.Errorf("failed to add bypass path: %w", err)
|
||||||
}
|
}
|
||||||
|
// OAuth callback for proxy authentication
|
||||||
|
if err := bypass.AddBypassPath("/api/oauth/callback"); err != nil {
|
||||||
|
return nil, fmt.Errorf("failed to add bypass path: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
var rateLimitingConfig *middleware.RateLimiterConfig
|
var rateLimitingConfig *middleware.RateLimiterConfig
|
||||||
if os.Getenv(rateLimitingEnabledKey) == "true" {
|
if os.Getenv(rateLimitingEnabledKey) == "true" {
|
||||||
@@ -162,6 +168,12 @@ func NewAPIHandler(ctx context.Context, accountManager account.Manager, networks
|
|||||||
instance.AddVersionEndpoint(instanceManager, router)
|
instance.AddVersionEndpoint(instanceManager, router)
|
||||||
reverseproxymanager.RegisterEndpoints(reverseProxyManager, reverseProxyDomainManager, reverseProxyAccessLogsManager, router)
|
reverseproxymanager.RegisterEndpoints(reverseProxyManager, reverseProxyDomainManager, reverseProxyAccessLogsManager, router)
|
||||||
|
|
||||||
|
// Register OAuth callback handler for proxy authentication
|
||||||
|
if proxyGRPCServer != nil {
|
||||||
|
oauthHandler := proxy.NewAuthCallbackHandler(proxyGRPCServer)
|
||||||
|
oauthHandler.RegisterEndpoints(router)
|
||||||
|
}
|
||||||
|
|
||||||
// Mount embedded IdP handler at /oauth2 path if configured
|
// Mount embedded IdP handler at /oauth2 path if configured
|
||||||
if embeddedIdpEnabled {
|
if embeddedIdpEnabled {
|
||||||
rootRouter.PathPrefix("/oauth2").Handler(corsMiddleware.Handler(embeddedIdP.Handler()))
|
rootRouter.PathPrefix("/oauth2").Handler(corsMiddleware.Handler(embeddedIdP.Handler()))
|
||||||
|
|||||||
80
management/server/http/handlers/proxy/auth.go
Normal file
80
management/server/http/handlers/proxy/auth.go
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
package proxy
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
"net/url"
|
||||||
|
|
||||||
|
"github.com/coreos/go-oidc/v3/oidc"
|
||||||
|
"github.com/gorilla/mux"
|
||||||
|
log "github.com/sirupsen/logrus"
|
||||||
|
"golang.org/x/oauth2"
|
||||||
|
|
||||||
|
nbgrpc "github.com/netbirdio/netbird/management/internals/shared/grpc"
|
||||||
|
)
|
||||||
|
|
||||||
|
type AuthCallbackHandler struct {
|
||||||
|
proxyService *nbgrpc.ProxyServiceServer
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewAuthCallbackHandler(proxyService *nbgrpc.ProxyServiceServer) *AuthCallbackHandler {
|
||||||
|
return &AuthCallbackHandler{
|
||||||
|
proxyService: proxyService,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (h *AuthCallbackHandler) RegisterEndpoints(router *mux.Router) {
|
||||||
|
router.HandleFunc("/oauth/callback", h.handleCallback).Methods(http.MethodGet)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (h *AuthCallbackHandler) handleCallback(w http.ResponseWriter, r *http.Request) {
|
||||||
|
state := r.URL.Query().Get("state")
|
||||||
|
|
||||||
|
codeVerifier, originalURL, err := h.proxyService.ValidateState(state)
|
||||||
|
if err != nil {
|
||||||
|
log.WithError(err).Error("OAuth callback state validation failed")
|
||||||
|
http.Error(w, "Invalid state parameter", http.StatusBadRequest)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
redirectURL, err := url.Parse(originalURL)
|
||||||
|
if err != nil {
|
||||||
|
log.WithError(err).Error("Failed to parse redirect URL")
|
||||||
|
http.Error(w, "Invalid redirect URL", http.StatusBadRequest)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get OIDC configuration
|
||||||
|
oidcConfig := h.proxyService.GetOIDCConfig()
|
||||||
|
|
||||||
|
// Create OIDC provider to discover endpoints
|
||||||
|
provider, err := oidc.NewProvider(r.Context(), oidcConfig.Issuer)
|
||||||
|
if err != nil {
|
||||||
|
log.WithError(err).Error("Failed to create OIDC provider")
|
||||||
|
http.Error(w, "Failed to create OIDC provider", http.StatusInternalServerError)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
token, err := (&oauth2.Config{
|
||||||
|
ClientID: oidcConfig.ClientID,
|
||||||
|
Endpoint: provider.Endpoint(),
|
||||||
|
RedirectURL: oidcConfig.CallbackURL,
|
||||||
|
}).Exchange(r.Context(), r.URL.Query().Get("code"), oauth2.VerifierOption(codeVerifier))
|
||||||
|
if err != nil {
|
||||||
|
log.WithError(err).Error("Failed to exchange code for token")
|
||||||
|
http.Error(w, "Failed to exchange code for token", http.StatusInternalServerError)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
redirectQuery := redirectURL.Query()
|
||||||
|
redirectQuery.Set("access_token", token.AccessToken)
|
||||||
|
if token.RefreshToken != "" {
|
||||||
|
redirectQuery.Set("refresh_token", token.RefreshToken)
|
||||||
|
}
|
||||||
|
redirectURL.RawQuery = redirectQuery.Encode()
|
||||||
|
|
||||||
|
// Redirect must be HTTPS, regardless of what was originally intended (which should always be HTTPS but better to double-check here).
|
||||||
|
redirectURL.Scheme = "https"
|
||||||
|
|
||||||
|
log.WithField("redirect", redirectURL.String()).Debug("OAuth callback: redirecting user with token")
|
||||||
|
http.Redirect(w, r, redirectURL.String(), http.StatusFound)
|
||||||
|
}
|
||||||
@@ -11,6 +11,7 @@ import (
|
|||||||
|
|
||||||
"github.com/netbirdio/management-integrations/integrations"
|
"github.com/netbirdio/management-integrations/integrations"
|
||||||
|
|
||||||
|
"github.com/netbirdio/netbird/management/internals/modules/reverseproxy/domain"
|
||||||
zonesManager "github.com/netbirdio/netbird/management/internals/modules/zones/manager"
|
zonesManager "github.com/netbirdio/netbird/management/internals/modules/zones/manager"
|
||||||
recordsManager "github.com/netbirdio/netbird/management/internals/modules/zones/records/manager"
|
recordsManager "github.com/netbirdio/netbird/management/internals/modules/zones/records/manager"
|
||||||
"github.com/netbirdio/netbird/management/internals/server/config"
|
"github.com/netbirdio/netbird/management/internals/server/config"
|
||||||
@@ -102,7 +103,7 @@ func BuildApiBlackBoxWithDBState(t testing_tools.TB, sqlFile string, expectedPee
|
|||||||
customZonesManager := zonesManager.NewManager(store, am, permissionsManager, "")
|
customZonesManager := zonesManager.NewManager(store, am, permissionsManager, "")
|
||||||
zoneRecordsManager := recordsManager.NewManager(store, am, permissionsManager)
|
zoneRecordsManager := recordsManager.NewManager(store, am, permissionsManager)
|
||||||
|
|
||||||
apiHandler, err := http2.NewAPIHandler(context.Background(), am, networksManagerMock, resourcesManagerMock, routersManagerMock, groupsManagerMock, geoMock, authManagerMock, metrics, validatorMock, proxyController, permissionsManager, peersManager, settingsManager, customZonesManager, zoneRecordsManager, networkMapController, nil)
|
apiHandler, err := http2.NewAPIHandler(context.Background(), am, networksManagerMock, resourcesManagerMock, routersManagerMock, groupsManagerMock, geoMock, authManagerMock, metrics, validatorMock, proxyController, permissionsManager, peersManager, settingsManager, customZonesManager, zoneRecordsManager, networkMapController, nil, nil, domain.Manager{}, nil, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("Failed to create API handler: %v", err)
|
t.Fatalf("Failed to create API handler: %v", err)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ import (
|
|||||||
const (
|
const (
|
||||||
staticClientDashboard = "netbird-dashboard"
|
staticClientDashboard = "netbird-dashboard"
|
||||||
staticClientCLI = "netbird-cli"
|
staticClientCLI = "netbird-cli"
|
||||||
staticClientProxy = "netbird-proxy"
|
|
||||||
defaultCLIRedirectURL1 = "http://localhost:53000/"
|
defaultCLIRedirectURL1 = "http://localhost:53000/"
|
||||||
defaultCLIRedirectURL2 = "http://localhost:54000/"
|
defaultCLIRedirectURL2 = "http://localhost:54000/"
|
||||||
defaultScopes = "openid profile email groups"
|
defaultScopes = "openid profile email groups"
|
||||||
@@ -38,10 +37,8 @@ type EmbeddedIdPConfig struct {
|
|||||||
Storage EmbeddedStorageConfig
|
Storage EmbeddedStorageConfig
|
||||||
// DashboardRedirectURIs are the OAuth2 redirect URIs for the dashboard client
|
// DashboardRedirectURIs are the OAuth2 redirect URIs for the dashboard client
|
||||||
DashboardRedirectURIs []string
|
DashboardRedirectURIs []string
|
||||||
// CLIRedirectURIs are the OAuth2 redirect URIs for the CLI client
|
// DashboardRedirectURIs are the OAuth2 redirect URIs for the dashboard client
|
||||||
CLIRedirectURIs []string
|
CLIRedirectURIs []string
|
||||||
// ProxyRedirectURIs are the OAuth2 redirect URIs for the Proxy client
|
|
||||||
ProxyRedirectURIs []string
|
|
||||||
// Owner is the initial owner/admin user (optional, can be nil)
|
// Owner is the initial owner/admin user (optional, can be nil)
|
||||||
Owner *OwnerConfig
|
Owner *OwnerConfig
|
||||||
// SignKeyRefreshEnabled enables automatic key rotation for signing keys
|
// SignKeyRefreshEnabled enables automatic key rotation for signing keys
|
||||||
@@ -89,6 +86,11 @@ func (c *EmbeddedIdPConfig) ToYAMLConfig() (*dex.YAMLConfig, error) {
|
|||||||
cliRedirectURIs = append(cliRedirectURIs, "/device/callback")
|
cliRedirectURIs = append(cliRedirectURIs, "/device/callback")
|
||||||
cliRedirectURIs = append(cliRedirectURIs, c.Issuer+"/device/callback")
|
cliRedirectURIs = append(cliRedirectURIs, c.Issuer+"/device/callback")
|
||||||
|
|
||||||
|
// Build dashboard redirect URIs including the OAuth callback for proxy authentication
|
||||||
|
dashboardRedirectURIs := c.DashboardRedirectURIs
|
||||||
|
baseURL := strings.TrimSuffix(c.Issuer, "/oauth2")
|
||||||
|
dashboardRedirectURIs = append(dashboardRedirectURIs, baseURL+"/api/oauth/callback")
|
||||||
|
|
||||||
cfg := &dex.YAMLConfig{
|
cfg := &dex.YAMLConfig{
|
||||||
Issuer: c.Issuer,
|
Issuer: c.Issuer,
|
||||||
Storage: dex.Storage{
|
Storage: dex.Storage{
|
||||||
@@ -114,7 +116,7 @@ func (c *EmbeddedIdPConfig) ToYAMLConfig() (*dex.YAMLConfig, error) {
|
|||||||
ID: staticClientDashboard,
|
ID: staticClientDashboard,
|
||||||
Name: "NetBird Dashboard",
|
Name: "NetBird Dashboard",
|
||||||
Public: true,
|
Public: true,
|
||||||
RedirectURIs: c.DashboardRedirectURIs,
|
RedirectURIs: dashboardRedirectURIs,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
ID: staticClientCLI,
|
ID: staticClientCLI,
|
||||||
@@ -122,12 +124,6 @@ func (c *EmbeddedIdPConfig) ToYAMLConfig() (*dex.YAMLConfig, error) {
|
|||||||
Public: true,
|
Public: true,
|
||||||
RedirectURIs: cliRedirectURIs,
|
RedirectURIs: cliRedirectURIs,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
ID: staticClientProxy,
|
|
||||||
Name: "NetBird Proxy",
|
|
||||||
Public: true,
|
|
||||||
RedirectURIs: c.ProxyRedirectURIs,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -555,7 +551,7 @@ func (m *EmbeddedIdPManager) GetLocalKeysLocation() string {
|
|||||||
|
|
||||||
// GetClientIDs returns the OAuth2 client IDs configured for this provider.
|
// GetClientIDs returns the OAuth2 client IDs configured for this provider.
|
||||||
func (m *EmbeddedIdPManager) GetClientIDs() []string {
|
func (m *EmbeddedIdPManager) GetClientIDs() []string {
|
||||||
return []string{staticClientDashboard, staticClientCLI, staticClientProxy}
|
return []string{staticClientDashboard, staticClientCLI}
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetUserIDClaim returns the JWT claim name used for user identification.
|
// GetUserIDClaim returns the JWT claim name used for user identification.
|
||||||
|
|||||||
@@ -14,14 +14,18 @@ Proxy Authentication methods supported are:
|
|||||||
- Simple PIN
|
- Simple PIN
|
||||||
- HTTP Basic Auth Username and Password
|
- HTTP Basic Auth Username and Password
|
||||||
|
|
||||||
## Management Connection
|
## Management Connection and Authentication
|
||||||
|
|
||||||
The Proxy communicates with the Management server over a gRPC connection.
|
The Proxy communicates with the Management server over a gRPC connection.
|
||||||
Proxies act as clients to the Management server, the following RPCs are used:
|
Proxies act as clients to the Management server, the following RPCs are used:
|
||||||
- Server-side streaming for proxied service updates.
|
- Server-side streaming for proxied service updates.
|
||||||
- Client-side streaming for proxy logs.
|
- Client-side streaming for proxy logs.
|
||||||
|
|
||||||
## Authentication
|
To authenticate with the Management server, the proxy server uses Machine-to-Machine OAuth2.
|
||||||
|
If you are using the embedded IdP //TODO: explain how to get credentials.
|
||||||
|
Otherwise, create a new machine-to-machine profile in your IdP for proxy servers and set the relevant settings in the proxy's environment or flags (see below).
|
||||||
|
|
||||||
|
## User Authentication
|
||||||
|
|
||||||
When a request hits the Proxy, it looks up the permitted authentication methods for the Host domain.
|
When a request hits the Proxy, it looks up the permitted authentication methods for the Host domain.
|
||||||
If no authentication methods are registered for the Host domain, then no authentication will be applied (for fully public resources).
|
If no authentication methods are registered for the Host domain, then no authentication will be applied (for fully public resources).
|
||||||
|
|||||||
@@ -50,8 +50,3 @@ func (l Link) Authenticate(r *http.Request) (string, string) {
|
|||||||
|
|
||||||
return "", linkFormId
|
return "", linkFormId
|
||||||
}
|
}
|
||||||
|
|
||||||
func (l Link) Middleware(next http.Handler) http.Handler {
|
|
||||||
// TODO: handle magic link redirects, should be similar to OIDC.
|
|
||||||
return next
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -52,12 +52,6 @@ type Scheme interface {
|
|||||||
// be included in a UI template when prompting the user to authenticate.
|
// be included in a UI template when prompting the user to authenticate.
|
||||||
// If the request is authenticated, then a user id should be returned.
|
// If the request is authenticated, then a user id should be returned.
|
||||||
Authenticate(*http.Request) (userid string, promptData string)
|
Authenticate(*http.Request) (userid string, promptData string)
|
||||||
// Middleware is applied within the outer auth middleware, but they will
|
|
||||||
// be applied after authentication if no scheme has authenticated a
|
|
||||||
// request.
|
|
||||||
// If no scheme Middleware blocks the request processing, then the auth
|
|
||||||
// middleware will then present the user with the auth UI.
|
|
||||||
Middleware(http.Handler) http.Handler
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type Middleware struct {
|
type Middleware struct {
|
||||||
@@ -132,20 +126,7 @@ func (mw *Middleware) Protect(next http.Handler) http.Handler {
|
|||||||
methods[s.Type().String()] = promptData
|
methods[s.Type().String()] = promptData
|
||||||
}
|
}
|
||||||
|
|
||||||
// The handler is passed through the scheme middlewares,
|
web.ServeHTTP(w, r, map[string]any{"methods": methods})
|
||||||
// if none of them intercept the request, then this handler will
|
|
||||||
// be called and present the user with the authentication page.
|
|
||||||
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
||||||
web.ServeHTTP(w, r, map[string]any{"methods": methods})
|
|
||||||
}))
|
|
||||||
|
|
||||||
// No authentication succeeded. Apply the scheme handlers.
|
|
||||||
for _, s := range schemes {
|
|
||||||
handler = s.Middleware(handler)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Run the unauthenticated request against the scheme handlers and the final UI handler.
|
|
||||||
handler.ServeHTTP(w, r)
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,30 +2,27 @@ package auth
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"crypto/rand"
|
|
||||||
"encoding/base64"
|
|
||||||
"fmt"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
"strings"
|
|
||||||
"sync"
|
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/coreos/go-oidc/v3/oidc"
|
gojwt "github.com/golang-jwt/jwt/v5"
|
||||||
"golang.org/x/oauth2"
|
"github.com/netbirdio/netbird/shared/management/proto"
|
||||||
|
"google.golang.org/grpc"
|
||||||
|
|
||||||
|
"github.com/netbirdio/netbird/shared/auth/jwt"
|
||||||
)
|
)
|
||||||
|
|
||||||
const stateExpiration = 10 * time.Minute
|
type urlGenerator interface {
|
||||||
|
GetOIDCURL(context.Context, *proto.GetOIDCURLRequest, ...grpc.CallOption) (*proto.GetOIDCURLResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
const callbackPath = "/oauth/callback"
|
// OIDCConfig holds configuration for OIDC JWT verification
|
||||||
|
|
||||||
// OIDCConfig holds configuration for OIDC authentication
|
|
||||||
type OIDCConfig struct {
|
type OIDCConfig struct {
|
||||||
OIDCProviderURL string
|
Issuer string
|
||||||
OIDCClientID string
|
Audiences []string
|
||||||
OIDCClientSecret string
|
KeysLocation string
|
||||||
OIDCScopes []string
|
MaxTokenAgeSeconds int64
|
||||||
DistributionGroups []string
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// oidcState stores CSRF state with expiration
|
// oidcState stores CSRF state with expiration
|
||||||
@@ -36,50 +33,26 @@ type oidcState struct {
|
|||||||
|
|
||||||
// OIDC implements the Scheme interface for JWT/OIDC authentication
|
// OIDC implements the Scheme interface for JWT/OIDC authentication
|
||||||
type OIDC struct {
|
type OIDC struct {
|
||||||
id, accountId, proxyURL string
|
id, accountId string
|
||||||
verifier *oidc.IDTokenVerifier
|
validator *jwt.Validator
|
||||||
oauthConfig *oauth2.Config
|
maxTokenAgeSeconds int64
|
||||||
states map[string]*oidcState
|
client urlGenerator
|
||||||
statesMux sync.RWMutex
|
|
||||||
distributionGroups []string
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewOIDC creates a new OIDC authentication scheme
|
// NewOIDC creates a new OIDC authentication scheme
|
||||||
func NewOIDC(ctx context.Context, id, accountId, proxyURL string, cfg OIDCConfig) (*OIDC, error) {
|
func NewOIDC(client urlGenerator, id, accountId string, cfg OIDCConfig) *OIDC {
|
||||||
if cfg.OIDCProviderURL == "" || cfg.OIDCClientID == "" {
|
return &OIDC{
|
||||||
return nil, fmt.Errorf("OIDC provider URL and client ID are required")
|
|
||||||
}
|
|
||||||
|
|
||||||
scopes := cfg.OIDCScopes
|
|
||||||
if len(scopes) == 0 {
|
|
||||||
scopes = []string{oidc.ScopeOpenID, "profile", "email"}
|
|
||||||
}
|
|
||||||
|
|
||||||
provider, err := oidc.NewProvider(ctx, cfg.OIDCProviderURL)
|
|
||||||
if err != nil {
|
|
||||||
return nil, fmt.Errorf("failed to create OIDC provider: %w", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
o := &OIDC{
|
|
||||||
id: id,
|
id: id,
|
||||||
accountId: accountId,
|
accountId: accountId,
|
||||||
proxyURL: proxyURL,
|
validator: jwt.NewValidator(
|
||||||
verifier: provider.Verifier(&oidc.Config{
|
cfg.Issuer,
|
||||||
ClientID: cfg.OIDCClientID,
|
cfg.Audiences,
|
||||||
}),
|
cfg.KeysLocation,
|
||||||
oauthConfig: &oauth2.Config{
|
true,
|
||||||
ClientID: cfg.OIDCClientID,
|
),
|
||||||
ClientSecret: cfg.OIDCClientSecret,
|
maxTokenAgeSeconds: cfg.MaxTokenAgeSeconds,
|
||||||
Endpoint: provider.Endpoint(),
|
client: client,
|
||||||
Scopes: scopes,
|
|
||||||
},
|
|
||||||
states: make(map[string]*oidcState),
|
|
||||||
distributionGroups: cfg.DistributionGroups,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
go o.cleanupStates()
|
|
||||||
|
|
||||||
return o, nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (*OIDC) Type() Method {
|
func (*OIDC) Type() Method {
|
||||||
@@ -87,153 +60,79 @@ func (*OIDC) Type() Method {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (o *OIDC) Authenticate(r *http.Request) (string, string) {
|
func (o *OIDC) Authenticate(r *http.Request) (string, string) {
|
||||||
// Try Authorization: Bearer <token> header
|
if token := r.URL.Query().Get("access_token"); token != "" {
|
||||||
if auth := r.Header.Get("Authorization"); strings.HasPrefix(auth, "Bearer ") {
|
|
||||||
if userID := o.validateToken(r.Context(), strings.TrimPrefix(auth, "Bearer ")); userID != "" {
|
|
||||||
return userID, ""
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Try _auth_token query parameter (from OIDC callback redirect)
|
|
||||||
if token := r.URL.Query().Get("_auth_token"); token != "" {
|
|
||||||
if userID := o.validateToken(r.Context(), token); userID != "" {
|
if userID := o.validateToken(r.Context(), token); userID != "" {
|
||||||
return userID, ""
|
return userID, ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the request is not authenticated, return a redirect URL for the UI to
|
redirectURL := &url.URL{
|
||||||
// route the user through if they select OIDC login.
|
Scheme: "https",
|
||||||
b := make([]byte, 32)
|
Host: r.Host,
|
||||||
_, _ = rand.Read(b)
|
Path: r.URL.Path,
|
||||||
state := base64.URLEncoding.EncodeToString(b)
|
}
|
||||||
|
|
||||||
// TODO: this does not work if you are load balancing across multiple proxy servers.
|
res, err := o.client.GetOIDCURL(r.Context(), &proto.GetOIDCURLRequest{
|
||||||
o.statesMux.Lock()
|
Id: o.id,
|
||||||
o.states[state] = &oidcState{OriginalURL: fmt.Sprintf("https://%s%s", r.Host, r.URL), CreatedAt: time.Now()}
|
AccountId: o.accountId,
|
||||||
o.statesMux.Unlock()
|
RedirectUrl: redirectURL.String(),
|
||||||
|
|
||||||
return "", (&oauth2.Config{
|
|
||||||
ClientID: o.oauthConfig.ClientID,
|
|
||||||
ClientSecret: o.oauthConfig.ClientSecret,
|
|
||||||
Endpoint: o.oauthConfig.Endpoint,
|
|
||||||
RedirectURL: o.proxyURL + callbackPath,
|
|
||||||
Scopes: o.oauthConfig.Scopes,
|
|
||||||
}).AuthCodeURL(state)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Middleware returns an http.Handler that handles OIDC callback and flow initiation.
|
|
||||||
func (o *OIDC) Middleware(next http.Handler) http.Handler {
|
|
||||||
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
||||||
// Handle OIDC callback
|
|
||||||
if r.URL.Path == callbackPath {
|
|
||||||
o.handleCallback(w, r)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
next.ServeHTTP(w, r)
|
|
||||||
})
|
})
|
||||||
|
if err != nil {
|
||||||
|
// TODO: log
|
||||||
|
return "", ""
|
||||||
|
}
|
||||||
|
|
||||||
|
return "", res.GetUrl()
|
||||||
}
|
}
|
||||||
|
|
||||||
// validateToken validates a JWT ID token and returns the user ID (subject)
|
// validateToken validates a JWT ID token and returns the user ID (subject)
|
||||||
// Returns empty string if token is invalid or user's groups don't appear
|
// Returns empty string if token is invalid.
|
||||||
// in the distributionGroups.
|
|
||||||
func (o *OIDC) validateToken(ctx context.Context, token string) string {
|
func (o *OIDC) validateToken(ctx context.Context, token string) string {
|
||||||
if o.verifier == nil {
|
if o.validator == nil {
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
idToken, err := o.verifier.Verify(ctx, token)
|
idToken, err := o.validator.ValidateAndParse(ctx, token)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
// TODO: log or return?
|
// TODO: log or return?
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
// If distribution groups are configured, check if user has access
|
iat, err := idToken.Claims.GetIssuedAt()
|
||||||
if len(o.distributionGroups) > 0 {
|
if err != nil {
|
||||||
var claims struct {
|
// TODO: log or return?
|
||||||
Groups []string `json:"groups"`
|
return ""
|
||||||
}
|
|
||||||
if err := idToken.Claims(&claims); err != nil {
|
|
||||||
// TODO: log or return?
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
allowed := make(map[string]struct{}, len(o.distributionGroups))
|
|
||||||
for _, g := range o.distributionGroups {
|
|
||||||
allowed[g] = struct{}{}
|
|
||||||
}
|
|
||||||
|
|
||||||
for _, g := range claims.Groups {
|
|
||||||
if _, ok := allowed[g]; ok {
|
|
||||||
return idToken.Subject
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Default deny
|
// If max token age is 0 skip this check.
|
||||||
return ""
|
if o.maxTokenAgeSeconds > 0 && time.Since(iat.Time).Seconds() > float64(o.maxTokenAgeSeconds) {
|
||||||
|
// TODO: log or return?
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
return extractUserID(idToken)
|
||||||
}
|
}
|
||||||
|
|
||||||
// handleCallback processes the OIDC callback
|
func extractUserID(token *gojwt.Token) string {
|
||||||
func (o *OIDC) handleCallback(w http.ResponseWriter, r *http.Request) {
|
if token == nil {
|
||||||
code := r.URL.Query().Get("code")
|
return "unknown"
|
||||||
state := r.URL.Query().Get("state")
|
|
||||||
|
|
||||||
if code == "" || state == "" {
|
|
||||||
http.Error(w, "Invalid callback parameters", http.StatusBadRequest)
|
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
claims, ok := token.Claims.(gojwt.MapClaims)
|
||||||
// Verify and consume state
|
|
||||||
o.statesMux.Lock()
|
|
||||||
st, ok := o.states[state]
|
|
||||||
if ok {
|
|
||||||
delete(o.states, state)
|
|
||||||
}
|
|
||||||
o.statesMux.Unlock()
|
|
||||||
|
|
||||||
if !ok {
|
if !ok {
|
||||||
http.Error(w, "Invalid or expired state", http.StatusBadRequest)
|
return "unknown"
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
return getUserIDFromClaims(claims)
|
||||||
// Exchange code for token
|
|
||||||
token, err := o.oauthConfig.Exchange(r.Context(), code)
|
|
||||||
if err != nil {
|
|
||||||
http.Error(w, "Authentication failed", http.StatusUnauthorized)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// Prefer ID token if available
|
|
||||||
idToken := token.AccessToken
|
|
||||||
if id, ok := token.Extra("id_token").(string); ok && id != "" {
|
|
||||||
idToken = id
|
|
||||||
}
|
|
||||||
|
|
||||||
// Redirect back to original URL with token
|
|
||||||
origURL, err := url.Parse(st.OriginalURL)
|
|
||||||
if err != nil {
|
|
||||||
http.Error(w, "Internal Server Error", http.StatusInternalServerError)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
q := origURL.Query()
|
|
||||||
q.Set("_auth_token", idToken)
|
|
||||||
origURL.RawQuery = q.Encode()
|
|
||||||
|
|
||||||
http.Redirect(w, r, origURL.String(), http.StatusFound)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// cleanupStates periodically removes expired states
|
func getUserIDFromClaims(claims gojwt.MapClaims) string {
|
||||||
func (o *OIDC) cleanupStates() {
|
if sub, ok := claims["sub"].(string); ok && sub != "" {
|
||||||
for range time.Tick(time.Minute) {
|
return sub
|
||||||
cutoff := time.Now().Add(-stateExpiration)
|
|
||||||
o.statesMux.Lock()
|
|
||||||
for k, v := range o.states {
|
|
||||||
if v.CreatedAt.Before(cutoff) {
|
|
||||||
delete(o.states, k)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
o.statesMux.Unlock()
|
|
||||||
}
|
}
|
||||||
|
if userID, ok := claims["user_id"].(string); ok && userID != "" {
|
||||||
|
return userID
|
||||||
|
}
|
||||||
|
if email, ok := claims["email"].(string); ok && email != "" {
|
||||||
|
return email
|
||||||
|
}
|
||||||
|
return "unknown"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,6 +36,11 @@ func (Password) Type() Method {
|
|||||||
func (p Password) Authenticate(r *http.Request) (string, string) {
|
func (p Password) Authenticate(r *http.Request) (string, string) {
|
||||||
password := r.FormValue(passwordFormId)
|
password := r.FormValue(passwordFormId)
|
||||||
|
|
||||||
|
if password == "" {
|
||||||
|
// This cannot be authenticated so not worth wasting time sending the request.
|
||||||
|
return "", passwordFormId
|
||||||
|
}
|
||||||
|
|
||||||
res, err := p.client.Authenticate(r.Context(), &proto.AuthenticateRequest{
|
res, err := p.client.Authenticate(r.Context(), &proto.AuthenticateRequest{
|
||||||
Id: p.id,
|
Id: p.id,
|
||||||
AccountId: p.accountId,
|
AccountId: p.accountId,
|
||||||
@@ -56,7 +61,3 @@ func (p Password) Authenticate(r *http.Request) (string, string) {
|
|||||||
|
|
||||||
return "", passwordFormId
|
return "", passwordFormId
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p Password) Middleware(next http.Handler) http.Handler {
|
|
||||||
return next
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -36,6 +36,11 @@ func (Pin) Type() Method {
|
|||||||
func (p Pin) Authenticate(r *http.Request) (string, string) {
|
func (p Pin) Authenticate(r *http.Request) (string, string) {
|
||||||
pin := r.FormValue(pinFormId)
|
pin := r.FormValue(pinFormId)
|
||||||
|
|
||||||
|
if pin == "" {
|
||||||
|
// This cannot be authenticated so not worth wasting time sending the request.
|
||||||
|
return "", pinFormId
|
||||||
|
}
|
||||||
|
|
||||||
res, err := p.client.Authenticate(r.Context(), &proto.AuthenticateRequest{
|
res, err := p.client.Authenticate(r.Context(), &proto.AuthenticateRequest{
|
||||||
Id: p.id,
|
Id: p.id,
|
||||||
AccountId: p.accountId,
|
AccountId: p.accountId,
|
||||||
@@ -56,7 +61,3 @@ func (p Pin) Authenticate(r *http.Request) (string, string) {
|
|||||||
|
|
||||||
return "", pinFormId
|
return "", pinFormId
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p Pin) Middleware(next http.Handler) http.Handler {
|
|
||||||
return next
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -376,18 +376,12 @@ func (s *Server) updateMapping(ctx context.Context, mapping *proto.ProxyMapping)
|
|||||||
}
|
}
|
||||||
if mapping.GetAuth().GetOidc() != nil {
|
if mapping.GetAuth().GetOidc() != nil {
|
||||||
oidc := mapping.GetAuth().GetOidc()
|
oidc := mapping.GetAuth().GetOidc()
|
||||||
scheme, err := auth.NewOIDC(ctx, mapping.GetId(), mapping.GetAccountId(), s.ProxyURL, auth.OIDCConfig{
|
schemes = append(schemes, auth.NewOIDC(mgmtClient, mapping.GetId(), mapping.GetAccountId(), auth.OIDCConfig{
|
||||||
OIDCProviderURL: s.OIDCEndpoint,
|
Issuer: oidc.GetIssuer(),
|
||||||
OIDCClientID: s.OIDCClientId,
|
Audiences: oidc.GetAudiences(),
|
||||||
OIDCClientSecret: s.OIDCClientSecret,
|
KeysLocation: oidc.GetKeysLocation(),
|
||||||
OIDCScopes: s.OIDCScopes,
|
MaxTokenAgeSeconds: oidc.GetMaxTokenAge(),
|
||||||
DistributionGroups: oidc.GetDistributionGroups(),
|
}))
|
||||||
})
|
|
||||||
if err != nil {
|
|
||||||
s.Logger.WithError(err).Error("Failed to create OIDC scheme")
|
|
||||||
} else {
|
|
||||||
schemes = append(schemes, scheme)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if mapping.GetAuth().GetLink() {
|
if mapping.GetAuth().GetLink() {
|
||||||
schemes = append(schemes, auth.NewLink(s.mgmtClient, mapping.GetId(), mapping.GetAccountId()))
|
schemes = append(schemes, auth.NewLink(s.mgmtClient, mapping.GetId(), mapping.GetAccountId()))
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.26.0
|
// protoc-gen-go v1.26.0
|
||||||
// protoc v6.33.0
|
// protoc v3.21.12
|
||||||
// source: proxy_service.proto
|
// source: proxy_service.proto
|
||||||
|
|
||||||
package proto
|
package proto
|
||||||
@@ -381,7 +381,10 @@ type OIDC struct {
|
|||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
DistributionGroups []string `protobuf:"bytes,1,rep,name=distribution_groups,json=distributionGroups,proto3" json:"distribution_groups,omitempty"`
|
Issuer string `protobuf:"bytes,1,opt,name=issuer,proto3" json:"issuer,omitempty"`
|
||||||
|
Audiences []string `protobuf:"bytes,2,rep,name=audiences,proto3" json:"audiences,omitempty"`
|
||||||
|
KeysLocation string `protobuf:"bytes,3,opt,name=keys_location,json=keysLocation,proto3" json:"keys_location,omitempty"`
|
||||||
|
MaxTokenAge int64 `protobuf:"varint,4,opt,name=max_token_age,json=maxTokenAge,proto3" json:"max_token_age,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *OIDC) Reset() {
|
func (x *OIDC) Reset() {
|
||||||
@@ -416,13 +419,34 @@ func (*OIDC) Descriptor() ([]byte, []int) {
|
|||||||
return file_proxy_service_proto_rawDescGZIP(), []int{4}
|
return file_proxy_service_proto_rawDescGZIP(), []int{4}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *OIDC) GetDistributionGroups() []string {
|
func (x *OIDC) GetIssuer() string {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.DistributionGroups
|
return x.Issuer
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *OIDC) GetAudiences() []string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Audiences
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *OIDC) GetKeysLocation() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.KeysLocation
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *OIDC) GetMaxTokenAge() int64 {
|
||||||
|
if x != nil {
|
||||||
|
return x.MaxTokenAge
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
type ProxyMapping struct {
|
type ProxyMapping struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
@@ -1174,6 +1198,116 @@ func (*SendStatusUpdateResponse) Descriptor() ([]byte, []int) {
|
|||||||
return file_proxy_service_proto_rawDescGZIP(), []int{15}
|
return file_proxy_service_proto_rawDescGZIP(), []int{15}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type GetOIDCURLRequest struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||||
|
AccountId string `protobuf:"bytes,2,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"`
|
||||||
|
RedirectUrl string `protobuf:"bytes,3,opt,name=redirect_url,json=redirectUrl,proto3" json:"redirect_url,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetOIDCURLRequest) Reset() {
|
||||||
|
*x = GetOIDCURLRequest{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_proxy_service_proto_msgTypes[16]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetOIDCURLRequest) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*GetOIDCURLRequest) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *GetOIDCURLRequest) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_proxy_service_proto_msgTypes[16]
|
||||||
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use GetOIDCURLRequest.ProtoReflect.Descriptor instead.
|
||||||
|
func (*GetOIDCURLRequest) Descriptor() ([]byte, []int) {
|
||||||
|
return file_proxy_service_proto_rawDescGZIP(), []int{16}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetOIDCURLRequest) GetId() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Id
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetOIDCURLRequest) GetAccountId() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.AccountId
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetOIDCURLRequest) GetRedirectUrl() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.RedirectUrl
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
type GetOIDCURLResponse struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetOIDCURLResponse) Reset() {
|
||||||
|
*x = GetOIDCURLResponse{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_proxy_service_proto_msgTypes[17]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetOIDCURLResponse) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*GetOIDCURLResponse) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *GetOIDCURLResponse) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_proxy_service_proto_msgTypes[17]
|
||||||
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use GetOIDCURLResponse.ProtoReflect.Descriptor instead.
|
||||||
|
func (*GetOIDCURLResponse) Descriptor() ([]byte, []int) {
|
||||||
|
return file_proxy_service_proto_rawDescGZIP(), []int{17}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetOIDCURLResponse) GetUrl() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Url
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
var File_proxy_service_proto protoreflect.FileDescriptor
|
var File_proxy_service_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
var file_proxy_service_proto_rawDesc = []byte{
|
var file_proxy_service_proto_rawDesc = []byte{
|
||||||
@@ -1208,147 +1342,166 @@ var file_proxy_service_proto_rawDesc = []byte{
|
|||||||
0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e,
|
0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e,
|
||||||
0x4f, 0x49, 0x44, 0x43, 0x48, 0x00, 0x52, 0x04, 0x6f, 0x69, 0x64, 0x63, 0x88, 0x01, 0x01, 0x12,
|
0x4f, 0x49, 0x44, 0x43, 0x48, 0x00, 0x52, 0x04, 0x6f, 0x69, 0x64, 0x63, 0x88, 0x01, 0x01, 0x12,
|
||||||
0x12, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x6c,
|
0x12, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x6c,
|
||||||
0x69, 0x6e, 0x6b, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6f, 0x69, 0x64, 0x63, 0x22, 0x37, 0x0a, 0x04,
|
0x69, 0x6e, 0x6b, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6f, 0x69, 0x64, 0x63, 0x22, 0x85, 0x01, 0x0a,
|
||||||
0x4f, 0x49, 0x44, 0x43, 0x12, 0x2f, 0x0a, 0x13, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75,
|
0x04, 0x4f, 0x49, 0x44, 0x43, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x18,
|
||||||
0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28,
|
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x12, 0x1c, 0x0a,
|
||||||
0x09, 0x52, 0x12, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x47,
|
0x09, 0x61, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09,
|
||||||
0x72, 0x6f, 0x75, 0x70, 0x73, 0x22, 0x87, 0x02, 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x4d,
|
0x52, 0x09, 0x61, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x6b,
|
||||||
0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x36, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01,
|
0x65, 0x79, 0x73, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01,
|
||||||
0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e,
|
0x28, 0x09, 0x52, 0x0c, 0x6b, 0x65, 0x79, 0x73, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
||||||
0x74, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x55, 0x70,
|
0x12, 0x22, 0x0a, 0x0d, 0x6d, 0x61, 0x78, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x61, 0x67,
|
||||||
0x64, 0x61, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x0e,
|
0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x6d, 0x61, 0x78, 0x54, 0x6f, 0x6b, 0x65,
|
||||||
0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d,
|
0x6e, 0x41, 0x67, 0x65, 0x22, 0x87, 0x02, 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x4d, 0x61,
|
||||||
0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01,
|
0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x36, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20,
|
||||||
0x28, 0x09, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x16, 0x0a,
|
0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74,
|
||||||
0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64,
|
0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x55, 0x70, 0x64,
|
||||||
0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x2b, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x05, 0x20,
|
0x61, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x0e, 0x0a,
|
||||||
0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74,
|
0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a,
|
||||||
0x2e, 0x50, 0x61, 0x74, 0x68, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x04, 0x70, 0x61,
|
0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28,
|
||||||
0x74, 0x68, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x65, 0x74, 0x75, 0x70, 0x5f, 0x6b, 0x65, 0x79, 0x18,
|
0x09, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06,
|
||||||
0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x74, 0x75, 0x70, 0x4b, 0x65, 0x79, 0x12,
|
0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x6f,
|
||||||
0x2e, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e,
|
0x6d, 0x61, 0x69, 0x6e, 0x12, 0x2b, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x05, 0x20, 0x03,
|
||||||
0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x65,
|
0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e,
|
||||||
0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x61, 0x75, 0x74, 0x68, 0x22,
|
0x50, 0x61, 0x74, 0x68, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x04, 0x70, 0x61, 0x74,
|
||||||
0x3f, 0x0a, 0x14, 0x53, 0x65, 0x6e, 0x64, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67,
|
0x68, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x65, 0x74, 0x75, 0x70, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x06,
|
||||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x03, 0x6c, 0x6f, 0x67, 0x18, 0x01,
|
0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x74, 0x75, 0x70, 0x4b, 0x65, 0x79, 0x12, 0x2e,
|
||||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e,
|
0x0a, 0x04, 0x61, 0x75, 0x74, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6d,
|
||||||
0x74, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x52, 0x03, 0x6c, 0x6f, 0x67,
|
|
||||||
0x22, 0x17, 0x0a, 0x15, 0x53, 0x65, 0x6e, 0x64, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f,
|
|
||||||
0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xa0, 0x03, 0x0a, 0x09, 0x41, 0x63,
|
|
||||||
0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73,
|
|
||||||
0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f,
|
|
||||||
0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d,
|
|
||||||
0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d,
|
|
||||||
0x70, 0x12, 0x15, 0x0a, 0x06, 0x6c, 0x6f, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28,
|
|
||||||
0x09, 0x52, 0x05, 0x6c, 0x6f, 0x67, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f,
|
|
||||||
0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x63,
|
|
||||||
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x69,
|
|
||||||
0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x72,
|
|
||||||
0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x05,
|
|
||||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61,
|
|
||||||
0x74, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x1f,
|
|
||||||
0x0a, 0x0b, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x73, 0x18, 0x07, 0x20,
|
|
||||||
0x01, 0x28, 0x03, 0x52, 0x0a, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x73, 0x12,
|
|
||||||
0x16, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52,
|
|
||||||
0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f,
|
|
||||||
0x6e, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c,
|
|
||||||
0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1b, 0x0a, 0x09,
|
|
||||||
0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x70, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52,
|
|
||||||
0x08, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x70, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x75, 0x74,
|
|
||||||
0x68, 0x5f, 0x6d, 0x65, 0x63, 0x68, 0x61, 0x6e, 0x69, 0x73, 0x6d, 0x18, 0x0b, 0x20, 0x01, 0x28,
|
|
||||||
0x09, 0x52, 0x0d, 0x61, 0x75, 0x74, 0x68, 0x4d, 0x65, 0x63, 0x68, 0x61, 0x6e, 0x69, 0x73, 0x6d,
|
|
||||||
0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28,
|
|
||||||
0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x75, 0x74,
|
|
||||||
0x68, 0x5f, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52,
|
|
||||||
0x0b, 0x61, 0x75, 0x74, 0x68, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x22, 0xe5, 0x01, 0x0a,
|
|
||||||
0x13, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71,
|
|
||||||
0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
|
||||||
0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f,
|
|
||||||
0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e,
|
|
||||||
0x74, 0x49, 0x64, 0x12, 0x39, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18,
|
|
||||||
0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65,
|
|
||||||
0x6e, 0x74, 0x2e, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65,
|
|
||||||
0x73, 0x74, 0x48, 0x00, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x2a,
|
|
||||||
0x0a, 0x03, 0x70, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x61,
|
|
||||||
0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x50, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75,
|
|
||||||
0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x03, 0x70, 0x69, 0x6e, 0x12, 0x2d, 0x0a, 0x04, 0x6c, 0x69,
|
|
||||||
0x6e, 0x6b, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67,
|
|
||||||
0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
|
||||||
0x74, 0x48, 0x00, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x42, 0x09, 0x0a, 0x07, 0x72, 0x65, 0x71,
|
|
||||||
0x75, 0x65, 0x73, 0x74, 0x22, 0x2d, 0x0a, 0x0f, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64,
|
|
||||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77,
|
|
||||||
0x6f, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77,
|
|
||||||
0x6f, 0x72, 0x64, 0x22, 0x1e, 0x0a, 0x0a, 0x50, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
|
||||||
0x74, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03,
|
|
||||||
0x70, 0x69, 0x6e, 0x22, 0x3f, 0x0a, 0x0b, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65,
|
|
||||||
0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28,
|
|
||||||
0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x64, 0x69,
|
|
||||||
0x72, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x64, 0x69,
|
|
||||||
0x72, 0x65, 0x63, 0x74, 0x22, 0x30, 0x0a, 0x14, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69,
|
|
||||||
0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07,
|
|
||||||
0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73,
|
|
||||||
0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x22, 0xfe, 0x01, 0x0a, 0x17, 0x53, 0x65, 0x6e, 0x64, 0x53,
|
|
||||||
0x74, 0x61, 0x74, 0x75, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65,
|
|
||||||
0x73, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x5f, 0x70, 0x72,
|
|
||||||
0x6f, 0x78, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65,
|
|
||||||
0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a,
|
|
||||||
0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
|
|
||||||
0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x2f, 0x0a, 0x06, 0x73,
|
|
||||||
0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x6d, 0x61,
|
|
||||||
0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x53, 0x74,
|
|
||||||
0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2d, 0x0a, 0x12,
|
|
||||||
0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x73, 0x73, 0x75,
|
|
||||||
0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66,
|
|
||||||
0x69, 0x63, 0x61, 0x74, 0x65, 0x49, 0x73, 0x73, 0x75, 0x65, 0x64, 0x12, 0x28, 0x0a, 0x0d, 0x65,
|
|
||||||
0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01,
|
|
||||||
0x28, 0x09, 0x48, 0x00, 0x52, 0x0c, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61,
|
|
||||||
0x67, 0x65, 0x88, 0x01, 0x01, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f,
|
|
||||||
0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x1a, 0x0a, 0x18, 0x53, 0x65, 0x6e, 0x64, 0x53,
|
|
||||||
0x74, 0x61, 0x74, 0x75, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
|
||||||
0x6e, 0x73, 0x65, 0x2a, 0x64, 0x0a, 0x16, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x4d, 0x61, 0x70, 0x70,
|
|
||||||
0x69, 0x6e, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x17, 0x0a,
|
|
||||||
0x13, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x43, 0x52, 0x45,
|
|
||||||
0x41, 0x54, 0x45, 0x44, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45,
|
|
||||||
0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x4f, 0x44, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x01,
|
|
||||||
0x12, 0x17, 0x0a, 0x13, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f,
|
|
||||||
0x52, 0x45, 0x4d, 0x4f, 0x56, 0x45, 0x44, 0x10, 0x02, 0x2a, 0xc8, 0x01, 0x0a, 0x0b, 0x50, 0x72,
|
|
||||||
0x6f, 0x78, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, 0x0a, 0x14, 0x50, 0x52, 0x4f,
|
|
||||||
0x58, 0x59, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e,
|
|
||||||
0x47, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x50, 0x52, 0x4f, 0x58, 0x59, 0x5f, 0x53, 0x54, 0x41,
|
|
||||||
0x54, 0x55, 0x53, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x01, 0x12, 0x23, 0x0a, 0x1f,
|
|
||||||
0x50, 0x52, 0x4f, 0x58, 0x59, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x54, 0x55, 0x4e,
|
|
||||||
0x4e, 0x45, 0x4c, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x44, 0x10,
|
|
||||||
0x02, 0x12, 0x24, 0x0a, 0x20, 0x50, 0x52, 0x4f, 0x58, 0x59, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55,
|
|
||||||
0x53, 0x5f, 0x43, 0x45, 0x52, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x45, 0x5f, 0x50, 0x45,
|
|
||||||
0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x12, 0x23, 0x0a, 0x1f, 0x50, 0x52, 0x4f, 0x58, 0x59,
|
|
||||||
0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, 0x45, 0x52, 0x54, 0x49, 0x46, 0x49, 0x43,
|
|
||||||
0x41, 0x54, 0x45, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x04, 0x12, 0x16, 0x0a, 0x12,
|
|
||||||
0x50, 0x52, 0x4f, 0x58, 0x59, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x45, 0x52, 0x52,
|
|
||||||
0x4f, 0x52, 0x10, 0x05, 0x32, 0xf7, 0x02, 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x53, 0x65,
|
|
||||||
0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x5f, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x4d, 0x61, 0x70, 0x70,
|
|
||||||
0x69, 0x6e, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x23, 0x2e, 0x6d, 0x61, 0x6e, 0x61,
|
|
||||||
0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e,
|
|
||||||
0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24,
|
|
||||||
0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x4d,
|
|
||||||
0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70,
|
|
||||||
0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x54, 0x0a, 0x0d, 0x53, 0x65, 0x6e, 0x64, 0x41, 0x63,
|
|
||||||
0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x12, 0x20, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65,
|
|
||||||
0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c,
|
|
||||||
0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6d, 0x61, 0x6e, 0x61,
|
|
||||||
0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x41, 0x63, 0x63, 0x65, 0x73,
|
|
||||||
0x73, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x0c,
|
|
||||||
0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x1f, 0x2e, 0x6d,
|
|
||||||
0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e,
|
0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e,
|
||||||
0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e,
|
0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x61, 0x75, 0x74, 0x68, 0x22, 0x3f,
|
||||||
0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x65,
|
0x0a, 0x14, 0x53, 0x65, 0x6e, 0x64, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x52,
|
||||||
0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
|
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x03, 0x6c, 0x6f, 0x67, 0x18, 0x01, 0x20,
|
||||||
0x5d, 0x0a, 0x10, 0x53, 0x65, 0x6e, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x55, 0x70, 0x64,
|
0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74,
|
||||||
0x61, 0x74, 0x65, 0x12, 0x23, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74,
|
0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x52, 0x03, 0x6c, 0x6f, 0x67, 0x22,
|
||||||
0x2e, 0x53, 0x65, 0x6e, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74,
|
0x17, 0x0a, 0x15, 0x53, 0x65, 0x6e, 0x64, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67,
|
||||||
0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67,
|
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xa0, 0x03, 0x0a, 0x09, 0x41, 0x63, 0x63,
|
||||||
0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73,
|
0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74,
|
||||||
0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x08,
|
0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
|
||||||
0x5a, 0x06, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65,
|
||||||
|
0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70,
|
||||||
|
0x12, 0x15, 0x0a, 0x06, 0x6c, 0x6f, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
|
||||||
|
0x52, 0x05, 0x6c, 0x6f, 0x67, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75,
|
||||||
|
0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x63, 0x63,
|
||||||
|
0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63,
|
||||||
|
0x65, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x72, 0x76,
|
||||||
|
0x69, 0x63, 0x65, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x05, 0x20,
|
||||||
|
0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74,
|
||||||
|
0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x1f, 0x0a,
|
||||||
|
0x0b, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x73, 0x18, 0x07, 0x20, 0x01,
|
||||||
|
0x28, 0x03, 0x52, 0x0a, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x73, 0x12, 0x16,
|
||||||
|
0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06,
|
||||||
|
0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||||
|
0x73, 0x65, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x72,
|
||||||
|
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x73,
|
||||||
|
0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x70, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08,
|
||||||
|
0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x70, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x75, 0x74, 0x68,
|
||||||
|
0x5f, 0x6d, 0x65, 0x63, 0x68, 0x61, 0x6e, 0x69, 0x73, 0x6d, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09,
|
||||||
|
0x52, 0x0d, 0x61, 0x75, 0x74, 0x68, 0x4d, 0x65, 0x63, 0x68, 0x61, 0x6e, 0x69, 0x73, 0x6d, 0x12,
|
||||||
|
0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09,
|
||||||
|
0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x75, 0x74, 0x68,
|
||||||
|
0x5f, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b,
|
||||||
|
0x61, 0x75, 0x74, 0x68, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x22, 0xe5, 0x01, 0x0a, 0x13,
|
||||||
|
0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75,
|
||||||
|
0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||||
|
0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69,
|
||||||
|
0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
|
||||||
|
0x49, 0x64, 0x12, 0x39, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x03,
|
||||||
|
0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e,
|
||||||
|
0x74, 0x2e, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||||
|
0x74, 0x48, 0x00, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x2a, 0x0a,
|
||||||
|
0x03, 0x70, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x61, 0x6e,
|
||||||
|
0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x50, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||||
|
0x73, 0x74, 0x48, 0x00, 0x52, 0x03, 0x70, 0x69, 0x6e, 0x12, 0x2d, 0x0a, 0x04, 0x6c, 0x69, 0x6e,
|
||||||
|
0x6b, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65,
|
||||||
|
0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||||
|
0x48, 0x00, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x42, 0x09, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75,
|
||||||
|
0x65, 0x73, 0x74, 0x22, 0x2d, 0x0a, 0x0f, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52,
|
||||||
|
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f,
|
||||||
|
0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f,
|
||||||
|
0x72, 0x64, 0x22, 0x1e, 0x0a, 0x0a, 0x50, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||||
|
0x12, 0x10, 0x0a, 0x03, 0x70, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x70,
|
||||||
|
0x69, 0x6e, 0x22, 0x3f, 0x0a, 0x0b, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||||
|
0x74, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
||||||
|
0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x64, 0x69, 0x72,
|
||||||
|
0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x64, 0x69, 0x72,
|
||||||
|
0x65, 0x63, 0x74, 0x22, 0x30, 0x0a, 0x14, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63,
|
||||||
|
0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73,
|
||||||
|
0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75,
|
||||||
|
0x63, 0x63, 0x65, 0x73, 0x73, 0x22, 0xfe, 0x01, 0x0a, 0x17, 0x53, 0x65, 0x6e, 0x64, 0x53, 0x74,
|
||||||
|
0x61, 0x74, 0x75, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||||
|
0x74, 0x12, 0x28, 0x0a, 0x10, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x5f, 0x70, 0x72, 0x6f,
|
||||||
|
0x78, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x76,
|
||||||
|
0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x61,
|
||||||
|
0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||||
|
0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x2f, 0x0a, 0x06, 0x73, 0x74,
|
||||||
|
0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x6d, 0x61, 0x6e,
|
||||||
|
0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x53, 0x74, 0x61,
|
||||||
|
0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2d, 0x0a, 0x12, 0x63,
|
||||||
|
0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x73, 0x73, 0x75, 0x65,
|
||||||
|
0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69,
|
||||||
|
0x63, 0x61, 0x74, 0x65, 0x49, 0x73, 0x73, 0x75, 0x65, 0x64, 0x12, 0x28, 0x0a, 0x0d, 0x65, 0x72,
|
||||||
|
0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28,
|
||||||
|
0x09, 0x48, 0x00, 0x52, 0x0c, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67,
|
||||||
|
0x65, 0x88, 0x01, 0x01, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d,
|
||||||
|
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x1a, 0x0a, 0x18, 0x53, 0x65, 0x6e, 0x64, 0x53, 0x74,
|
||||||
|
0x61, 0x74, 0x75, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||||
|
0x73, 0x65, 0x22, 0x65, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x4f, 0x49, 0x44, 0x43, 0x55, 0x52, 0x4c,
|
||||||
|
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20,
|
||||||
|
0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75,
|
||||||
|
0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x63, 0x63,
|
||||||
|
0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65,
|
||||||
|
0x63, 0x74, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65,
|
||||||
|
0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x55, 0x72, 0x6c, 0x22, 0x26, 0x0a, 0x12, 0x47, 0x65, 0x74,
|
||||||
|
0x4f, 0x49, 0x44, 0x43, 0x55, 0x52, 0x4c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
|
||||||
|
0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72,
|
||||||
|
0x6c, 0x2a, 0x64, 0x0a, 0x16, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e,
|
||||||
|
0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x17, 0x0a, 0x13, 0x55,
|
||||||
|
0x50, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54,
|
||||||
|
0x45, 0x44, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x54,
|
||||||
|
0x59, 0x50, 0x45, 0x5f, 0x4d, 0x4f, 0x44, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x01, 0x12, 0x17,
|
||||||
|
0x0a, 0x13, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45,
|
||||||
|
0x4d, 0x4f, 0x56, 0x45, 0x44, 0x10, 0x02, 0x2a, 0xc8, 0x01, 0x0a, 0x0b, 0x50, 0x72, 0x6f, 0x78,
|
||||||
|
0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, 0x0a, 0x14, 0x50, 0x52, 0x4f, 0x58, 0x59,
|
||||||
|
0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10,
|
||||||
|
0x00, 0x12, 0x17, 0x0a, 0x13, 0x50, 0x52, 0x4f, 0x58, 0x59, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55,
|
||||||
|
0x53, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x01, 0x12, 0x23, 0x0a, 0x1f, 0x50, 0x52,
|
||||||
|
0x4f, 0x58, 0x59, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x54, 0x55, 0x4e, 0x4e, 0x45,
|
||||||
|
0x4c, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x44, 0x10, 0x02, 0x12,
|
||||||
|
0x24, 0x0a, 0x20, 0x50, 0x52, 0x4f, 0x58, 0x59, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f,
|
||||||
|
0x43, 0x45, 0x52, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x45, 0x5f, 0x50, 0x45, 0x4e, 0x44,
|
||||||
|
0x49, 0x4e, 0x47, 0x10, 0x03, 0x12, 0x23, 0x0a, 0x1f, 0x50, 0x52, 0x4f, 0x58, 0x59, 0x5f, 0x53,
|
||||||
|
0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, 0x45, 0x52, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54,
|
||||||
|
0x45, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x04, 0x12, 0x16, 0x0a, 0x12, 0x50, 0x52,
|
||||||
|
0x4f, 0x58, 0x59, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52,
|
||||||
|
0x10, 0x05, 0x32, 0xc4, 0x03, 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x53, 0x65, 0x72, 0x76,
|
||||||
|
0x69, 0x63, 0x65, 0x12, 0x5f, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e,
|
||||||
|
0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x23, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65,
|
||||||
|
0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x55,
|
||||||
|
0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6d,
|
||||||
|
0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x61, 0x70,
|
||||||
|
0x70, 0x69, 0x6e, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||||
|
0x73, 0x65, 0x30, 0x01, 0x12, 0x54, 0x0a, 0x0d, 0x53, 0x65, 0x6e, 0x64, 0x41, 0x63, 0x63, 0x65,
|
||||||
|
0x73, 0x73, 0x4c, 0x6f, 0x67, 0x12, 0x20, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65,
|
||||||
|
0x6e, 0x74, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67,
|
||||||
|
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65,
|
||||||
|
0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c,
|
||||||
|
0x6f, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x0c, 0x41, 0x75,
|
||||||
|
0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x1f, 0x2e, 0x6d, 0x61, 0x6e,
|
||||||
|
0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69,
|
||||||
|
0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6d, 0x61,
|
||||||
|
0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74,
|
||||||
|
0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5d, 0x0a,
|
||||||
|
0x10, 0x53, 0x65, 0x6e, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74,
|
||||||
|
0x65, 0x12, 0x23, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x53,
|
||||||
|
0x65, 0x6e, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52,
|
||||||
|
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d,
|
||||||
|
0x65, 0x6e, 0x74, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x55, 0x70,
|
||||||
|
0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x0a,
|
||||||
|
0x47, 0x65, 0x74, 0x4f, 0x49, 0x44, 0x43, 0x55, 0x52, 0x4c, 0x12, 0x1d, 0x2e, 0x6d, 0x61, 0x6e,
|
||||||
|
0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x49, 0x44, 0x43, 0x55,
|
||||||
|
0x52, 0x4c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x6d, 0x61, 0x6e, 0x61,
|
||||||
|
0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x49, 0x44, 0x43, 0x55, 0x52,
|
||||||
|
0x4c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x08, 0x5a, 0x06, 0x2f, 0x70, 0x72,
|
||||||
|
0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@@ -1364,7 +1517,7 @@ func file_proxy_service_proto_rawDescGZIP() []byte {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var file_proxy_service_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
|
var file_proxy_service_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
|
||||||
var file_proxy_service_proto_msgTypes = make([]protoimpl.MessageInfo, 16)
|
var file_proxy_service_proto_msgTypes = make([]protoimpl.MessageInfo, 18)
|
||||||
var file_proxy_service_proto_goTypes = []interface{}{
|
var file_proxy_service_proto_goTypes = []interface{}{
|
||||||
(ProxyMappingUpdateType)(0), // 0: management.ProxyMappingUpdateType
|
(ProxyMappingUpdateType)(0), // 0: management.ProxyMappingUpdateType
|
||||||
(ProxyStatus)(0), // 1: management.ProxyStatus
|
(ProxyStatus)(0), // 1: management.ProxyStatus
|
||||||
@@ -1384,17 +1537,19 @@ var file_proxy_service_proto_goTypes = []interface{}{
|
|||||||
(*AuthenticateResponse)(nil), // 15: management.AuthenticateResponse
|
(*AuthenticateResponse)(nil), // 15: management.AuthenticateResponse
|
||||||
(*SendStatusUpdateRequest)(nil), // 16: management.SendStatusUpdateRequest
|
(*SendStatusUpdateRequest)(nil), // 16: management.SendStatusUpdateRequest
|
||||||
(*SendStatusUpdateResponse)(nil), // 17: management.SendStatusUpdateResponse
|
(*SendStatusUpdateResponse)(nil), // 17: management.SendStatusUpdateResponse
|
||||||
(*timestamppb.Timestamp)(nil), // 18: google.protobuf.Timestamp
|
(*GetOIDCURLRequest)(nil), // 18: management.GetOIDCURLRequest
|
||||||
|
(*GetOIDCURLResponse)(nil), // 19: management.GetOIDCURLResponse
|
||||||
|
(*timestamppb.Timestamp)(nil), // 20: google.protobuf.Timestamp
|
||||||
}
|
}
|
||||||
var file_proxy_service_proto_depIdxs = []int32{
|
var file_proxy_service_proto_depIdxs = []int32{
|
||||||
18, // 0: management.GetMappingUpdateRequest.started_at:type_name -> google.protobuf.Timestamp
|
20, // 0: management.GetMappingUpdateRequest.started_at:type_name -> google.protobuf.Timestamp
|
||||||
7, // 1: management.GetMappingUpdateResponse.mapping:type_name -> management.ProxyMapping
|
7, // 1: management.GetMappingUpdateResponse.mapping:type_name -> management.ProxyMapping
|
||||||
6, // 2: management.Authentication.oidc:type_name -> management.OIDC
|
6, // 2: management.Authentication.oidc:type_name -> management.OIDC
|
||||||
0, // 3: management.ProxyMapping.type:type_name -> management.ProxyMappingUpdateType
|
0, // 3: management.ProxyMapping.type:type_name -> management.ProxyMappingUpdateType
|
||||||
4, // 4: management.ProxyMapping.path:type_name -> management.PathMapping
|
4, // 4: management.ProxyMapping.path:type_name -> management.PathMapping
|
||||||
5, // 5: management.ProxyMapping.auth:type_name -> management.Authentication
|
5, // 5: management.ProxyMapping.auth:type_name -> management.Authentication
|
||||||
10, // 6: management.SendAccessLogRequest.log:type_name -> management.AccessLog
|
10, // 6: management.SendAccessLogRequest.log:type_name -> management.AccessLog
|
||||||
18, // 7: management.AccessLog.timestamp:type_name -> google.protobuf.Timestamp
|
20, // 7: management.AccessLog.timestamp:type_name -> google.protobuf.Timestamp
|
||||||
12, // 8: management.AuthenticateRequest.password:type_name -> management.PasswordRequest
|
12, // 8: management.AuthenticateRequest.password:type_name -> management.PasswordRequest
|
||||||
13, // 9: management.AuthenticateRequest.pin:type_name -> management.PinRequest
|
13, // 9: management.AuthenticateRequest.pin:type_name -> management.PinRequest
|
||||||
14, // 10: management.AuthenticateRequest.link:type_name -> management.LinkRequest
|
14, // 10: management.AuthenticateRequest.link:type_name -> management.LinkRequest
|
||||||
@@ -1403,12 +1558,14 @@ var file_proxy_service_proto_depIdxs = []int32{
|
|||||||
8, // 13: management.ProxyService.SendAccessLog:input_type -> management.SendAccessLogRequest
|
8, // 13: management.ProxyService.SendAccessLog:input_type -> management.SendAccessLogRequest
|
||||||
11, // 14: management.ProxyService.Authenticate:input_type -> management.AuthenticateRequest
|
11, // 14: management.ProxyService.Authenticate:input_type -> management.AuthenticateRequest
|
||||||
16, // 15: management.ProxyService.SendStatusUpdate:input_type -> management.SendStatusUpdateRequest
|
16, // 15: management.ProxyService.SendStatusUpdate:input_type -> management.SendStatusUpdateRequest
|
||||||
3, // 16: management.ProxyService.GetMappingUpdate:output_type -> management.GetMappingUpdateResponse
|
18, // 16: management.ProxyService.GetOIDCURL:input_type -> management.GetOIDCURLRequest
|
||||||
9, // 17: management.ProxyService.SendAccessLog:output_type -> management.SendAccessLogResponse
|
3, // 17: management.ProxyService.GetMappingUpdate:output_type -> management.GetMappingUpdateResponse
|
||||||
15, // 18: management.ProxyService.Authenticate:output_type -> management.AuthenticateResponse
|
9, // 18: management.ProxyService.SendAccessLog:output_type -> management.SendAccessLogResponse
|
||||||
17, // 19: management.ProxyService.SendStatusUpdate:output_type -> management.SendStatusUpdateResponse
|
15, // 19: management.ProxyService.Authenticate:output_type -> management.AuthenticateResponse
|
||||||
16, // [16:20] is the sub-list for method output_type
|
17, // 20: management.ProxyService.SendStatusUpdate:output_type -> management.SendStatusUpdateResponse
|
||||||
12, // [12:16] is the sub-list for method input_type
|
19, // 21: management.ProxyService.GetOIDCURL:output_type -> management.GetOIDCURLResponse
|
||||||
|
17, // [17:22] is the sub-list for method output_type
|
||||||
|
12, // [12:17] is the sub-list for method input_type
|
||||||
12, // [12:12] is the sub-list for extension type_name
|
12, // [12:12] is the sub-list for extension type_name
|
||||||
12, // [12:12] is the sub-list for extension extendee
|
12, // [12:12] is the sub-list for extension extendee
|
||||||
0, // [0:12] is the sub-list for field type_name
|
0, // [0:12] is the sub-list for field type_name
|
||||||
@@ -1612,6 +1769,30 @@ func file_proxy_service_proto_init() {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
file_proxy_service_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*GetOIDCURLRequest); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
file_proxy_service_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*GetOIDCURLResponse); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
file_proxy_service_proto_msgTypes[3].OneofWrappers = []interface{}{}
|
file_proxy_service_proto_msgTypes[3].OneofWrappers = []interface{}{}
|
||||||
file_proxy_service_proto_msgTypes[9].OneofWrappers = []interface{}{
|
file_proxy_service_proto_msgTypes[9].OneofWrappers = []interface{}{
|
||||||
@@ -1626,7 +1807,7 @@ func file_proxy_service_proto_init() {
|
|||||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
RawDescriptor: file_proxy_service_proto_rawDesc,
|
RawDescriptor: file_proxy_service_proto_rawDesc,
|
||||||
NumEnums: 2,
|
NumEnums: 2,
|
||||||
NumMessages: 16,
|
NumMessages: 18,
|
||||||
NumExtensions: 0,
|
NumExtensions: 0,
|
||||||
NumServices: 1,
|
NumServices: 1,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -16,6 +16,8 @@ service ProxyService {
|
|||||||
rpc Authenticate(AuthenticateRequest) returns (AuthenticateResponse);
|
rpc Authenticate(AuthenticateRequest) returns (AuthenticateResponse);
|
||||||
|
|
||||||
rpc SendStatusUpdate(SendStatusUpdateRequest) returns (SendStatusUpdateResponse);
|
rpc SendStatusUpdate(SendStatusUpdateRequest) returns (SendStatusUpdateResponse);
|
||||||
|
|
||||||
|
rpc GetOIDCURL(GetOIDCURLRequest) returns (GetOIDCURLResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetMappingUpdateRequest is sent to initialise a mapping stream.
|
// GetMappingUpdateRequest is sent to initialise a mapping stream.
|
||||||
@@ -52,7 +54,10 @@ message Authentication {
|
|||||||
}
|
}
|
||||||
|
|
||||||
message OIDC {
|
message OIDC {
|
||||||
repeated string distribution_groups = 1;
|
string issuer = 1;
|
||||||
|
repeated string audiences = 2;
|
||||||
|
string keys_location = 3;
|
||||||
|
int64 max_token_age = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
message ProxyMapping {
|
message ProxyMapping {
|
||||||
@@ -136,3 +141,13 @@ message SendStatusUpdateRequest {
|
|||||||
|
|
||||||
// SendStatusUpdateResponse is intentionally empty to allow for future expansion
|
// SendStatusUpdateResponse is intentionally empty to allow for future expansion
|
||||||
message SendStatusUpdateResponse {}
|
message SendStatusUpdateResponse {}
|
||||||
|
|
||||||
|
message GetOIDCURLRequest {
|
||||||
|
string id = 1;
|
||||||
|
string account_id = 2;
|
||||||
|
string redirect_url = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetOIDCURLResponse {
|
||||||
|
string url = 1;
|
||||||
|
}
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ type ProxyServiceClient interface {
|
|||||||
SendAccessLog(ctx context.Context, in *SendAccessLogRequest, opts ...grpc.CallOption) (*SendAccessLogResponse, error)
|
SendAccessLog(ctx context.Context, in *SendAccessLogRequest, opts ...grpc.CallOption) (*SendAccessLogResponse, error)
|
||||||
Authenticate(ctx context.Context, in *AuthenticateRequest, opts ...grpc.CallOption) (*AuthenticateResponse, error)
|
Authenticate(ctx context.Context, in *AuthenticateRequest, opts ...grpc.CallOption) (*AuthenticateResponse, error)
|
||||||
SendStatusUpdate(ctx context.Context, in *SendStatusUpdateRequest, opts ...grpc.CallOption) (*SendStatusUpdateResponse, error)
|
SendStatusUpdate(ctx context.Context, in *SendStatusUpdateRequest, opts ...grpc.CallOption) (*SendStatusUpdateResponse, error)
|
||||||
|
GetOIDCURL(ctx context.Context, in *GetOIDCURLRequest, opts ...grpc.CallOption) (*GetOIDCURLResponse, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
type proxyServiceClient struct {
|
type proxyServiceClient struct {
|
||||||
@@ -91,6 +92,15 @@ func (c *proxyServiceClient) SendStatusUpdate(ctx context.Context, in *SendStatu
|
|||||||
return out, nil
|
return out, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *proxyServiceClient) GetOIDCURL(ctx context.Context, in *GetOIDCURLRequest, opts ...grpc.CallOption) (*GetOIDCURLResponse, error) {
|
||||||
|
out := new(GetOIDCURLResponse)
|
||||||
|
err := c.cc.Invoke(ctx, "/management.ProxyService/GetOIDCURL", in, out, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
// ProxyServiceServer is the server API for ProxyService service.
|
// ProxyServiceServer is the server API for ProxyService service.
|
||||||
// All implementations must embed UnimplementedProxyServiceServer
|
// All implementations must embed UnimplementedProxyServiceServer
|
||||||
// for forward compatibility
|
// for forward compatibility
|
||||||
@@ -99,6 +109,7 @@ type ProxyServiceServer interface {
|
|||||||
SendAccessLog(context.Context, *SendAccessLogRequest) (*SendAccessLogResponse, error)
|
SendAccessLog(context.Context, *SendAccessLogRequest) (*SendAccessLogResponse, error)
|
||||||
Authenticate(context.Context, *AuthenticateRequest) (*AuthenticateResponse, error)
|
Authenticate(context.Context, *AuthenticateRequest) (*AuthenticateResponse, error)
|
||||||
SendStatusUpdate(context.Context, *SendStatusUpdateRequest) (*SendStatusUpdateResponse, error)
|
SendStatusUpdate(context.Context, *SendStatusUpdateRequest) (*SendStatusUpdateResponse, error)
|
||||||
|
GetOIDCURL(context.Context, *GetOIDCURLRequest) (*GetOIDCURLResponse, error)
|
||||||
mustEmbedUnimplementedProxyServiceServer()
|
mustEmbedUnimplementedProxyServiceServer()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -118,6 +129,9 @@ func (UnimplementedProxyServiceServer) Authenticate(context.Context, *Authentica
|
|||||||
func (UnimplementedProxyServiceServer) SendStatusUpdate(context.Context, *SendStatusUpdateRequest) (*SendStatusUpdateResponse, error) {
|
func (UnimplementedProxyServiceServer) SendStatusUpdate(context.Context, *SendStatusUpdateRequest) (*SendStatusUpdateResponse, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method SendStatusUpdate not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method SendStatusUpdate not implemented")
|
||||||
}
|
}
|
||||||
|
func (UnimplementedProxyServiceServer) GetOIDCURL(context.Context, *GetOIDCURLRequest) (*GetOIDCURLResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method GetOIDCURL not implemented")
|
||||||
|
}
|
||||||
func (UnimplementedProxyServiceServer) mustEmbedUnimplementedProxyServiceServer() {}
|
func (UnimplementedProxyServiceServer) mustEmbedUnimplementedProxyServiceServer() {}
|
||||||
|
|
||||||
// UnsafeProxyServiceServer may be embedded to opt out of forward compatibility for this service.
|
// UnsafeProxyServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||||
@@ -206,6 +220,24 @@ func _ProxyService_SendStatusUpdate_Handler(srv interface{}, ctx context.Context
|
|||||||
return interceptor(ctx, in, info, handler)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func _ProxyService_GetOIDCURL_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(GetOIDCURLRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(ProxyServiceServer).GetOIDCURL(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: "/management.ProxyService/GetOIDCURL",
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(ProxyServiceServer).GetOIDCURL(ctx, req.(*GetOIDCURLRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
// ProxyService_ServiceDesc is the grpc.ServiceDesc for ProxyService service.
|
// ProxyService_ServiceDesc is the grpc.ServiceDesc for ProxyService service.
|
||||||
// It's only intended for direct use with grpc.RegisterService,
|
// It's only intended for direct use with grpc.RegisterService,
|
||||||
// and not to be introspected or modified (even as a copy)
|
// and not to be introspected or modified (even as a copy)
|
||||||
@@ -225,6 +257,10 @@ var ProxyService_ServiceDesc = grpc.ServiceDesc{
|
|||||||
MethodName: "SendStatusUpdate",
|
MethodName: "SendStatusUpdate",
|
||||||
Handler: _ProxyService_SendStatusUpdate_Handler,
|
Handler: _ProxyService_SendStatusUpdate_Handler,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
MethodName: "GetOIDCURL",
|
||||||
|
Handler: _ProxyService_GetOIDCURL_Handler,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
Streams: []grpc.StreamDesc{
|
Streams: []grpc.StreamDesc{
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user