mirror of https://github.com/hashicorp/consul
Allow the bootstrap endpoint to be disabled in enterprise. (#7614)
parent
4bfaeb5cd2
commit
da893c36a1
|
@ -115,6 +115,10 @@ func (a *ACL) BootstrapTokens(args *structs.DCSpecificRequest, reply *structs.AC
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if err := a.srv.aclBootstrapAllowed(); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
// Verify we are allowed to serve this request
|
// Verify we are allowed to serve this request
|
||||||
if !a.srv.InACLDatacenter() {
|
if !a.srv.InACLDatacenter() {
|
||||||
return acl.ErrDisabled
|
return acl.ErrDisabled
|
||||||
|
|
|
@ -16,3 +16,11 @@ func (s *Server) ResolveEntTokenToIdentityAndAuthorizer(token string) (structs.A
|
||||||
func (s *Server) validateEnterpriseToken(identity structs.ACLIdentity) error {
|
func (s *Server) validateEnterpriseToken(identity structs.ACLIdentity) error {
|
||||||
return nil
|
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…
Reference in New Issue