Re: [Dev] (IDENTITY-6167) Need to honor modifications to email-admin-config.xml file

2017-08-08 Thread Thilina Madumal
Hi all,

Instead of having set of configuration files, why can't we go with a
configuration database.

For an example;

   - We can use CouchDB  as our configuration
   database. There we can achieve Configuration changes to database files
   itself reflected in UI and vice-versa (Even Without a restart, if desired).
   - On the other hand, CouchDB is based on JSON files and provides a
   Rest-API for CRUD operations. Thus can manipulate config file easily.
   - The only downside I see is, we might need to move our configuration
   files from XML based to JSON based, which is a bit difficult task.
   - But if we look the to the bright side, We can move from XML based to
   JSON based which is a good thing.

WDYT?

Thanks and Regards,
Thilina.

On Fri, Jul 28, 2017 at 1:19 PM, Isura Karunaratne  wrote:

> Can we move configuration files in a minor release?
>
> Thanks
> Isura.
>
> On Thu, Jul 27, 2017 at 12:26 PM, KasunG Gajasinghe 
> wrote:
>
>>
>>
>> On Thu, Jul 27, 2017 at 10:20 AM, Harsha Thirimanna 
>> wrote:
>>
>>>
>>>
>>> On Thu, Jul 27, 2017 at 9:41 AM, KasunG Gajasinghe 
>>> wrote:
>>>


 On Wed, Jul 26, 2017 at 10:39 PM, Harsha Thirimanna 
 wrote:

>
> On Wed, Jul 26, 2017 at 9:31 PM, KasunG Gajasinghe 
> wrote:
>
>>
>>
>> On Wed, Jul 26, 2017 at 9:07 PM, Johann Nallathamby 
>> wrote:
>>
>>>
>>>
>>> On Wed, Jul 26, 2017 at 8:58 PM, Harsha Thirimanna >> > wrote:
>>>
 Hi All,

 I think we feel like both pros and cons because of these data file
 are located under the configurations. These are not actually config 
 files
 and as Kasun said if these are under the config folder then anyone can 
 feel
 to change and expect the changes in system after restarting. And same 
 as
 Johan said, we can explain in the documentation clearly about the
 behaviour.

 As an alternative solution, can't we have such files in some
 different root folder but not under the config or deployment ,because 
 of
 these files are not either deployable artifact or configs. Then users 
 will
 not misunderstand about these files and there can be its own behaviour 
 as
 what we have now.

>>>
 *Harsha Thirimanna*
 *Associate Tech Lead | WSO2*

 Email: hars...@wso2.com
 Mob: +94715186770 <+94%2071%20518%206770>
 Blog: http://harshathirimanna.blogspot.com/
 Twitter: http://twitter.com/harshathirimann
 Linked-In: linked-in: http://www.linkedin.com/pub/ha
 rsha-thirimanna/10/ab8/122
 

 On Wed, Jul 26, 2017 at 5:21 PM, KasunG Gajasinghe  wrote:

> Hi Johann,
>
>
> On Wed, Jul 26, 2017 at 3:22 PM, Farasath Ahamed <
> farasa...@wso2.com> wrote:
>
>> Hi,
>>
>> email-admin-config.xml has the default email templates that are
>> used for Email notifications.
>> Since we have a UI to add/update new Email templates I don't
>> think the user has to go to the registry and do any modifications.
>>
>>
>> Thanks,
>> Farasath
>>
>> Farasath Ahamed
>> Software Engineer, WSO2 Inc.; http://wso2.com
>> Mobile: +94777603866
>> Blog: blog.farazath.com
>> Twitter: @farazath619 
>> 
>>
>>
>>
>> On Wed, Jul 26, 2017 at 1:30 PM, Johann Nallathamby <
>> joh...@wso2.com> wrote:
>>
>>> Hi Kasun,
>>>
>>> I don't think we need to do this because,
>>>
>>> 1. This is the model we follow for some other files as well.
>>> claim-config.xml
>>> identity-event.properties
>>>
>>>
> Yes, I think Isura mentioned the same. Let me revise my original
> query. The problem I was trying to address is:
>
> 1. There is a config file under repository/conf/ which is only
> read during start-up. Since it is read once, should it really be in 
> the
> repository/conf/?
>
> 2. If a config file is there under repository/conf/, then users
> expect any changes to it will be visible to users. It is not that 
> intuitive
> for a first time user IMO.
>

> As the product is quite matured, I think it may be better to look
> into these aspects to make the first time user experience better.  
> Hence,
> the request for $subject.

Re: [Dev] (IDENTITY-6167) Need to honor modifications to email-admin-config.xml file

2017-07-28 Thread Isura Karunaratne
Can we move configuration files in a minor release?

Thanks
Isura.

On Thu, Jul 27, 2017 at 12:26 PM, KasunG Gajasinghe  wrote:

>
>
> On Thu, Jul 27, 2017 at 10:20 AM, Harsha Thirimanna 
> wrote:
>
>>
>>
>> On Thu, Jul 27, 2017 at 9:41 AM, KasunG Gajasinghe 
>> wrote:
>>
>>>
>>>
>>> On Wed, Jul 26, 2017 at 10:39 PM, Harsha Thirimanna 
>>> wrote:
>>>

 On Wed, Jul 26, 2017 at 9:31 PM, KasunG Gajasinghe 
 wrote:

>
>
> On Wed, Jul 26, 2017 at 9:07 PM, Johann Nallathamby 
> wrote:
>
>>
>>
>> On Wed, Jul 26, 2017 at 8:58 PM, Harsha Thirimanna 
>> wrote:
>>
>>> Hi All,
>>>
>>> I think we feel like both pros and cons because of these data file
>>> are located under the configurations. These are not actually config 
>>> files
>>> and as Kasun said if these are under the config folder then anyone can 
>>> feel
>>> to change and expect the changes in system after restarting. And same as
>>> Johan said, we can explain in the documentation clearly about the
>>> behaviour.
>>>
>>> As an alternative solution, can't we have such files in some
>>> different root folder but not under the config or deployment ,because of
>>> these files are not either deployable artifact or configs. Then users 
>>> will
>>> not misunderstand about these files and there can be its own behaviour 
>>> as
>>> what we have now.
>>>
>>
>>> *Harsha Thirimanna*
>>> *Associate Tech Lead | WSO2*
>>>
>>> Email: hars...@wso2.com
>>> Mob: +94715186770 <+94%2071%20518%206770>
>>> Blog: http://harshathirimanna.blogspot.com/
>>> Twitter: http://twitter.com/harshathirimann
>>> Linked-In: linked-in: http://www.linkedin.com/pub/ha
>>> rsha-thirimanna/10/ab8/122
>>> 
>>>
>>> On Wed, Jul 26, 2017 at 5:21 PM, KasunG Gajasinghe 
>>> wrote:
>>>
 Hi Johann,


 On Wed, Jul 26, 2017 at 3:22 PM, Farasath Ahamed <
 farasa...@wso2.com> wrote:

> Hi,
>
> email-admin-config.xml has the default email templates that are
> used for Email notifications.
> Since we have a UI to add/update new Email templates I don't think
> the user has to go to the registry and do any modifications.
>
>
> Thanks,
> Farasath
>
> Farasath Ahamed
> Software Engineer, WSO2 Inc.; http://wso2.com
> Mobile: +94777603866
> Blog: blog.farazath.com
> Twitter: @farazath619 
> 
>
>
>
> On Wed, Jul 26, 2017 at 1:30 PM, Johann Nallathamby <
> joh...@wso2.com> wrote:
>
>> Hi Kasun,
>>
>> I don't think we need to do this because,
>>
>> 1. This is the model we follow for some other files as well.
>> claim-config.xml
>> identity-event.properties
>>
>>
 Yes, I think Isura mentioned the same. Let me revise my original
 query. The problem I was trying to address is:

 1. There is a config file under repository/conf/ which is only read
 during start-up. Since it is read once, should it really be in the
 repository/conf/?

 2. If a config file is there under repository/conf/, then users
 expect any changes to it will be visible to users. It is not that 
 intuitive
 for a first time user IMO.

>>>
 As the product is quite matured, I think it may be better to look
 into these aspects to make the first time user experience better.  
 Hence,
 the request for $subject.

>>>
>> Agreed. We may be able to improve this.
>>
>>
> Cool.. :) My suggestion is to honor the changes to the file. So, if
> the file hash is changed, we re-upload the changes.
>
> MD5 hash can be stored in registry as a property along with the email
> templates. It is a simple change to [1] as I understand.
>

 ​But after some one change from the UI then it will update the changes
 in registry. But it is not reflected in the file. Again if some one change
 in the file, then registry will override the changes in registry that is
 changed by the UI. Is this expected ?
 ​

>>>
>>> Yes, that happens. User need to stick to one. This is actually a problem
>>> we had in our platform for a while. Some of our configurations are
>>> duplicated in both file system and registry. This leads to much confusion
>>> for a first time user.
>>>
>>
>> ​Agree
>> ​
>>
>>>
>>> What's your suggestion?
>>>
>>
>> ​​I think, main reason is that we consider these 

Re: [Dev] (IDENTITY-6167) Need to honor modifications to email-admin-config.xml file

2017-07-27 Thread KasunG Gajasinghe
On Thu, Jul 27, 2017 at 10:20 AM, Harsha Thirimanna 
wrote:

>
>
> On Thu, Jul 27, 2017 at 9:41 AM, KasunG Gajasinghe 
> wrote:
>
>>
>>
>> On Wed, Jul 26, 2017 at 10:39 PM, Harsha Thirimanna 
>> wrote:
>>
>>>
>>> On Wed, Jul 26, 2017 at 9:31 PM, KasunG Gajasinghe 
>>> wrote:
>>>


 On Wed, Jul 26, 2017 at 9:07 PM, Johann Nallathamby 
 wrote:

>
>
> On Wed, Jul 26, 2017 at 8:58 PM, Harsha Thirimanna 
> wrote:
>
>> Hi All,
>>
>> I think we feel like both pros and cons because of these data file
>> are located under the configurations. These are not actually config files
>> and as Kasun said if these are under the config folder then anyone can 
>> feel
>> to change and expect the changes in system after restarting. And same as
>> Johan said, we can explain in the documentation clearly about the
>> behaviour.
>>
>> As an alternative solution, can't we have such files in some
>> different root folder but not under the config or deployment ,because of
>> these files are not either deployable artifact or configs. Then users 
>> will
>> not misunderstand about these files and there can be its own behaviour as
>> what we have now.
>>
>
>> *Harsha Thirimanna*
>> *Associate Tech Lead | WSO2*
>>
>> Email: hars...@wso2.com
>> Mob: +94715186770 <+94%2071%20518%206770>
>> Blog: http://harshathirimanna.blogspot.com/
>> Twitter: http://twitter.com/harshathirimann
>> Linked-In: linked-in: http://www.linkedin.com/pub/ha
>> rsha-thirimanna/10/ab8/122
>> 
>>
>> On Wed, Jul 26, 2017 at 5:21 PM, KasunG Gajasinghe 
>> wrote:
>>
>>> Hi Johann,
>>>
>>>
>>> On Wed, Jul 26, 2017 at 3:22 PM, Farasath Ahamed >> > wrote:
>>>
 Hi,

 email-admin-config.xml has the default email templates that are
 used for Email notifications.
 Since we have a UI to add/update new Email templates I don't think
 the user has to go to the registry and do any modifications.


 Thanks,
 Farasath

 Farasath Ahamed
 Software Engineer, WSO2 Inc.; http://wso2.com
 Mobile: +94777603866
 Blog: blog.farazath.com
 Twitter: @farazath619 
 



 On Wed, Jul 26, 2017 at 1:30 PM, Johann Nallathamby <
 joh...@wso2.com> wrote:

