On Fri, 30 Nov 2018 at 00:19, Paul Caskey <pcaskey
at internet2.edu> wrote:
Thanks, Ivan.
microservice. In the form of a microservice it
can now be chosen whether
this should take place or not; and the configuration has been extended to
define if this should take place when a specific SP-entityid is met.
Along with this, some configuration options are no longer needed. One of
them is USER_ID_HASH_SALT. As SATOSA is not performing the hash, it does
not need that configuration option anymore. If there is a reason that you
Removing USER_ID_HASH_SALT from proxy_conf.yaml cleared one of the two hash-related
deprecation warnings I was seeing.
I am still seeing the following and, so far, am not able to track it down:
"/usr/local/lib/python3.6/site-packages/satosa/deprecated.py:173:
DeprecationWarning: UserIdHashType is deprecated and will be removed.
_warnings.warn(msg, DeprecationWarning)"
I don't see that anywhere in my config files...
Any pointers?
I can only guess that some part of your code (most probably a
microservice) is using this component. Do you have any custom
microservices?
I think the problem is that the deprecation warning is always going to
be shown during startup of SATOSA because it is part of a class that sub
classes enum.Enum and so it is evaluated during the module load:
root at b3fce00a13ea:/tmp# python3
Python 3.5.3 (default, Sep 27 2018, 17:25:39)
[GCC 6.3.0 20170516] on linux
Type "help", "copyright", "credits" or "license"
for more information.
>> import satosa.deprecated
/opt/satosa/satosa/deprecated.py:173: DeprecationWarning: UserIdHashType is
deprecated and will be removed.
_warnings.warn(msg, DeprecationWarning)
>>
Put another way, I do not think there is anything a deployer can do to NOT
see this deprecation warning.
I think that is not ideal.
I understand why the __getattr__() method on UserIdHashType was defined and
the DeprecationWarning put in place there, but I think it is too aggressive.
Developers should be paying attention and know that UserIdHashType is
deprecated since it is defined in deprecated.py. I don't think we need
to display the DeprecationWarning if a developer tries to use UserIdHashType
in a piece of code.
And deployers will never have occasion to call UserIdHashType.
So I think if the developers should be aware of it and deployers will never
call it then the deprecation warning can be removed from the class.
If you agree Ivan let me know and I can file a bug and/or make a pull
request.
Thanks,
Scott K