agent: comments to point to differing logic

This commit is contained in:
Mitchell Hashimoto 2018-05-10 22:37:02 -07:00
parent 526cfc34bd
commit b02502be73
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
//
// 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) {
// Fetch the token
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
// 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(
args *structs.IntentionQueryRequest,
reply *structs.IntentionQueryTestResponse) error {