> Hi Kasun,
>
> I don't think we need to do this because,
>
> 1. This is the model we follow for some other files as well.
> claim-config.xml
> identity-event.properties
>
>
>>> Yes, I think Isura mentioned the same. Let me revise my original
>>> query. The problem I was trying to address is:
>>>
>>> 1. There is a config file under repository/conf/ which is only read
>>> during start-up. Since it is read once, should it really be in the
>>> repository/conf/?
>>>
>>> 2. If a config file is there under repository/conf/, then users
>>> expect any changes to it will be visible to users. It is not that 
>>> intuitive
>>> for a first time user IMO.
>>>
>>
>>> As the product is quite matured, I think it may be better to look
>>> into these aspects to make the first time user experience better.  
>>> Hence,
>>> the request for $subject.
>>>
>>
> Agreed. We may be able to improve this.
>
>
 Cool.. :) My suggestion is to honor the changes to the file. So, if the
 file hash is changed, we re-upload the changes.

 MD5 hash can be stored in registry as a property along with the email
 templates. It is a simple change to [1] as I understand.

>>>
>>> ​But after some one change from the UI then it will update the changes
>>> in registry. But it is not reflected in the file. Again if some one change
>>> in the file, then registry will override the changes in registry that is
>>> changed by the UI. Is this expected ?
>>> ​
>>>
>>
>> Yes, that happens. User need to stick to one. This is actually a problem
>> we had in our platform for a while. Some of our configurations are
>> duplicated in both file system and registry. This leads to much confusion
>> for a first time user.
>>
>
> ​Agree
> ​
>
>>
>> What's your suggestion?
>>
>
> ​​I think, main reason is that we consider these data files as configs as
> i explained above. ​
>
> ​My suggestion was to put these data files from out of config folder. We
> can't treat these as configs. ​
>
> And no need to push to the registry with every restart by checking the
> hash and the current behaviour is correct then.
>
> For the super tenant, it will 

Re: [Dev] (IDENTITY-6167) Need to honor modifications to email-admin-config.xml file

2017-07-26 Thread Harsha Thirimanna
On Thu, Jul 27, 2017 at 9:41 AM, KasunG Gajasinghe  wrote:

>
>
> On Wed, Jul 26, 2017 at 10:39 PM, Harsha Thirimanna 
> wrote:
>
>>
>> On Wed, Jul 26, 2017 at 9:31 PM, KasunG Gajasinghe 
>> wrote:
>>
>>>
>>>
>>> On Wed, Jul 26, 2017 at 9:07 PM, Johann Nallathamby 
>>> wrote:
>>>


 On Wed, Jul 26, 2017 at 8:58 PM, Harsha Thirimanna 
 wrote:

> Hi All,
>
> I think we feel like both pros and cons because of these data file are
> located under the configurations. These are not actually config files and
> as Kasun said if these are under the config folder then anyone can feel to
> change and expect the changes in system after restarting. And same as 
> Johan
> said, we can explain in the documentation clearly about the behaviour.
>
> As an alternative solution, can't we have such files in some different
> root folder but not under the config or deployment ,because of these files
> are not either deployable artifact or configs. Then users will not
> misunderstand about these files and there can be its own behaviour as what
> we have now.
>

> *Harsha Thirimanna*
> *Associate Tech Lead | WSO2*
>
> Email: hars...@wso2.com
> Mob: +94715186770 <+94%2071%20518%206770>
> Blog: http://harshathirimanna.blogspot.com/
> Twitter: http://twitter.com/harshathirimann
> Linked-In: linked-in: http://www.linkedin.com/pub/ha
> rsha-thirimanna/10/ab8/122
> 
>
> On Wed, Jul 26, 2017 at 5:21 PM, KasunG Gajasinghe 
> wrote:
>
>> Hi Johann,
>>
>>
>> On Wed, Jul 26, 2017 at 3:22 PM, Farasath Ahamed 
>> wrote:
>>
>>> Hi,
>>>
>>> email-admin-config.xml has the default email templates that are used
>>> for Email notifications.
>>> Since we have a UI to add/update new Email templates I don't think
>>> the user has to go to the registry and do any modifications.
>>>
>>>
>>> Thanks,
>>> Farasath
>>>
>>> Farasath Ahamed
>>> Software Engineer, WSO2 Inc.; http://wso2.com
>>> Mobile: +94777603866
>>> Blog: blog.farazath.com
>>> Twitter: @farazath619 
>>> 
>>>
>>>
>>>
>>> On Wed, Jul 26, 2017 at 1:30 PM, Johann Nallathamby >> > wrote:
>>>
 Hi Kasun,

 I don't think we need to do this because,

 1. This is the model we follow for some other files as well.
 claim-config.xml
 identity-event.properties


>> Yes, I think Isura mentioned the same. Let me revise my original
>> query. The problem I was trying to address is:
>>
>> 1. There is a config file under repository/conf/ which is only read
>> during start-up. Since it is read once, should it really be in the
>> repository/conf/?
>>
>> 2. If a config file is there under repository/conf/, then users
>> expect any changes to it will be visible to users. It is not that 
>> intuitive
>> for a first time user IMO.
>>
>
>> As the product is quite matured, I think it may be better to look
>> into these aspects to make the first time user experience better.  Hence,
>> the request for $subject.
>>
>
 Agreed. We may be able to improve this.


>>> Cool.. :) My suggestion is to honor the changes to the file. So, if the
>>> file hash is changed, we re-upload the changes.
>>>
>>> MD5 hash can be stored in registry as a property along with the email
>>> templates. It is a simple change to [1] as I understand.
>>>
>>
>> ​But after some one change from the UI then it will update the changes in
>> registry. But it is not reflected in the file. Again if some one change in
>> the file, then registry will override the changes in registry that is
>> changed by the UI. Is this expected ?
>> ​
>>
>
> Yes, that happens. User need to stick to one. This is actually a problem
> we had in our platform for a while. Some of our configurations are
> duplicated in both file system and registry. This leads to much confusion
> for a first time user.
>

​Agree
​

>
> What's your suggestion?
>

​​I think, main reason is that we consider these data files as configs as i
explained above. ​

​My suggestion was to put these data files from out of config folder. We
can't treat these as configs. ​

And no need to push to the registry with every restart by checking the hash
and the current behaviour is correct then.

