Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

chore: get openid configuration in backend (#14622)

boojack65027f0c2783
diff --git a/backend/api/v1/idp_service.go b/backend/api/v1/idp_service.go
index c556e6d0b6..2373440b9d 100644
--- a/backend/api/v1/idp_service.go
+++ b/backend/api/v1/idp_service.go
@@ -3,6 +3,7 @@ package v1
import (
"context"
"fmt"
+ "slices"
"strings"
"github.com/pkg/errors"
@@ -38,11 +39,15 @@ func NewIdentityProviderService(store *store.Store, licenseService enterprise.Li
// GetIdentityProvider gets an identity provider.
func (s *IdentityProviderService) GetIdentityProvider(ctx context.Context, request *v1pb.GetIdentityProviderRequest) (*v1pb.IdentityProvider, error) {
- identityProvider, err := s.getIdentityProviderMessage(ctx, request.Name)
+ identityProviderMessage, err := s.getIdentityProviderMessage(ctx, request.Name)
if err != nil {
return nil, err
}
- return convertToIdentityProvider(identityProvider), nil
+ identityProvider, err := convertToIdentityProvider(identityProviderMessage)
+ if err != nil {
+ return nil, status.Errorf(codes.Internal, "failed to convert identity provider: %v", err)
+ }
+ return identityProvider, nil
}
// ListIdentityProviders lists all identity providers.
@@ -52,8 +57,12 @@ func (s *IdentityProviderService) ListIdentityProviders(ctx context.Context, req
return nil, status.Error(codes.Internal, err.Error())
}
response := &v1pb.ListIdentityProvidersResponse{}
- for _, identityProvider := range identityProviders {
- response.IdentityProviders = append(response.IdentityProviders, convertToIdentityProvider(identityProvider))
+ for _, identityProviderMessage := range identityProviders {
+ identityProvider, err := convertToIdentityProvider(identityProviderMessage)
+ if err != nil {
+ return nil, status.Errorf(codes.Internal, "failed to convert identity provider: %v", err)
+ }
+ response.IdentityProviders = append(response.IdentityProviders, identityProvider)
}
return response, nil
}
@@ -85,18 +94,21 @@ func (s *IdentityProviderService) CreateIdentityProvider(ctx context.Context, re
if err := validIdentityProviderConfig(request.IdentityProvider.Type, request.IdentityProvider.Config); err != nil {
return nil, status.Error(codes.InvalidArgument, err.Error())
}
- identityProviderMessage := store.IdentityProviderMessage{
+ identityProviderMessage, err := s.store.CreateIdentityProvider(ctx, &store.IdentityProviderMessage{
ResourceID: request.IdentityProviderId,
Title: request.IdentityProvider.Title,
Domain: request.IdentityProvider.Domain,
Type: storepb.IdentityProviderType(request.IdentityProvider.Type),
Config: convertIdentityProviderConfigToStore(request.IdentityProvider.GetConfig()),
- }
- identityProvider, err := s.store.CreateIdentityProvider(ctx, &identityProviderMessage)
+ })
if err != nil {
return nil, status.Error(codes.Internal, err.Error())
}
- return convertToIdentityProvider(identityProvider), nil
+ identityProvider, err := convertToIdentityProvider(identityProviderMessage)
+ if err != nil {
+ return nil, status.Errorf(codes.Internal, "failed to convert identity provider: %v", err)
+ }
+ return identityProvider, nil
}
// UpdateIdentityProvider updates an identity provider.
@@ -111,16 +123,16 @@ func (s *IdentityProviderService) UpdateIdentityProvider(ctx context.Context, re
return nil, err
}
- identityProvider, err := s.getIdentityProviderMessage(ctx, request.IdentityProvider.Name)
+ identityProviderMessage, err := s.getIdentityProviderMessage(ctx, request.IdentityProvider.Name)
if err != nil {
return nil, err
}
- if identityProvider.Deleted {
+ if identityProviderMessage.Deleted {
return nil, status.Errorf(codes.NotFound, "identity provider %q has been deleted", request.IdentityProvider.Name)
}
patch := &store.UpdateIdentityProviderMessage{
- ResourceID: identityProvider.ResourceID,
+ ResourceID: identityProviderMessage.ResourceID,
}
for _, path := range request.UpdateMask.Paths {
switch path {
@@ -136,30 +148,34 @@ func (s *IdentityProviderService) UpdateIdentityProvider(ctx context.Context, re
}
}
if patch.Config != nil {
- if err := validIdentityProviderConfig(v1pb.IdentityProviderType(identityProvider.Type), request.IdentityProvider.Config); err != nil {
+ if err := validIdentityProviderConfig(v1pb.IdentityProviderType(identityProviderMessage.Type), request.IdentityProvider.Config); err != nil {
return nil, status.Error(codes.InvalidArgument, err.Error())
}
// Don't update client secret if it's empty string.
- if identityProvider.Type == storepb.IdentityProviderType_OAUTH2 {
+ if identityProviderMessage.Type == storepb.IdentityProviderType_OAUTH2 {
if request.IdentityProvider.Config.GetOauth2Config().ClientSecret == "" {
- patch.Config.GetOauth2Config().ClientSecret = identityProvider.Config.GetOauth2Config().ClientSecret
+ patch.Config.GetOauth2Config().ClientSecret = identityProviderMessage.Config.GetOauth2Config().ClientSecret
}
- } else if identityProvider.Type == storepb.IdentityProviderType_OIDC {
+ } else if identityProviderMessage.Type == storepb.IdentityProviderType_OIDC {
if request.IdentityProvider.Config.GetOidcConfig().ClientSecret == "" {
- patch.Config.GetOidcConfig().ClientSecret = identityProvider.Config.GetOidcConfig().ClientSecret
+ patch.Config.GetOidcConfig().ClientSecret = identityProviderMessage.Config.GetOidcConfig().ClientSecret
}
- } else if identityProvider.Type == storepb.IdentityProviderType_LDAP {
+ } else if identityProviderMessage.Type == storepb.IdentityProviderType_LDAP {
if request.IdentityProvider.Config.GetLdapConfig().BindPassword == "" {
- patch.Config.GetLdapConfig().BindPassword = identityProvider.Config.GetLdapConfig().BindPassword
+ patch.Config.GetLdapConfig().BindPassword = identityProviderMessage.Config.GetLdapConfig().BindPassword
}
}
}
- identityProvider, err = s.store.UpdateIdentityProvider(ctx, patch)
+ identityProviderMessage, err = s.store.UpdateIdentityProvider(ctx, patch)
if err != nil {
return nil, status.Error(codes.Internal, err.Error())
}
- return convertToIdentityProvider(identityProvider), nil
+ identityProvider, err := convertToIdentityProvider(identityProviderMessage)
+ if err != nil {
+ return nil, status.Error(codes.Internal, fmt.Sprintf("failed to convert identity provider: %v", err))
+ }
+ return identityProvider, nil
}
// DeleteIdentityProvider deletes an identity provider.
@@ -184,26 +200,30 @@ func (s *IdentityProviderService) DeleteIdentityProvider(ctx context.Context, re
// UndeleteIdentityProvider undeletes an identity provider.
func (s *IdentityProviderService) UndeleteIdentityProvider(ctx context.Context, request *v1pb.UndeleteIdentityProviderRequest) (*v1pb.IdentityProvider, error) {
- identityProvider, err := s.getIdentityProviderMessage(ctx, request.Name)
+ identityProviderMessage, err := s.getIdentityProviderMessage(ctx, request.Name)
if err != nil {
return nil, err
}
- if !identityProvider.Deleted {
+ if !identityProviderMessage.Deleted {
return nil, status.Errorf(codes.InvalidArgument, "identity provider %q is active", request.Name)
}
- if err := s.checkFeatureAvailable(v1pb.IdentityProviderType(identityProvider.Type)); err != nil {
+ if err := s.checkFeatureAvailable(v1pb.IdentityProviderType(identityProviderMessage.Type)); err != nil {
return nil, err
}
patch := &store.UpdateIdentityProviderMessage{
- ResourceID: identityProvider.ResourceID,
+ ResourceID: identityProviderMessage.ResourceID,
Delete: &undeletePatch,
}
- identityProvider, err = s.store.UpdateIdentityProvider(ctx, patch)
+ identityProviderMessage, err = s.store.UpdateIdentityProvider(ctx, patch)
if err != nil {
return nil, status.Error(codes.Internal, err.Error())
}
- return convertToIdentityProvider(identityProvider), nil
+ identityProvider, err := convertToIdentityProvider(identityProviderMessage)
+ if err != nil {
+ return nil, status.Errorf(codes.Internal, "failed to convert identity provider: %v", err)
+ }
+ return identityProvider, nil
}
func (s *IdentityProviderService) checkFeatureAvailable(ssoType v1pb.IdentityProviderType) error {
@@ -241,15 +261,15 @@ func (s *IdentityProviderService) TestIdentityProvider(ctx context.Context, requ
if identityProvider.Type == v1pb.IdentityProviderType_OAUTH2 {
// Find client secret for those existed identity providers.
- if request.IdentityProvider.Config.GetOauth2Config().ClientSecret == "" {
- storedIdentityProvider, err := s.getIdentityProviderMessage(ctx, request.IdentityProvider.Name)
+ if identityProvider.Config.GetOauth2Config().ClientSecret == "" {
+ storedIdentityProvider, err := s.getIdentityProviderMessage(ctx, identityProvider.Name)
if err != nil {
return nil, status.Errorf(codes.Internal, "failed to find identity provider, error: %s", err.Error())
}
if storedIdentityProvider == nil {
- return nil, status.Errorf(codes.Internal, "identity provider %s not found", request.IdentityProvider.Name)
+ return nil, status.Errorf(codes.Internal, "identity provider %s not found", identityProvider.Name)
}
- request.IdentityProvider.Config.GetOauth2Config().ClientSecret = storedIdentityProvider.Config.GetOauth2Config().ClientSecret
+ identityProvider.Config.GetOauth2Config().ClientSecret = storedIdentityProvider.Config.GetOauth2Config().ClientSecret
}
oauth2Context := request.GetOauth2Context()
if oauth2Context == nil {
@@ -271,15 +291,15 @@ func (s *IdentityProviderService) TestIdentityProvider(ctx context.Context, requ
}
} else if identityProvider.Type == v1pb.IdentityProviderType_OIDC {
// Find client secret for those existed identity providers.
- if request.IdentityProvider.Config.GetOidcConfig().ClientSecret == "" {
- storedIdentityProvider, err := s.getIdentityProviderMessage(ctx, request.IdentityProvider.Name)
+ if identityProvider.Config.GetOidcConfig().ClientSecret == "" {
+ storedIdentityProvider, err := s.getIdentityProviderMessage(ctx, identityProvider.Name)
if err != nil {
return nil, status.Errorf(codes.Internal, "failed to find identity provider, error: %s", err.Error())
}
if storedIdentityProvider == nil {
- return nil, status.Errorf(codes.Internal, "identity provider %s not found", request.IdentityProvider.Name)
+ return nil, status.Errorf(codes.Internal, "identity provider %s not found", identityProvider.Name)
}
- request.IdentityProvider.Config.GetOidcConfig().ClientSecret = storedIdentityProvider.Config.GetOidcConfig().ClientSecret
+ identityProvider.Config.GetOidcConfig().ClientSecret = storedIdentityProvider.Config.GetOidcConfig().ClientSecret
}
oauth2Context := request.GetOauth2Context()
if oauth2Context == nil {
@@ -310,15 +330,15 @@ func (s *IdentityProviderService) TestIdentityProvider(ctx context.Context, requ
}
} else if identityProvider.Type == v1pb.IdentityProviderType_LDAP {
// Retrieve bind password from stored identity provider if not provided.
- if request.IdentityProvider.Config.GetLdapConfig().BindPassword == "" {
- storedIdentityProvider, err := s.getIdentityProviderMessage(ctx, request.IdentityProvider.Name)
+ if identityProvider.Config.GetLdapConfig().BindPassword == "" {
+ storedIdentityProvider, err := s.getIdentityProviderMessage(ctx, identityProvider.Name)
if err != nil {
return nil, status.Errorf(codes.Internal, "failed to find identity provider, error: %s", err.Error())
}
if storedIdentityProvider == nil {
- return nil, status.Errorf(codes.Internal, "identity provider %s not found", request.IdentityProvider.Name)
+ return nil, status.Errorf(codes.Internal, "identity provider %s not found", identityProvider.Name)
}
- request.IdentityProvider.Config.GetLdapConfig().BindPassword = storedIdentityProvider.Config.GetLdapConfig().BindPassword
+ identityProvider.Config.GetLdapConfig().BindPassword = storedIdentityProvider.Config.GetLdapConfig().BindPassword
}
identityProviderConfig := convertIdentityProviderConfigToStore(identityProvider.Config).GetLdapConfig()
ldapIdentityProvider, err := ldap.NewIdentityProvider(
@@ -368,9 +388,12 @@ func (s *IdentityProviderService) getIdentityProviderMessage(ctx context.Context
return identityProvider, nil
}
-func convertToIdentityProvider(identityProvider *store.IdentityProviderMessage) *v1pb.IdentityProvider {
+func convertToIdentityProvider(identityProvider *store.IdentityProviderMessage) (*v1pb.IdentityProvider, error) {
identityProviderType := v1pb.IdentityProviderType(identityProvider.Type)
- config := convertIdentityProviderConfigFromStore(identityProvider.Config)
+ config, err := convertIdentityProviderConfigFromStore(identityProvider.Config)
+ if err != nil {
+ return nil, err
+ }
return &v1pb.IdentityProvider{
Name: fmt.Sprintf("%s%s", common.IdentityProviderNamePrefix, identityProvider.ResourceID),
State: convertDeletedToState(identityProvider.Deleted),
@@ -378,10 +401,10 @@ func convertToIdentityProvider(identityProvider *store.IdentityProviderMessage)
Domain: identityProvider.Domain,
Type: identityProviderType,
Config: config,
- }
+ }, nil
}
-func convertIdentityProviderConfigFromStore(identityProviderConfig *storepb.IdentityProviderConfig) *v1pb.IdentityProviderConfig {
+func convertIdentityProviderConfigFromStore(identityProviderConfig *storepb.IdentityProviderConfig) (*v1pb.IdentityProviderConfig, error) {
if v := identityProviderConfig.GetOauth2Config(); v != nil {
fieldMapping := v1pb.FieldMapping{
Identifier: v.FieldMapping.Identifier,
@@ -403,8 +426,19 @@ func convertIdentityProviderConfigFromStore(identityProviderConfig *storepb.Iden
AuthStyle: v1pb.OAuth2AuthStyle(v.AuthStyle),
},
},
- }
+ }, nil
} else if v := identityProviderConfig.GetOidcConfig(); v != nil {
+ // Fetch openid configuration to get the auth endpoint and supported scopes.
+ openidConfigration, err := oidc.GetOpenIDConfiguration(v.Issuer)
+ if err != nil {
+ return nil, errors.Wrap(err, "failed to fetch openid configuration")
+ }
+ scopes := oidc.DefaultScopes
+ // Some IdPs like authning.cn doesn't expose "username" as part of standard claims.
+ // We need to check if it's supported by the IdP and add it to the scopes.
+ if slices.Contains(openidConfigration.ScopesSupported, "username") {
+ scopes = append(scopes, "username")
+ }
fieldMapping := v1pb.FieldMapping{
Identifier: v.FieldMapping.Identifier,
DisplayName: v.FieldMapping.DisplayName,
@@ -417,13 +451,14 @@ func convertIdentityProviderConfigFromStore(identityProviderConfig *storepb.Iden
Issuer: v.Issuer,
ClientId: v.ClientId,
ClientSecret: "", // SECURITY: We do not expose the client secret
- Scopes: oidc.DefaultScopes,
FieldMapping: &fieldMapping,
SkipTlsVerify: v.SkipTlsVerify,
AuthStyle: v1pb.OAuth2AuthStyle(v.AuthStyle),
+ Scopes: scopes,
+ AuthEndpoint: openidConfigration.AuthorizationEndpoint,
},
},
- }
+ }, nil
} else if v := identityProviderConfig.GetLdapConfig(); v != nil {
fieldMapping := v1pb.FieldMapping{
Identifier: v.FieldMapping.Identifier,
@@ -445,9 +480,9 @@ func convertIdentityProviderConfigFromStore(identityProviderConfig *storepb.Iden
FieldMapping: &fieldMapping,
},
},
- }
+ }, nil
}
- return nil
+ return nil, nil
}
func convertIdentityProviderConfigToStore(identityProviderConfig *v1pb.IdentityProviderConfig) *storepb.IdentityProviderConfig {
diff --git a/backend/plugin/idp/oidc/oidc.go b/backend/plugin/idp/oidc/oidc.go
index 4f472a06b7..9e9857337f 100644
--- a/backend/plugin/idp/oidc/oidc.go
+++ b/backend/plugin/idp/oidc/oidc.go
@@ -4,8 +4,10 @@ package oidc
import (
"context"
"crypto/tls"
+ "encoding/json"
"log/slog"
"net/http"
+ "strings"
"github.com/coreos/go-oidc"
"github.com/pkg/errors"
@@ -168,3 +170,41 @@ func (p *IdentityProvider) UserInfo(ctx context.Context, token *oauth2.Token, no
}
return userInfo, nil
}
+
+// The common OIDC configuration response.
+// Refer to https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata.
+type OpenIDConfigurationResponse struct {
+ AuthorizationEndpoint string `json:"authorization_endpoint"`
+ ScopesSupported []string `json:"scopes_supported"`
+}
+
+// openidConfigResponseCache is a cache for the OpenID Configuration Response.
+var openidConfigResponseCache = make(map[string]*OpenIDConfigurationResponse)
+
+// GetOpenIDConfiguration fetches the OpenID Configuration from the given issuer.
+func GetOpenIDConfiguration(issuer string) (*OpenIDConfigurationResponse, error) {
+ if config, found := openidConfigResponseCache[issuer]; found {
+ return config, nil
+ }
+
+ client := &http.Client{
+ Transport: &http.Transport{
+ TLSClientConfig: &tls.Config{
+ InsecureSkipVerify: true,
+ },
+ },
+ }
+ resp, err := client.Get(strings.TrimSuffix(issuer, "/") + "/.well-known/openid-configuration")
+ if err != nil {
+ return nil, errors.Wrap(err, "fetch openid configuration")
+ }
+ defer resp.Body.Close()
+
+ var config OpenIDConfigurationResponse
+ if err := json.NewDecoder(resp.Body).Decode(&config); err != nil {
+ return nil, errors.Wrap(err, "unmarshal openid configuration")
+ }
+
+ openidConfigResponseCache[issuer] = &config
+ return &config, nil
+}
diff --git a/backend/plugin/idp/oidc/oidc_test.go b/backend/plugin/idp/oidc/oidc_test.go
index ee532c0a24..8f4e4bd902 100644
--- a/backend/plugin/idp/oidc/oidc_test.go
+++ b/backend/plugin/idp/oidc/oidc_test.go
@@ -299,3 +299,26 @@ func TestIdentityProvider_SelfSigned(t *testing.T) {
assert.Equal(t, wantUserInfo, userInfo)
})
}
+
+func TestGetOpenIDConfigration(t *testing.T) {
+ tests := []struct {
+ issuer string
+ response *OpenIDConfigurationResponse
+ }{
+ {
+ issuer: "https://accounts.google.com",
+ response: &OpenIDConfigurationResponse{
+ AuthorizationEndpoint: "https://accounts.google.com/o/oauth2/v2/auth",
+ ScopesSupported: []string{"openid", "email", "profile"},
+ },
+ },
+ }
+
+ for _, test := range tests {
+ t.Run(test.issuer, func(t *testing.T) {
+ response, err := GetOpenIDConfiguration(test.issuer)
+ require.NoError(t, err)
+ assert.Equal(t, test.response, response)
+ })
+ }
+}
diff --git a/frontend/src/types/proto/v1/idp_service.ts b/frontend/src/types/proto/v1/idp_service.ts
index f992e62d7d..caf0f19afd 100644
--- a/frontend/src/types/proto/v1/idp_service.ts
+++ b/frontend/src/types/proto/v1/idp_service.ts
@@ -267,10 +267,19 @@ export interface OIDCIdentityProviderConfig {
issuer: string;
clientId: string;
clientSecret: string;
- scopes: string[];
fieldMapping: FieldMapping | undefined;
skipTlsVerify: boolean;
authStyle: OAuth2AuthStyle;
+ /**
+ * The scopes that the OIDC provider supports.
+ * Should be fetched from the well-known configuration file of the OIDC provider.
+ */
+ scopes: string[];
+ /**
+ * The authorization endpoint of the OIDC provider.
+ * Should be fetched from the well-known configuration file of the OIDC provider.
+ */
+ authEndpoint: string;
}
/** LDAPIdentityProviderConfig is the structure for LDAP identity provider config. */
@@ -1472,10 +1481,11 @@ function createBaseOIDCIdentityProviderConfig(): OIDCIdentityProviderConfig {
issuer: "",
clientId: "",
clientSecret: "",
- scopes: [],
fieldMapping: undefined,
skipTlsVerify: false,
authStyle: OAuth2AuthStyle.OAUTH2_AUTH_STYLE_UNSPECIFIED,
+ scopes: [],
+ authEndpoint: "",
};
}
@@ -1490,9 +1500,6 @@ export const OIDCIdentityProviderConfig: MessageFns<OIDCIdentityProviderConfig>
if (message.clientSecret !== "") {
writer.uint32(26).string(message.clientSecret);
}
- for (const v of message.scopes) {
- writer.uint32(34).string(v!);
- }
if (message.fieldMapping !== undefined) {
FieldMapping.encode(message.fieldMapping, writer.uint32(42).fork()).join();
}
@@ -1502,6 +1509,12 @@ export const OIDCIdentityProviderConfig: MessageFns<OIDCIdentityProviderConfig>
if (message.authStyle !== OAuth2AuthStyle.OAUTH2_AUTH_STYLE_UNSPECIFIED) {
writer.uint32(56).int32(oAuth2AuthStyleToNumber(message.authStyle));
}
+ for (const v of message.scopes) {
+ writer.uint32(34).string(v!);
+ }
+ if (message.authEndpoint !== "") {
+ writer.uint32(66).string(message.authEndpoint);
+ }
return writer;
},
@@ -1536,14 +1549,6 @@ export const OIDCIdentityProviderConfig: MessageFns<OIDCIdentityProviderConfig>
message.clientSecret = reader.string();
continue;
}
- case 4: {
- if (tag !== 34) {
- break;
- }
-
- message.scopes.push(reader.string());
- continue;
- }
case 5: {
if (tag !== 42) {
break;
@@ -1568,6 +1573,22 @@ export const OIDCIdentityProviderConfig: MessageFns<OIDCIdentityProviderConfig>
message.authStyle = oAuth2AuthStyleFromJSON(reader.int32());
continue;
}
+ case 4: {
+ if (tag !== 34) {
+ break;
+ }
+
+ message.scopes.push(reader.string());
+ continue;
+ }
+ case 8: {
+ if (tag !== 66) {
+ break;
+ }
+
+ message.authEndpoint = reader.string();
+ continue;
+ }
}
if ((tag & 7) === 4 || tag === 0) {
break;
@@ -1582,12 +1603,13 @@ export const OIDCIdentityProviderConfig: MessageFns<OIDCIdentityProviderConfig>
issuer: isSet(object.issuer) ? globalThis.String(object.issuer) : "",
clientId: isSet(object.clientId) ? globalThis.String(object.clientId) : "",
clientSecret: isSet(object.clientSecret) ? globalThis.String(object.clientSecret) : "",
- scopes: globalThis.Array.isArray(object?.scopes) ? object.scopes.map((e: any) => globalThis.String(e)) : [],
fieldMapping: isSet(object.fieldMapping) ? FieldMapping.fromJSON(object.fieldMapping) : undefined,
skipTlsVerify: isSet(object.skipTlsVerify) ? globalThis.Boolean(object.skipTlsVerify) : false,
authStyle: isSet(object.authStyle)
? oAuth2AuthStyleFromJSON(object.authStyle)
: OAuth2AuthStyle.OAUTH2_AUTH_STYLE_UNSPECIFIED,
+ scopes: globalThis.Array.isArray(object?.scopes) ? object.scopes.map((e: any) => globalThis.String(e)) : [],
+ authEndpoint: isSet(object.authEndpoint) ? globalThis.String(object.authEndpoint) : "",
};
},
@@ -1602,9 +1624,6 @@ export const OIDCIdentityProviderConfig: MessageFns<OIDCIdentityProviderConfig>
if (message.clientSecret !== "") {
obj.clientSecret = message.clientSecret;
}
- if (message.scopes?.length) {
- obj.scopes = message.scopes;
- }
if (message.fieldMapping !== undefined) {
obj.fieldMapping = FieldMapping.toJSON(message.fieldMapping);
}
@@ -1614,6 +1633,12 @@ export const OIDCIdentityProviderConfig: MessageFns<OIDCIdentityProviderConfig>
if (message.authStyle !== OAuth2AuthStyle.OAUTH2_AUTH_STYLE_UNSPECIFIED) {
obj.authStyle = oAuth2AuthStyleToJSON(message.authStyle);
}
+ if (message.scopes?.length) {
+ obj.scopes = message.scopes;
+ }
+ if (message.authEndpoint !== "") {
+ obj.authEndpoint = message.authEndpoint;
+ }
return obj;
},
@@ -1625,12 +1650,13 @@ export const OIDCIdentityProviderConfig: MessageFns<OIDCIdentityProviderConfig>
message.issuer = object.issuer ?? "";
message.clientId = object.clientId ?? "";
message.clientSecret = object.clientSecret ?? "";
- message.scopes = object.scopes?.map((e) => e) || [];
message.fieldMapping = (object.fieldMapping !== undefined && object.fieldMapping !== null)
? FieldMapping.fromPartial(object.fieldMapping)
: undefined;
message.skipTlsVerify = object.skipTlsVerify ?? false;
message.authStyle = object.authStyle ?? OAuth2AuthStyle.OAUTH2_AUTH_STYLE_UNSPECIFIED;
+ message.scopes = object.scopes?.map((e) => e) || [];
+ message.authEndpoint = object.authEndpoint ?? "";
return message;
},
};
diff --git a/frontend/src/utils/sso.ts b/frontend/src/utils/sso.ts
index 4697637089..1787365ad3 100644
--- a/frontend/src/utils/sso.ts
+++ b/frontend/src/utils/sso.ts
@@ -1,5 +1,3 @@
-import axios from "axios";
-import { trimEnd, uniq } from "lodash-es";
import { stringify } from "qs";
import type { OAuthState } from "@/types";
import type { IdentityProvider } from "@/types/proto/v1/idp_service";
@@ -7,9 +5,6 @@ import { IdentityProviderType } from "@/types/proto/v1/idp_service";
export const SSOConfigSessionKey = "sso-config";
-// defaultOIDCScopes is a list of scopes that are part of OIDC standard claims. Same as backend.
-const defaultOIDCScopes = ["openid", "profile", "email"];
-
export async function openWindowForSSO(
identityProvider: IdentityProvider,
popup = true,
@@ -46,21 +41,7 @@ export async function openWindowForSSO(
if (!oidcConfig) {
return null;
}
-
- const openidConfig = (
- await axios.get(
- `${trimEnd(oidcConfig.issuer, "/")}/.well-known/openid-configuration`
- )
- ).data;
-
- // Some IdPs like authning.cn doesn't expose "username" as part of standard claims,
- // so we need to request the claim explicitly when possible.
- if (openidConfig.scopes_supported.includes("username")) {
- oidcConfig.scopes.push("username");
- }
- oidcConfig.scopes = uniq([...oidcConfig.scopes, ...defaultOIDCScopes]);
-
- uri.basePath = openidConfig.authorization_endpoint;
+ uri.basePath = oidcConfig.authEndpoint;
Object.assign(uri.query, {
client_id: oidcConfig.clientId,
scope: oidcConfig.scopes.join(" "),
diff --git a/proto/gen/grpc-doc/openapi.yaml b/proto/gen/grpc-doc/openapi.yaml
index e35299438a..d1509a98d3 100644
--- a/proto/gen/grpc-doc/openapi.yaml
+++ b/proto/gen/grpc-doc/openapi.yaml
@@ -12012,10 +12012,6 @@ components:
type: string
clientSecret:
type: string
- scopes:
- type: array
- items:
- type: string
fieldMapping:
$ref: '#/components/schemas/FieldMapping'
skipTlsVerify:
@@ -12027,6 +12023,20 @@ components:
- IN_HEADER
type: string
format: enum
+ scopes:
+ readOnly: true
+ type: array
+ items:
+ type: string
+ description: |-
+ The scopes that the OIDC provider supports.
+ Should be fetched from the well-known configuration file of the OIDC provider.
+ authEndpoint:
+ readOnly: true
+ type: string
+ description: |-
+ The authorization endpoint of the OIDC provider.
+ Should be fetched from the well-known configuration file of the OIDC provider.
description: OIDCIdentityProviderConfig is the structure for OIDC identity provider config.
OIDCIdentityProviderContext:
type: object
diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.md
index 717be8fd65..ba6169d86c 100644
--- a/proto/gen/grpc-doc/v1/README.md
+++ b/proto/gen/grpc-doc/v1/README.md
@@ -7285,10 +7285,11 @@ OIDCIdentityProviderConfig is the structure for OIDC identity provider config.
| issuer | [string](#string) | | |
| client_id | [string](#string) | | |
| client_secret | [string](#string) | | |
-| scopes | [string](#string) | repeated | |
| field_mapping | [FieldMapping](#bytebase-v1-FieldMapping) | | |
| skip_tls_verify | [bool](#bool) | | |
| auth_style | [OAuth2AuthStyle](#bytebase-v1-OAuth2AuthStyle) | | |
+| scopes | [string](#string) | repeated | The scopes that the OIDC provider supports. Should be fetched from the well-known configuration file of the OIDC provider. |
+| auth_endpoint | [string](#string) | | The authorization endpoint of the OIDC provider. Should be fetched from the well-known configuration file of the OIDC provider. |
diff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.html
index c4ff52993c..a7d58896b6 100644
--- a/proto/gen/grpc-doc/v1/index.html
+++ b/proto/gen/grpc-doc/v1/index.html
@@ -20566,13 +20566,6 @@ If this field is omitted, there are no subsequent pages. </p></td>
<td><p> </p></td>
</tr>
- <tr>
- <td>scopes</td>
- <td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p> </p></td>
- </tr>
-
<tr>
<td>field_mapping</td>
<td><a href="#bytebase.v1.FieldMapping">FieldMapping</a></td>
@@ -20594,6 +20587,22 @@ If this field is omitted, there are no subsequent pages. </p></td>
<td><p> </p></td>
</tr>
+ <tr>
+ <td>scopes</td>
+ <td><a href="#string">string</a></td>
+ <td>repeated</td>
+ <td><p>The scopes that the OIDC provider supports.
+Should be fetched from the well-known configuration file of the OIDC provider. </p></td>
+ </tr>
+
+ <tr>
+ <td>auth_endpoint</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The authorization endpoint of the OIDC provider.
+Should be fetched from the well-known configuration file of the OIDC provider. </p></td>
+ </tr>
+
</tbody>
</table>
diff --git a/proto/generated-go/v1/idp_service.pb.go b/proto/generated-go/v1/idp_service.pb.go
index d41149c6c0..28699d04b2 100644
--- a/proto/generated-go/v1/idp_service.pb.go
+++ b/proto/generated-go/v1/idp_service.pb.go
@@ -968,10 +968,15 @@ type OIDCIdentityProviderConfig struct {
Issuer string `protobuf:"bytes,1,opt,name=issuer,proto3" json:"issuer,omitempty"`
ClientId string `protobuf:"bytes,2,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
ClientSecret string `protobuf:"bytes,3,opt,name=client_secret,json=clientSecret,proto3" json:"client_secret,omitempty"`
- Scopes []string `protobuf:"bytes,4,rep,name=scopes,proto3" json:"scopes,omitempty"`
FieldMapping *FieldMapping `protobuf:"bytes,5,opt,name=field_mapping,json=fieldMapping,proto3" json:"field_mapping,omitempty"`
SkipTlsVerify bool `protobuf:"varint,6,opt,name=skip_tls_verify,json=skipTlsVerify,proto3" json:"skip_tls_verify,omitempty"`
AuthStyle OAuth2AuthStyle `protobuf:"varint,7,opt,name=auth_style,json=authStyle,proto3,enum=bytebase.v1.OAuth2AuthStyle" json:"auth_style,omitempty"`
+ // The scopes that the OIDC provider supports.
+ // Should be fetched from the well-known configuration file of the OIDC provider.
+ Scopes []string `protobuf:"bytes,4,rep,name=scopes,proto3" json:"scopes,omitempty"`
+ // The authorization endpoint of the OIDC provider.
+ // Should be fetched from the well-known configuration file of the OIDC provider.
+ AuthEndpoint string `protobuf:"bytes,8,opt,name=auth_endpoint,json=authEndpoint,proto3" json:"auth_endpoint,omitempty"`
}
func (x *OIDCIdentityProviderConfig) Reset() {
@@ -1025,13 +1030,6 @@ func (x *OIDCIdentityProviderConfig) GetClientSecret() string {
return ""
}
-func (x *OIDCIdentityProviderConfig) GetScopes() []string {
- if x != nil {
- return x.Scopes
- }
- return nil
-}
-
func (x *OIDCIdentityProviderConfig) GetFieldMapping() *FieldMapping {
if x != nil {
return x.FieldMapping
@@ -1053,6 +1051,20 @@ func (x *OIDCIdentityProviderConfig) GetAuthStyle() OAuth2AuthStyle {
return OAuth2AuthStyle_OAUTH2_AUTH_STYLE_UNSPECIFIED
}
+func (x *OIDCIdentityProviderConfig) GetScopes() []string {
+ if x != nil {
+ return x.Scopes
+ }
+ return nil
+}
+
+func (x *OIDCIdentityProviderConfig) GetAuthEndpoint() string {
+ if x != nil {
+ return x.AuthEndpoint
+ }
+ return ""
+}
+
// LDAPIdentityProviderConfig is the structure for LDAP identity provider config.
type LDAPIdentityProviderConfig struct {
state protoimpl.MessageState
@@ -1410,7 +1422,7 @@ var file_v1_idp_service_proto_rawDesc = []byte{
0x75, 0x74, 0x68, 0x5f, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0e, 0x32,
0x1c, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x41,
0x75, 0x74, 0x68, 0x32, 0x41, 0x75, 0x74, 0x68, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x52, 0x09, 0x61,
- 0x75, 0x74, 0x68, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x22, 0xb3, 0x02, 0x0a, 0x1a, 0x4f, 0x49, 0x44,
+ 0x75, 0x74, 0x68, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x22, 0xe4, 0x02, 0x0a, 0x1a, 0x4f, 0x49, 0x44,
0x43, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65,
0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x73, 0x75, 0x65,
0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x12,
@@ -1418,140 +1430,143 @@ var file_v1_idp_service_proto_rawDesc = []byte{
0x28, 0x09, 0x52, 0x08, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d,
0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x03, 0x20,
0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65,
- 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28,
- 0x09, 0x52, 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x12, 0x3e, 0x0a, 0x0d, 0x66, 0x69, 0x65,
- 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b,
- 0x32, 0x19, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x46,
- 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x0c, 0x66, 0x69, 0x65,
- 0x6c, 0x64, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x26, 0x0a, 0x0f, 0x73, 0x6b, 0x69,
- 0x70, 0x5f, 0x74, 0x6c, 0x73, 0x5f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x18, 0x06, 0x20, 0x01,
- 0x28, 0x08, 0x52, 0x0d, 0x73, 0x6b, 0x69, 0x70, 0x54, 0x6c, 0x73, 0x56, 0x65, 0x72, 0x69, 0x66,
- 0x79, 0x12, 0x3b, 0x0a, 0x0a, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x18,
- 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,
- 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x41, 0x75, 0x74, 0x68, 0x32, 0x41, 0x75, 0x74, 0x68, 0x53, 0x74,
- 0x79, 0x6c, 0x65, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x22, 0xd1,
- 0x02, 0x0a, 0x1a, 0x4c, 0x44, 0x41, 0x50, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50,
- 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x12, 0x0a,
- 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x6f, 0x73,
- 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52,
- 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x26, 0x0a, 0x0f, 0x73, 0x6b, 0x69, 0x70, 0x5f, 0x74, 0x6c,
- 0x73, 0x5f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d,
- 0x73, 0x6b, 0x69, 0x70, 0x54, 0x6c, 0x73, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x12, 0x17, 0x0a,
- 0x07, 0x62, 0x69, 0x6e, 0x64, 0x5f, 0x64, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06,
- 0x62, 0x69, 0x6e, 0x64, 0x44, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x62, 0x69, 0x6e, 0x64, 0x5f, 0x70,
- 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x62,
- 0x69, 0x6e, 0x64, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x62,
- 0x61, 0x73, 0x65, 0x5f, 0x64, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x62, 0x61,
- 0x73, 0x65, 0x44, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x66, 0x69, 0x6c,
- 0x74, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x46,
- 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x2b, 0x0a, 0x11, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74,
- 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09,
- 0x52, 0x10, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63,
- 0x6f, 0x6c, 0x12, 0x3e, 0x0a, 0x0d, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x70, 0x70,
- 0x69, 0x6e, 0x67, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x62, 0x79, 0x74, 0x65,
- 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x70,
- 0x70, 0x69, 0x6e, 0x67, 0x52, 0x0c, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x70, 0x70, 0x69,
- 0x6e, 0x67, 0x22, 0x7d, 0x0a, 0x0c, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x70, 0x70, 0x69,
- 0x6e, 0x67, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72,
- 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69,
- 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61,
- 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61,
- 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x03,
- 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x70,
- 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e,
- 0x65, 0x2a, 0x5e, 0x0a, 0x14, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f,
- 0x76, 0x69, 0x64, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x26, 0x0a, 0x22, 0x49, 0x44, 0x45,
- 0x4e, 0x54, 0x49, 0x54, 0x59, 0x5f, 0x50, 0x52, 0x4f, 0x56, 0x49, 0x44, 0x45, 0x52, 0x5f, 0x54,
- 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10,
- 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x4f, 0x41, 0x55, 0x54, 0x48, 0x32, 0x10, 0x01, 0x12, 0x08, 0x0a,
- 0x04, 0x4f, 0x49, 0x44, 0x43, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x4c, 0x44, 0x41, 0x50, 0x10,
- 0x03, 0x2a, 0x52, 0x0a, 0x0f, 0x4f, 0x41, 0x75, 0x74, 0x68, 0x32, 0x41, 0x75, 0x74, 0x68, 0x53,
- 0x74, 0x79, 0x6c, 0x65, 0x12, 0x21, 0x0a, 0x1d, 0x4f, 0x41, 0x55, 0x54, 0x48, 0x32, 0x5f, 0x41,
- 0x55, 0x54, 0x48, 0x5f, 0x53, 0x54, 0x59, 0x4c, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43,
- 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x49, 0x4e, 0x5f, 0x50, 0x41,
- 0x52, 0x41, 0x4d, 0x53, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x49, 0x4e, 0x5f, 0x48, 0x45, 0x41,
- 0x44, 0x45, 0x52, 0x10, 0x02, 0x32, 0xf7, 0x09, 0x0a, 0x17, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69,
- 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
- 0x65, 0x12, 0x9f, 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74,
- 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x27, 0x2e, 0x62, 0x79, 0x74, 0x65,
- 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74,
- 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65,
- 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,
- 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65,
- 0x72, 0x22, 0x40, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x8a, 0xea, 0x30, 0x18, 0x62, 0x62,
- 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65,
- 0x72, 0x73, 0x2e, 0x67, 0x65, 0x74, 0x90, 0xea, 0x30, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13,
- 0x12, 0x11, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x69, 0x64, 0x70, 0x73,
- 0x2f, 0x2a, 0x7d, 0x12, 0x87, 0x01, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x64, 0x65, 0x6e,
- 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x12, 0x29, 0x2e,
- 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74,
- 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72,
- 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,
- 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74,
- 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70,
- 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x17, 0xda, 0x41, 0x00, 0x80, 0xea, 0x30, 0x01, 0x82, 0xd3, 0xe4,
- 0x93, 0x02, 0x0a, 0x12, 0x08, 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x64, 0x70, 0x73, 0x12, 0xb2, 0x01,
- 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79,
- 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x2a, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,
- 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x64, 0x65,
- 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71,
- 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,
- 0x76, 0x31, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69,
- 0x64, 0x65, 0x72, 0x22, 0x4d, 0xda, 0x41, 0x00, 0x8a, 0xea, 0x30, 0x1b, 0x62, 0x62, 0x2e, 0x69,
- 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73,
- 0x2e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x90, 0xea, 0x30, 0x01, 0x98, 0xea, 0x30, 0x01, 0x82,
- 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x3a, 0x11, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f,
- 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x22, 0x08, 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x64,
- 0x70, 0x73, 0x12, 0xeb, 0x01, 0x0a, 0x16, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x64, 0x65,
- 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x2a, 0x2e,
- 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61,
- 0x74, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64,
- 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x62, 0x79, 0x74, 0x65,
- 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79,
- 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x22, 0x85, 0x01, 0xda, 0x41, 0x1d, 0x69, 0x64,
- 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2c,
- 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x8a, 0xea, 0x30, 0x1b, 0x62,
- 0x62, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64,
- 0x65, 0x72, 0x73, 0x2e, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x90, 0xea, 0x30, 0x01, 0x98, 0xea,
- 0x30, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x38, 0x3a, 0x11, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69,
- 0x74, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x32, 0x23, 0x2f, 0x76, 0x31,
- 0x2f, 0x7b, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69,
- 0x64, 0x65, 0x72, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x69, 0x64, 0x70, 0x73, 0x2f, 0x2a, 0x7d,
- 0x12, 0xa5, 0x01, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74,
- 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x2a, 0x2e, 0x62, 0x79,
- 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65,
- 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72,
- 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
- 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22,
- 0x47, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x8a, 0xea, 0x30, 0x1b, 0x62, 0x62, 0x2e, 0x69,
- 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73,
- 0x2e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x90, 0xea, 0x30, 0x01, 0x98, 0xea, 0x30, 0x01, 0x82,
- 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x2a, 0x11, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65,
- 0x3d, 0x69, 0x64, 0x70, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0xb7, 0x01, 0x0a, 0x18, 0x55, 0x6e, 0x64,
- 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f,
- 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x2c, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,
- 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x64, 0x65, 0x6e,
+ 0x74, 0x12, 0x3e, 0x0a, 0x0d, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x69,
+ 0x6e, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,
+ 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x70, 0x70,
+ 0x69, 0x6e, 0x67, 0x52, 0x0c, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e,
+ 0x67, 0x12, 0x26, 0x0a, 0x0f, 0x73, 0x6b, 0x69, 0x70, 0x5f, 0x74, 0x6c, 0x73, 0x5f, 0x76, 0x65,
+ 0x72, 0x69, 0x66, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x73, 0x6b, 0x69, 0x70,
+ 0x54, 0x6c, 0x73, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x12, 0x3b, 0x0a, 0x0a, 0x61, 0x75, 0x74,
+ 0x68, 0x5f, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e,
+ 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x41, 0x75, 0x74,
+ 0x68, 0x32, 0x41, 0x75, 0x74, 0x68, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x52, 0x09, 0x61, 0x75, 0x74,
+ 0x68, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x12, 0x1c, 0x0a, 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73,
+ 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x03, 0x52, 0x06, 0x73, 0x63,
+ 0x6f, 0x70, 0x65, 0x73, 0x12, 0x29, 0x0a, 0x0d, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x65, 0x6e, 0x64,
+ 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01,
+ 0x03, 0x52, 0x0c, 0x61, 0x75, 0x74, 0x68, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x22,
+ 0xd1, 0x02, 0x0a, 0x1a, 0x4c, 0x44, 0x41, 0x50, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79,
+ 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x12,
+ 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x6f,
+ 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05,
+ 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x26, 0x0a, 0x0f, 0x73, 0x6b, 0x69, 0x70, 0x5f, 0x74,
+ 0x6c, 0x73, 0x5f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52,
+ 0x0d, 0x73, 0x6b, 0x69, 0x70, 0x54, 0x6c, 0x73, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x12, 0x17,
+ 0x0a, 0x07, 0x62, 0x69, 0x6e, 0x64, 0x5f, 0x64, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x06, 0x62, 0x69, 0x6e, 0x64, 0x44, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x62, 0x69, 0x6e, 0x64, 0x5f,
+ 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c,
+ 0x62, 0x69, 0x6e, 0x64, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x17, 0x0a, 0x07,
+ 0x62, 0x61, 0x73, 0x65, 0x5f, 0x64, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x62,
+ 0x61, 0x73, 0x65, 0x44, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x66, 0x69,
+ 0x6c, 0x74, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x75, 0x73, 0x65, 0x72,
+ 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x2b, 0x0a, 0x11, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69,
+ 0x74, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x10, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f,
+ 0x63, 0x6f, 0x6c, 0x12, 0x3e, 0x0a, 0x0d, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x70,
+ 0x70, 0x69, 0x6e, 0x67, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x62, 0x79, 0x74,
+ 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61,
+ 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x0c, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x70, 0x70,
+ 0x69, 0x6e, 0x67, 0x22, 0x7d, 0x0a, 0x0c, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x70, 0x70,
+ 0x69, 0x6e, 0x67, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65,
+ 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66,
+ 0x69, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e,
+ 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c,
+ 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18,
+ 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x14, 0x0a, 0x05,
+ 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x68, 0x6f,
+ 0x6e, 0x65, 0x2a, 0x5e, 0x0a, 0x14, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72,
+ 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x26, 0x0a, 0x22, 0x49, 0x44,
+ 0x45, 0x4e, 0x54, 0x49, 0x54, 0x59, 0x5f, 0x50, 0x52, 0x4f, 0x56, 0x49, 0x44, 0x45, 0x52, 0x5f,
+ 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44,
+ 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x4f, 0x41, 0x55, 0x54, 0x48, 0x32, 0x10, 0x01, 0x12, 0x08,
+ 0x0a, 0x04, 0x4f, 0x49, 0x44, 0x43, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x4c, 0x44, 0x41, 0x50,
+ 0x10, 0x03, 0x2a, 0x52, 0x0a, 0x0f, 0x4f, 0x41, 0x75, 0x74, 0x68, 0x32, 0x41, 0x75, 0x74, 0x68,
+ 0x53, 0x74, 0x79, 0x6c, 0x65, 0x12, 0x21, 0x0a, 0x1d, 0x4f, 0x41, 0x55, 0x54, 0x48, 0x32, 0x5f,
+ 0x41, 0x55, 0x54, 0x48, 0x5f, 0x53, 0x54, 0x59, 0x4c, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45,
+ 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x49, 0x4e, 0x5f, 0x50,
+ 0x41, 0x52, 0x41, 0x4d, 0x53, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x49, 0x4e, 0x5f, 0x48, 0x45,
+ 0x41, 0x44, 0x45, 0x52, 0x10, 0x02, 0x32, 0xf7, 0x09, 0x0a, 0x17, 0x49, 0x64, 0x65, 0x6e, 0x74,
+ 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69,
+ 0x63, 0x65, 0x12, 0x9f, 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69,
+ 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x27, 0x2e, 0x62, 0x79, 0x74,
+ 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x64, 0x65, 0x6e,
0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,
0x31, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64,
- 0x65, 0x72, 0x22, 0x4e, 0x8a, 0xea, 0x30, 0x1d, 0x62, 0x62, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74,
- 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x75, 0x6e, 0x64,
- 0x65, 0x6c, 0x65, 0x74, 0x65, 0x90, 0xea, 0x30, 0x01, 0x98, 0xea, 0x30, 0x01, 0x82, 0xd3, 0xe4,
- 0x93, 0x02, 0x1f, 0x3a, 0x01, 0x2a, 0x22, 0x1a, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d,
- 0x65, 0x3d, 0x69, 0x64, 0x70, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x75, 0x6e, 0x64, 0x65, 0x6c, 0x65,
- 0x74, 0x65, 0x12, 0xaa, 0x01, 0x0a, 0x14, 0x54, 0x65, 0x73, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74,
- 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x28, 0x2e, 0x62, 0x79,
- 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x49, 0x64,
+ 0x65, 0x72, 0x22, 0x40, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x8a, 0xea, 0x30, 0x18, 0x62,
+ 0x62, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64,
+ 0x65, 0x72, 0x73, 0x2e, 0x67, 0x65, 0x74, 0x90, 0xea, 0x30, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02,
+ 0x13, 0x12, 0x11, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x69, 0x64, 0x70,
+ 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x87, 0x01, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x64, 0x65,
+ 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x12, 0x29,
+ 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73,
+ 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65,
+ 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x62, 0x79, 0x74, 0x65,
+ 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x64, 0x65, 0x6e,
+ 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73,
+ 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x17, 0xda, 0x41, 0x00, 0x80, 0xea, 0x30, 0x01, 0x82, 0xd3,
+ 0xe4, 0x93, 0x02, 0x0a, 0x12, 0x08, 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x64, 0x70, 0x73, 0x12, 0xb2,
+ 0x01, 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74,
+ 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x2a, 0x2e, 0x62, 0x79, 0x74, 0x65,
+ 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x64,
0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x65,
- 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,
- 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79,
- 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
- 0x22, 0x3d, 0x8a, 0xea, 0x30, 0x1b, 0x62, 0x62, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74,
- 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x75, 0x70, 0x64, 0x61, 0x74,
- 0x65, 0x90, 0xea, 0x30, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x3a, 0x01, 0x2a, 0x22, 0x0f,
- 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x64, 0x70, 0x73, 0x2f, 0x2a, 0x3a, 0x74, 0x65, 0x73, 0x74, 0x42,
- 0x11, 0x5a, 0x0f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2d, 0x67, 0x6f, 0x2f,
- 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,
+ 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76,
+ 0x69, 0x64, 0x65, 0x72, 0x22, 0x4d, 0xda, 0x41, 0x00, 0x8a, 0xea, 0x30, 0x1b, 0x62, 0x62, 0x2e,
+ 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72,
+ 0x73, 0x2e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x90, 0xea, 0x30, 0x01, 0x98, 0xea, 0x30, 0x01,
+ 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x3a, 0x11, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79,
+ 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x22, 0x08, 0x2f, 0x76, 0x31, 0x2f, 0x69,
+ 0x64, 0x70, 0x73, 0x12, 0xeb, 0x01, 0x0a, 0x16, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x64,
+ 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x2a,
+ 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64,
+ 0x61, 0x74, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69,
+ 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x62, 0x79, 0x74,
+ 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74,
+ 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x22, 0x85, 0x01, 0xda, 0x41, 0x1d, 0x69,
+ 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72,
+ 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x8a, 0xea, 0x30, 0x1b,
+ 0x62, 0x62, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69,
+ 0x64, 0x65, 0x72, 0x73, 0x2e, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x90, 0xea, 0x30, 0x01, 0x98,
+ 0xea, 0x30, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x38, 0x3a, 0x11, 0x69, 0x64, 0x65, 0x6e, 0x74,
+ 0x69, 0x74, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x32, 0x23, 0x2f, 0x76,
+ 0x31, 0x2f, 0x7b, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x76,
+ 0x69, 0x64, 0x65, 0x72, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x69, 0x64, 0x70, 0x73, 0x2f, 0x2a,
+ 0x7d, 0x12, 0xa5, 0x01, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x64, 0x65, 0x6e,
+ 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x2a, 0x2e, 0x62,
+ 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74,
+ 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65,
+ 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
+ 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79,
+ 0x22, 0x47, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x8a, 0xea, 0x30, 0x1b, 0x62, 0x62, 0x2e,
+ 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72,
+ 0x73, 0x2e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x90, 0xea, 0x30, 0x01, 0x98, 0xea, 0x30, 0x01,
+ 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x2a, 0x11, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d,
+ 0x65, 0x3d, 0x69, 0x64, 0x70, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0xb7, 0x01, 0x0a, 0x18, 0x55, 0x6e,
+ 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72,
+ 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x2c, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,
+ 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x64, 0x65,
+ 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,
+ 0x76, 0x31, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69,
+ 0x64, 0x65, 0x72, 0x22, 0x4e, 0x8a, 0xea, 0x30, 0x1d, 0x62, 0x62, 0x2e, 0x69, 0x64, 0x65, 0x6e,
+ 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x75, 0x6e,
+ 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x90, 0xea, 0x30, 0x01, 0x98, 0xea, 0x30, 0x01, 0x82, 0xd3,
+ 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x01, 0x2a, 0x22, 0x1a, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61,
+ 0x6d, 0x65, 0x3d, 0x69, 0x64, 0x70, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x75, 0x6e, 0x64, 0x65, 0x6c,
+ 0x65, 0x74, 0x65, 0x12, 0xaa, 0x01, 0x0a, 0x14, 0x54, 0x65, 0x73, 0x74, 0x49, 0x64, 0x65, 0x6e,
+ 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x28, 0x2e, 0x62,
+ 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x49,
+ 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52,
+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,
+ 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74,
+ 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
+ 0x65, 0x22, 0x3d, 0x8a, 0xea, 0x30, 0x1b, 0x62, 0x62, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69,
+ 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x75, 0x70, 0x64, 0x61,
+ 0x74, 0x65, 0x90, 0xea, 0x30, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x3a, 0x01, 0x2a, 0x22,
+ 0x0f, 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x64, 0x70, 0x73, 0x2f, 0x2a, 0x3a, 0x74, 0x65, 0x73, 0x74,
+ 0x42, 0x11, 0x5a, 0x0f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2d, 0x67, 0x6f,
+ 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
diff --git a/proto/v1/idp_service.proto b/proto/v1/idp_service.proto
index 6b4992bd15..545849c9f9 100644
--- a/proto/v1/idp_service.proto
+++ b/proto/v1/idp_service.proto
@@ -238,13 +238,19 @@ message OIDCIdentityProviderConfig {
string client_secret = 3;
- repeated string scopes = 4;
-
FieldMapping field_mapping = 5;
bool skip_tls_verify = 6;
OAuth2AuthStyle auth_style = 7;
+
+ // The scopes that the OIDC provider supports.
+ // Should be fetched from the well-known configuration file of the OIDC provider.
+ repeated string scopes = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ // The authorization endpoint of the OIDC provider.
+ // Should be fetched from the well-known configuration file of the OIDC provider.
+ string auth_endpoint = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
}
// LDAPIdentityProviderConfig is the structure for LDAP identity provider config.