I'm designing a system, and it needs future expandability for the use of a permission system of some kind. I'm wondering if the flyweight pattern would be a good choice to implement this. I'm not responsible for the implementation right now, as it is just a prototype, and we're not prototyping any parts that need the right system. However, because of the demand for future extensibility to parts that need permission management the interface needs to be solid. This means that in the end it will be a thought experiment, rather than a real part of what I have to work on. However, I do need to be able to explain and justify my design in this area of the application.
In favour of using the are that you can define permissions by having them symbolized through a token class, as represented in the flyweight pattern. If you're dealing with hundreds of users, this would somewhat simplify the handling and issuing of the rights a user holds, and the required rights a user needs for an action within the system; as well as the memory usage of the rights assigned to all the users. In the system I have in mind, a factory method of some kind will assign the rights needed at construction time.
As I'm not really experienced with designing with security in mind, I'm having a paranoid line of thought of which I can't determine if it's justified, security wise. A shared pointer could be hijacked by 'evil intruders' to gain rights they should not be getting. This is the major argument against the use of a flyweight that keeps bugging me, Even though the 'how' is undefined, and I wouldn't know how someone would get it done. (no experience in the security mindset, or it's workings. However, I'm not really looking for a lecture in security beyond the secure use of patterns, unless motivated and clearly related to the question)
Q: Is the flyweight pattern a suitable pattern to manage the representation of the rights of a user (or other some 'hand out' type of data) in the design of a software system that needs to be secure by design? Does the use of flyweight objects as representation of permissions pose more of a security risk than other patterns (I could also use a decorator chain for it, even though that would take up more memory) when dealing with permissions?