For the super tenant, it will push to the registry if there are no data in
registry for that resource path.
For the tenant, same thing when the tenant creation time.

WDYT ?



>
> Thanks.
>
>
>>
>>> [1] https://github.com/wso2-extensions/identity-event-handler-no
>>> 

Re: [Dev] (IDENTITY-6167) Need to honor modifications to email-admin-config.xml file

2017-07-26 Thread KasunG Gajasinghe
On Wed, Jul 26, 2017 at 10:39 PM, Harsha Thirimanna 
wrote:

>
> On Wed, Jul 26, 2017 at 9:31 PM, KasunG Gajasinghe 
> wrote:
>
>>
>>
>> On Wed, Jul 26, 2017 at 9:07 PM, Johann Nallathamby 
>> wrote:
>>
>>>
>>>
>>> On Wed, Jul 26, 2017 at 8:58 PM, Harsha Thirimanna 
>>> wrote:
>>>
 Hi All,

 I think we feel like both pros and cons because of these data file are
 located under the configurations. These are not actually config files and
 as Kasun said if these are under the config folder then anyone can feel to
 change and expect the changes in system after restarting. And same as Johan
 said, we can explain in the documentation clearly about the behaviour.

 As an alternative solution, can't we have such files in some different
 root folder but not under the config or deployment ,because of these files
 are not either deployable artifact or configs. Then users will not
 misunderstand about these files and there can be its own behaviour as what
 we have now.

>>>
 *Harsha Thirimanna*
 *Associate Tech Lead | WSO2*

 Email: hars...@wso2.com
 Mob: +94715186770 <+94%2071%20518%206770>
 Blog: http://harshathirimanna.blogspot.com/
 Twitter: http://twitter.com/harshathirimann
 Linked-In: linked-in: http://www.linkedin.com/pub/ha
 rsha-thirimanna/10/ab8/122
 

 On Wed, Jul 26, 2017 at 5:21 PM, KasunG Gajasinghe 
 wrote:

> Hi Johann,
>
>
> On Wed, Jul 26, 2017 at 3:22 PM, Farasath Ahamed 
> wrote:
>
>> Hi,
>>
>> email-admin-config.xml has the default email templates that are used
>> for Email notifications.
>> Since we have a UI to add/update new Email templates I don't think
>> the user has to go to the registry and do any modifications.
>>
>>
>> Thanks,
>> Farasath
>>
>> Farasath Ahamed
>> Software Engineer, WSO2 Inc.; http://wso2.com
>> Mobile: +94777603866
>> Blog: blog.farazath.com
>> Twitter: @farazath619 
>> 
>>
>>
>>
>> On Wed, Jul 26, 2017 at 1:30 PM, Johann Nallathamby 
>> wrote:
>>
>>> Hi Kasun,
>>>
>>> I don't think we need to do this because,
>>>
>>> 1. This is the model we follow for some other files as well.
>>> claim-config.xml
>>> identity-event.properties
>>>
>>>
> Yes, I think Isura mentioned the same. Let me revise my original
> query. The problem I was trying to address is:
>
> 1. There is a config file under repository/conf/ which is only read
> during start-up. Since it is read once, should it really be in the
> repository/conf/?
>
> 2. If a config file is there under repository/conf/, then users expect
> any changes to it will be visible to users. It is not that intuitive for a
> first time user IMO.
>

> As the product is quite matured, I think it may be better to look into
> these aspects to make the first time user experience better.  Hence, the
> request for $subject.
>

>>> Agreed. We may be able to improve this.
>>>
>>>
>> Cool.. :) My suggestion is to honor the changes to the file. So, if the
>> file hash is changed, we re-upload the changes.
>>
>> MD5 hash can be stored in registry as a property along with the email
>> templates. It is a simple change to [1] as I understand.
>>
>
> ​But after some one change from the UI then it will update the changes in
> registry. But it is not reflected in the file. Again if some one change in
> the file, then registry will override the changes in registry that is
> changed by the UI. Is this expected ?
> ​
>

Yes, that happens. User need to stick to one. This is actually a problem we
had in our platform for a while. Some of our configurations are duplicated
in both file system and registry. This leads to much confusion for a first
time user.

What's your suggestion?

Thanks.


>
>> [1] https://github.com/wso2-extensions/identity-event-handler-
>> notification/blob/master/components/email-mgt/org.wso2.
>> carbon.email.mgt/src/main/java/org/wso2/carbon/email/
>> mgt/EmailTemplateManagerImpl.java#L78
>>
>>
>>>
>
>
>> 2. This content goes not only to the super tenant but also to tenants
>>> as default email templates. So if we change it in the middle tenants
>>> created until then will have a different default template and the ones
>>> created after that will have a different default template.
>>>
>>>
> Yes, this is the current behavior, isn't it?
>

>>> Yes. This is the current behavior.
>>>
>>>

> Thanks for your feedback.
>
>
>> I don't think we have any problems with current model. If we do this
>>> we need to change our migration, etc. If the 

Re: [Dev] (IDENTITY-6167) Need to honor modifications to email-admin-config.xml file

2017-07-26 Thread Harsha Thirimanna
On Wed, Jul 26, 2017 at 9:31 PM, KasunG Gajasinghe  wrote:

>
>
> On Wed, Jul 26, 2017 at 9:07 PM, Johann Nallathamby 
> wrote:
>
>>
>>
>> On Wed, Jul 26, 2017 at 8:58 PM, Harsha Thirimanna 
>> wrote:
>>
>>> Hi All,
>>>
>>> I think we feel like both pros and cons because of these data file are
>>> located under the configurations. These are not actually config files and
>>> as Kasun said if these are under the config folder then anyone can feel to
>>> change and expect the changes in system after restarting. And same as Johan
>>> said, we can explain in the documentation clearly about the behaviour.
>>>
>>> As an alternative solution, can't we have such files in some different
>>> root folder but not under the config or deployment ,because of these files
>>> are not either deployable artifact or configs. Then users will not
>>> misunderstand about these files and there can be its own behaviour as what
>>> we have now.
>>>
>>
>>> *Harsha Thirimanna*
>>> *Associate Tech Lead | WSO2*
>>>
>>> Email: hars...@wso2.com
>>> Mob: +94715186770 <+94%2071%20518%206770>
>>> Blog: http://harshathirimanna.blogspot.com/
>>> Twitter: http://twitter.com/harshathirimann
>>> Linked-In: linked-in: http://www.linkedin.com/pub/ha
>>> rsha-thirimanna/10/ab8/122
>>> 
>>>
>>> On Wed, Jul 26, 2017 at 5:21 PM, KasunG Gajasinghe 
>>> wrote:
>>>
 Hi Johann,


 On Wed, Jul 26, 2017 at 3:22 PM, Farasath Ahamed 
 wrote:

> Hi,
>
> email-admin-config.xml has the default email templates that are used
> for Email notifications.
> Since we have a UI to add/update new Email templates I don't think the
> user has to go to the registry and do any modifications.
>
>
> Thanks,
> Farasath
>
> Farasath Ahamed
> Software Engineer, WSO2 Inc.; http://wso2.com
> Mobile: +94777603866
> Blog: blog.farazath.com
> Twitter: @farazath619 
> 
>
>
>
> On Wed, Jul 26, 2017 at 1:30 PM, Johann Nallathamby 
> wrote:
>
>> Hi Kasun,
>>
>> I don't think we need to do this because,
>>
>> 1. This is the model we follow for some other files as well.
>> claim-config.xml
>> identity-event.properties
>>
>>
 Yes, I think Isura mentioned the same. Let me revise my original query.
 The problem I was trying to address is:

 1. There is a config file under repository/conf/ which is only read
 during start-up. Since it is read once, should it really be in the
 repository/conf/?

 2. If a config file is there under repository/conf/, then users expect
 any changes to it will be visible to users. It is not that intuitive for a
 first time user IMO.

>>>
 As the product is quite matured, I think it may be better to look into
 these aspects to make the first time user experience better.  Hence, the
 request for $subject.

>>>
>> Agreed. We may be able to improve this.
>>
>>
> Cool.. :) My suggestion is to honor the changes to the file. So, if the
> file hash is changed, we re-upload the changes.
>
> MD5 hash can be stored in registry as a property along with the email
> templates. It is a simple change to [1] as I understand.
>

​But after some one change from the UI then it will update the changes in
registry. But it is not reflected in the file. Again if some one change in
the file, then registry will override the changes in registry that is
changed by the UI. Is this expected ?
​

>
> [1] https://github.com/wso2-extensions/identity-event-
> handler-notification/blob/master/components/email-mgt/
> org.wso2.carbon.email.mgt/src/main/java/org/wso2/carbon/email/mgt/
> EmailTemplateManagerImpl.java#L78
>
>
>>


> 2. This content goes not only to the super tenant but also to tenants
>> as default email templates. So if we change it in the middle tenants
>> created until then will have a different default template and the ones
>> created after that will have a different default template.
>>
>>
 Yes, this is the current behavior, isn't it?

>>>
>> Yes. This is the current behavior.
>>
>>
>>>
 Thanks for your feedback.


> I don't think we have any problems with current model. If we do this
>> we need to change our migration, etc. If the issue here is clarity for 
>> the
>> users it is better we explain it using better wordings in the docs.
>>
>> Regards,
>> Johann.
>>
>> -- Forwarded message --
>> From: Kasun Gajasinghe (JIRA) 
>> Date: Wed, Jul 19, 2017 at 1:54 AM
>> Subject: [jira] (IDENTITY-6167) Need to honor modifications to
>> email-admin-config.xml file
>> To: joh...@wso2.com
>>
>>
>> Kasun Gajasinghe
>> 

Re: [Dev] (IDENTITY-6167) Need to honor modifications to email-admin-config.xml file

2017-07-26 Thread KasunG Gajasinghe
On Wed, Jul 26, 2017 at 9:07 PM, Johann Nallathamby  wrote:

>
>
> On Wed, Jul 26, 2017 at 8:58 PM, Harsha Thirimanna 
> wrote:
>
>> Hi All,
>>
>> I think we feel like both pros and cons because of these data file are
>> located under the configurations. These are not actually config files and
>> as Kasun said if these are under the config folder then anyone can feel to
>> change and expect the changes in system after restarting. And same as Johan
>> said, we can explain in the documentation clearly about the behaviour.
>>
>> As an alternative solution, can't we have such files in some different
>> root folder but not under the config or deployment ,because of these files
>> are not either deployable artifact or configs. Then users will not
>> misunderstand about these files and there can be its own behaviour as what
>> we have now.
>>
>
>> *Harsha Thirimanna*
>> *Associate Tech Lead | WSO2*
>>
>> Email: hars...@wso2.com
>> Mob: +94715186770 <+94%2071%20518%206770>
>> Blog: http://harshathirimanna.blogspot.com/
>> Twitter: http://twitter.com/harshathirimann
>> Linked-In: linked-in: http://www.linkedin.com/pub/ha
>> rsha-thirimanna/10/ab8/122
>> 
>>
>> On Wed, Jul 26, 2017 at 5:21 PM, KasunG Gajasinghe 
>> wrote:
>>
>>> Hi Johann,
>>>
>>>
>>> On Wed, Jul 26, 2017 at 3:22 PM, Farasath Ahamed 
>>> wrote:
>>>
 Hi,

 email-admin-config.xml has the default email templates that are used
 for Email notifications.
 Since we have a UI to add/update new Email templates I don't think the
 user has to go to the registry and do any modifications.


 Thanks,
 Farasath

 Farasath Ahamed
 Software Engineer, WSO2 Inc.; http://wso2.com
 Mobile: +94777603866
 Blog: blog.farazath.com
 Twitter: @farazath619 
 



 On Wed, Jul 26, 2017 at 1:30 PM, Johann Nallathamby 
 wrote:

