-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improving data sources #516
Improving data sources #516
Conversation
I'm planning to add some test cases for data sources. Please wait merger for a while. |
That's very cool! |
@dverdin, whether a user is included from data source(s) or not may be known by checking whether
Problems are:
Additionally, determining data sources by each user is not so useful by these reason:
In conclusion, I decided not to store data source IDs in the tables. Edit: Corrected a commit ID. (again) |
I understand why the current setup don't always give relevant informations and thus should not be trusted. |
Consequently, it is in vain to ask which sources could include a user, at least from view of Sympa. However, if users (owners) pleased, a name of the source by which user was actually included may be stored in a field of the table (doing this, incorrespondence between data source and configuration does not matter). However, gathering all names of data sources which possiblly could include a user is nearly impossible. |
…t::Handler::include, Sympa::DataSource and its subclasses. Sympa::Datasource was deprecated. And some fixes: * [bug] Now include_remote_file, include_sympa_list and include_remote_sympa_list paragraphs may have nosync_time_ranges subparameter. No reason they don't have it. include_file stil doesn't have it. * [-feature] include_voot_group has not been implemented, and it was invalidated. * [bug] include_ldap_query and include_ldap_ca data sources did not implement "regex" option of "selection" subparameter. Now they support it. * [bug] LDAP multiple values in custom attribute with include_ldap_ca was broken. * [-feature] include_sql_query and include_sql_ca stores inclusion data in temporary file so that big data sources will be handled safely. Tentative change: * include_ldap_query, include_ldap_2level and include_sql_query won't clear (overwrite) gecos if retrieved value was empty or undefined. Now they clear (overwrite) gecos in such cases.
- Now it have timeout, ssl_version, ssl_ciphers, ca_verify parameters. - Client certificate and key in cert.pem and private_key files are available.
- HTTP/1.1 is supported thanks to LWP::UserAgent. - Now it has user, passwd, timeout, ssl_version, ssl_ciphers and ca_verify parameters. - host, port and path parameters were obsoleted. Use url instead. - cert parameter was obsoleted.
It is supported by MySQL, PostgreSQL and Oracle (also MS SQL 2017) while SQLite does not.
…gned only when a new user is added (included) from data source, or when it is added (subscribed) by users.
…ata sources of the list has succeeded inclusion. By this change, if there are data sources with nosync_time_ranges set, deletion of outdated users can be delayed 24 hours at most. [change] Database schema: included_* and include_sources_* in subscriber_table and admin_table were deprecated. inclusion_* fields will be used instead.
… and admin_table to give the last time of inclusion from external data sources. "External" means that it is not include_sympa_list or not including list on local domain. Note that if inclusion_ext_* field is updated, inclusion_* field must be updated at the same time. Known bug: - If data source is a list included from the other external data source(s), it will be treated as non-external and move_user request on corresponding users will be allowed.
8126821
to
d5b31fe
Compare
…ed in inclusion_label_* field of the table.
Done. See 1b42ea0
|
Conflicts: ext/Plugin/lib/Sympa/Plugin/ListSource.pm src/lib/Sympa/List.pm src/lib/Sympa/ListDef.pm
I was busy in the end of fiscal year. This will be postponed to the next milestone 6.2.44. |
NOTE: Please discuss/report bugs on #693.
Changes in code:
Sympa::Request::Handler::include
,Sympa::DataSource
and its subclasses.Sympa::Datasource
was deprecated.Changes in behavior:
Previously, some (all, with very earlier version) data sources overwrote.
Previously, users were delayed expiration when corresponding data source failed synchronization: In order to do that, entire subscribers had to be loaded in memory (this bug has been pointed out by #11: Spurious error on duplicate keys with admin sync, and changes on configuration for owners/moderators #275). By this change, if there are data sources with
nosync_time_ranges
set, deletion of outdated users can be delayed 24 hours at most.Names of data sources will no longer be shown in subscriber table of web interface.Other changes:
included_*
andinclude_sources_*
insubscriber_table
andadmin_table
were deprecated.inclusion_*
andinclusion_ext_*
fields will be used instead.inclusion_*
holds the last time of confirmation of inclusion. Additionally,inclusion_ext_*
holds the time from "external" data sources. "External" means that it is notinclude_sympa_list
or not including list on local domain (this data source should be treated specially to detect inclusion loop).Table content will be updated during upgrading process.
include_voot_group
has not been implemented, and it was invalidated.Improvements and bug fixes:
include_sql_query
andinclude_sql_ca
stores inclusion data in temporary file so that big data sources will be handled safely.include_ldap_2level_ca
data source was implemented.However it needs more tests.
include_remote_sympa_list
data source:LWP::UserAgent
.user
,passwd
,timeout
,ssl_version
,ssl_ciphers
andca_verify
parameters.host
,port
andpath
parameters were obsoleted. Useurl
instead.cert
parameter was obsoleted.include_remote_file
data source:timeout
,ssl_version
,ssl_ciphers
,ca_verify
parameters.cert.pem
andprivate_key
files (asinclude_remote_sympa_list
does).include_ldap_query
andinclude_ldap_ca
data sources did not implement "regex" option of "selection" subparameter. Now they support it.include_remote_file
,include_sympa_list
andinclude_remote_sympa_list
paragraphs also may havenosync_time_ranges
parameter. No reason they don't have it.include_file
still doesn't have it.include_remote_sympa_list
:New parameter
url
replacedhost
,port
andpath
.include_ldap_query
,include_ldap_2level_query
,include_ldap_ca
&include_ldap_2level_ca
:bind_dn
&bind_password
replaceduser
&passwd
, respectively.include_sql_query
&include_sql_ca
:db_host
,db_options
,db_user
&db_passwd
replacedhost
,connect_options
,user
&passwd
, respectively.include_remote_file
should limit protocols to HTTP, HTTPS and FTP.include_ldap_ca
was broken.Known bug:
incude_sympa_list
data source with the list included from the other external data source(s), it will be treated as non-external andmove_user
request on corresponding users will be allowed.