mirror of
https://github.com/status-im/consul.git
synced 2025-02-02 08:56:43 +00:00
Allow the bootstrap endpoint to be disabled in enterprise. (#7614)
This commit is contained in:
parent
4bfaeb5cd2
commit
da893c36a1
@ -115,6 +115,10 @@ func (a *ACL) BootstrapTokens(args *structs.DCSpecificRequest, reply *structs.AC
|
||||
return err
|
||||
}
|
||||
|
||||
if err := a.srv.aclBootstrapAllowed(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// Verify we are allowed to serve this request
|
||||
if !a.srv.InACLDatacenter() {
|
||||
return acl.ErrDisabled
|
||||
|
@ -16,3 +16,11 @@ func (s *Server) ResolveEntTokenToIdentityAndAuthorizer(token string) (structs.A
|
||||
func (s *Server) validateEnterpriseToken(identity structs.ACLIdentity) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// aclBootstrapAllowed returns whether the server's configuration would allow ACL bootstrapping
|
||||
//
|
||||
// This endpoint does not take into account whether bootstrapping has been performed previously
|
||||
// nor the bootstrap reset file.
|
||||
func (s *Server) aclBootstrapAllowed() error {
|
||||
return nil
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user