> Hi Kasun,
>
> I don't think we need to do this because,
>
> 1. This is the model we follow for some other files as well.
> claim-config.xml
> identity-event.properties
>
>
>>> Yes, I think Isura mentioned the same. Let me revise my original query.
>>> The problem I was trying to address is:
>>>
>>> 1. There is a config file under repository/conf/ which is only read
>>> during start-up. Since it is read once, should it really be in the
>>> repository/conf/?
>>>
>>> 2. If a config file is there under repository/conf/, then users expect
>>> any changes to it will be visible to users. It is not that intuitive for a
>>> first time user IMO.
>>>
>>
>>> As the product is quite matured, I think it may be better to look into
>>> these aspects to make the first time user experience better.  Hence, the
>>> request for $subject.
>>>
>>
> Agreed. We may be able to improve this.
>
>
Cool.. :) My suggestion is to honor the changes to the file. So, if the
file hash is changed, we re-upload the changes.

MD5 hash can be stored in registry as a property along with the email
templates. It is a simple change to [1] as I understand.

[1]
https://github.com/wso2-extensions/identity-event-handler-notification/blob/master/components/email-mgt/org.wso2.carbon.email.mgt/src/main/java/org/wso2/carbon/email/mgt/EmailTemplateManagerImpl.java#L78


>
>>>
>>>
 2. This content goes not only to the super tenant but also to tenants
> as default email templates. So if we change it in the middle tenants
> created until then will have a different default template and the ones
> created after that will have a different default template.
>
>
>>> Yes, this is the current behavior, isn't it?
>>>
>>
> Yes. This is the current behavior.
>
>
>>
>>> Thanks for your feedback.
>>>
>>>
 I don't think we have any problems with current model. If we do this we
> need to change our migration, etc. If the issue here is clarity for the
> users it is better we explain it using better wordings in the docs.
>
> Regards,
> Johann.
>
> -- Forwarded message --
> From: Kasun Gajasinghe (JIRA) 
> Date: Wed, Jul 19, 2017 at 1:54 AM
> Subject: [jira] (IDENTITY-6167) Need to honor modifications to
> email-admin-config.xml file
> To: joh...@wso2.com
>
>
> Kasun Gajasinghe
> 
> *created* an issue
>
> WSO2 Identity Server  / [image:
> Improvement] 
> IDENTITY-6167 
> Need to honor modifications to email-admin-config.xml file
> 
> Issue Type: [image: Improvement] Improvement
> Affects Versions: 5.3.0-GA
> Assignee: Johann 

Re: [Dev] (IDENTITY-6167) Need to honor modifications to email-admin-config.xml file

2017-07-26 Thread Johann Nallathamby
On Wed, Jul 26, 2017 at 8:58 PM, Harsha Thirimanna  wrote:

> Hi All,
>
> I think we feel like both pros and cons because of these data file are
> located under the configurations. These are not actually config files and
> as Kasun said if these are under the config folder then anyone can feel to
> change and expect the changes in system after restarting. And same as Johan
> said, we can explain in the documentation clearly about the behaviour.
>
> As an alternative solution, can't we have such files in some different
> root folder but not under the config or deployment ,because of these files
> are not either deployable artifact or configs. Then users will not
> misunderstand about these files and there can be its own behaviour as what
> we have now.
>

> *Harsha Thirimanna*
> *Associate Tech Lead | WSO2*
>
> Email: hars...@wso2.com
> Mob: +94715186770 <+94%2071%20518%206770>
> Blog: http://harshathirimanna.blogspot.com/
> Twitter: http://twitter.com/harshathirimann
> Linked-In: linked-in: http://www.linkedin.com/pub/
> harsha-thirimanna/10/ab8/122
> 
>
> On Wed, Jul 26, 2017 at 5:21 PM, KasunG Gajasinghe 
> wrote:
>
>> Hi Johann,
>>
>>
>> On Wed, Jul 26, 2017 at 3:22 PM, Farasath Ahamed 
>> wrote:
>>
>>> Hi,
>>>
>>> email-admin-config.xml has the default email templates that are used for
>>> Email notifications.
>>> Since we have a UI to add/update new Email templates I don't think the
>>> user has to go to the registry and do any modifications.
>>>
>>>
>>> Thanks,
>>> Farasath
>>>
>>> Farasath Ahamed
>>> Software Engineer, WSO2 Inc.; http://wso2.com
>>> Mobile: +94777603866
>>> Blog: blog.farazath.com
>>> Twitter: @farazath619 
>>> 
>>>
>>>
>>>
>>> On Wed, Jul 26, 2017 at 1:30 PM, Johann Nallathamby 
>>> wrote:
>>>
 Hi Kasun,

 I don't think we need to do this because,

 1. This is the model we follow for some other files as well.
 claim-config.xml
 identity-event.properties


>> Yes, I think Isura mentioned the same. Let me revise my original query.
>> The problem I was trying to address is:
>>
>> 1. There is a config file under repository/conf/ which is only read
>> during start-up. Since it is read once, should it really be in the
>> repository/conf/?
>>
>> 2. If a config file is there under repository/conf/, then users expect
>> any changes to it will be visible to users. It is not that intuitive for a
>> first time user IMO.
>>
>
>> As the product is quite matured, I think it may be better to look into
>> these aspects to make the first time user experience better.  Hence, the
>> request for $subject.
>>
>
Agreed. We may be able to improve this.


>>
>>
>>> 2. This content goes not only to the super tenant but also to tenants as
 default email templates. So if we change it in the middle tenants created
 until then will have a different default template and the ones created
 after that will have a different default template.


>> Yes, this is the current behavior, isn't it?
>>
>
Yes. This is the current behavior.


>
>> Thanks for your feedback.
>>
>>
>>> I don't think we have any problems with current model. If we do this we
 need to change our migration, etc. If the issue here is clarity for the
 users it is better we explain it using better wordings in the docs.

 Regards,
 Johann.

 -- Forwarded message --
 From: Kasun Gajasinghe (JIRA) 
 Date: Wed, Jul 19, 2017 at 1:54 AM
 Subject: [jira] (IDENTITY-6167) Need to honor modifications to
 email-admin-config.xml file
 To: joh...@wso2.com


 Kasun Gajasinghe
 
 *created* an issue

 WSO2 Identity Server  / [image:
 Improvement]  IDENTITY-6167
 
 Need to honor modifications to email-admin-config.xml file
 
 Issue Type: [image: Improvement] Improvement
 Affects Versions: 5.3.0-GA
 Assignee: Johann Nallathamby
 
 Created: 19/Jul/17 1:53 AM
 Fix Versions: 5.4.0-GA
 Priority: [image: High] High
 Reporter: Kasun Gajasinghe
 

 At the moment, we save the email-admin-config.xml in the registry
 during the very first server startup. After that, changes to the file are
 not picked up. So, users are forced to go to the registry to update the
 config.

 This is a bit confusing since a user probably expects that the changes
 to the file will be honored especially since it is located under

