Skip to content

Conversation

@shinrich
Copy link
Member

@shinrich shinrich commented May 4, 2016

Actually enforce the ip-level ACL checks for HTTP2 and move to the accept logic to make the decision before creating the session object.

ats_ip_nptop(client_ip, ipb, sizeof(ipb)), netvc->attributes);
}

// XXX Allocate a Http2ClientSession
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this "XXX" is done now?

@bryancall
Copy link
Contributor

bryancall commented May 4, 2016

Where is the check on the method? Each individual stream would need to be verified. You can do a higher level check on the session if you check that all methods are being denied.

@shinrich
Copy link
Member Author

shinrich commented May 4, 2016

The method checks are done in HttpTransact. The acl_record is stored on the ProxyClientTransaction object for that later check.

@bryancall
Copy link
Contributor

Don't you need to check what is being denied at the higher level?

@shinrich
Copy link
Member Author

shinrich commented May 4, 2016

Just pushed another commit that moves the IP-based ip allow checking to the SessionAccept superclass. Verified for IP-based and method-based policies. The method-based denies will return an error header and body. The IP-based denies just closed the connection.

@bryancall I'm not following your question about checking what is denied at a higher level.

Warning("HTTP/2 client '%s' prohibited by ip-allow policy", ats_ip_ntop(client_ip, ipb, sizeof(ipb)));
netvc->do_io_close();
return;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is an extra space at the end of this line.

@bryancall
Copy link
Contributor

Looks like it needs to be clang-formatted there are a few formatting issues.

@shinrich
Copy link
Member Author

shinrich commented May 4, 2016

Yes, planning on running clang-format and squashing before mergin.

@bryancall
Copy link
Contributor

Besides the formatting it looks good. I was meaning from above that you would have to check the allowed methods at the at the session level. I missed the isEmpty() before.

@asfgit asfgit closed this in 5ce103e May 4, 2016
PSUdaemon pushed a commit that referenced this pull request May 20, 2016
SolidWallOfCode pushed a commit to SolidWallOfCode/trafficserver that referenced this pull request Feb 1, 2017
Conflicts:
	lib/luajit
	proxy/http2/Http2ClientSession.cc
	proxy/http2/Http2SessionAccept.cc
SolidWallOfCode pushed a commit to SolidWallOfCode/trafficserver that referenced this pull request Feb 1, 2017
TS-3485: Support ip_allow config for HTTP2.  This closes apache#614.
shinrich added a commit to shinrich/trafficserver that referenced this pull request Jan 9, 2018
Fix previous H2 cherry-pick which pulled in extra stuff
brbzull0 pushed a commit to brbzull0/trafficserver that referenced this pull request Jan 24, 2022
…o carry the plugin responses to jsonrpc messages. (apache#614)

This needs to be clear up after use otherwise the state may hold the old one which can end up giving the wrong response
to rpc requests.
brbzull0 pushed a commit to brbzull0/trafficserver that referenced this pull request Jan 24, 2022
…o carry the plugin responses to jsonrpc messages. (apache#614)

This needs to be clear up after use otherwise the state may hold the old one which can end up giving the wrong response
to rpc requests.
ywkaras pushed a commit to ywkaras/trafficserver that referenced this pull request Jul 7, 2022
…o carry the plugin responses to jsonrpc messages. (apache#614)

This needs to be clear up after use otherwise the state may hold the old one which can end up giving the wrong response
to rpc requests.
masaori335 pushed a commit to masaori335/trafficserver that referenced this pull request Sep 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants