Accessing request attributes in filter?

I wish to do an ab test. I want to assign each user to one of 2 random groups. And I want it assignment kind of permanent. So my approach was to create my own implementation of ActionCreator where I read assignment from cookie (or randomly assign A or B). Value of assignment I store in requests’ attribute. I can read this attribute in the application. When application logic finishes, I wish to store the assignment in cookie. The best way to save it in cookie seemed to be via a filter. But even my implementation of EssentialFilter (which is supposed to hold “full” request) does not hold the attributes I’ve set in ActionCreator. Is there any way to pass such value to filter? Or maybe there’s better approach to achieve my goal?