Re: [Dev] (IDENTITY-6167) Need to honor modifications to email-admin-config.xml file

2017-07-26 Thread Harsha Thirimanna
Hi All,

I think we feel like both pros and cons because of these data file are
located under the configurations. These are not actually config files and
as Kasun said if these are under the config folder then anyone can feel to
change and expect the changes in system after restarting. And same as Johan
said, we can explain in the documentation clearly about the behaviour.

As an alternative solution, can't we have such files in some different root
folder but not under the config or deployment ,because of these files are
not either deployable artifact or configs. Then users will not
misunderstand about these files and there can be its own behaviour as what
we have now.

*Harsha Thirimanna*
*Associate Tech Lead | WSO2*

Email: hars...@wso2.com
Mob: +94715186770
Blog: http://harshathirimanna.blogspot.com/
Twitter: http://twitter.com/harshathirimann
Linked-In: linked-in:
http://www.linkedin.com/pub/harsha-thirimanna/10/ab8/122


On Wed, Jul 26, 2017 at 5:21 PM, KasunG Gajasinghe  wrote:

> Hi Johann,
>
>
> On Wed, Jul 26, 2017 at 3:22 PM, Farasath Ahamed 
> wrote:
>
>> Hi,
>>
>> email-admin-config.xml has the default email templates that are used for
>> Email notifications.
>> Since we have a UI to add/update new Email templates I don't think the
>> user has to go to the registry and do any modifications.
>>
>>
>> Thanks,
>> Farasath
>>
>> Farasath Ahamed
>> Software Engineer, WSO2 Inc.; http://wso2.com
>> Mobile: +94777603866
>> Blog: blog.farazath.com
>> Twitter: @farazath619 
>> 
>>
>>
>>
>> On Wed, Jul 26, 2017 at 1:30 PM, Johann Nallathamby 
>> wrote:
>>
>>> Hi Kasun,
>>>
>>> I don't think we need to do this because,
>>>
>>> 1. This is the model we follow for some other files as well.
>>> claim-config.xml
>>> identity-event.properties
>>>
>>>
> Yes, I think Isura mentioned the same. Let me revise my original query.
> The problem I was trying to address is:
>
> 1. There is a config file under repository/conf/ which is only read during
> start-up. Since it is read once, should it really be in the
> repository/conf/?
>
> 2. If a config file is there under repository/conf/, then users expect any
> changes to it will be visible to users. It is not that intuitive for a
> first time user IMO.
>
> As the product is quite matured, I think it may be better to look into
> these aspects to make the first time user experience better.  Hence, the
> request for $subject.
>
>
>
>> 2. This content goes not only to the super tenant but also to tenants as
>>> default email templates. So if we change it in the middle tenants created
>>> until then will have a different default template and the ones created
>>> after that will have a different default template.
>>>
>>>
> Yes, this is the current behavior, isn't it?
>
> Thanks for your feedback.
>
>
>> I don't think we have any problems with current model. If we do this we
>>> need to change our migration, etc. If the issue here is clarity for the
>>> users it is better we explain it using better wordings in the docs.
>>>
>>> Regards,
>>> Johann.
>>>
>>> -- Forwarded message --
>>> From: Kasun Gajasinghe (JIRA) 
>>> Date: Wed, Jul 19, 2017 at 1:54 AM
>>> Subject: [jira] (IDENTITY-6167) Need to honor modifications to
>>> email-admin-config.xml file
>>> To: joh...@wso2.com
>>>
>>>
>>> Kasun Gajasinghe
>>> 
>>> *created* an issue
>>>
>>> WSO2 Identity Server  / [image:
>>> Improvement]  IDENTITY-6167
>>> 
>>> Need to honor modifications to email-admin-config.xml file
>>> 
>>> Issue Type: [image: Improvement] Improvement
>>> Affects Versions: 5.3.0-GA
>>> Assignee: Johann Nallathamby
>>> 
>>> Created: 19/Jul/17 1:53 AM
>>> Fix Versions: 5.4.0-GA
>>> Priority: [image: High] High
>>> Reporter: Kasun Gajasinghe
>>> 
>>>
>>> At the moment, we save the email-admin-config.xml in the registry during
>>> the very first server startup. After that, changes to the file are not
>>> picked up. So, users are forced to go to the registry to update the config.
>>>
>>> This is a bit confusing since a user probably expects that the changes
>>> to the file will be honored especially since it is located under
>>> repository/conf folder.
>>>
>>> We can do some hashing mechanism and verify whether the contents in the
>>> registry and the file matches. And, then we can update the registry
>>> accordingly.
>>> [image: Add Comment]
>>>  Add Comment
>>> 

Re: [Dev] (IDENTITY-6167) Need to honor modifications to email-admin-config.xml file

2017-07-26 Thread KasunG Gajasinghe
Hi Johann,


On Wed, Jul 26, 2017 at 3:22 PM, Farasath Ahamed  wrote:

> Hi,
>
> email-admin-config.xml has the default email templates that are used for
> Email notifications.
> Since we have a UI to add/update new Email templates I don't think the
> user has to go to the registry and do any modifications.
>
>
> Thanks,
> Farasath
>
> Farasath Ahamed
> Software Engineer, WSO2 Inc.; http://wso2.com
> Mobile: +94777603866
> Blog: blog.farazath.com
> Twitter: @farazath619 
> 
>
>
>
> On Wed, Jul 26, 2017 at 1:30 PM, Johann Nallathamby 
> wrote:
>
>> Hi Kasun,
>>
>> I don't think we need to do this because,
>>
>> 1. This is the model we follow for some other files as well.
>> claim-config.xml
>> identity-event.properties
>>
>>
Yes, I think Isura mentioned the same. Let me revise my original query. The
problem I was trying to address is:

