feat: add API support for additional LDAP auth method fields. (#3679)

* feat (auth/ldap): add Repo support for max page size and deref aliases (#3670)

* chore: update cap/ldap dependency

This latest version of cap/ldap adds support for MaxPageSize and
DerefAliases

* feat (auth/ldap): add MaxPageSize and DerefAliases to storage proto

* feat (api/authmethods): add new ldap fields.

Add support for maximum_page_size and dereference_aliases

* feat (auth/ldap): schema changes to support new LDAP attributes

* feat (auth/ldap): add Repo support for max page size and deref aliases

* feat (handlers/ldap): add support for new fields (#3674)

Added API support for new ldap fields: MaximumPageSize and
DereferenceAliases

* chore: add CHANGELOG entry for new api auth ldap fields
This commit is contained in:
Jim authored and GitHub committed 2023-09-06 15:07:45 -04:00
1 parent b2c0300dac
commit dc89ca28a1
28 files changed
+1166 -237

No files matched your search

+25 -1
View File
@@ -31,7 +31,8 @@ type AuthMethod struct {
//
// Supports the options: WithUrls, WithName, WithDescription, WithStartTLS,
// WithInsecureTLS, WithDiscoverDN, WithAnonGroupSearch, WithUpnDomain,
// WithUserSearchConf, WithGroupSearchConf, WithCertificates, WithBindCredential
// WithUserSearchConf, WithGroupSearchConf, WithCertificates,
// WithBindCredential, WithDerefAliases, WithMaximumPageSize
// are the only valid options and all other options are ignored.
func NewAuthMethod(ctx context.Context, scopeId string, opt ...Option) (*AuthMethod, error) {
const op = "ldap.NewAuthMethod"
@@ -69,6 +70,8 @@ func NewAuthMethod(ctx context.Context, scopeId string, opt ...Option) (*AuthMet
Certificates: opts.withCertificates,
ClientCertificate: opts.withClientCertificate,
ClientCertificateKey: opts.withClientCertificateKey,
DereferenceAliases: string(opts.withDerefAliases),
MaximumPageSize: uint32(opts.withMaximumPageSize),
},
}
if len(opts.withAccountAttributeMap) > 0 {
@@ -139,6 +142,7 @@ type convertedValues struct {
ClientCertificate any
BindCredential any
AccountAttributeMaps []any
DerefAliases any
}
// convertValueObjects converts the embedded value objects. It will return an
@@ -180,6 +184,11 @@ func (am *AuthMethod) convertValueObjects(ctx context.Context) (*convertedValues
if converted.AccountAttributeMaps, err = am.convertAccountAttributeMaps(ctx); err != nil {
return nil, errors.Wrap(ctx, err, op)
}
if am.DereferenceAliases != "" {
if converted.DerefAliases, err = am.convertDerefAliases(ctx); err != nil {
return nil, errors.Wrap(ctx, err, op)
}
}
return converted, nil
}
@@ -286,6 +295,21 @@ func (am *AuthMethod) convertBindCredential(ctx context.Context) (any, error) {
return bc, nil
}
// convertDerefAliases converts an embedded deref aliases entry into
// an any type. It will return an error if the AuthMethod's public id is not
// set.
func (am *AuthMethod) convertDerefAliases(ctx context.Context) (any, error) {
const op = "ldap.(AuthMethod).convertDerefAliases"
if am.PublicId == "" {
return nil, errors.New(ctx, errors.InvalidPublicId, op, "missing auth method id")
}
da, err := NewDerefAliases(ctx, am.PublicId, DerefAliasType(am.DereferenceAliases))
if err != nil {
return nil, errors.Wrap(ctx, err, op)
}
return da, nil
}
// convertAccountAttributeMaps converts the embedded account attribute maps from
// []string to []interface{} where each slice element is a *AccountAttributeMap. It
// will return an error if the AuthMethod's public id is not set or it can
+39
View File
@@ -64,6 +64,8 @@ func TestNewAuthMethod(t *testing.T) {
WithCertificates(testCtx, testCert),
WithClientCertificate(testCtx, derPrivKey, testCert), // not a client cert but good enough for this test.
WithAccountAttributeMap(testCtx, map[string]AccountToAttribute{"mail": "email"}),
WithDerefAliases(testCtx, DerefAlways),
WithMaximumPageSize(testCtx, 10),
},
want: &AuthMethod{
AuthMethod: &store.AuthMethod{
@@ -90,6 +92,8 @@ func TestNewAuthMethod(t *testing.T) {
ClientCertificate: testCertEncoded,
ClientCertificateKey: derPrivKey,
AccountAttributeMaps: []string{"mail=email"},
DereferenceAliases: string(DerefAlways),
MaximumPageSize: 10,
},
},
},
@@ -127,6 +131,18 @@ func TestNewAuthMethod(t *testing.T) {
wantErrCode: errors.InvalidParameter,
wantErrContains: `https scheme in url "https://alice.com" is not either ldap or ldaps`,
},
{
name: "invalid-deref-aliases",
ctx: testCtx,
scopeId: "global",
urls: TestConvertToUrls(t, "ldaps://alice.com"),
opts: []Option{
WithDerefAliases(testCtx, "invalid"),
},
wantErr: true,
wantErrCode: errors.InvalidParameter,
wantErrContains: `"invalid" is not a valid ldap dereference alias type`,
},
}
for _, tc := range tests {
t.Run(tc.name, func(t *testing.T) {
@@ -208,6 +224,8 @@ func TestAuthMethod_clone(t *testing.T) {
WithBindCredential(testCtx, "bind-dn", "bind-password"),
WithCertificates(testCtx, testCert),
WithClientCertificate(testCtx, derPrivKey, testCert), // not a client cert but good enough for this test.
WithDerefAliases(testCtx, DerefAlways),
WithMaximumPageSize(testCtx, 10),
)
require.NoError(err)
cp := am.clone()
@@ -370,6 +388,9 @@ func Test_convertValueObjects(t *testing.T) {
testBindCredential, err := NewBindCredential(testCtx, testPublicId, "bind-dn", []byte("bind-password"))
require.NoError(t, err)
testDerefAliases, err := NewDerefAliases(testCtx, testPublicId, DerefAlways)
require.NoError(t, err)
tests := []struct {
name string
am *AuthMethod
@@ -393,6 +414,7 @@ func Test_convertValueObjects(t *testing.T) {
BindDn: "bind-dn",
BindPassword: "bind-password",
AccountAttributeMaps: testAttrMaps,
DereferenceAliases: string(DerefAlways),
},
},
wantValues: &convertedValues{
@@ -403,6 +425,7 @@ func Test_convertValueObjects(t *testing.T) {
ClientCertificate: testClientCertificate,
BindCredential: testBindCredential,
AccountAttributeMaps: testAccountAttributeMaps,
DerefAliases: testDerefAliases,
},
},
{
@@ -490,6 +513,17 @@ func Test_convertValueObjects(t *testing.T) {
wantErrMatch: errors.T(errors.InvalidParameter),
wantErrContains: "failed to parse certificate",
},
{
name: "invalid-deref-aliases",
am: &AuthMethod{
AuthMethod: &store.AuthMethod{
PublicId: testPublicId,
DereferenceAliases: "invalid",
},
},
wantErrMatch: errors.T(errors.InvalidParameter),
wantErrContains: `"invalid" is not a valid ldap dereference alias type:`,
},
}
for _, tc := range tests {
t.Run(tc.name, func(t *testing.T) {
@@ -561,6 +595,11 @@ func Test_convertValueObjects(t *testing.T) {
require.Error(err)
assert.Nil(convertedBindCredential)
assert.Truef(errors.Match(wantErrMatch, err), "wanted err %q and got: %+v", wantErrMatch.Code, err)
convertedDerefAliases, err := am.convertDerefAliases(testCtx)
require.Error(err)
assert.Nil(convertedDerefAliases)
assert.Truef(errors.Match(wantErrMatch, err), "wanted err %q and got: %+v", wantErrMatch.Code, err)
})
}
+70
View File
@@ -0,0 +1,70 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: BUSL-1.1
package ldap
import (
"context"
"github.com/hashicorp/boundary/internal/auth/ldap/store"
"github.com/hashicorp/boundary/internal/errors"
"google.golang.org/protobuf/proto"
)
const derefAliasesTableName = "auth_ldap_deref_aliases"
// DerefAliases represent optional config parameters which allow Boundary to
// properly dereference aliases when ldap searching
type DerefAliases struct {
*store.DerefAliases
tableName string
}
// NewDerefAliases creates a new in memory NewDerefAliases. No options are currently supported.
func NewDerefAliases(ctx context.Context, authMethodId string, derefType DerefAliasType) (*DerefAliases, error) {
const op = "ldap.NewDerefAliases"
switch {
case authMethodId == "":
return nil, errors.New(ctx, errors.InvalidParameter, op, "missing auth method id")
case derefType == "":
return nil, errors.New(ctx, errors.InvalidParameter, op, "missing dereference alias type")
default:
if err := derefType.IsValid(ctx); err != nil {
return nil, errors.Wrap(ctx, err, op)
}
}
return &DerefAliases{
DerefAliases: &store.DerefAliases{
LdapMethodId: authMethodId,
DereferenceAliases: string(derefType),
},
}, nil
}
// allocDerefAliases makes an empty one in memory
func allocDerefAliases() *DerefAliases {
return &DerefAliases{
DerefAliases: &store.DerefAliases{},
}
}
// clone a deref aliases
func (da *DerefAliases) clone() *DerefAliases {
cp := proto.Clone(da.DerefAliases)
return &DerefAliases{
DerefAliases: cp.(*store.DerefAliases),
}
}
// TableName returns the table name
func (da *DerefAliases) TableName() string {
if da.tableName != "" {
return da.tableName
}
return derefAliasesTableName
}
// SetTableName sets the table name.
func (da *DerefAliases) SetTableName(n string) {
da.tableName = n
}
+142
View File
@@ -0,0 +1,142 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: BUSL-1.1
package ldap
import (
"context"
"testing"
"github.com/hashicorp/boundary/internal/auth/ldap/store"
"github.com/hashicorp/boundary/internal/errors"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"google.golang.org/protobuf/proto"
)
func TestNewDerefAliases(t *testing.T) {
t.Parallel()
testCtx := context.Background()
tests := []struct {
name string
ctx context.Context
authMethodId string
derefAliases DerefAliasType
want *DerefAliases
wantErr bool
wantErrCode errors.Code
wantErrContains string
}{
{
name: "valid-DerefAlways",
ctx: testCtx,
authMethodId: "test-id",
derefAliases: DerefAlways,
want: &DerefAliases{
DerefAliases: &store.DerefAliases{
LdapMethodId: "test-id",
DereferenceAliases: string(DerefAlways),
},
},
},
{
name: "missing-auth-method-id",
ctx: testCtx,
derefAliases: DerefAlways,
wantErr: true,
wantErrCode: errors.InvalidParameter,
wantErrContains: "missing auth method id",
},
{
name: "missing-deref-aliases",
ctx: testCtx,
authMethodId: "test-id",
wantErr: true,
wantErrCode: errors.InvalidParameter,
wantErrContains: "missing dereference alias type",
},
{
name: "invalid-deref-aliases",
ctx: testCtx,
authMethodId: "test-id",
derefAliases: "invalid",
wantErr: true,
wantErrCode: errors.InvalidParameter,
wantErrContains: `"invalid" is not a valid ldap dereference alias type`,
},
}
for _, tc := range tests {
tc := tc
t.Run(tc.name, func(t *testing.T) {
assert, require := assert.New(t), require.New(t)
got, err := NewDerefAliases(tc.ctx, tc.authMethodId, tc.derefAliases)
if tc.wantErr {
require.Error(err)
assert.Nil(got)
if tc.wantErrCode != errors.Unknown {
assert.True(errors.Match(errors.T(tc.wantErrCode), err))
}
if tc.wantErrContains != "" {
assert.Contains(err.Error(), tc.wantErrContains)
}
return
}
require.NoError(err)
assert.Equal(tc.want, got)
})
}
}
func TestDerefAliases_SetTableName(t *testing.T) {
t.Parallel()
defaultTableName := derefAliasesTableName
tests := []struct {
name string
setNameTo string
want string
}{
{
name: "new-name",
setNameTo: "new-name",
want: "new-name",
},
{
name: "reset to default",
setNameTo: "",
want: defaultTableName,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
assert, require := assert.New(t), require.New(t)
deref := allocDerefAliases()
require.Equal(defaultTableName, deref.TableName())
derefOverriddenTableName := allocDerefAliases()
derefOverriddenTableName.SetTableName(tt.setNameTo)
assert.Equal(tt.want, derefOverriddenTableName.TableName())
})
}
}
func TestDerefAliases_clone(t *testing.T) {
t.Parallel()
testCtx := context.Background()
t.Run("valid", func(t *testing.T) {
assert, require := assert.New(t), require.New(t)
d, err := NewDerefAliases(testCtx, "test-id", DerefFindingBaseObj)
require.NoError(err)
cp := d.clone()
assert.True(proto.Equal(cp.DerefAliases, d.DerefAliases))
})
t.Run("not-equal", func(t *testing.T) {
assert, require := assert.New(t), require.New(t)
d, err := NewDerefAliases(testCtx, "test-id", DerefFindingBaseObj)
require.NoError(err)
d2, err := NewDerefAliases(testCtx, "test-id", DerefAlways)
require.NoError(err)
cp := d.clone()
assert.True(!proto.Equal(cp.DerefAliases, d2.DerefAliases))
})
}
+44
View File
@@ -46,6 +46,8 @@ type options struct {
withMemberOfGroups string
withUrls []string
withPublicId string
withDerefAliases DerefAliasType
withMaximumPageSize uint32
}
// Option - how options are passed as args
@@ -369,3 +371,45 @@ func WithPublicId(ctx context.Context, publicId string) Option {
return nil
}
}
// WithMaximumPageSize provides an option for passing a max page size for group
// searching to the operation
func WithMaximumPageSize(ctx context.Context, max uint32) Option {
const op = "ldap.WithMaximumPageSize"
return func(o *options) error {
o.withMaximumPageSize = max
return nil
}
}
// WithDerefAliases provides an option for passing in how dereferencing aliases
// should be handled
func WithDerefAliases(ctx context.Context, derefAlias DerefAliasType) Option {
const op = "ldap.WithMaximumPageSize"
return func(o *options) error {
if err := derefAlias.IsValid(ctx); err != nil {
return errors.Wrap(ctx, err, op)
}
o.withDerefAliases = derefAlias
return nil
}
}
type DerefAliasType string
const (
NeverDerefAliases DerefAliasType = "NeverDerefAliases"
DerefInSearching DerefAliasType = "DerefInSearching"
DerefFindingBaseObj DerefAliasType = "DerefFindingBaseObj"
DerefAlways DerefAliasType = "DerefAlways"
)
func (d DerefAliasType) IsValid(ctx context.Context) error {
const op = "ldap.(DerefAliasType).IsValid"
switch d {
case NeverDerefAliases, DerefInSearching, DerefFindingBaseObj, DerefAlways:
return nil
default:
return errors.New(ctx, errors.InvalidParameter, op, fmt.Sprintf("%q is not a valid ldap dereference alias type", d))
}
}
+26
View File
@@ -10,6 +10,7 @@ import (
"crypto/x509"
"testing"
"github.com/hashicorp/boundary/internal/errors"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
@@ -324,4 +325,29 @@ func Test_getOpts(t *testing.T) {
testOpts.withPublicId = "test"
assert.Equal(opts, testOpts)
})
t.Run("WithMaximumPageSize", func(t *testing.T) {
assert := assert.New(t)
opts, err := getOpts(WithMaximumPageSize(testCtx, 10))
require.NoError(t, err)
testOpts := getDefaultOptions()
assert.NotEqual(opts, testOpts)
testOpts.withMaximumPageSize = 10
assert.Equal(opts, testOpts)
})
t.Run("WithDerefAliases", func(t *testing.T) {
assert := assert.New(t)
opts, err := getOpts(WithDerefAliases(testCtx, DerefAlways))
require.NoError(t, err)
testOpts := getDefaultOptions()
assert.NotEqual(opts, testOpts)
testOpts.withDerefAliases = DerefAlways
assert.Equal(opts, testOpts)
})
t.Run("WithDerefAliases-invalid", func(t *testing.T) {
assert := assert.New(t)
_, err := getOpts(WithDerefAliases(testCtx, "Invalid"))
require.Error(t, err)
assert.ErrorContains(err, `"Invalid" is not a valid ldap dereference alias type`)
assert.Truef(errors.Match(errors.T(errors.InvalidParameter), err), "want err code: %q got: %q", errors.InvalidParameter, err)
})
}
@@ -159,6 +159,13 @@ func (r *Repository) CreateAuthMethod(ctx context.Context, am *AuthMethod, opt .
}
msgs = append(msgs, attrMapsOplogMsgs...)
}
if cv.DerefAliases != nil {
var daOplogMsg oplog.Message
if err := w.Create(ctx, cv.DerefAliases, db.NewOplogMsg(&daOplogMsg)); err != nil {
return err
}
msgs = append(msgs, &daOplogMsg)
}
md, err := am.oplog(ctx, oplog.OpType_OP_TYPE_CREATE)
if err != nil {
return errors.Wrap(ctx, err, op, errors.WithMsg("unable to generate oplog metadata"))
@@ -63,6 +63,8 @@ func TestRepository_CreateAuthMethod(t *testing.T) {
WithAccountAttributeMap(testCtx, map[string]AccountToAttribute{
"mail": ToEmailAttribute,
}),
WithDerefAliases(testCtx, DerefFindingBaseObj),
WithMaximumPageSize(testCtx, 10),
)
require.NoError(t, err)
@@ -199,7 +199,8 @@ func (r *Repository) getAuthMethods(ctx context.Context, authMethodId string, sc
if agg.AccountAttributeMap != "" {
am.AccountAttributeMaps = strings.Split(agg.AccountAttributeMap, aggregateDelimiter)
}
am.DereferenceAliases = agg.DereferenceAliases
am.MaximumPageSize = agg.MaximumPageSize
authMethods = append(authMethods, &am)
}
return authMethods, nil
@@ -242,6 +243,8 @@ type authMethodAgg struct {
BindPasswordHmac []byte
BindKeyId string
AccountAttributeMap string
DereferenceAliases string
MaximumPageSize uint32
}
// TableName returns the table name for gorm
@@ -184,6 +184,8 @@ func TestRepository_getAuthMethods(t *testing.T) {
WithCertificates(testCtx, testCert),
WithClientCertificate(testCtx, derPrivKey, testCert), // not a client cert but good enough for this test.)
WithAccountAttributeMap(testCtx, map[string]AccountToAttribute{"mail": ToEmailAttribute, "displayName": ToFullNameAttribute}),
WithMaximumPageSize(testCtx, 10),
WithDerefAliases(testCtx, DerefAlways),
)
return am.PublicId, nil, []*AuthMethod{am}
},
@@ -45,6 +45,8 @@ const (
BindPasswordField = "BindPassword"
AccountAttributeMapsField = "AccountAttributeMaps"
GroupNamesField = "GroupNames"
DerefAliasesField = "DereferenceAliases"
MaximumPageSizeField = "MaximumPageSize"
)
// isEmpty returns true if all the args are empty. Only supports checking
@@ -116,6 +118,8 @@ func (r *Repository) UpdateAuthMethod(ctx context.Context, am *AuthMethod, versi
BindPasswordField: am.BindPassword,
UrlsField: am.Urls,
AccountAttributeMapsField: am.AccountAttributeMaps,
DerefAliasesField: am.DereferenceAliases,
MaximumPageSizeField: am.MaximumPageSize,
},
fieldMaskPaths,
[]string{
@@ -125,6 +129,7 @@ func (r *Repository) UpdateAuthMethod(ctx context.Context, am *AuthMethod, versi
AnonGroupSearchField,
EnableGroupsField,
UseTokenGroupsField,
MaximumPageSizeField,
},
)
if len(dbMask) == 0 && len(nullFields) == 0 {
@@ -303,6 +308,29 @@ func (r *Repository) UpdateAuthMethod(ctx context.Context, am *AuthMethod, versi
}
}
var addDerefAliases, deleteDerefAliases any
if strListContainsOneOf(combinedMasks, DerefAliasesField) {
if !isEmpty(origAm.DereferenceAliases) {
d := allocDerefAliases()
d.LdapMethodId = am.PublicId
deleteDerefAliases = d
}
derefAliases := origAm.DereferenceAliases
switch {
case strutil.StrListContains(dbMask, DerefAliasesField):
derefAliases = am.DereferenceAliases
case strutil.StrListContains(nullFields, DerefAliasesField):
derefAliases = ""
}
if !isEmpty(derefAliases) {
d, err := NewDerefAliases(ctx, am.PublicId, DerefAliasType(derefAliases))
if err != nil {
return nil, db.NoRowsAffected, errors.Wrap(ctx, err, op)
}
addDerefAliases = d
}
}
var filteredDbMask, filteredNullFields []string
for _, f := range dbMask {
switch f {
@@ -313,7 +341,8 @@ func (r *Repository) UpdateAuthMethod(ctx context.Context, am *AuthMethod, versi
UserDnField, UserAttrField, UserFilterField,
GroupDnField, GroupAttrField, GroupFilterField,
ClientCertificateField, ClientCertificateKeyField,
BindDnField, BindPasswordField:
BindDnField, BindPasswordField,
DerefAliasesField:
continue
default:
filteredDbMask = append(filteredDbMask, f)
@@ -329,7 +358,8 @@ func (r *Repository) UpdateAuthMethod(ctx context.Context, am *AuthMethod, versi
UserDnField, UserAttrField, UserFilterField,
GroupDnField, GroupAttrField, GroupFilterField,
ClientCertificateField, ClientCertificateKeyField,
BindDnField, BindPasswordField:
BindDnField, BindPasswordField,
DerefAliasesField:
continue
default:
filteredNullFields = append(filteredNullFields, f)
@@ -352,7 +382,9 @@ func (r *Repository) UpdateAuthMethod(ctx context.Context, am *AuthMethod, versi
addBindCred == nil &&
deleteBindCred == nil &&
len(addMaps) == 0 &&
len(deleteMaps) == 0 {
len(deleteMaps) == 0 &&
addDerefAliases == nil &&
deleteDerefAliases == nil {
return origAm, db.NoRowsAffected, nil
}
@@ -529,6 +561,24 @@ func (r *Repository) UpdateAuthMethod(ctx context.Context, am *AuthMethod, versi
}
msgs = append(msgs, addMapsOplogMsgs...)
}
if deleteDerefAliases != nil {
var deleteDerefMsg oplog.Message
rowsDeleted, err := w.Delete(ctx, deleteDerefAliases, db.NewOplogMsg(&deleteDerefMsg))
if err != nil {
return errors.Wrap(ctx, err, op, errors.WithMsg("unable to delete deref aliases"))
}
if rowsDeleted != 1 {
return errors.New(ctx, errors.MultipleRecords, op, fmt.Sprintf("deref aliases deleted %d did not match request for 1", rowsDeleted))
}
msgs = append(msgs, &deleteDerefMsg)
}
if addDerefAliases != nil {
var addDerefOplogMsg oplog.Message
if err := w.Create(ctx, addDerefAliases, db.NewOplogMsg(&addDerefOplogMsg)); err != nil {
return errors.Wrap(ctx, err, op, errors.WithMsg("unable to add deref aliases"))
}
msgs = append(msgs, &addDerefOplogMsg)
}
metadata, err := updatedAm.oplog(ctx, oplog.OpType_OP_TYPE_UPDATE)
if err != nil {
@@ -589,6 +639,8 @@ func validateFieldMask(ctx context.Context, fieldMaskPaths []string) error {
case strings.EqualFold(BindPasswordField, f):
case strings.EqualFold(UrlsField, f):
case strings.EqualFold(AccountAttributeMapsField, f):
case strings.EqualFold(DerefAliasesField, f):
case strings.EqualFold(MaximumPageSizeField, f):
default:
return errors.New(ctx, errors.InvalidParameter, op, fmt.Sprintf("invalid field mask: %q", f))
}
@@ -87,6 +87,8 @@ func TestRepository_UpdateAuthMethod(t *testing.T) {
"displayName": ToFullNameAttribute,
"mail": ToEmailAttribute,
}),
WithDerefAliases(testCtx, DerefAlways),
WithMaximumPageSize(testCtx, 10),
)
},
updateWith: func(orig *AuthMethod) *AuthMethod {
@@ -117,6 +119,8 @@ func TestRepository_UpdateAuthMethod(t *testing.T) {
am.AccountAttributeMaps = []string{
fmt.Sprintf("%s=%s", "cn", ToFullNameAttribute),
}
am.DereferenceAliases = string(NeverDerefAliases)
am.MaximumPageSize = 100
return &am
},
fieldMasks: []string{
@@ -143,6 +147,8 @@ func TestRepository_UpdateAuthMethod(t *testing.T) {
ClientCertificateField,
ClientCertificateKeyField,
AccountAttributeMapsField,
DerefAliasesField,
MaximumPageSizeField,
},
version: 1,
want: func(orig, updateWith *AuthMethod) *AuthMethod {
@@ -172,6 +178,8 @@ func TestRepository_UpdateAuthMethod(t *testing.T) {
am.ClientCertificate = updateWith.ClientCertificate
am.ClientCertificateKeyHmac = updateWith.ClientCertificateKeyHmac
am.AccountAttributeMaps = updateWith.AccountAttributeMaps
am.DereferenceAliases = string(NeverDerefAliases)
am.MaximumPageSize = 100
return am
},
},
@@ -318,6 +326,8 @@ func TestRepository_UpdateAuthMethod(t *testing.T) {
WithBindCredential(testCtx, "orig-bind-dn", "orig-bind-password"),
WithCertificates(testCtx, testCert),
WithClientCertificate(testCtx, derPrivKey, testCert), // not a client cert but good enough for this test.
WithDerefAliases(testCtx, DerefAlways),
WithMaximumPageSize(testCtx, 10),
)
},
updateWith: func(orig *AuthMethod) *AuthMethod {
@@ -335,6 +345,8 @@ func TestRepository_UpdateAuthMethod(t *testing.T) {
UpnDomainField,
EnableGroupsField,
UseTokenGroupsField,
DerefAliasesField,
MaximumPageSizeField,
},
version: 1,
want: func(orig, updateWith *AuthMethod) *AuthMethod {
@@ -348,6 +360,8 @@ func TestRepository_UpdateAuthMethod(t *testing.T) {
am.UpnDomain = updateWith.UpnDomain
am.EnableGroups = updateWith.EnableGroups
am.UseTokenGroups = updateWith.UseTokenGroups
am.MaximumPageSize = updateWith.MaximumPageSize
am.DereferenceAliases = updateWith.DereferenceAliases
return am
},
},
@@ -376,6 +390,7 @@ func TestRepository_UpdateAuthMethod(t *testing.T) {
"mail": ToEmailAttribute,
"cn": ToFullNameAttribute,
}),
WithDerefAliases(testCtx, NeverDerefAliases),
)
},
updateWith: func(orig *AuthMethod) *AuthMethod {
@@ -394,6 +409,7 @@ func TestRepository_UpdateAuthMethod(t *testing.T) {
am.ClientCertificate = testCertEncoded
am.ClientCertificateKey = derPrivKey
am.AccountAttributeMaps = []string{"cn=fullName"}
am.DereferenceAliases = string(DerefAlways)
return &am
},
fieldMasks: []string{
@@ -410,6 +426,7 @@ func TestRepository_UpdateAuthMethod(t *testing.T) {
ClientCertificateField,
ClientCertificateKeyField,
AccountAttributeMapsField,
DerefAliasesField,
},
version: 1,
want: func(orig, updateWith *AuthMethod) *AuthMethod {
@@ -428,6 +445,7 @@ func TestRepository_UpdateAuthMethod(t *testing.T) {
am.ClientCertificate = updateWith.ClientCertificate
am.ClientCertificateKeyHmac = updateWith.ClientCertificateKeyHmac
am.AccountAttributeMaps = updateWith.AccountAttributeMaps
am.DereferenceAliases = updateWith.DereferenceAliases
return am
},
},
@@ -453,6 +471,7 @@ func TestRepository_UpdateAuthMethod(t *testing.T) {
"mail": ToEmailAttribute,
"cn": ToFullNameAttribute,
}),
WithDerefAliases(testCtx, DerefAlways),
)
},
updateWith: func(orig *AuthMethod) *AuthMethod {
@@ -473,6 +492,7 @@ func TestRepository_UpdateAuthMethod(t *testing.T) {
ClientCertificateField,
ClientCertificateKeyField,
AccountAttributeMapsField,
DerefAliasesField,
},
version: 1,
want: func(orig, updateWith *AuthMethod) *AuthMethod {
@@ -491,6 +511,7 @@ func TestRepository_UpdateAuthMethod(t *testing.T) {
am.ClientCertificate = updateWith.ClientCertificate
am.ClientCertificateKeyHmac = updateWith.ClientCertificateKeyHmac
am.AccountAttributeMaps = updateWith.AccountAttributeMaps
am.DereferenceAliases = updateWith.DereferenceAliases
return am
},
},
@@ -77,6 +77,8 @@ func (r *Repository) Authenticate(ctx context.Context, authMethodId, loginName,
BindDN: am.BindDn,
BindPassword: am.BindPassword,
RequestTimeout: DefaultRequestTimeout,
DerefAliases: am.DereferenceAliases,
MaximumPageSize: int(am.MaximumPageSize),
})
if err != nil {
return nil, errors.Wrap(ctx, err, op, errors.WithMsg("unable to initialize ldap client with auth method retrieved from database"))
+331 -191
View File
@@ -178,6 +178,19 @@ type AuthMethod struct {
// attribute names are case insensitive.
// @inject_tag: `gorm:"-"`
AccountAttributeMaps []string `protobuf:"bytes,300,rep,name=account_attribute_maps,json=accountAttributeMaps,proto3" json:"account_attribute_maps,omitempty" gorm:"-"`
// MaximumPageSize optionally specifies a maximum ldap search result size to
// use when retrieving the authenticated user's group memberships. This can
// be used to avoid reaching the LDAP server's max result size.
// @inject_tag: `gorm:"not_null;default:0"`
MaximumPageSize uint32 `protobuf:"varint,310,opt,name=maximum_page_size,json=maximumPageSize,proto3" json:"maximum_page_size,omitempty" gorm:"not_null;default:0"`
// dereference_aliases will control how aliases are dereferenced when
// performing the search. Possible values are: never, finding, searching,
// and always. If unset, a default of "never" is used. When set to
// "finding", it will only dereference aliases during name resolution of the
// base. When set to "searching", it will dereference aliases after name
// resolution.
// @inject_tag: `gorm:"-"`
DereferenceAliases string `protobuf:"bytes,320,opt,name=dereference_aliases,json=dereferenceAliases,proto3" json:"dereference_aliases,omitempty" gorm:"-"`
}
func (x *AuthMethod) Reset() {
@@ -429,6 +442,20 @@ func (x *AuthMethod) GetAccountAttributeMaps() []string {
return nil
}
func (x *AuthMethod) GetMaximumPageSize() uint32 {
if x != nil {
return x.MaximumPageSize
}
return 0
}
func (x *AuthMethod) GetDereferenceAliases() string {
if x != nil {
return x.DereferenceAliases
}
return ""
}
// Url represents LDAP URLs that specify LDAP servers to connection to. There
// must be at lease on URL for each LDAP auth method.
type Url struct {
@@ -1280,6 +1307,81 @@ func (x *AccountAttributeMap) GetCreateTime() *timestamp.Timestamp {
return nil
}
// DerefAliases represent aan optional configuration field used to
// determine how to derefence aliases when searching ldap.
type DerefAliases struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// create_time is set by the database.
// @inject_tag: `gorm:"default:current_timestamp"`
CreateTime *timestamp.Timestamp `protobuf:"bytes,10,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty" gorm:"default:current_timestamp"`
// ldap_method_id is the FK to the UserEntrySearchConf's LDAP auth method.
// @inject_tag: `gorm:"primary_key"`
LdapMethodId string `protobuf:"bytes,20,opt,name=ldap_method_id,json=ldapMethodId,proto3" json:"ldap_method_id,omitempty" gorm:"primary_key"`
// dereference_aliases will control how aliases are dereferenced when
// performing the search. Possible values are: never, finding, searching,
// and always. If unset, a default of "never" is used. When set to
// "finding", it will only dereference aliases during name resolution of the
// base. When set to "searching", it will dereference aliases after name
// resolution.
DereferenceAliases string `protobuf:"bytes,30,opt,name=dereference_aliases,json=dereferenceAliases,proto3" json:"dereference_aliases,omitempty"`
}
func (x *DerefAliases) Reset() {
*x = DerefAliases{}
if protoimpl.UnsafeEnabled {
mi := &file_controller_storage_auth_ldap_store_v1_ldap_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DerefAliases) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DerefAliases) ProtoMessage() {}
func (x *DerefAliases) ProtoReflect() protoreflect.Message {
mi := &file_controller_storage_auth_ldap_store_v1_ldap_proto_msgTypes[9]
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 DerefAliases.ProtoReflect.Descriptor instead.
func (*DerefAliases) Descriptor() ([]byte, []int) {
return file_controller_storage_auth_ldap_store_v1_ldap_proto_rawDescGZIP(), []int{9}
}
func (x *DerefAliases) GetCreateTime() *timestamp.Timestamp {
if x != nil {
return x.CreateTime
}
return nil
}
func (x *DerefAliases) GetLdapMethodId() string {
if x != nil {
return x.LdapMethodId
}
return ""
}
func (x *DerefAliases) GetDereferenceAliases() string {
if x != nil {
return x.DereferenceAliases
}
return ""
}
// ManagedGroup entries provide an LDAP auth method implementation of managed
// groups.
type ManagedGroup struct {
@@ -1314,7 +1416,7 @@ type ManagedGroup struct {
func (x *ManagedGroup) Reset() {
*x = ManagedGroup{}
if protoimpl.UnsafeEnabled {
mi := &file_controller_storage_auth_ldap_store_v1_ldap_proto_msgTypes[9]
mi := &file_controller_storage_auth_ldap_store_v1_ldap_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1327,7 +1429,7 @@ func (x *ManagedGroup) String() string {
func (*ManagedGroup) ProtoMessage() {}
func (x *ManagedGroup) ProtoReflect() protoreflect.Message {
mi := &file_controller_storage_auth_ldap_store_v1_ldap_proto_msgTypes[9]
mi := &file_controller_storage_auth_ldap_store_v1_ldap_proto_msgTypes[10]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1340,7 +1442,7 @@ func (x *ManagedGroup) ProtoReflect() protoreflect.Message {
// Deprecated: Use ManagedGroup.ProtoReflect.Descriptor instead.
func (*ManagedGroup) Descriptor() ([]byte, []int) {
return file_controller_storage_auth_ldap_store_v1_ldap_proto_rawDescGZIP(), []int{9}
return file_controller_storage_auth_ldap_store_v1_ldap_proto_rawDescGZIP(), []int{10}
}
func (x *ManagedGroup) GetPublicId() string {
@@ -1420,7 +1522,7 @@ type ManagedGroupMemberAccount struct {
func (x *ManagedGroupMemberAccount) Reset() {
*x = ManagedGroupMemberAccount{}
if protoimpl.UnsafeEnabled {
mi := &file_controller_storage_auth_ldap_store_v1_ldap_proto_msgTypes[10]
mi := &file_controller_storage_auth_ldap_store_v1_ldap_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1433,7 +1535,7 @@ func (x *ManagedGroupMemberAccount) String() string {
func (*ManagedGroupMemberAccount) ProtoMessage() {}
func (x *ManagedGroupMemberAccount) ProtoReflect() protoreflect.Message {
mi := &file_controller_storage_auth_ldap_store_v1_ldap_proto_msgTypes[10]
mi := &file_controller_storage_auth_ldap_store_v1_ldap_proto_msgTypes[11]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1446,7 +1548,7 @@ func (x *ManagedGroupMemberAccount) ProtoReflect() protoreflect.Message {
// Deprecated: Use ManagedGroupMemberAccount.ProtoReflect.Descriptor instead.
func (*ManagedGroupMemberAccount) Descriptor() ([]byte, []int) {
return file_controller_storage_auth_ldap_store_v1_ldap_proto_rawDescGZIP(), []int{10}
return file_controller_storage_auth_ldap_store_v1_ldap_proto_rawDescGZIP(), []int{11}
}
func (x *ManagedGroupMemberAccount) GetCreateTime() *timestamp.Timestamp {
@@ -1484,7 +1586,7 @@ var file_controller_storage_auth_ldap_store_v1_ldap_proto_rawDesc = []byte{
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65,
0x72, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74,
0x61, 0x6d, 0x70, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa0, 0x11, 0x0a, 0x0a, 0x41, 0x75, 0x74, 0x68, 0x4d,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xee, 0x12, 0x0a, 0x0a, 0x41, 0x75, 0x74, 0x68, 0x4d,
0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f,
0x69, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63,
0x49, 0x64, 0x12, 0x4b, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d,
@@ -1622,35 +1724,20 @@ var file_controller_storage_auth_ldap_store_v1_ldap_proto_rawDesc = []byte{
0x12, 0x21, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x61, 0x63, 0x63,
0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x5f, 0x6d,
0x61, 0x70, 0x73, 0x52, 0x14, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x74, 0x74, 0x72,
0x69, 0x62, 0x75, 0x74, 0x65, 0x4d, 0x61, 0x70, 0x73, 0x22, 0xc8, 0x01, 0x0a, 0x03, 0x55, 0x72,
0x6c, 0x12, 0x4b, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65,
0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c,
0x6c, 0x65, 0x72, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x74, 0x69, 0x6d, 0x65,
0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61,
0x6d, 0x70, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x24,
0x0a, 0x0e, 0x6c, 0x64, 0x61, 0x70, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x5f, 0x69, 0x64,
0x18, 0x14, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6c, 0x64, 0x61, 0x70, 0x4d, 0x65, 0x74, 0x68,
0x6f, 0x64, 0x49, 0x64, 0x12, 0x2f, 0x0a, 0x13, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69,
0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x1e, 0x20, 0x01, 0x28,
0x0d, 0x52, 0x12, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x69,
0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f,
0x75, 0x72, 0x6c, 0x18, 0x28, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x72, 0x76, 0x65,
0x72, 0x55, 0x72, 0x6c, 0x22, 0xdf, 0x01, 0x0a, 0x13, 0x55, 0x73, 0x65, 0x72, 0x45, 0x6e, 0x74,
0x72, 0x79, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x12, 0x4b, 0x0a, 0x0b,
0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x2a, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x73,
0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70,
0x2e, 0x76, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x63,
0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x6c, 0x64, 0x61,
0x70, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x14, 0x20, 0x01, 0x28,
0x09, 0x52, 0x0c, 0x6c, 0x64, 0x61, 0x70, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x49, 0x64, 0x12,
0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x64, 0x6e, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x09,
0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x44, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x75, 0x73, 0x65, 0x72,
0x5f, 0x61, 0x74, 0x74, 0x72, 0x18, 0x28, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65,
0x72, 0x41, 0x74, 0x74, 0x72, 0x12, 0x1f, 0x0a, 0x0b, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x66, 0x69,
0x6c, 0x74, 0x65, 0x72, 0x18, 0x32, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x75, 0x73, 0x65, 0x72,
0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0xe6, 0x01, 0x0a, 0x14, 0x47, 0x72, 0x6f, 0x75, 0x70,
0x45, 0x6e, 0x74, 0x72, 0x79, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x12,
0x69, 0x62, 0x75, 0x74, 0x65, 0x4d, 0x61, 0x70, 0x73, 0x12, 0x60, 0x0a, 0x11, 0x6d, 0x61, 0x78,
0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0xb6,
0x02, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x33, 0xc2, 0xdd, 0x29, 0x2f, 0x0a, 0x0f, 0x4d, 0x61, 0x78,
0x69, 0x6d, 0x75, 0x6d, 0x50, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1c, 0x61, 0x74,
0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d,
0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x52, 0x0f, 0x6d, 0x61, 0x78, 0x69,
0x6d, 0x75, 0x6d, 0x50, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x6a, 0x0a, 0x13, 0x64,
0x65, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73,
0x65, 0x73, 0x18, 0xc0, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x38, 0xc2, 0xdd, 0x29, 0x34, 0x0a,
0x12, 0x44, 0x65, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x41, 0x6c, 0x69, 0x61,
0x73, 0x65, 0x73, 0x12, 0x1e, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e,
0x64, 0x65, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x61, 0x6c, 0x69, 0x61,
0x73, 0x65, 0x73, 0x52, 0x12, 0x64, 0x65, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65,
0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x22, 0xc8, 0x01, 0x0a, 0x03, 0x55, 0x72, 0x6c, 0x12,
0x4b, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0a,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65,
0x72, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74,
@@ -1658,60 +1745,146 @@ var file_controller_storage_auth_ldap_store_v1_ldap_proto_rawDesc = []byte{
0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0e,
0x6c, 0x64, 0x61, 0x70, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x14,
0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6c, 0x64, 0x61, 0x70, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64,
0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x64, 0x6e, 0x18, 0x1e,
0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x44, 0x6e, 0x12, 0x1d, 0x0a,
0x0a, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x18, 0x28, 0x20, 0x01, 0x28,
0x09, 0x52, 0x09, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x74, 0x74, 0x72, 0x12, 0x21, 0x0a, 0x0c,
0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x32, 0x20, 0x01,
0x28, 0x09, 0x52, 0x0b, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22,
0x94, 0x01, 0x0a, 0x0b, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12,
0x4b, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0a,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65,
0x72, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74,
0x61, 0x6d, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70,
0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0e,
0x6c, 0x64, 0x61, 0x70, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x14,
0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6c, 0x64, 0x61, 0x70, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64,
0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x65, 0x72, 0x74, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x09,
0x52, 0x04, 0x63, 0x65, 0x72, 0x74, 0x22, 0xc8, 0x02, 0x0a, 0x11, 0x43, 0x6c, 0x69, 0x65, 0x6e,
0x74, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x4b, 0x0a, 0x0b,
0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x2a, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x73,
0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70,
0x2e, 0x76, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x63,
0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x6c, 0x64, 0x61,
0x70, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x14, 0x20, 0x01, 0x28,
0x09, 0x52, 0x0c, 0x6c, 0x64, 0x61, 0x70, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x49, 0x64, 0x12,
0x20, 0x0a, 0x0b, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x18, 0x1e,
0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74,
0x65, 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65,
0x5f, 0x6b, 0x65, 0x79, 0x18, 0x28, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0e, 0x63, 0x65, 0x72, 0x74,
0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x2c, 0x0a, 0x12, 0x63, 0x74,
0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x6b, 0x65, 0x79,
0x18, 0x32, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x10, 0x63, 0x74, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66,
0x69, 0x63, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x30, 0x0a, 0x14, 0x63, 0x65, 0x72, 0x74,
0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x68, 0x6d, 0x61, 0x63,
0x18, 0x3c, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x12, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63,
0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x48, 0x6d, 0x61, 0x63, 0x12, 0x15, 0x0a, 0x06, 0x6b, 0x65,
0x79, 0x5f, 0x69, 0x64, 0x18, 0x46, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6b, 0x65, 0x79, 0x49,
0x64, 0x22, 0x8c, 0x02, 0x0a, 0x0e, 0x42, 0x69, 0x6e, 0x64, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e,
0x74, 0x69, 0x61, 0x6c, 0x12, 0x4b, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74,
0x69, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x63, 0x6f, 0x6e, 0x74,
0x49, 0x64, 0x12, 0x2f, 0x0a, 0x13, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e,
0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0d, 0x52,
0x12, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x69, 0x6f, 0x72,
0x69, 0x74, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x75, 0x72,
0x6c, 0x18, 0x28, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x55,
0x72, 0x6c, 0x22, 0xdf, 0x01, 0x0a, 0x13, 0x55, 0x73, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79,
0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x12, 0x4b, 0x0a, 0x0b, 0x63, 0x72,
0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x2a, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x73, 0x74, 0x6f,
0x72, 0x61, 0x67, 0x65, 0x2e, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x76,
0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x63, 0x72, 0x65,
0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x6c, 0x64, 0x61, 0x70, 0x5f,
0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x14, 0x20, 0x01, 0x28, 0x09, 0x52,
0x0c, 0x6c, 0x64, 0x61, 0x70, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x49, 0x64, 0x12, 0x17, 0x0a,
0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x64, 0x6e, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06,
0x75, 0x73, 0x65, 0x72, 0x44, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x61,
0x74, 0x74, 0x72, 0x18, 0x28, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x41,
0x74, 0x74, 0x72, 0x12, 0x1f, 0x0a, 0x0b, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x66, 0x69, 0x6c, 0x74,
0x65, 0x72, 0x18, 0x32, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x46, 0x69,
0x6c, 0x74, 0x65, 0x72, 0x22, 0xe6, 0x01, 0x0a, 0x14, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x45, 0x6e,
0x74, 0x72, 0x79, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x12, 0x4b, 0x0a,
0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e,
0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d,
0x70, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a,
0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x6c, 0x64,
0x61, 0x70, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x14, 0x20, 0x01,
0x28, 0x09, 0x52, 0x0c, 0x6c, 0x64, 0x61, 0x70, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x49, 0x64,
0x12, 0x19, 0x0a, 0x08, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x64, 0x6e, 0x18, 0x1e, 0x20, 0x01,
0x28, 0x09, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x44, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x67,
0x72, 0x6f, 0x75, 0x70, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x18, 0x28, 0x20, 0x01, 0x28, 0x09, 0x52,
0x09, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x74, 0x74, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x67, 0x72,
0x6f, 0x75, 0x70, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x32, 0x20, 0x01, 0x28, 0x09,
0x52, 0x0b, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x94, 0x01,
0x0a, 0x0b, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x4b, 0x0a,
0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e,
0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d,
0x70, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a,
0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x6c, 0x64,
0x61, 0x70, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x14, 0x20, 0x01,
0x28, 0x09, 0x52, 0x0c, 0x6c, 0x64, 0x61, 0x70, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x49, 0x64,
0x12, 0x12, 0x0a, 0x04, 0x63, 0x65, 0x72, 0x74, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
0x63, 0x65, 0x72, 0x74, 0x22, 0xc8, 0x02, 0x0a, 0x11, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43,
0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x4b, 0x0a, 0x0b, 0x63, 0x72,
0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x2a, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x73, 0x74, 0x6f,
0x72, 0x61, 0x67, 0x65, 0x2e, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x76,
0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x63, 0x72, 0x65,
0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x6c, 0x64, 0x61, 0x70, 0x5f,
0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x14, 0x20, 0x01, 0x28, 0x09, 0x52,
0x0c, 0x6c, 0x64, 0x61, 0x70, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x49, 0x64, 0x12, 0x20, 0x0a,
0x0b, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x18, 0x1e, 0x20, 0x01,
0x28, 0x0c, 0x52, 0x0b, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12,
0x27, 0x0a, 0x0f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x6b,
0x65, 0x79, 0x18, 0x28, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0e, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66,
0x69, 0x63, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x2c, 0x0a, 0x12, 0x63, 0x74, 0x5f, 0x63,
0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x32,
0x20, 0x01, 0x28, 0x0c, 0x52, 0x10, 0x63, 0x74, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63,
0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x30, 0x0a, 0x14, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66,
0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x68, 0x6d, 0x61, 0x63, 0x18, 0x3c,
0x20, 0x01, 0x28, 0x0c, 0x52, 0x12, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74,
0x65, 0x4b, 0x65, 0x79, 0x48, 0x6d, 0x61, 0x63, 0x12, 0x15, 0x0a, 0x06, 0x6b, 0x65, 0x79, 0x5f,
0x69, 0x64, 0x18, 0x46, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6b, 0x65, 0x79, 0x49, 0x64, 0x22,
0x8c, 0x02, 0x0a, 0x0e, 0x42, 0x69, 0x6e, 0x64, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69,
0x61, 0x6c, 0x12, 0x4b, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d,
0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f,
0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x74, 0x69, 0x6d,
0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74,
0x61, 0x6d, 0x70, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12,
0x24, 0x0a, 0x0e, 0x6c, 0x64, 0x61, 0x70, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x5f, 0x69,
0x64, 0x18, 0x14, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6c, 0x64, 0x61, 0x70, 0x4d, 0x65, 0x74,
0x68, 0x6f, 0x64, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x64, 0x6e, 0x18, 0x1e, 0x20, 0x01, 0x28,
0x09, 0x52, 0x02, 0x64, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72,
0x64, 0x18, 0x28, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72,
0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x74, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64,
0x18, 0x32, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x63, 0x74, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f,
0x72, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x5f, 0x68,
0x6d, 0x61, 0x63, 0x18, 0x3c, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x70, 0x61, 0x73, 0x73, 0x77,
0x6f, 0x72, 0x64, 0x48, 0x6d, 0x61, 0x63, 0x12, 0x15, 0x0a, 0x06, 0x6b, 0x65, 0x79, 0x5f, 0x69,
0x64, 0x18, 0x46, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6b, 0x65, 0x79, 0x49, 0x64, 0x22, 0x90,
0x04, 0x0a, 0x07, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x75,
0x62, 0x6c, 0x69, 0x63, 0x5f, 0x69, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70,
0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x64, 0x12, 0x4b, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74,
0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x63,
0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67,
0x65, 0x2e, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x54,
0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65,
0x54, 0x69, 0x6d, 0x65, 0x12, 0x4b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74,
0x69, 0x6d, 0x65, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x63, 0x6f, 0x6e, 0x74,
0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x74,
0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65,
0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d,
0x65, 0x12, 0x24, 0x0a, 0x0e, 0x6c, 0x64, 0x61, 0x70, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64,
0x5f, 0x69, 0x64, 0x18, 0x14, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6c, 0x64, 0x61, 0x70, 0x4d,
0x65, 0x74, 0x68, 0x6f, 0x64, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x64, 0x6e, 0x18, 0x1e, 0x20,
0x01, 0x28, 0x09, 0x52, 0x02, 0x64, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77,
0x6f, 0x72, 0x64, 0x18, 0x28, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77,
0x6f, 0x72, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x74, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f,
0x72, 0x64, 0x18, 0x32, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x63, 0x74, 0x50, 0x61, 0x73, 0x73,
0x77, 0x6f, 0x72, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64,
0x5f, 0x68, 0x6d, 0x61, 0x63, 0x18, 0x3c, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x70, 0x61, 0x73,
0x73, 0x77, 0x6f, 0x72, 0x64, 0x48, 0x6d, 0x61, 0x63, 0x12, 0x15, 0x0a, 0x06, 0x6b, 0x65, 0x79,
0x5f, 0x69, 0x64, 0x18, 0x46, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6b, 0x65, 0x79, 0x49, 0x64,
0x22, 0x90, 0x04, 0x0a, 0x07, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09,
0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d,
0x65, 0x12, 0x24, 0x0a, 0x0e, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64,
0x5f, 0x69, 0x64, 0x18, 0x28, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x75, 0x74, 0x68, 0x4d,
0x65, 0x74, 0x68, 0x6f, 0x64, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,
0x32, 0x20, 0x01, 0x28, 0x09, 0x42, 0x10, 0xc2, 0xdd, 0x29, 0x0c, 0x0a, 0x04, 0x4e, 0x61, 0x6d,
0x65, 0x12, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x40, 0x0a,
0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x3c, 0x20, 0x01,
0x28, 0x09, 0x42, 0x1e, 0xc2, 0xdd, 0x29, 0x1a, 0x0a, 0x0b, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69,
0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69,
0x6f, 0x6e, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12,
0x19, 0x0a, 0x08, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x46, 0x20, 0x01, 0x28,
0x09, 0x52, 0x07, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65,
0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x50, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x76, 0x65, 0x72,
0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x5f, 0x6e, 0x61,
0x6d, 0x65, 0x18, 0x5a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x4e,
0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x75, 0x6c, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65,
0x18, 0x64, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x75, 0x6c, 0x6c, 0x4e, 0x61, 0x6d, 0x65,
0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x6e, 0x20, 0x01, 0x28, 0x09, 0x52,
0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x64, 0x6e, 0x18, 0x78, 0x20, 0x01,
0x28, 0x09, 0x52, 0x02, 0x64, 0x6e, 0x12, 0x29, 0x0a, 0x10, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72,
0x5f, 0x6f, 0x66, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x8c, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x0e, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x4f, 0x66, 0x47, 0x72, 0x6f, 0x75, 0x70,
0x73, 0x22, 0xd2, 0x01, 0x0a, 0x13, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x74, 0x74,
0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x4d, 0x61, 0x70, 0x12, 0x24, 0x0a, 0x0e, 0x6c, 0x64, 0x61,
0x70, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28,
0x09, 0x52, 0x0c, 0x6c, 0x64, 0x61, 0x70, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x49, 0x64, 0x12,
0x25, 0x0a, 0x0e, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74,
0x65, 0x18, 0x14, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x66, 0x72, 0x6f, 0x6d, 0x41, 0x74, 0x74,
0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x6f, 0x5f, 0x61, 0x74, 0x74,
0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x74, 0x6f,
0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x12, 0x4b, 0x0a, 0x0b, 0x63, 0x72, 0x65,
0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x28, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a,
0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x73, 0x74, 0x6f, 0x72,
0x61, 0x67, 0x65, 0x2e, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x76, 0x31,
0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61,
0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x22, 0xb2, 0x01, 0x0a, 0x0c, 0x44, 0x65, 0x72, 0x65, 0x66,
0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x12, 0x4b, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74,
0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x63,
0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67,
0x65, 0x2e, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x54,
0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65,
0x54, 0x69, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x6c, 0x64, 0x61, 0x70, 0x5f, 0x6d, 0x65, 0x74,
0x68, 0x6f, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x14, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6c, 0x64,
0x61, 0x70, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x49, 0x64, 0x12, 0x2f, 0x0a, 0x13, 0x64, 0x65,
0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65,
0x73, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x64, 0x65, 0x72, 0x65, 0x66, 0x65, 0x72,
0x65, 0x6e, 0x63, 0x65, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x22, 0xb8, 0x03, 0x0a, 0x0c,
0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1b, 0x0a, 0x09,
0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x69, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52,
0x08, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x64, 0x12, 0x4b, 0x0a, 0x0b, 0x63, 0x72, 0x65,
0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a,
@@ -1723,84 +1896,37 @@ var file_controller_storage_auth_ldap_store_v1_ldap_proto_rawDesc = []byte{
0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65,
0x2e, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x69,
0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54,
0x69, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x6d, 0x65, 0x74, 0x68,
0x6f, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x28, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x75, 0x74,
0x68, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x04, 0x6e, 0x61, 0x6d,
0x65, 0x18, 0x32, 0x20, 0x01, 0x28, 0x09, 0x42, 0x10, 0xc2, 0xdd, 0x29, 0x0c, 0x0a, 0x04, 0x4e,
0x61, 0x6d, 0x65, 0x12, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12,
0x40, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x3c,
0x20, 0x01, 0x28, 0x09, 0x42, 0x1e, 0xc2, 0xdd, 0x29, 0x1a, 0x0a, 0x0b, 0x44, 0x65, 0x73, 0x63,
0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70,
0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f,
0x6e, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x46, 0x20,
0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07,
0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x50, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x76,
0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x5f,
0x6e, 0x61, 0x6d, 0x65, 0x18, 0x5a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6c, 0x6f, 0x67, 0x69,
0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x75, 0x6c, 0x6c, 0x5f, 0x6e, 0x61,
0x6d, 0x65, 0x18, 0x64, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x75, 0x6c, 0x6c, 0x4e, 0x61,
0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x6e, 0x20, 0x01, 0x28,
0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x64, 0x6e, 0x18, 0x78,
0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x64, 0x6e, 0x12, 0x29, 0x0a, 0x10, 0x6d, 0x65, 0x6d, 0x62,
0x65, 0x72, 0x5f, 0x6f, 0x66, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x8c, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52, 0x0e, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x4f, 0x66, 0x47, 0x72, 0x6f,
0x75, 0x70, 0x73, 0x22, 0xd2, 0x01, 0x0a, 0x13, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41,
0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x4d, 0x61, 0x70, 0x12, 0x24, 0x0a, 0x0e, 0x6c,
0x64, 0x61, 0x70, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x0a, 0x20,
0x01, 0x28, 0x09, 0x52, 0x0c, 0x6c, 0x64, 0x61, 0x70, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x49,
0x64, 0x12, 0x25, 0x0a, 0x0e, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62,
0x75, 0x74, 0x65, 0x18, 0x14, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x66, 0x72, 0x6f, 0x6d, 0x41,
0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x6f, 0x5f, 0x61,
0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b,
0x74, 0x6f, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x12, 0x4b, 0x0a, 0x0b, 0x63,
0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x28, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x2a, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x73, 0x74,
0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e,
0x76, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x63, 0x72,
0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x22, 0xb8, 0x03, 0x0a, 0x0c, 0x4d, 0x61, 0x6e,
0x61, 0x67, 0x65, 0x64, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x75, 0x62,
0x6c, 0x69, 0x63, 0x5f, 0x69, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x75,
0x62, 0x6c, 0x69, 0x63, 0x49, 0x64, 0x12, 0x4b, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65,
0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x63, 0x6f,
0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65,
0x2e, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x69,
0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54,
0x69, 0x6d, 0x65, 0x12, 0x4b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69,
0x6d, 0x65, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72,
0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x74, 0x69,
0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73,
0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65,
0x12, 0x24, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x28, 0x20, 0x01, 0x28, 0x09, 0x42, 0x10,
0xc2, 0xdd, 0x29, 0x0c, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x04, 0x6e, 0x61, 0x6d, 0x65,
0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x40, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69,
0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x32, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1e, 0xc2, 0xdd, 0x29,
0x1a, 0x0a, 0x0b, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0b,
0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x64, 0x65, 0x73,
0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73,
0x69, 0x6f, 0x6e, 0x18, 0x3c, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69,
0x6f, 0x6e, 0x12, 0x24, 0x0a, 0x0e, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f,
0x64, 0x5f, 0x69, 0x64, 0x18, 0x46, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x75, 0x74, 0x68,
0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x49, 0x64, 0x12, 0x49, 0x0a, 0x0b, 0x67, 0x72, 0x6f, 0x75,
0x70, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x50, 0x20, 0x01, 0x28, 0x09, 0x42, 0x28, 0xc2,
0xdd, 0x29, 0x24, 0x0a, 0x0a, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12,
0x16, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x67, 0x72, 0x6f, 0x75,
0x70, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x0a, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x61,
0x6d, 0x65, 0x73, 0x22, 0xaf, 0x01, 0x0a, 0x19, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, 0x47,
0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e,
0x74, 0x12, 0x4b, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65,
0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c,
0x6c, 0x65, 0x72, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x74, 0x69, 0x6d, 0x65,
0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61,
0x6d, 0x70, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x28,
0x0a, 0x10, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f,
0x69, 0x64, 0x18, 0x14, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65,
0x64, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x65, 0x6d, 0x62,
0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x65, 0x6d,
0x62, 0x65, 0x72, 0x49, 0x64, 0x42, 0x3e, 0x5a, 0x3c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e,
0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x62, 0x6f,
0x75, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f,
0x61, 0x75, 0x74, 0x68, 0x2f, 0x6c, 0x64, 0x61, 0x70, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x3b,
0x73, 0x74, 0x6f, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x69, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x28, 0x20, 0x01, 0x28,
0x09, 0x42, 0x10, 0xc2, 0xdd, 0x29, 0x0c, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x04, 0x6e,
0x61, 0x6d, 0x65, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x40, 0x0a, 0x0b, 0x64, 0x65, 0x73,
0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x32, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1e,
0xc2, 0xdd, 0x29, 0x1a, 0x0a, 0x0b, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f,
0x6e, 0x12, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b,
0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x76,
0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x3c, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x76, 0x65,
0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x24, 0x0a, 0x0e, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x6d, 0x65,
0x74, 0x68, 0x6f, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x46, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61,
0x75, 0x74, 0x68, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x49, 0x64, 0x12, 0x49, 0x0a, 0x0b, 0x67,
0x72, 0x6f, 0x75, 0x70, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x50, 0x20, 0x01, 0x28, 0x09,
0x42, 0x28, 0xc2, 0xdd, 0x29, 0x24, 0x0a, 0x0a, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x61, 0x6d,
0x65, 0x73, 0x12, 0x16, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x67,
0x72, 0x6f, 0x75, 0x70, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x0a, 0x67, 0x72, 0x6f, 0x75,
0x70, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x22, 0xaf, 0x01, 0x0a, 0x19, 0x4d, 0x61, 0x6e, 0x61, 0x67,
0x65, 0x64, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x41, 0x63, 0x63,
0x6f, 0x75, 0x6e, 0x74, 0x12, 0x4b, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74,
0x69, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x63, 0x6f, 0x6e, 0x74,
0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x74,
0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65,
0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d,
0x65, 0x12, 0x28, 0x0a, 0x10, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, 0x5f, 0x67, 0x72, 0x6f,
0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x14, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6d, 0x61, 0x6e,
0x61, 0x67, 0x65, 0x64, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6d,
0x65, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08,
0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x49, 0x64, 0x42, 0x3e, 0x5a, 0x3c, 0x67, 0x69, 0x74, 0x68,
0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70,
0x2f, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e,
0x61, 0x6c, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x6c, 0x64, 0x61, 0x70, 0x2f, 0x73, 0x74, 0x6f,
0x72, 0x65, 0x3b, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@@ -1815,7 +1941,7 @@ func file_controller_storage_auth_ldap_store_v1_ldap_proto_rawDescGZIP() []byte
return file_controller_storage_auth_ldap_store_v1_ldap_proto_rawDescData
}
var file_controller_storage_auth_ldap_store_v1_ldap_proto_msgTypes = make([]protoimpl.MessageInfo, 11)
var file_controller_storage_auth_ldap_store_v1_ldap_proto_msgTypes = make([]protoimpl.MessageInfo, 12)
var file_controller_storage_auth_ldap_store_v1_ldap_proto_goTypes = []interface{}{
(*AuthMethod)(nil), // 0: controller.storage.auth.ldap.store.v1.AuthMethod
(*Url)(nil), // 1: controller.storage.auth.ldap.store.v1.Url
@@ -1826,30 +1952,32 @@ var file_controller_storage_auth_ldap_store_v1_ldap_proto_goTypes = []interface{
(*BindCredential)(nil), // 6: controller.storage.auth.ldap.store.v1.BindCredential
(*Account)(nil), // 7: controller.storage.auth.ldap.store.v1.Account
(*AccountAttributeMap)(nil), // 8: controller.storage.auth.ldap.store.v1.AccountAttributeMap
(*ManagedGroup)(nil), // 9: controller.storage.auth.ldap.store.v1.ManagedGroup
(*ManagedGroupMemberAccount)(nil), // 10: controller.storage.auth.ldap.store.v1.ManagedGroupMemberAccount
(*timestamp.Timestamp)(nil), // 11: controller.storage.timestamp.v1.Timestamp
(*DerefAliases)(nil), // 9: controller.storage.auth.ldap.store.v1.DerefAliases
(*ManagedGroup)(nil), // 10: controller.storage.auth.ldap.store.v1.ManagedGroup
(*ManagedGroupMemberAccount)(nil), // 11: controller.storage.auth.ldap.store.v1.ManagedGroupMemberAccount
(*timestamp.Timestamp)(nil), // 12: controller.storage.timestamp.v1.Timestamp
}
var file_controller_storage_auth_ldap_store_v1_ldap_proto_depIdxs = []int32{
11, // 0: controller.storage.auth.ldap.store.v1.AuthMethod.create_time:type_name -> controller.storage.timestamp.v1.Timestamp
11, // 1: controller.storage.auth.ldap.store.v1.AuthMethod.update_time:type_name -> controller.storage.timestamp.v1.Timestamp
11, // 2: controller.storage.auth.ldap.store.v1.Url.create_time:type_name -> controller.storage.timestamp.v1.Timestamp
11, // 3: controller.storage.auth.ldap.store.v1.UserEntrySearchConf.create_time:type_name -> controller.storage.timestamp.v1.Timestamp
11, // 4: controller.storage.auth.ldap.store.v1.GroupEntrySearchConf.create_time:type_name -> controller.storage.timestamp.v1.Timestamp
11, // 5: controller.storage.auth.ldap.store.v1.Certificate.create_time:type_name -> controller.storage.timestamp.v1.Timestamp
11, // 6: controller.storage.auth.ldap.store.v1.ClientCertificate.create_time:type_name -> controller.storage.timestamp.v1.Timestamp
11, // 7: controller.storage.auth.ldap.store.v1.BindCredential.create_time:type_name -> controller.storage.timestamp.v1.Timestamp
11, // 8: controller.storage.auth.ldap.store.v1.Account.create_time:type_name -> controller.storage.timestamp.v1.Timestamp
11, // 9: controller.storage.auth.ldap.store.v1.Account.update_time:type_name -> controller.storage.timestamp.v1.Timestamp
11, // 10: controller.storage.auth.ldap.store.v1.AccountAttributeMap.create_time:type_name -> controller.storage.timestamp.v1.Timestamp
11, // 11: controller.storage.auth.ldap.store.v1.ManagedGroup.create_time:type_name -> controller.storage.timestamp.v1.Timestamp
11, // 12: controller.storage.auth.ldap.store.v1.ManagedGroup.update_time:type_name -> controller.storage.timestamp.v1.Timestamp
11, // 13: controller.storage.auth.ldap.store.v1.ManagedGroupMemberAccount.create_time:type_name -> controller.storage.timestamp.v1.Timestamp
14, // [14:14] is the sub-list for method output_type
14, // [14:14] is the sub-list for method input_type
14, // [14:14] is the sub-list for extension type_name
14, // [14:14] is the sub-list for extension extendee
0, // [0:14] is the sub-list for field type_name
12, // 0: controller.storage.auth.ldap.store.v1.AuthMethod.create_time:type_name -> controller.storage.timestamp.v1.Timestamp
12, // 1: controller.storage.auth.ldap.store.v1.AuthMethod.update_time:type_name -> controller.storage.timestamp.v1.Timestamp
12, // 2: controller.storage.auth.ldap.store.v1.Url.create_time:type_name -> controller.storage.timestamp.v1.Timestamp
12, // 3: controller.storage.auth.ldap.store.v1.UserEntrySearchConf.create_time:type_name -> controller.storage.timestamp.v1.Timestamp
12, // 4: controller.storage.auth.ldap.store.v1.GroupEntrySearchConf.create_time:type_name -> controller.storage.timestamp.v1.Timestamp
12, // 5: controller.storage.auth.ldap.store.v1.Certificate.create_time:type_name -> controller.storage.timestamp.v1.Timestamp
12, // 6: controller.storage.auth.ldap.store.v1.ClientCertificate.create_time:type_name -> controller.storage.timestamp.v1.Timestamp
12, // 7: controller.storage.auth.ldap.store.v1.BindCredential.create_time:type_name -> controller.storage.timestamp.v1.Timestamp
12, // 8: controller.storage.auth.ldap.store.v1.Account.create_time:type_name -> controller.storage.timestamp.v1.Timestamp
12, // 9: controller.storage.auth.ldap.store.v1.Account.update_time:type_name -> controller.storage.timestamp.v1.Timestamp
12, // 10: controller.storage.auth.ldap.store.v1.AccountAttributeMap.create_time:type_name -> controller.storage.timestamp.v1.Timestamp
12, // 11: controller.storage.auth.ldap.store.v1.DerefAliases.create_time:type_name -> controller.storage.timestamp.v1.Timestamp
12, // 12: controller.storage.auth.ldap.store.v1.ManagedGroup.create_time:type_name -> controller.storage.timestamp.v1.Timestamp
12, // 13: controller.storage.auth.ldap.store.v1.ManagedGroup.update_time:type_name -> controller.storage.timestamp.v1.Timestamp
12, // 14: controller.storage.auth.ldap.store.v1.ManagedGroupMemberAccount.create_time:type_name -> controller.storage.timestamp.v1.Timestamp
15, // [15:15] is the sub-list for method output_type
15, // [15:15] is the sub-list for method input_type
15, // [15:15] is the sub-list for extension type_name
15, // [15:15] is the sub-list for extension extendee
0, // [0:15] is the sub-list for field type_name
}
func init() { file_controller_storage_auth_ldap_store_v1_ldap_proto_init() }
@@ -1967,7 +2095,7 @@ func file_controller_storage_auth_ldap_store_v1_ldap_proto_init() {
}
}
file_controller_storage_auth_ldap_store_v1_ldap_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ManagedGroup); i {
switch v := v.(*DerefAliases); i {
case 0:
return &v.state
case 1:
@@ -1979,6 +2107,18 @@ func file_controller_storage_auth_ldap_store_v1_ldap_proto_init() {
}
}
file_controller_storage_auth_ldap_store_v1_ldap_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ManagedGroup); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_controller_storage_auth_ldap_store_v1_ldap_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ManagedGroupMemberAccount); i {
case 0:
return &v.state
@@ -1997,7 +2137,7 @@ func file_controller_storage_auth_ldap_store_v1_ldap_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_controller_storage_auth_ldap_store_v1_ldap_proto_rawDesc,
NumEnums: 0,
NumMessages: 11,
NumMessages: 12,
NumExtensions: 0,
NumServices: 0,
},
+10
View File
@@ -140,6 +140,16 @@ func TestAuthMethod(t testing.TB,
}
am.BindPasswordHmac = bc.PasswordHmac
}
if opts.withDerefAliases != "" {
d, err := NewDerefAliases(testCtx, am.PublicId, opts.withDerefAliases)
if err != nil {
return err
}
if err := w.Create(testCtx, d); err != nil {
return err
}
am.DereferenceAliases = d.DereferenceAliases
}
return nil
})
require.NoError(err)