2022-01-05 18:02:03 +00:00
|
|
|
//go:build !enterprise
|
2018-09-18 03:03:00 +00:00
|
|
|
|
|
|
|
package vault
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
2021-02-04 14:10:35 +00:00
|
|
|
"sync"
|
2018-09-18 03:03:00 +00:00
|
|
|
|
|
|
|
"github.com/hashicorp/vault/helper/identity"
|
2019-04-12 21:54:35 +00:00
|
|
|
"github.com/hashicorp/vault/sdk/logical"
|
2018-09-18 03:03:00 +00:00
|
|
|
)
|
|
|
|
|
2021-02-04 14:10:35 +00:00
|
|
|
func waitForReplicationState(context.Context, *Core, *logical.Request) (*sync.WaitGroup, error) {
|
|
|
|
return nil, nil
|
|
|
|
}
|
2018-09-18 03:03:00 +00:00
|
|
|
|
|
|
|
func checkNeedsCG(context.Context, *Core, *logical.Request, *logical.Auth, error, []string) (error, *logical.Response, *logical.Auth, error) {
|
|
|
|
return nil, nil, nil, nil
|
|
|
|
}
|
|
|
|
|
2019-04-03 21:16:49 +00:00
|
|
|
func checkErrControlGroupTokenNeedsCreated(err error) bool {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
2019-07-05 22:12:34 +00:00
|
|
|
func shouldForward(c *Core, resp *logical.Response, err error) bool {
|
2019-03-05 19:55:07 +00:00
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
2021-02-25 20:27:25 +00:00
|
|
|
func syncCounters(c *Core) error {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func syncBarrierEncryptionCounter(c *Core) error {
|
|
|
|
return nil
|
2019-03-05 19:55:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func couldForward(c *Core) bool {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
|
|
|
func forward(ctx context.Context, c *Core, req *logical.Request) (*logical.Response, error) {
|
|
|
|
panic("forward called in OSS Vault")
|
2018-09-18 03:03:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func getLeaseRegisterFunc(c *Core) (func(context.Context, *logical.Request, *logical.Response) (string, error), error) {
|
|
|
|
return c.expiration.Register, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func getAuthRegisterFunc(c *Core) (RegisterAuthFunc, error) {
|
|
|
|
return c.RegisterAuth, nil
|
|
|
|
}
|
|
|
|
|
2022-05-18 16:16:13 +00:00
|
|
|
func possiblyForwardAliasCreation(ctx context.Context, c *Core, inErr error, auth *logical.Auth, entity *identity.Entity) (*identity.Entity, bool, error) {
|
|
|
|
return entity, false, inErr
|
2018-09-18 03:03:00 +00:00
|
|
|
}
|
2021-10-15 19:20:00 +00:00
|
|
|
|
|
|
|
var errCreateEntityUnimplemented = "create entity unimplemented in the server"
|
|
|
|
|
|
|
|
func possiblyForwardEntityCreation(ctx context.Context, c *Core, inErr error, auth *logical.Auth, entity *identity.Entity) (*identity.Entity, error) {
|
|
|
|
return entity, inErr
|
|
|
|
}
|
2022-05-17 20:30:36 +00:00
|
|
|
|
|
|
|
func possiblyForwardSaveCachedAuthResponse(ctx context.Context, c *Core, respAuth *MFACachedAuthResponse) error {
|
|
|
|
err := c.SaveMFAResponseAuth(respAuth)
|
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|