1. There is a config file under repository/conf/ which is only read during
start-up. Since it is read once, should it really be in the
repository/conf/?

2. If a config file is there under repository/conf/, then users expect any
changes to it will be visible to users. It is not that intuitive for a
first time user IMO.

As the product is quite matured, I think it may be better to look into
these aspects to make the first time user experience better.  Hence, the
request for $subject.



> 2. This content goes not only to the super tenant but also to tenants as
>> default email templates. So if we change it in the middle tenants created
>> until then will have a different default template and the ones created
>> after that will have a different default template.
>>
>>
Yes, this is the current behavior, isn't it?

Thanks for your feedback.


> I don't think we have any problems with current model. If we do this we
>> need to change our migration, etc. If the issue here is clarity for the
>> users it is better we explain it using better wordings in the docs.
>>
>> Regards,
>> Johann.
>>
>> -- Forwarded message --
>> From: Kasun Gajasinghe (JIRA) 
>> Date: Wed, Jul 19, 2017 at 1:54 AM
>> Subject: [jira] (IDENTITY-6167) Need to honor modifications to
>> email-admin-config.xml file
>> To: joh...@wso2.com
>>
>>
>> Kasun Gajasinghe
>> 
>> *created* an issue
>>
>> WSO2 Identity Server  / [image:
>> Improvement]  IDENTITY-6167
>> 
>> Need to honor modifications to email-admin-config.xml file
>> 
>> Issue Type: [image: Improvement] Improvement
>> Affects Versions: 5.3.0-GA
>> Assignee: Johann Nallathamby
>> 
>> Created: 19/Jul/17 1:53 AM
>> Fix Versions: 5.4.0-GA
>> Priority: [image: High] High
>> Reporter: Kasun Gajasinghe
>> 
>>
>> At the moment, we save the email-admin-config.xml in the registry during
>> the very first server startup. After that, changes to the file are not
>> picked up. So, users are forced to go to the registry to update the config.
>>
>> This is a bit confusing since a user probably expects that the changes to
>> the file will be honored especially since it is located under
>> repository/conf folder.
>>
>> We can do some hashing mechanism and verify whether the contents in the
>> registry and the file matches. And, then we can update the registry
>> accordingly.
>> [image: Add Comment]
>>  Add Comment
>> 
>>
>> This message was sent by Atlassian JIRA (v7.2.2#72004-sha1:9d51328)
>> [image: Atlassian logo]
>>
>>
>>
>> --
>> Thanks & Regards,
>>
>> *Johann Dilantha Nallathamby*
>> Senior Lead Solutions Engineer
>> WSO2, Inc.
>> lean.enterprise.middleware
>>
>> Mobile - *+9476950*
>> Blog - *http://nallaa.wordpress.com *
>>
>
>


-- 

*Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
email: kasung AT spamfree wso2.com
linked-in: http://lk.linkedin.com/in/gajasinghe
blog: http://kasunbg.org
phone: +1 650-745-4499, 77 678 0813
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] (IDENTITY-6167) Need to honor modifications to email-admin-config.xml file

2017-07-26 Thread Farasath Ahamed
Hi,

email-admin-config.xml has the default email templates that are used for
Email notifications.
Since we have a UI to add/update new Email templates I don't think the user
has to go to the registry and do any modifications.


Thanks,
Farasath

Farasath Ahamed
Software Engineer, WSO2 Inc.; http://wso2.com
Mobile: +94777603866
Blog: blog.farazath.com
Twitter: @farazath619 




On Wed, Jul 26, 2017 at 1:30 PM, Johann Nallathamby  wrote:

> Hi Kasun,
>
> I don't think we need to do this because,
>
> 1. This is the model we follow for some other files as well.
> claim-config.xml
> identity-event.properties
>
> 2. This content goes not only to the super tenant but also to tenants as
> default email templates. So if we change it in the middle tenants created
> until then will have a different default template and the ones created
> after that will have a different default template.
>
> I don't think we have any problems with current model. If we do this we
> need to change our migration, etc. If the issue here is clarity for the
> users it is better we explain it using better wordings in the docs.
>
> Regards,
> Johann.
>
> -- Forwarded message --
> From: Kasun Gajasinghe (JIRA) 
> Date: Wed, Jul 19, 2017 at 1:54 AM
> Subject: [jira] (IDENTITY-6167) Need to honor modifications to
> email-admin-config.xml file
> To: joh...@wso2.com
>
>
> Kasun Gajasinghe
> 
> *created* an issue
>
> WSO2 Identity Server  / [image:
> Improvement]  IDENTITY-6167
> 
> Need to honor modifications to email-admin-config.xml file
> 
> Issue Type: [image: Improvement] Improvement
> Affects Versions: 5.3.0-GA
> Assignee: Johann Nallathamby
> 
> Created: 19/Jul/17 1:53 AM
> Fix Versions: 5.4.0-GA
> Priority: [image: High] High
> Reporter: Kasun Gajasinghe
> 
>
> At the moment, we save the email-admin-config.xml in the registry during
> the very first server startup. After that, changes to the file are not
> picked up. So, users are forced to go to the registry to update the config.
>
> This is a bit confusing since a user probably expects that the changes to
> the file will be honored especially since it is located under
> repository/conf folder.
>
> We can do some hashing mechanism and verify whether the contents in the
> registry and the file matches. And, then we can update the registry
> accordingly.
> [image: Add Comment]
>  Add Comment
> 
>
> This message was sent by Atlassian JIRA (v7.2.2#72004-sha1:9d51328)
> [image: Atlassian logo]
>
>
>
> --
> Thanks & Regards,
>
> *Johann Dilantha Nallathamby*
> Senior Lead Solutions Engineer
> WSO2, Inc.
> lean.enterprise.middleware
>
> Mobile - *+9476950*
> Blog - *http://nallaa.wordpress.com *
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev