diff --git a/agent/agent_endpoint.go b/agent/agent_endpoint.go index bc684f115c..1cbb4b1da7 100644 --- a/agent/agent_endpoint.go +++ b/agent/agent_endpoint.go @@ -885,3 +885,16 @@ func (s *HTTPServer) AgentConnectCALeafCert(resp http.ResponseWriter, req *http. return &reply, nil } + +// AgentConnectAuthorize +// +// POST /v1/agent/connect/authorize +func (s *HTTPServer) AgentConnectAuthorize(resp http.ResponseWriter, req *http.Request) (interface{}, error) { + // Test the method + if req.Method != "POST" { + return nil, MethodNotAllowedError{req.Method, []string{"POST"}} + } + + // NOTE(mitchellh): return 200 for now. To be implemented later. + return nil, nil +} diff --git a/agent/http_oss.go b/agent/http_oss.go index 6c2e697eaa..774388ad3e 100644 --- a/agent/http_oss.go +++ b/agent/http_oss.go @@ -29,6 +29,7 @@ func init() { registerEndpoint("/v1/agent/check/warn/", []string{"PUT"}, (*HTTPServer).AgentCheckWarn) registerEndpoint("/v1/agent/check/fail/", []string{"PUT"}, (*HTTPServer).AgentCheckFail) registerEndpoint("/v1/agent/check/update/", []string{"PUT"}, (*HTTPServer).AgentCheckUpdate) + registerEndpoint("/v1/agent/connect/authorize", []string{"POST"}, (*HTTPServer).AgentConnectAuthorize) registerEndpoint("/v1/agent/connect/ca/roots", []string{"GET"}, (*HTTPServer).AgentConnectCARoots) registerEndpoint("/v1/agent/connect/ca/leaf/", []string{"GET"}, (*HTTPServer).AgentConnectCALeafCert) registerEndpoint("/v1/agent/service/register", []string{"PUT"}, (*HTTPServer).AgentRegisterService)