0c80ee5cf5
* VAULT-6613 add DetermineRoleFromLoginRequest function to Core * Fix body handling * Role resolution for rate limit quotas * VAULT-6613 update precedence test * Add changelog * VAULT-6614 start of changes for roles in LCQs * Expiration changes for leases * Add role information to RequestAuth * VAULT-6614 Test updates * VAULT-6614 Add expiration test with roles * VAULT-6614 fix comment * VAULT-6614 Protobuf on OSS * VAULT-6614 Add rlock to determine role code * VAULT-6614 Try lock instead of rlock * VAULT-6614 back to rlock while I think about this more * VAULT-6614 Additional safety for nil dereference * VAULT-6614 Use %q over %s * VAULT-6614 Add overloading to plugin backends * VAULT-6614 RLocks instead * VAULT-6614 Fix return for backend factory
71 lines
1.8 KiB
Go
71 lines
1.8 KiB
Go
//go:build !enterprise
|
|
|
|
package vault
|
|
|
|
import (
|
|
"context"
|
|
"sync"
|
|
|
|
"github.com/hashicorp/vault/helper/identity"
|
|
"github.com/hashicorp/vault/sdk/logical"
|
|
)
|
|
|
|
func waitForReplicationState(context.Context, *Core, *logical.Request) (*sync.WaitGroup, error) {
|
|
return nil, nil
|
|
}
|
|
|
|
func checkNeedsCG(context.Context, *Core, *logical.Request, *logical.Auth, error, []string) (error, *logical.Response, *logical.Auth, error) {
|
|
return nil, nil, nil, nil
|
|
}
|
|
|
|
func checkErrControlGroupTokenNeedsCreated(err error) bool {
|
|
return false
|
|
}
|
|
|
|
func shouldForward(c *Core, resp *logical.Response, err error) bool {
|
|
return false
|
|
}
|
|
|
|
func syncCounters(c *Core) error {
|
|
return nil
|
|
}
|
|
|
|
func syncBarrierEncryptionCounter(c *Core) error {
|
|
return nil
|
|
}
|
|
|
|
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")
|
|
}
|
|
|
|
func getLeaseRegisterFunc(c *Core) (func(context.Context, *logical.Request, *logical.Response, string) (string, error), error) {
|
|
return c.expiration.Register, nil
|
|
}
|
|
|
|
func getAuthRegisterFunc(c *Core) (RegisterAuthFunc, error) {
|
|
return c.RegisterAuth, nil
|
|
}
|
|
|
|
func possiblyForwardAliasCreation(ctx context.Context, c *Core, inErr error, auth *logical.Auth, entity *identity.Entity) (*identity.Entity, bool, error) {
|
|
return entity, false, inErr
|
|
}
|
|
|
|
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
|
|
}
|
|
|
|
func possiblyForwardSaveCachedAuthResponse(ctx context.Context, c *Core, respAuth *MFACachedAuthResponse) error {
|
|
err := c.SaveMFAResponseAuth(respAuth)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|