agent: comments to point to differing logic

This commit is contained in:
Mitchell Hashimoto 2018-05-10 22:37:02 -07:00
parent d68462fca6
commit 54ac5adb08
No known key found for this signature in database
GPG Key ID: 744E147AA52F5B0A
2 changed files with 7 additions and 0 deletions

View File

@ -1106,6 +1106,9 @@ func (s *HTTPServer) agentLocalBlockingQuery(resp http.ResponseWriter, hash stri
// AgentConnectAuthorize // AgentConnectAuthorize
// //
// POST /v1/agent/connect/authorize // POST /v1/agent/connect/authorize
//
// Note: when this logic changes, consider if the Intention.Test RPC method
// also needs to be updated.
func (s *HTTPServer) AgentConnectAuthorize(resp http.ResponseWriter, req *http.Request) (interface{}, error) { func (s *HTTPServer) AgentConnectAuthorize(resp http.ResponseWriter, req *http.Request) (interface{}, error) {
// Fetch the token // Fetch the token
var token string var token string

View File

@ -256,6 +256,10 @@ func (s *Intention) Match(
// Test tests a source/destination and returns whether it would be allowed // Test tests a source/destination and returns whether it would be allowed
// or denied based on the current ACL configuration. // or denied based on the current ACL configuration.
//
// Note: Whenever the logic for this method is changed, you should take
// a look at the agent authorize endpoint (agent/agent_endpoint.go) since
// the logic there is similar.
func (s *Intention) Test( func (s *Intention) Test(
args *structs.IntentionQueryRequest, args *structs.IntentionQueryRequest,
reply *structs.IntentionQueryTestResponse) error { reply *structs.IntentionQueryTestResponse) error {