Kees Jongenburger wrote:
You can store the username/password in the module configuration file.
Another solution is to create a central utility method that can be
called to get a reference to a cloud object. Only the utility method
will need to look up the password in order to create a cloud instance.
Another benefit from the latter solution is one single cloud instance
can be shared and reused by all code, as the basic cloud implementation
is (apparently) threadsafe.
I was thinking that depending on the caller the security implementation could return a valid cloud (based on a stacktrace)
I tink we should add an interface that is called something like
TrustedInterface.

This interface could have 2 functions:
        void runCloud(Cloud cloud);
        void runAsUser(UserContext context);

In the Authorization we would require 2 methods:
        boolean runCloud(Object userid ,String loginModule, TrustedInterface
toCall)
        boolean runAsUser(Object userid ,String loginModule, TrustedInterface
toCall)
This way there is no need for a stracktrace, and

Modules / Otherthings that require to have either an UserContext / Cloud
 could ask the security.
In the security, the authorization has to look into a list if a user may
login as the given user.





Reply via email to