Attribute lookup, port ACL code and mainline SP code to Session/Attribute API.