You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@fineract.apache.org by Ebenezer Graham <eg...@alustudent.com> on 2018/07/03 22:17:31 UTC

Re: [Discussion] Fineract CN SMS & Email Notifications Project

Hello there,

I would like to retrieve a customer after it has been created, or activated
etc.

I have coded the logic to send the SMS and email after getting the contact
details, however, I have to get the customer to get the contact details.

This is the error I get during my call: https://pastebin.com/zrebwE8v

I would like to get clarifications on how to set the tenant and correctly
make authentication during a rest call.

I would also like to get a better understanding of how to use the Anubis,
test and identity microservice in this case

*At your service,*

*Ebenezer Graham*

*BSc (Hons) Computing*


[image: EmailSignature.png]

African Leadership University,

Power Mill Road, Pamplemousses,

Mauritius.


*skype*:
​ebenezer.graham
GitHub <https://github.com/ebenezergraham> | LinkedIn
<https://www.linkedin.com/in/ebenezer-graham/> | Twitter
<https://twitter.com/pactmart> | Facebook
<https://www.facebook.com/pactmart>
www.pactmart.com | Freelancing made easy.


*“Talk is cheap, show me the code.” *- *Linus Torvalds*



On 19 May 2018 at 00:41, Ebenezer Graham <eg...@alustudent.com> wrote:

> Hi everyone,
>
> I am Ebenezer a student from the African Leadership University and I will
> be working on this project under the mentorship of Isaac Kamga.
>
> The idea is to use this thread to discuss the decisions being made on this
> project so that the community has visibility on what's happening and most
> importantly give constructive feedback.
>
> *EventListeners:*
> This is the Doc
> <https://docs.google.com/document/d/1kme5qrxOrO0WGUEvNgzv5XVkgWtpg0lbX-CrBH4js7o/edit?usp=sharing>
> containing the shortlisted events which I believe qualify for an Email or
> SMS notification. Please review and comment on the doc suggesting any
> addition or deletion or related feedback.
>
> *UI for the service:*
> This is a link <https://wireframe.cc/pro/pp/5fb6b2e61167290> to the
> wireframes for the UI of the service. Please give pointers on what could be
> added and what should be taken out.
>
>
> *​At your service*
> *,*
>
> *Ebenezer Graham*
>
> *BSc (Hons) Computing*
>
>
> [image: EmailSignature.png]
>
> Beau Plan Business Park | West Building
>
> Pamplemousses |  Mauritius
>
>
> <http://www.pactmart.com/>
> <http://www.pactmart.com/>
> www.pactmart.com | Freelancing made easy.
> GitHub <https://github.com/ebenezergraham> | LinkedIn
> <https://www.linkedin.com/in/ebenezer-graham/> | Twitter
> <https://twitter.com/pactmart> | Facebook
> <https://www.facebook.com/pactmart> | Website
> <http://ebenezergraham.github.io/>
> ​
> *skype*:
> ​ebenezer.graham
> ​ | *Phone*:
> +230 5840 9206
>
>
> *“Practice isn’t the thing you do once you’re good. It’s the thing you do
> that makes you good.”*
> -*Malcolm Gladwell*
>
>
>

Re: [Discussion] Fineract CN SMS & Email Notifications Project

Posted by Myrle Krantz <my...@apache.org>.
On Wed, Aug 22, 2018 at 1:40 PM Ebenezer Graham <eg...@alustudent.com>
wrote:

> Thanks myrle,
>
> I have already created a demo email account called
> fineractcnnotificationdemo@gmail.com and I created it for the sole
> purpose of testing emails for this service and for other contributors
> to use. Please advise me on this approach.
>

I don't have a better idea on how to do this right now.  I suggest we
create you a private area in confluence where you can put the password to
that account.  Please don't check in a current password for that account.
You'll just have to be careful.

Meanwhile, I'll ask around if this problem has been had at Apache before
(seems likely), and how it's been handled there.

Best Regards,
Myrle

Re: [Discussion] Fineract CN SMS & Email Notifications Project

Posted by Isaac Kamga <is...@mifos.org>.
Hello devs,

@Graham, @Myrle, I am having issues running demo-server successfully after
incorporation of the last 5 commits from you both related to starting
services in debug mode and adjustments to service runner. Demo-server seems
to work well when reverted to commit *3d8ffa969bb3* [1] of August 19
related to Louis Niyongabo's patch. Please, try running Fineract CN from
your end and provide feedback on any ensuing errors.

Is any other developer experiencing the broken build when running Fineract
CN ?

Unrelated, I've updated the How to build Fineract CN page [2] with links to
enable new developers easily start the platform.

Cheers,
Isaac Kamga.

[1]
https://github.com/apache/fineract-cn-demo-server/commit/3d8ffa969bb3f835bcacc9a0b4d153690d4f8494

[2]
https://cwiki.apache.org/confluence/display/FINERACT/How+To+Build+Apache+Fineract+CN


On Thu, Oct 18, 2018 at 10:03 PM James Dailey <ja...@gmail.com>
wrote:

> Hi Ebenezer,
>
> I was just looking through this thread and your ongoing work since May
> 2018.  Nice work.
>
> In your design, I was wondering if there is a place to make messages
> conditional on various flags in other data tables.  That is, as an example,
> for some customers, we send out "Urgent Reminder, you missed last payment
> and owe new amount" while for other customers we send out "Normal payment
> due" message.  Is this sort of logic in scope?  Could you imagine that your
> code could be extended in this direction?
>
> Second, from a security point of view, have you noticed any
> issues/challenges we should think about and then address in the overall
> architecture?  I guess I am riffing off the use of an admin user as the
> default account required for sending messages.  Is the scope of this user
> at the right level for this task?  Is the permitted-feign-client
> documentation useful and complete on cwiki?  You've been into this code now
> for a while and may have useful observations that could benefit the
> community.
>
> Third, once this service is available, does it automatically get included
> in any deployment and/or is it optionally included and invoked?  This may
> be a larger question for the architects, but I'm trying to understand how
> the various available microservices would be combined (or not) in different
> deployment situations.
>
> Thanks,
> ~james
>
>
> On Thu, Oct 11, 2018 at 11:35 AM Myrle Krantz <my...@apache.org> wrote:
>
> > Hey Ebenezer,
> >
> > I really hope you keep the name Wada.  I love personal touches like
> > this.  Hermes isn't Egyptian and his Egyptian counterpart Thoth is
> > already taken by another service.  But far more important: Wada means
> > something to you.
> >
> > No problem on the 404s  Your repos are public so it wasn't really an
> > obstacle.
> >
> > Have you been able to make headway with my explanation?  If something
> > is unclear please tell me.  But also keep in mind I have several
> > deadlines coming up so I'm going to be slow in replying through the
> > next week.
> >
> > Best Regards,
> > Myrle
> >
> >
> > On Mon, Oct 8, 2018 at 10:59 PM Ebenezer Graham
> > <eg...@alustudent.com> wrote:
> > >
> > > Wow! the reason for Anubis is deep. I should have consulted you for
> > > suggestions.
> > >
> > > First of all apologies for the 404s. I clean up my repo ( squashed some
> > > commits and deleted a few test branches) and so I had to force push to
> my
> > > git repo when I wanted to pull onto the VM. All the new code on the
> > > authentication is here
> > >
> >
> https://github.com/ebenezergraham/fineract-cn-notifications/tree/permitted-feign-client-auth
> > .
> > > I will be mindful of squash and force push next time.
> > >
> > > Wada means "To be loved".The notification service is my first ever open
> > > source project and as a wannabe open source advocate this was a really
> > big
> > > deal for me hence *"my love for it".* Also partly because it's an
> > > Indigenous Kalanga name, I am fascinated by southern African languages
> > and
> > > as such, I leave a trail of it on significant things in my life. :)
> > >
> > > But after reading the meaning of Anubis. I guess *hermes* would be a
> > > perfect name. One of the twelve Olympian gods ( mostly known as the
> > > messenger god). :0
> >
>

Re: [Discussion] Fineract CN SMS & Email Notifications Project

Posted by James Dailey <ja...@gmail.com>.
Hi Ebenezer,

I was just looking through this thread and your ongoing work since May
2018.  Nice work.

In your design, I was wondering if there is a place to make messages
conditional on various flags in other data tables.  That is, as an example,
for some customers, we send out "Urgent Reminder, you missed last payment
and owe new amount" while for other customers we send out "Normal payment
due" message.  Is this sort of logic in scope?  Could you imagine that your
code could be extended in this direction?

Second, from a security point of view, have you noticed any
issues/challenges we should think about and then address in the overall
architecture?  I guess I am riffing off the use of an admin user as the
default account required for sending messages.  Is the scope of this user
at the right level for this task?  Is the permitted-feign-client
documentation useful and complete on cwiki?  You've been into this code now
for a while and may have useful observations that could benefit the
community.

Third, once this service is available, does it automatically get included
in any deployment and/or is it optionally included and invoked?  This may
be a larger question for the architects, but I'm trying to understand how
the various available microservices would be combined (or not) in different
deployment situations.

Thanks,
~james


On Thu, Oct 11, 2018 at 11:35 AM Myrle Krantz <my...@apache.org> wrote:

> Hey Ebenezer,
>
> I really hope you keep the name Wada.  I love personal touches like
> this.  Hermes isn't Egyptian and his Egyptian counterpart Thoth is
> already taken by another service.  But far more important: Wada means
> something to you.
>
> No problem on the 404s  Your repos are public so it wasn't really an
> obstacle.
>
> Have you been able to make headway with my explanation?  If something
> is unclear please tell me.  But also keep in mind I have several
> deadlines coming up so I'm going to be slow in replying through the
> next week.
>
> Best Regards,
> Myrle
>
>
> On Mon, Oct 8, 2018 at 10:59 PM Ebenezer Graham
> <eg...@alustudent.com> wrote:
> >
> > Wow! the reason for Anubis is deep. I should have consulted you for
> > suggestions.
> >
> > First of all apologies for the 404s. I clean up my repo ( squashed some
> > commits and deleted a few test branches) and so I had to force push to my
> > git repo when I wanted to pull onto the VM. All the new code on the
> > authentication is here
> >
> https://github.com/ebenezergraham/fineract-cn-notifications/tree/permitted-feign-client-auth
> .
> > I will be mindful of squash and force push next time.
> >
> > Wada means "To be loved".The notification service is my first ever open
> > source project and as a wannabe open source advocate this was a really
> big
> > deal for me hence *"my love for it".* Also partly because it's an
> > Indigenous Kalanga name, I am fascinated by southern African languages
> and
> > as such, I leave a trail of it on significant things in my life. :)
> >
> > But after reading the meaning of Anubis. I guess *hermes* would be a
> > perfect name. One of the twelve Olympian gods ( mostly known as the
> > messenger god). :0
>

Re: [Discussion] Fineract CN SMS & Email Notifications Project

Posted by Myrle Krantz <my...@apache.org>.
Hey Ebenezer,

I really hope you keep the name Wada.  I love personal touches like
this.  Hermes isn't Egyptian and his Egyptian counterpart Thoth is
already taken by another service.  But far more important: Wada means
something to you.

No problem on the 404s  Your repos are public so it wasn't really an obstacle.

Have you been able to make headway with my explanation?  If something
is unclear please tell me.  But also keep in mind I have several
deadlines coming up so I'm going to be slow in replying through the
next week.

Best Regards,
Myrle


On Mon, Oct 8, 2018 at 10:59 PM Ebenezer Graham
<eg...@alustudent.com> wrote:
>
> Wow! the reason for Anubis is deep. I should have consulted you for
> suggestions.
>
> First of all apologies for the 404s. I clean up my repo ( squashed some
> commits and deleted a few test branches) and so I had to force push to my
> git repo when I wanted to pull onto the VM. All the new code on the
> authentication is here
> https://github.com/ebenezergraham/fineract-cn-notifications/tree/permitted-feign-client-auth.
> I will be mindful of squash and force push next time.
>
> Wada means "To be loved".The notification service is my first ever open
> source project and as a wannabe open source advocate this was a really big
> deal for me hence *"my love for it".* Also partly because it's an
> Indigenous Kalanga name, I am fascinated by southern African languages and
> as such, I leave a trail of it on significant things in my life. :)
>
> But after reading the meaning of Anubis. I guess *hermes* would be a
> perfect name. One of the twelve Olympian gods ( mostly known as the
> messenger god). :0

Re: [Discussion] Fineract CN SMS & Email Notifications Project

Posted by Ebenezer Graham <eg...@alustudent.com>.
Wow! the reason for Anubis is deep. I should have consulted you for
suggestions.

First of all apologies for the 404s. I clean up my repo ( squashed some
commits and deleted a few test branches) and so I had to force push to my
git repo when I wanted to pull onto the VM. All the new code on the
authentication is here
https://github.com/ebenezergraham/fineract-cn-notifications/tree/permitted-feign-client-auth.
I will be mindful of squash and force push next time.

Wada means "To be loved".The notification service is my first ever open
source project and as a wannabe open source advocate this was a really big
deal for me hence *"my love for it".* Also partly because it's an
Indigenous Kalanga name, I am fascinated by southern African languages and
as such, I leave a trail of it on significant things in my life. :)

But after reading the meaning of Anubis. I guess *hermes* would be a
perfect name. One of the twelve Olympian gods ( mostly known as the
messenger god). :0

Currently, wrapping my head around the explanation given. I will try to
understand it and get back to you.

*At your service,*

*Ebenezer Graham*

*BSc (Hons) Computing*


[image: EmailSignature.png]

African Leadership University,

Power Mill Road, Pamplemousses,

Mauritius.


*skype*:
ebenezer.graham
GitHub <https://github.com/ebenezergraham> | LinkedIn
<https://www.linkedin.com/in/ebenezer-graham/> | Twitter
<https://twitter.com/pactmart> | Facebook
<https://www.facebook.com/pactmart>
www.pactmart.com | Freelancing made easy.


*“Talk is cheap, show me the code.” *- *Linus Torvalds*




On Mon, 8 Oct 2018 at 23:01, Myrle Krantz <my...@apache.org> wrote:

> Hey Ebenezer,
> those code
> First the easy question:
> The services do all have code names, which we use to name the tables.
> Most of them are named after Egyptian gods.  Anubis for example plays
> a part in the judgement of the newly dead, and so it seemed
> appropriate that the library responsible for authentication and
> authorization at the service level should also be called anubis.
> There's a Maat's feather in there somewhere too.
>
> I'm glad you picked a code name for notifications too.  I bellieve it
> actually makes communication about the services more precise, and it's
> also fun.
>
> Does "wada" mean anything?
>
> Unfortunately the code links you included don't work (I'm getting
> 404's).  But I took a look through your repositories as they are in
> github anyways.  And it seems likely that you haven't understood how
> this works yet.  Which is understandable since it is complex and
> poorly documented.
>
> The current best I have available is here, but this may be confusing
> because the interaction being prepared is with identity, in addition
> to identity's involvement with the provisioning of permissions:
>
> https://cwiki.apache.org/confluence/display/FINERACT/Fineract+CN+demo-server
>  (In other words identity is involved in two parts of that problem
> instead of just one, and that muddies the waters.)
>
> Let me take another swing at it.  I'm currently assuming the only
> function you need from customer is CustomerManager.findCustomer.  That
> function is in the permittable group customer__v1__customer.  Here's
> what will need to happen and how your code fits in.  I've put stars
> next to the parts which will require you to do something.  I'll
> explain below what you need to do for each star.  Some of it you are
> already doing, so you can take those stars home : o)
>
> demo_server -> provisioner: add customer service to the tenant
> (skipping some parts here)
>   provisioner -> customer: ask what permissions are part of customer
>   provisioner -> identity: create the permission groups which are part
> of customer, including the permittable group customer__v1__customer.
> demo_server -> identity: create the role notificationAdmin, set it to
> include permissions to the parts of customer you want to access. *1
> demo_server -> identity: add user wadaadmin with the role
> notificationAdmin. *2
> demo_server -> provisioner: add wada service to the tenant *3
>   provisioner -> wada: provision signature with same timestamp as
> current identity signature.
>   provisioner -> identity: create application with signature returned by
> wada
>   provisioner -> wada: ask what permissions wada needs.  Wada responds
> that it needs customer__v1__customer. *4
>   provisioner -> identity: create permission request for wada to
> access customer to get customer information.
>   provisioner -> wada: initialize tenant data tables in separate database.
> *5
> demo_server -> identity: allow wada to call customer__v1__customer as
> wadaadmin. *6
>
> *1.  You are already doing this in the demo-server function
> ServiceRunner::defineNotificationRole
> *2.  You are already doing this in the demo-server function
> ServiceRunner::createNotificationsAdmin
> *3.  You are already doing this in the demo-server function
> ServiceRunner::provisionAppsViaSeshat
> *4.  This is done by creating a feign interface for customer within
> the notification service code.  You can find an example in rhythm
> under ApplicationPermissionRequestCreator, intended to make it
> possible for rhythm to access identity.  In your case though you want
> wada to access customer, so you'll create a class that looks something
> like this:
>
> @EndpointSet(identifier = "notificiations__v1__customer__v1")
> @FeignClient(name="customer-v1", path="/customer/v1",
> configuration=PermittedFeignClientsConfiguration.class)
> public interface ApplicationPermissionRequestCreator {
>   @RequestMapping(...) /* copy params from CustomerManager */
>   @ThrowsException(...)/* copy params from CustomerManager */
>   @Permittable(groupId =
> org.apache.fineract.cn.customer.PermittableGroupIds.CUSTOMER)
>   Customer findCustomer(...); /* copy params from CustomerManager */
> }
>
> *5.  You are already doing this in notifications function
> MigrationAggregate::provisionAppsViaSeshatForTenant with a call to
> provisionApp for notificationManager.
> *6.  After all the other pieces are in place, login as wadaadmin and
> call.  This won't work until after notificationManager is provisioned.
> identityManager.api().setApplicationPermissionEnabledForUser(
>         notificationManager.name(),
>         org.apache.fineract.cn.customer.PermittableGroupIds.CUSTOMER,
>         notificationsAdminUser.getIdentifier(),
>         true);
>
> If you still can't figure it out after this, I'd like to puzzle
> together with you.  Write me an e-mail and we'll set up a pair
> programming session, and then bring back anything we learn to the
> list.
>
> Best Regards,
> Myrle Krantz
>
> On Mon, Oct 8, 2018 at 12:21 AM Ebenezer Graham
> <eg...@alustudent.com> wrote:
> >
> > HI Myrle,
> >
> > I will try this approach to connect to the VM. Thanks.
> >
> > Yes you are right, this happens during provisioning of the services
> >
> > This is the line throwing the exception
> >
> https://github.com/ebenezergraham/fineract-cn-demo-server/blob/application-permission-for-notification/
> > src/main/java/org/apache/fineract/cn/dev/ServiceRunner.java#L451
> > This is where I attempt to setApplicationPermissionEnabledForUser.
> >
> > I attempted to create the application request here:
> >
> https://github.com/ebenezergraham/fineract-cn-demo-server/blob/application-permission-for-notification/src/main/java/org/apache/fineract/cn/dev/ServiceRunner.java#L484-#L514
> >
> >
> > ** at provisioning, service A tells provisioner about its
> > permissiongroups.  provisioner then tells identity.*
> >
> > And so I understand this mechanism correctly, for the notification
> service
> > to be able to read data from the customer service a permission group has
> to
> > be defined in customer.
> >
> > Please correct me if I am wrong, this is done by declaring a groupId in
> the
> > PermittableGroupIds interface in customer(eg:
> > notification__v1__customer__v1?) and under the hood, provisioner will set
> > that in identity.
> >
> >
> > ** The demo-server than creates a user (Fred?) which which has accessto
> > that permission group.*
> > In other not create new users ( as this caused problems for other
> > developers) I believe I can use scheduler just like rhythm?
> >
> > I have added permission to read from a customer during the creation of
> the
> > scheduler
> >
> https://github.com/ebenezergraham/fineract-cn-demo-server/blob/application-permission-for-notification/src/main/java/org/apache/fineract/cn/dev/ServiceRunner.java#L588-#L590
> >
> >
> >
> > ** Then when service B is being provisioned, it tells identity aboutthe
> > permission groups that it will need in service A.*
> > So I believe the start fails because notification is setting a permission
> > which doesn't exist (customer never informed identity through
> provisioner).
> >
> >
> > ** The demo-server, in the name of Fred, gives service B permission
> tocall
> > service A on that permission group as Fred.*
> >
> > Also, I saw that other services have code names from the documentation.
> And
> > so I gave the notification service the name wada. I used it to prefix the
> > database tables. Is it alright to give it a code name? :)
> >
> > *At your service,*
> >
> > *Ebenezer Graham*
> >
> > *BSc (Hons) Computing*
> >
> >
> > [image: EmailSignature.png]
> >
> > African Leadership University,
> >
> > Power Mill Road, Pamplemousses,
> >
> > Mauritius.
> >
> >
> > *skype*:
> > ebenezer.graham
> > GitHub <https://github.com/ebenezergraham> | LinkedIn
> > <https://www.linkedin.com/in/ebenezer-graham/> | Twitter
> > <https://twitter.com/pactmart> | Facebook
> > <https://www.facebook.com/pactmart>
> > www.pactmart.com | Freelancing made easy.
> >
> >
> > *“Talk is cheap, show me the code.” *- *Linus Torvalds*
> >
> >
> >
> >
> > On Mon, 8 Oct 2018 at 01:08, Myrle Krantz <my...@apache.org> wrote:
> >
> > > Hey Ebenezer,
> > >
> > > I've never debugged a process on a remote server, but it should be
> > > possible.  First you'll need to find out what port debugging is
> > > running on and open that port.
> > >
> > > Aside from that, I've included the text you linked to in pastebin
> > > below (for snippets this short it's easier on me if you just include
> > > them in the mail.)
> > >
> > > It seems like your problem is actually in the start up of demo-server,
> > > is that correct?  But what line number?  What call is producing this
> > > exception?
> > >
> > > I can explain a bit about the permission requesting mechanism in
> > > identity.  If service B needs to call service A, then the following
> > > happens:
> > > * at provisioning, service A tells provisioner about its permission
> > > groups.  provisioner then tells identity.
> > > * The demo-server than creates a user (Fred?) which which has access
> > > to that permission group.
> > > * Then when service B is being provisioned, it tells identity about
> > > the permission groups that it will need in service A.
> > > * The demo-server, in the name of Fred, gives service B permission to
> > > call service A on that permission group as Fred.
> > >
> > > This line looks like you're expecting a permission group in customer
> > > called wada.  There is no such permission group.  Are you trying to
> > > get information from customer?  Is that why you need this permission?
> > > You'll need to call identity.setApplicationPermissionEnabledForUser.
> > >
> > > Can you share the code throwing this exception?  It would make things
> > > much easier.
> > >
> > > Best Regards,
> > > Myrle
> > >
> > >
> > > 1) startDevServer(org.apache.fineract.cn.dev.ServiceRunner)
> > > org.apache.fineract.cn.api.util.NotFoundException:
> > > {"timestamp":1538925629122,"status":404,"error":"Not
> > >
> > >
> Found","exception":"org.apache.fineract.cn.lang.ServiceException","message":"Application
> > > permission 'notification-v1.customer__v1__wada' doesn't
> > >
> > >
> exist.","path":"/identity/v1/applications/notification-v1/permissions/customer__v1__wada/users/imhotep/enabled"}
> > > at
> > >
> org.apache.fineract.cn.api.util.AnnotatedErrorDecoder.getAlternative(AnnotatedErrorDecoder.java:76)
> > > at
> > >
> org.apache.fineract.cn.api.util.AnnotatedErrorDecoder.decode(AnnotatedErrorDecoder.java:65)
> > > at
> > >
> feign.SynchronousMethodHandler.executeAndDecode(SynchronousMethodHandler.java:138)
> > > at
> feign.SynchronousMethodHandler.invoke(SynchronousMethodHandler.java:76)
> > > at
> > >
> feign.ReflectiveFeign$FeignInvocationHandler.invoke(ReflectiveFeign.java:103)
> > > at
> com.sun.proxy.$Proxy207.setApplicationPermissionEnabledForUser(Unknown
> > > Source)
> > > at
> > >
> org.apache.fineract.cn.dev.ServiceRunner.provisionAppsViaSeshatForTenant(ServiceRunner.java:451)
> > > at
> > >
> org.apache.fineract.cn.dev.ServiceRunner.provisionAppsViaSeshat(ServiceRunner.java:359)
> > > at
> > >
> org.apache.fineract.cn.dev.ServiceRunner.startDevServer(ServiceRunner.java:257)
> > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > > at
> > >
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> > > at
> > >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> > > at java.lang.reflect.Method.invoke(Method.java:498)
> > > at
> > >
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
> > > at
> > >
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> > > at
> > >
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
> > > at
> > >
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
> > > at
> > >
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
> > > at
> > >
> org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:75)
> > > at
> > >
> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
> > > at
> > >
> org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:86)
> > > at
> > >
> org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:84)
> > > at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
> > > at
> > >
> org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:252)
> > > at
> > >
> org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:94)
> > > at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
> > > at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
> > > at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
> > > at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
> > > at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
> > > at
> > >
> org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
> > > at
> > >
> org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
> > > at
> org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48)
> > > at
> org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48)
> > > at
> org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48)
> > > at org.junit.rules.RunRules.evaluate(RunRules.java:20)
> > > at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
> > > at
> > >
> org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:191)
> > > at org.junit.runners.Suite.runChild(Suite.java:128)
> > > at org.junit.runners.Suite.runChild(Suite.java:27)
> > > at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
> > > at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
> > > at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
> > > at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
> > > at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
> > > at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
> > > at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
> > > at org.junit.runner.JUnitCore.run(JUnitCore.java:115)
> > > at org.junit.runner.JUnitCore.runMain(JUnitCore.java:77)
> > > at org.junit.runner.JUnitCore.main(JUnitCore.java:36)
> > > at org.apache.fineract.cn.dev.DemoServer.main(DemoServer.java:30)
> > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > > at
> > >
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> > > at
> > >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> > > at java.lang.reflect.Method.invoke(Method.java:498)
> > > at
> > >
> org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48)
> > > at org.springframework.boot.loader.Launcher.launch(Launcher.java:87)
> > > at org.springframework.boot.loader.Launcher.launch(Launcher.java:50)
> > > at
> org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:58)
> > >
>

Re: [Discussion] Fineract CN SMS & Email Notifications Project

Posted by Myrle Krantz <my...@apache.org>.
Hey Ebenezer,
those code
First the easy question:
The services do all have code names, which we use to name the tables.
Most of them are named after Egyptian gods.  Anubis for example plays
a part in the judgement of the newly dead, and so it seemed
appropriate that the library responsible for authentication and
authorization at the service level should also be called anubis.
There's a Maat's feather in there somewhere too.

I'm glad you picked a code name for notifications too.  I bellieve it
actually makes communication about the services more precise, and it's
also fun.

Does "wada" mean anything?

Unfortunately the code links you included don't work (I'm getting
404's).  But I took a look through your repositories as they are in
github anyways.  And it seems likely that you haven't understood how
this works yet.  Which is understandable since it is complex and
poorly documented.

The current best I have available is here, but this may be confusing
because the interaction being prepared is with identity, in addition
to identity's involvement with the provisioning of permissions:
https://cwiki.apache.org/confluence/display/FINERACT/Fineract+CN+demo-server
 (In other words identity is involved in two parts of that problem
instead of just one, and that muddies the waters.)

Let me take another swing at it.  I'm currently assuming the only
function you need from customer is CustomerManager.findCustomer.  That
function is in the permittable group customer__v1__customer.  Here's
what will need to happen and how your code fits in.  I've put stars
next to the parts which will require you to do something.  I'll
explain below what you need to do for each star.  Some of it you are
already doing, so you can take those stars home : o)

demo_server -> provisioner: add customer service to the tenant
(skipping some parts here)
  provisioner -> customer: ask what permissions are part of customer
  provisioner -> identity: create the permission groups which are part
of customer, including the permittable group customer__v1__customer.
demo_server -> identity: create the role notificationAdmin, set it to
include permissions to the parts of customer you want to access. *1
demo_server -> identity: add user wadaadmin with the role notificationAdmin. *2
demo_server -> provisioner: add wada service to the tenant *3
  provisioner -> wada: provision signature with same timestamp as
current identity signature.
  provisioner -> identity: create application with signature returned by wada
  provisioner -> wada: ask what permissions wada needs.  Wada responds
that it needs customer__v1__customer. *4
  provisioner -> identity: create permission request for wada to
access customer to get customer information.
  provisioner -> wada: initialize tenant data tables in separate database. *5
demo_server -> identity: allow wada to call customer__v1__customer as
wadaadmin. *6

*1.  You are already doing this in the demo-server function
ServiceRunner::defineNotificationRole
*2.  You are already doing this in the demo-server function
ServiceRunner::createNotificationsAdmin
*3.  You are already doing this in the demo-server function
ServiceRunner::provisionAppsViaSeshat
*4.  This is done by creating a feign interface for customer within
the notification service code.  You can find an example in rhythm
under ApplicationPermissionRequestCreator, intended to make it
possible for rhythm to access identity.  In your case though you want
wada to access customer, so you'll create a class that looks something
like this:

@EndpointSet(identifier = "notificiations__v1__customer__v1")
@FeignClient(name="customer-v1", path="/customer/v1",
configuration=PermittedFeignClientsConfiguration.class)
public interface ApplicationPermissionRequestCreator {
  @RequestMapping(...) /* copy params from CustomerManager */
  @ThrowsException(...)/* copy params from CustomerManager */
  @Permittable(groupId =
org.apache.fineract.cn.customer.PermittableGroupIds.CUSTOMER)
  Customer findCustomer(...); /* copy params from CustomerManager */
}

*5.  You are already doing this in notifications function
MigrationAggregate::provisionAppsViaSeshatForTenant with a call to
provisionApp for notificationManager.
*6.  After all the other pieces are in place, login as wadaadmin and
call.  This won't work until after notificationManager is provisioned.
identityManager.api().setApplicationPermissionEnabledForUser(
        notificationManager.name(),
        org.apache.fineract.cn.customer.PermittableGroupIds.CUSTOMER,
        notificationsAdminUser.getIdentifier(),
        true);

If you still can't figure it out after this, I'd like to puzzle
together with you.  Write me an e-mail and we'll set up a pair
programming session, and then bring back anything we learn to the
list.

Best Regards,
Myrle Krantz

On Mon, Oct 8, 2018 at 12:21 AM Ebenezer Graham
<eg...@alustudent.com> wrote:
>
> HI Myrle,
>
> I will try this approach to connect to the VM. Thanks.
>
> Yes you are right, this happens during provisioning of the services
>
> This is the line throwing the exception
> https://github.com/ebenezergraham/fineract-cn-demo-server/blob/application-permission-for-notification/
> src/main/java/org/apache/fineract/cn/dev/ServiceRunner.java#L451
> This is where I attempt to setApplicationPermissionEnabledForUser.
>
> I attempted to create the application request here:
> https://github.com/ebenezergraham/fineract-cn-demo-server/blob/application-permission-for-notification/src/main/java/org/apache/fineract/cn/dev/ServiceRunner.java#L484-#L514
>
>
> ** at provisioning, service A tells provisioner about its
> permissiongroups.  provisioner then tells identity.*
>
> And so I understand this mechanism correctly, for the notification service
> to be able to read data from the customer service a permission group has to
> be defined in customer.
>
> Please correct me if I am wrong, this is done by declaring a groupId in the
> PermittableGroupIds interface in customer(eg:
> notification__v1__customer__v1?) and under the hood, provisioner will set
> that in identity.
>
>
> ** The demo-server than creates a user (Fred?) which which has accessto
> that permission group.*
> In other not create new users ( as this caused problems for other
> developers) I believe I can use scheduler just like rhythm?
>
> I have added permission to read from a customer during the creation of the
> scheduler
> https://github.com/ebenezergraham/fineract-cn-demo-server/blob/application-permission-for-notification/src/main/java/org/apache/fineract/cn/dev/ServiceRunner.java#L588-#L590
>
>
>
> ** Then when service B is being provisioned, it tells identity aboutthe
> permission groups that it will need in service A.*
> So I believe the start fails because notification is setting a permission
> which doesn't exist (customer never informed identity through provisioner).
>
>
> ** The demo-server, in the name of Fred, gives service B permission tocall
> service A on that permission group as Fred.*
>
> Also, I saw that other services have code names from the documentation. And
> so I gave the notification service the name wada. I used it to prefix the
> database tables. Is it alright to give it a code name? :)
>
> *At your service,*
>
> *Ebenezer Graham*
>
> *BSc (Hons) Computing*
>
>
> [image: EmailSignature.png]
>
> African Leadership University,
>
> Power Mill Road, Pamplemousses,
>
> Mauritius.
>
>
> *skype*:
> ebenezer.graham
> GitHub <https://github.com/ebenezergraham> | LinkedIn
> <https://www.linkedin.com/in/ebenezer-graham/> | Twitter
> <https://twitter.com/pactmart> | Facebook
> <https://www.facebook.com/pactmart>
> www.pactmart.com | Freelancing made easy.
>
>
> *“Talk is cheap, show me the code.” *- *Linus Torvalds*
>
>
>
>
> On Mon, 8 Oct 2018 at 01:08, Myrle Krantz <my...@apache.org> wrote:
>
> > Hey Ebenezer,
> >
> > I've never debugged a process on a remote server, but it should be
> > possible.  First you'll need to find out what port debugging is
> > running on and open that port.
> >
> > Aside from that, I've included the text you linked to in pastebin
> > below (for snippets this short it's easier on me if you just include
> > them in the mail.)
> >
> > It seems like your problem is actually in the start up of demo-server,
> > is that correct?  But what line number?  What call is producing this
> > exception?
> >
> > I can explain a bit about the permission requesting mechanism in
> > identity.  If service B needs to call service A, then the following
> > happens:
> > * at provisioning, service A tells provisioner about its permission
> > groups.  provisioner then tells identity.
> > * The demo-server than creates a user (Fred?) which which has access
> > to that permission group.
> > * Then when service B is being provisioned, it tells identity about
> > the permission groups that it will need in service A.
> > * The demo-server, in the name of Fred, gives service B permission to
> > call service A on that permission group as Fred.
> >
> > This line looks like you're expecting a permission group in customer
> > called wada.  There is no such permission group.  Are you trying to
> > get information from customer?  Is that why you need this permission?
> > You'll need to call identity.setApplicationPermissionEnabledForUser.
> >
> > Can you share the code throwing this exception?  It would make things
> > much easier.
> >
> > Best Regards,
> > Myrle
> >
> >
> > 1) startDevServer(org.apache.fineract.cn.dev.ServiceRunner)
> > org.apache.fineract.cn.api.util.NotFoundException:
> > {"timestamp":1538925629122,"status":404,"error":"Not
> >
> > Found","exception":"org.apache.fineract.cn.lang.ServiceException","message":"Application
> > permission 'notification-v1.customer__v1__wada' doesn't
> >
> > exist.","path":"/identity/v1/applications/notification-v1/permissions/customer__v1__wada/users/imhotep/enabled"}
> > at
> > org.apache.fineract.cn.api.util.AnnotatedErrorDecoder.getAlternative(AnnotatedErrorDecoder.java:76)
> > at
> > org.apache.fineract.cn.api.util.AnnotatedErrorDecoder.decode(AnnotatedErrorDecoder.java:65)
> > at
> > feign.SynchronousMethodHandler.executeAndDecode(SynchronousMethodHandler.java:138)
> > at feign.SynchronousMethodHandler.invoke(SynchronousMethodHandler.java:76)
> > at
> > feign.ReflectiveFeign$FeignInvocationHandler.invoke(ReflectiveFeign.java:103)
> > at com.sun.proxy.$Proxy207.setApplicationPermissionEnabledForUser(Unknown
> > Source)
> > at
> > org.apache.fineract.cn.dev.ServiceRunner.provisionAppsViaSeshatForTenant(ServiceRunner.java:451)
> > at
> > org.apache.fineract.cn.dev.ServiceRunner.provisionAppsViaSeshat(ServiceRunner.java:359)
> > at
> > org.apache.fineract.cn.dev.ServiceRunner.startDevServer(ServiceRunner.java:257)
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > at
> > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> > at
> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> > at java.lang.reflect.Method.invoke(Method.java:498)
> > at
> > org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
> > at
> > org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> > at
> > org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
> > at
> > org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
> > at
> > org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
> > at
> > org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:75)
> > at
> > org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
> > at
> > org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:86)
> > at
> > org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:84)
> > at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
> > at
> > org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:252)
> > at
> > org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:94)
> > at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
> > at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
> > at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
> > at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
> > at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
> > at
> > org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
> > at
> > org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
> > at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48)
> > at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48)
> > at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48)
> > at org.junit.rules.RunRules.evaluate(RunRules.java:20)
> > at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
> > at
> > org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:191)
> > at org.junit.runners.Suite.runChild(Suite.java:128)
> > at org.junit.runners.Suite.runChild(Suite.java:27)
> > at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
> > at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
> > at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
> > at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
> > at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
> > at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
> > at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
> > at org.junit.runner.JUnitCore.run(JUnitCore.java:115)
> > at org.junit.runner.JUnitCore.runMain(JUnitCore.java:77)
> > at org.junit.runner.JUnitCore.main(JUnitCore.java:36)
> > at org.apache.fineract.cn.dev.DemoServer.main(DemoServer.java:30)
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > at
> > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> > at
> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> > at java.lang.reflect.Method.invoke(Method.java:498)
> > at
> > org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48)
> > at org.springframework.boot.loader.Launcher.launch(Launcher.java:87)
> > at org.springframework.boot.loader.Launcher.launch(Launcher.java:50)
> > at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:58)
> >

Re: [Discussion] Fineract CN SMS & Email Notifications Project

Posted by Ebenezer Graham <eg...@alustudent.com>.
HI Myrle,

I will try this approach to connect to the VM. Thanks.

Yes you are right, this happens during provisioning of the services

This is the line throwing the exception
https://github.com/ebenezergraham/fineract-cn-demo-server/blob/application-permission-for-notification/
src/main/java/org/apache/fineract/cn/dev/ServiceRunner.java#L451
This is where I attempt to setApplicationPermissionEnabledForUser.

I attempted to create the application request here:
https://github.com/ebenezergraham/fineract-cn-demo-server/blob/application-permission-for-notification/src/main/java/org/apache/fineract/cn/dev/ServiceRunner.java#L484-#L514


** at provisioning, service A tells provisioner about its
permissiongroups.  provisioner then tells identity.*

And so I understand this mechanism correctly, for the notification service
to be able to read data from the customer service a permission group has to
be defined in customer.

Please correct me if I am wrong, this is done by declaring a groupId in the
PermittableGroupIds interface in customer(eg:
notification__v1__customer__v1?) and under the hood, provisioner will set
that in identity.


** The demo-server than creates a user (Fred?) which which has accessto
that permission group.*
In other not create new users ( as this caused problems for other
developers) I believe I can use scheduler just like rhythm?

I have added permission to read from a customer during the creation of the
scheduler
https://github.com/ebenezergraham/fineract-cn-demo-server/blob/application-permission-for-notification/src/main/java/org/apache/fineract/cn/dev/ServiceRunner.java#L588-#L590



** Then when service B is being provisioned, it tells identity aboutthe
permission groups that it will need in service A.*
So I believe the start fails because notification is setting a permission
which doesn't exist (customer never informed identity through provisioner).


** The demo-server, in the name of Fred, gives service B permission tocall
service A on that permission group as Fred.*

Also, I saw that other services have code names from the documentation. And
so I gave the notification service the name wada. I used it to prefix the
database tables. Is it alright to give it a code name? :)

*At your service,*

*Ebenezer Graham*

*BSc (Hons) Computing*


[image: EmailSignature.png]

African Leadership University,

Power Mill Road, Pamplemousses,

Mauritius.


*skype*:
ebenezer.graham
GitHub <https://github.com/ebenezergraham> | LinkedIn
<https://www.linkedin.com/in/ebenezer-graham/> | Twitter
<https://twitter.com/pactmart> | Facebook
<https://www.facebook.com/pactmart>
www.pactmart.com | Freelancing made easy.


*“Talk is cheap, show me the code.” *- *Linus Torvalds*




On Mon, 8 Oct 2018 at 01:08, Myrle Krantz <my...@apache.org> wrote:

> Hey Ebenezer,
>
> I've never debugged a process on a remote server, but it should be
> possible.  First you'll need to find out what port debugging is
> running on and open that port.
>
> Aside from that, I've included the text you linked to in pastebin
> below (for snippets this short it's easier on me if you just include
> them in the mail.)
>
> It seems like your problem is actually in the start up of demo-server,
> is that correct?  But what line number?  What call is producing this
> exception?
>
> I can explain a bit about the permission requesting mechanism in
> identity.  If service B needs to call service A, then the following
> happens:
> * at provisioning, service A tells provisioner about its permission
> groups.  provisioner then tells identity.
> * The demo-server than creates a user (Fred?) which which has access
> to that permission group.
> * Then when service B is being provisioned, it tells identity about
> the permission groups that it will need in service A.
> * The demo-server, in the name of Fred, gives service B permission to
> call service A on that permission group as Fred.
>
> This line looks like you're expecting a permission group in customer
> called wada.  There is no such permission group.  Are you trying to
> get information from customer?  Is that why you need this permission?
> You'll need to call identity.setApplicationPermissionEnabledForUser.
>
> Can you share the code throwing this exception?  It would make things
> much easier.
>
> Best Regards,
> Myrle
>
>
> 1) startDevServer(org.apache.fineract.cn.dev.ServiceRunner)
> org.apache.fineract.cn.api.util.NotFoundException:
> {"timestamp":1538925629122,"status":404,"error":"Not
>
> Found","exception":"org.apache.fineract.cn.lang.ServiceException","message":"Application
> permission 'notification-v1.customer__v1__wada' doesn't
>
> exist.","path":"/identity/v1/applications/notification-v1/permissions/customer__v1__wada/users/imhotep/enabled"}
> at
> org.apache.fineract.cn.api.util.AnnotatedErrorDecoder.getAlternative(AnnotatedErrorDecoder.java:76)
> at
> org.apache.fineract.cn.api.util.AnnotatedErrorDecoder.decode(AnnotatedErrorDecoder.java:65)
> at
> feign.SynchronousMethodHandler.executeAndDecode(SynchronousMethodHandler.java:138)
> at feign.SynchronousMethodHandler.invoke(SynchronousMethodHandler.java:76)
> at
> feign.ReflectiveFeign$FeignInvocationHandler.invoke(ReflectiveFeign.java:103)
> at com.sun.proxy.$Proxy207.setApplicationPermissionEnabledForUser(Unknown
> Source)
> at
> org.apache.fineract.cn.dev.ServiceRunner.provisionAppsViaSeshatForTenant(ServiceRunner.java:451)
> at
> org.apache.fineract.cn.dev.ServiceRunner.provisionAppsViaSeshat(ServiceRunner.java:359)
> at
> org.apache.fineract.cn.dev.ServiceRunner.startDevServer(ServiceRunner.java:257)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
> at
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> at
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
> at
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
> at
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
> at
> org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:75)
> at
> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
> at
> org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:86)
> at
> org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:84)
> at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
> at
> org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:252)
> at
> org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:94)
> at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
> at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
> at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
> at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
> at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
> at
> org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
> at
> org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
> at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48)
> at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48)
> at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48)
> at org.junit.rules.RunRules.evaluate(RunRules.java:20)
> at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
> at
> org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:191)
> at org.junit.runners.Suite.runChild(Suite.java:128)
> at org.junit.runners.Suite.runChild(Suite.java:27)
> at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
> at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
> at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
> at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
> at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
> at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
> at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
> at org.junit.runner.JUnitCore.run(JUnitCore.java:115)
> at org.junit.runner.JUnitCore.runMain(JUnitCore.java:77)
> at org.junit.runner.JUnitCore.main(JUnitCore.java:36)
> at org.apache.fineract.cn.dev.DemoServer.main(DemoServer.java:30)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at
> org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48)
> at org.springframework.boot.loader.Launcher.launch(Launcher.java:87)
> at org.springframework.boot.loader.Launcher.launch(Launcher.java:50)
> at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:58)
>

Re: [Discussion] Fineract CN SMS & Email Notifications Project

Posted by Myrle Krantz <my...@apache.org>.
Hey Ebenezer,

I've never debugged a process on a remote server, but it should be
possible.  First you'll need to find out what port debugging is
running on and open that port.

Aside from that, I've included the text you linked to in pastebin
below (for snippets this short it's easier on me if you just include
them in the mail.)

It seems like your problem is actually in the start up of demo-server,
is that correct?  But what line number?  What call is producing this
exception?

I can explain a bit about the permission requesting mechanism in
identity.  If service B needs to call service A, then the following
happens:
* at provisioning, service A tells provisioner about its permission
groups.  provisioner then tells identity.
* The demo-server than creates a user (Fred?) which which has access
to that permission group.
* Then when service B is being provisioned, it tells identity about
the permission groups that it will need in service A.
* The demo-server, in the name of Fred, gives service B permission to
call service A on that permission group as Fred.

This line looks like you're expecting a permission group in customer
called wada.  There is no such permission group.  Are you trying to
get information from customer?  Is that why you need this permission?
You'll need to call identity.setApplicationPermissionEnabledForUser.

Can you share the code throwing this exception?  It would make things
much easier.

Best Regards,
Myrle


1) startDevServer(org.apache.fineract.cn.dev.ServiceRunner)
org.apache.fineract.cn.api.util.NotFoundException:
{"timestamp":1538925629122,"status":404,"error":"Not
Found","exception":"org.apache.fineract.cn.lang.ServiceException","message":"Application
permission 'notification-v1.customer__v1__wada' doesn't
exist.","path":"/identity/v1/applications/notification-v1/permissions/customer__v1__wada/users/imhotep/enabled"}
at org.apache.fineract.cn.api.util.AnnotatedErrorDecoder.getAlternative(AnnotatedErrorDecoder.java:76)
at org.apache.fineract.cn.api.util.AnnotatedErrorDecoder.decode(AnnotatedErrorDecoder.java:65)
at feign.SynchronousMethodHandler.executeAndDecode(SynchronousMethodHandler.java:138)
at feign.SynchronousMethodHandler.invoke(SynchronousMethodHandler.java:76)
at feign.ReflectiveFeign$FeignInvocationHandler.invoke(ReflectiveFeign.java:103)
at com.sun.proxy.$Proxy207.setApplicationPermissionEnabledForUser(Unknown
Source)
at org.apache.fineract.cn.dev.ServiceRunner.provisionAppsViaSeshatForTenant(ServiceRunner.java:451)
at org.apache.fineract.cn.dev.ServiceRunner.provisionAppsViaSeshat(ServiceRunner.java:359)
at org.apache.fineract.cn.dev.ServiceRunner.startDevServer(ServiceRunner.java:257)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:75)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:86)
at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:84)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:252)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:94)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48)
at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48)
at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48)
at org.junit.rules.RunRules.evaluate(RunRules.java:20)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:191)
at org.junit.runners.Suite.runChild(Suite.java:128)
at org.junit.runners.Suite.runChild(Suite.java:27)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at org.junit.runner.JUnitCore.run(JUnitCore.java:115)
at org.junit.runner.JUnitCore.runMain(JUnitCore.java:77)
at org.junit.runner.JUnitCore.main(JUnitCore.java:36)
at org.apache.fineract.cn.dev.DemoServer.main(DemoServer.java:30)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:87)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:50)
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:58)

Re: [Discussion] Fineract CN SMS & Email Notifications Project

Posted by Ebenezer Graham <eg...@alustudent.com>.
Thanks for the insights into the email connection timeout error.

This is the correct log for the Service Exception:
https://pastebin.com/WsQLPmwf  <https://pastebin.com/WsQLPmwf>. My best
guess is that the identity service did not create the application request
when I called it. I wanted to find out how rhythm handles that aspect but
realized that rhythm checks and requests for permission before sending a
beat. But all of this is after initialization of the demo server. (So I was
actually wondering how it registers the permission) I created a request
helper method in the demo-server to help me request permission for the
customer service however, I believe this is not working as it should.
<https://pastebin.com/WsQLPmwf>


Also, I run the demo server on a cloud VM. I would love to connect my
IntelliJ IDE to the build. How should I approach this?


*At your service,*

*Ebenezer Graham*

*BSc (Hons) Computing*


[image: EmailSignature.png]

African Leadership University,

Power Mill Road, Pamplemousses,

Mauritius.


*skype*:
ebenezer.graham
GitHub <https://github.com/ebenezergraham> | LinkedIn
<https://www.linkedin.com/in/ebenezer-graham/> | Twitter
<https://twitter.com/pactmart> | Facebook
<https://www.facebook.com/pactmart>
www.pactmart.com | Freelancing made easy.


*“Talk is cheap, show me the code.” *- *Linus Torvalds*




On Sun, 7 Oct 2018 at 21:40, Myrle Krantz <my...@apache.org> wrote:

> Hey Ebenezer,
>
> Here are the 5 lines you put into pastebin:
>
> 12:28:48.386 [DefaultMessageListenerContainer-1] DEBUG
> notification-logger - customerActivatedEvent has been invoked
> 12:28:48.566 [DefaultMessageListenerContainer-1] DEBUG
> notification-logger - sendSMS invoked
> 12:30:55.867 [DefaultMessageListenerContainer-1] DEBUG
> notification-logger - Caused
> by:com.sun.mail.util.MailConnectException: Couldn't connect to host,
> port: smtp.gmail.com, 587; timeout -1;
>   nested exception is:
>     java.net.ConnectException: Connection timed out (Connection timed out)
>
> Based on those it looks like sms was successful, and then mail sending
> failed.  But with so little context I can only make wild guesses at
> the reason.  However I did recently check something in which could
> help you debug the problem yourself.  Pull the latest from demo-server
> and service-starter.  Then start demo-server with the parameter
> runInDebug set to true (-Ddemoserver.runInDebug=true).  Once
> demoServer is started, you can use your development environment to
> connect to the running service.  I'm not sure whether you are using
> IntelliJ or Eclipse, the process will be different depending which one
> you're using.
>
> Once your dev environment is connected to the process you can set
> break points and try to debug what's going on.  In particular, you can
> examine that exception for more information, and figure out where in
> the call stack it is coming from.
>
> I doubt this has anything to do with the Fineract CN security though.
> That shouldn't effect calls outside of Fineract CN.
>
> Best Regards,
> Myrle
>
> On Mon, Aug 27, 2018 at 6:03 PM Ebenezer Graham
> <eg...@alustudent.com> wrote:
> >
> > Hi all,
> >
> > I am having a connection issue with the java mail.  https://pastebin.com
> > /f8UAkvsa
> >
> > I can send emails when I run it from the component test but the
> connection
> > times out when the service is started by the demo-server. The SMS service
> > works fine and only the email service times out.
> >
> > Does anyone have ideas on how to solve this? I have tried a lot of
> > solutions on the web but I believe that this timeout is caused by
> security
> > constraints in Fineract CN
> >
> > *At your service,*
> >
> > *Ebenezer Graham*
> >
> > *BSc (Hons) Computing*
> >
> >
> > [image: EmailSignature.png]
> >
> > African Leadership University,
> >
> > Power Mill Road, Pamplemousses,
> >
> > Mauritius.
> >
> >
> >
> > *skype*:
> > ebenezer.graham
> > GitHub <https://github.com/ebenezergraham> | LinkedIn
> > <https://www.linkedin.com/in/ebenezer-graham/> | Twitter
> > <https://twitter.com/pactmart> | Facebook
> > <https://www.facebook.com/pactmart>
> > www.pactmart.com | Freelancing made easy.
> >
> >
> > *“Talk is cheap, show me the code.” *- *Linus Torvalds*
> >
> >
> >
> > On 23 August 2018 at 18:05, Ebenezer Graham <eg...@alustudent.com>
> > wrote:
> >
> > > Hi all,
> > >
> > > @Markus: The ActiveMQ configuration worked :). I am now getting one
> > > invocation. Thanks for the support,
> > >
> > > However, the entity creation is still not working but I think Myrle's
> > > feedback on my PR might do the trick.
> > >
> > > @Myrle: I have updated the private cwiki page with the credentials,
> > > thanks. Also, I have incorporated most of the feedback shared on the
> PRs
> > > and added a few comments.
> > > For the Domain objects, I have created tests for each of them. I will
> add
> > > more rigorous tests to it after making significant progress with the
> > > web-app interface
> > > and the connection timeout problem when the system is up. More about
> the
> > > issue below
> > > The issue has to do with service timeouts.
> https://pastebin.com/f8UAkvsa
> > > *N*
> > > * B: *the email and SMS services are correctly configured and do send
> out
> > > emails and SMS
> > > in the component test. However, when I make an actual build the mail
> > > connection times out even though it
> > > has been invoked
> > >
> > > @Awasum like you suggested, I have changed the JavaMail version to
> 1.4.1
> > > RELEASE and it works fine. Thanks
> > > I have created values in the ext.versions for the Twilio API and
> > > JavaMail in the shared.gradle
> > >
> > > My best guess is that there is something interrupting or inhibiting the
> > > connection when the entire system is
> > > up and running.
> > >
> > > Looking forward to your feedback.
> > >
> > > On 22 August 2018 at 16:03, Markus Geiss <ma...@kuelap.io>
> wrote:
> > >
> > >> Hey Ebenezer,
> > >>
> > >> hope this finds you well. (;
> > >>
> > >> looking at the two stack traces you've provided here is my take on it.
> > >>
> > >> The error while storing configuration is caused by a field in the
> database
> > >> 'sender_number' being declared as not null, but no data is provided.
> In
> > >> the
> > >> create method of SMSConfiguration you are not handling the sender
> number
> > >> at
> > >> all. I would recommend to either use a builder pattern or just use
> plain
> > >> getter/setter to create the instance.
> > >>
> > >> With regards to receiving multiple (3) events, this is caused by the
> way
> > >> acitvemq is configured in your service. The default
> > >> for activemq.concurrency is 3-10, if you set this to 1-1 it will only
> > >> listen with 1 concurrent thread.
> > >>
> > >> Hope this helps.
> > >>
> > >> Cheers
> > >>
> > >> Markus
> > >>
> > >>
> > >>
> > >> On Wed, Aug 22, 2018 at 1:40 PM Ebenezer Graham <
> egraham15@alustudent.com
> > >> >
> > >> wrote:
> > >>
> > >> > Thanks myrle,
> > >> >
> > >> > I have already created a demo email account called
> > >> > fineractcnnotificationdemo@gmail.com and I created it for the sole
> > >> purpose
> > >> > of testing emails for this service and for other contributors to
> use.
> > >> > Please advise me on this approach.
> > >> >
> > >> > Also, the password for ebenezergraham69@gmail.com and
> akyencorp@gmail
> > >> are
> > >> > no longer valid. I created app passwords and so I have already
> deleted
> > >> > those app passwords for my live account and are no longer valid.
> > >> >
> > >> > *Error:*
> > >> > In an attempt to store configurations from the repository I get this
> > >> error:
> > >> > https://pastebin.com/WqvRwXvB
> > >> >
> > >> > Please check: shouldCreateSMSConfigurationEntity()
> > >> > https://github.com/ebenezergraham/fineract-cn-notifications/
> > >> > blob/develop/component-test/src/main/java/org/apache/
> > >> > fineract/cn/notification/TestSMSService.java
> > >> >
> > >> > I am able to retrieve stored configurations but I am unable to
> create a
> > >> > configuration and store. Same issue for email repository
> > >> >
> > >> > Second Issue: https://pastebin.com/LKz7HcGy
> > >> > I have managed to authenticate with identity and getting customer
> > >> object,
> > >> > however, when I trigger an invent from the fims web app, I get 3
> > >> > invocations from the ActiveMQ. How can I resolve this issue? Are my
> > >> > assumptions correct to begin with?
> > >> >
> > >> >
> > >> > *At your service,*
> > >> >
> > >> > *Ebenezer Graham*
> > >> >
> > >> > *BSc (Hons) Computing*
> > >> >
> > >> >
> > >> > [image: EmailSignature.png]
> > >> >
> > >> > African Leadership University,
> > >> >
> > >> > Power Mill Road, Pamplemousses,
> > >> >
> > >> > Mauritius.
> > >> >
> > >> >
> > >> >
> > >> > *skype*:
> > >> > ebenezer.graham
> > >> > GitHub <https://github.com/ebenezergraham> | LinkedIn
> > >> > <https://www.linkedin.com/in/ebenezer-graham/> | Twitter
> > >> > <https://twitter.com/pactmart> | Facebook
> > >> > <https://www.facebook.com/pactmart>
> > >> > www.pactmart.com | Freelancing made easy.
> > >> >
> > >> >
> > >> > *“Talk is cheap, show me the code.” *- *Linus Torvalds*
> > >> >
> > >> >
> > >> >
> > >> > On 22 August 2018 at 15:10, Ebenezer Graham <
> egraham15@alustudent.com>
> > >> > wrote:
> > >> >
> > >> > > Thanks myrle,
> > >> > >
> > >> > > I have already created a demo email account called
> > >> > > fineractcnnotificationdemo@gmail.com and I created it for the
> sole
> > >> > > purpose of testing emails for this service and for other
> contributors
> > >> > > to use. Please advise me on this approach.
> > >> > >
> > >> > > Also, the password for ebenezergraham69@gmail.com and
> akyencorp@gmail
> > >> > are
> > >> > > not the real passwords. I created app passwords and so I have
> already
> > >> > > deleted those app passwords for my live account and are no longer
> > >> valid.
> > >> > >
> > >> > > *Error:*
> > >> > > In an attempt to store configurations from the repository I get
> this
> > >> > error:
> > >> > >
> > >> > > Please check: shouldCreateSMSConfigurationEntity()
> > >> > >
> > >> > https://github.com/ebenezergraham/fineract-cn-notifications/
> > >> blob/develop/
> > >> > > component-test/src/main/java/org/apache/fineract/cn/
> > >> > > notification/TestSMSService.java
> > >> > >
> > >> > > I am able to retrieve stored configurations but I am unable to
> create
> > >> a
> > >> > > configuration and store. Same issue for email repository
> > >> > >
> > >> > > Second Issue: https://pastebin.com/LKz7HcGy
> > >> > > I have managed to authenticate with identity and getting customer
> > >> object,
> > >> > > however, when I trigger an invent from the fims web app, I get 3
> > >> > > invocations from the ActiveMQ. How can I resolve this issue? Are
> my
> > >> > > assumptions correct to begin with?
> > >> > >
> > >> > >
> > >> > > *At your service,*
> > >> > >
> > >> > > *Ebenezer Graham*
> > >> > >
> > >> > > *BSc (Hons) Computing*
> > >> > >
> > >> > >
> > >> > > [image: EmailSignature.png]
> > >> > >
> > >> > > African Leadership University,
> > >> > >
> > >> > > Power Mill Road, Pamplemousses,
> > >> > >
> > >> > > Mauritius.
> > >> > >
> > >> > >
> > >> > >
> > >> > > *skype*:
> > >> > > ebenezer.graham
> > >> > > GitHub <https://github.com/ebenezergraham> | LinkedIn
> > >> > > <https://www.linkedin.com/in/ebenezer-graham/> | Twitter
> > >> > > <https://twitter.com/pactmart> | Facebook
> > >> > > <https://www.facebook.com/pactmart>
> > >> > > www.pactmart.com | Freelancing made easy.
> > >> > >
> > >> > >
> > >> > > *“Talk is cheap, show me the code.” *- *Linus Torvalds*
> > >> > >
> > >> > >
> > >> > >
> > >> > > On 22 August 2018 at 14:45, Myrle Krantz <my...@apache.org>
> wrote:
> > >> > >
> > >> > >> Hey Ebenezer,
> > >> > >>
> > >> > >> I was just reviewing your PR and realized that you had included
> > >> > >> passwords in it.  They look like they might be passwords to live
> > >> > >> accounts.  I strongly suggest you remove them from your latest
> PR.
> > >> > >>
> > >> > >> I also checked and it appears you have passwords in code that has
> > >> > >> already been merged.  If this is true, I suggest you change the
> > >> > >> password on the e-mail account: ebenezergraham69@gmail.com
> > >> > >>
> > >> > >> In general, we don't change git history.  It's okay to make
> mistakes,
> > >> > >> and it's important to preserve the commit history of a project.
> > >> There
> > >> > >> are few exceptions I would make, but one of those is for
> passwords or
> > >> > >> other secrets.  But only if those passwords or other secrets
> can't
> > >> > >> easily be replaced.  I don't believe this is the case here.
> > >> > >>
> > >> > >> Beyond that, I'm working on putting together feedback on your
> code
> > >> and
> > >> > >> will post that by the end of the day.
> > >> > >>
> > >> > >> Best Regards,
> > >> > >> Myrle
> > >> > >>
> > >> > >>
> > >> > >>
> > >> > >>
> > >> > >> On Wed, Aug 22, 2018 at 9:12 AM Ebenezer Graham
> > >> > >> <eg...@alustudent.com> wrote:
> > >> > >> >
> > >> > >> > Hi Awasum,
> > >> > >> >
> > >> > >> > I have been able to resolve the authentication problem and now
> > >> able to
> > >> > >> > retrieve customers.
> > >> > >> >
> > >> > >> > I have also written a component test for the email and sms
> service.
> > >> > >> >
> > >> > >> > In an attempt to clean up my repository and squash the commits
> I
> > >> > messed
> > >> > >> up
> > >> > >> > my repo hence I have deleted it and forked a new one.
> > >> > >> >
> > >> > >> > In light of this, would like to find out if it is possible to
> force
> > >> > >> merge
> > >> > >> > them so that apache repository takes commits from mine.  This
> is
> > >> > because
> > >> > >> > the one on Apache has some unwanted files such as the sample
> > >> classes
> > >> > and
> > >> > >> > travis.yml. Please let me know if this is possible.
> > >> > >> >
> > >> > >> > Also, I have made new PRs. Please review it and provide
> feedback
> > >> > >> >
> > >> > >> > Looking forward to your response.
> > >> > >> >
> > >> > >> > *At your service,*
> > >> > >> >
> > >> > >> > *Ebenezer Graham*
> > >> > >> >
> > >> > >> > *BSc (Hons) Computing*
> > >> > >> >
> > >> > >> >
> > >> > >> > [image: EmailSignature.png]
> > >> > >> >
> > >> > >> > African Leadership University,
> > >> > >> >
> > >> > >> > Power Mill Road, Pamplemousses,
> > >> > >> >
> > >> > >> > Mauritius.
> > >> > >> >
> > >> > >> >
> > >> > >> >
> > >> > >> > *skype*:
> > >> > >> > ebenezer.graham
> > >> > >> > GitHub <https://github.com/ebenezergraham> | LinkedIn
> > >> > >> > <https://www.linkedin.com/in/ebenezer-graham/> | Twitter
> > >> > >> > <https://twitter.com/pactmart> | Facebook
> > >> > >> > <https://www.facebook.com/pactmart>
> > >> > >> > www.pactmart.com | Freelancing made easy.
> > >> > >> >
> > >> > >> >
> > >> > >> > *“Talk is cheap, show me the code.” *- *Linus Torvalds*
> > >> > >> >
> > >> > >> >
> > >> > >> >
> > >> > >> > On 9 July 2018 at 12:25, Awasum Yannick <aw...@apache.org>
> wrote:
> > >> > >> >
> > >> > >> > > Hello Graham,
> > >> > >> > >
> > >> > >> > > You need to create a user, maybe use *operator* and make
> sure the
> > >> > >> user has
> > >> > >> > > permission to access customer (READ). Then you have to
> create a
> > >> > class
> > >> > >> which
> > >> > >> > > uses this user to connect and authenticate each time with the
> > >> > identity
> > >> > >> > > service before each customer information is retrieved.
> > >> > >> > >
> > >> > >> > > This user could be defined in the yml file of your service
> and
> > >> then
> > >> > >> > > injected into the Authentication Class you create.
> > >> > >> > >
> > >> > >> > > Each event which is emitted most often has the tenant within
> the
> > >> > >> message.
> > >> > >> > > just get this tenant and check and set the
> *TenantContextHolder
> > >> *if
> > >> > >> not
> > >> > >> > > already set just before you authenticate. Immediately after
> > >> > >> authentication,
> > >> > >> > > Set the *UserContextHolder* too
> > >> > >> > >
> > >> > >> > > Another point is to remember to trim or remove the quotes
> from
> > >> the
> > >> > >> customer
> > >> > >> > > identifier before trying to get more contact details about
> that
> > >> > >> customer:
> > >> > >> > > {String}.replaceAll("^\"|\"$", "")
> > >> > >> > >
> > >> > >> > > I hope this helps
> > >> > >> > >
> > >> > >> > > Thanks.
> > >> > >> > > Awasum Yannick
> > >> > >> > >
> > >> > >> > > On Tue, Jul 3, 2018 at 11:18 PM Ebenezer Graham <
> > >> > >> egraham15@alustudent.com>
> > >> > >> > > wrote:
> > >> > >> > >
> > >> > >> > > > Hello there,
> > >> > >> > > >
> > >> > >> > > > I would like to retrieve a customer after it has been
> created,
> > >> or
> > >> > >> > > activated
> > >> > >> > > > etc.
> > >> > >> > > >
> > >> > >> > > > I have coded the logic to send the SMS and email after
> getting
> > >> the
> > >> > >> > > contact
> > >> > >> > > > details, however, I have to get the customer to get the
> contact
> > >> > >> details.
> > >> > >> > > >
> > >> > >> > > > This is the error I get during my call:
> > >> > >> https://pastebin.com/zrebwE8v
> > >> > >> > > >
> > >> > >> > > > I would like to get clarifications on how to set the
> tenant and
> > >> > >> correctly
> > >> > >> > > > make authentication during a rest call.
> > >> > >> > > >
> > >> > >> > > > I would also like to get a better understanding of how to
> use
> > >> the
> > >> > >> Anubis,
> > >> > >> > > > test and identity microservice in this case
> > >> > >> > > >
> > >> > >> > > > *At your service,*
> > >> > >> > > >
> > >> > >> > > > *Ebenezer Graham*
> > >> > >> > > >
> > >> > >> > > > *BSc (Hons) Computing*
> > >> > >> > > >
> > >> > >> > > >
> > >> > >> > > > [image: EmailSignature.png]
> > >> > >> > > >
> > >> > >> > > > African Leadership University,
> > >> > >> > > >
> > >> > >> > > > Power Mill Road, Pamplemousses,
> > >> > >> > > >
> > >> > >> > > > Mauritius.
> > >> > >> > > >
> > >> > >> > > >
> > >> > >> > > > *skype*:
> > >> > >> > > > ebenezer.graham
> > >> > >> > > > GitHub <https://github.com/ebenezergraham> | LinkedIn
> > >> > >> > > > <https://www.linkedin.com/in/ebenezer-graham/> | Twitter
> > >> > >> > > > <https://twitter.com/pactmart> | Facebook
> > >> > >> > > > <https://www.facebook.com/pactmart>
> > >> > >> > > > www.pactmart.com | Freelancing made easy.
> > >> > >> > > >
> > >> > >> > > >
> > >> > >> > > > *“Talk is cheap, show me the code.” *- *Linus Torvalds*
> > >> > >> > > >
> > >> > >> > > >
> > >> > >> > > >
> > >> > >> > > > On 19 May 2018 at 00:41, Ebenezer Graham <
> > >> > egraham15@alustudent.com>
> > >> > >> > > wrote:
> > >> > >> > > >
> > >> > >> > > > > Hi everyone,
> > >> > >> > > > >
> > >> > >> > > > > I am Ebenezer a student from the African Leadership
> > >> University
> > >> > >> and I
> > >> > >> > > will
> > >> > >> > > > > be working on this project under the mentorship of Isaac
> > >> Kamga.
> > >> > >> > > > >
> > >> > >> > > > > The idea is to use this thread to discuss the decisions
> being
> > >> > >> made on
> > >> > >> > > > this
> > >> > >> > > > > project so that the community has visibility on what's
> > >> happening
> > >> > >> and
> > >> > >> > > most
> > >> > >> > > > > importantly give constructive feedback.
> > >> > >> > > > >
> > >> > >> > > > > *EventListeners:*
> > >> > >> > > > > This is the Doc
> > >> > >> > > > > <
> > >> > >> > > >
> https://docs.google.com/document/d/1kme5qrxOrO0WGUEvNgzv5XVk
> > >> gWtpg
> > >> > >> > > 0lbX-CrBH4js7o/edit?usp=sharing
> > >> > >> > > > >
> > >> > >> > > > > containing the shortlisted events which I believe qualify
> > >> for an
> > >> > >> Email
> > >> > >> > > or
> > >> > >> > > > > SMS notification. Please review and comment on the doc
> > >> > suggesting
> > >> > >> any
> > >> > >> > > > > addition or deletion or related feedback.
> > >> > >> > > > >
> > >> > >> > > > > *UI for the service:*
> > >> > >> > > > > This is a link <
> https://wireframe.cc/pro/pp/5fb6b2e61167290>
> > >> to
> > >> > >> the
> > >> > >> > > > > wireframes for the UI of the service. Please give
> pointers on
> > >> > what
> > >> > >> > > could
> > >> > >> > > > be
> > >> > >> > > > > added and what should be taken out.
> > >> > >> > > > >
> > >> > >> > > > >
> > >> > >> > > > > *At your service*
> > >> > >> > > > > *,*
> > >> > >> > > > >
> > >> > >> > > > > *Ebenezer Graham*
> > >> > >> > > > >
> > >> > >> > > > > *BSc (Hons) Computing*
> > >> > >> > > > >
> > >> > >> > > > >
> > >> > >> > > > > [image: EmailSignature.png]
> > >> > >> > > > >
> > >> > >> > > > > Beau Plan Business Park | West Building
> > >> > >> > > > >
> > >> > >> > > > > Pamplemousses |  Mauritius
> > >> > >> > > > >
> > >> > >> > > > >
> > >> > >> > > > > <http://www.pactmart.com/>
> > >> > >> > > > > <http://www.pactmart.com/>
> > >> > >> > > > > www.pactmart.com | Freelancing made easy.
> > >> > >> > > > > GitHub <https://github.com/ebenezergraham> | LinkedIn
> > >> > >> > > > > <https://www.linkedin.com/in/ebenezer-graham/> | Twitter
> > >> > >> > > > > <https://twitter.com/pactmart> | Facebook
> > >> > >> > > > > <https://www.facebook.com/pactmart> | Website
> > >> > >> > > > > <http://ebenezergraham.github.io/>
> > >> > >> > > > >
> > >> > >> > > > > *skype*:
> > >> > >> > > > > ebenezer.graham
> > >> > >> > > > > | *Phone*:
> > >> > >> > > > > +230 5840 9206 <+230%205840%209206>
> > >> > >> > > > >
> > >> > >> > > > >
> > >> > >> > > > > *“Practice isn’t the thing you do once you’re good. It’s
> the
> > >> > >> thing you
> > >> > >> > > do
> > >> > >> > > > > that makes you good.”*
> > >> > >> > > > > -*Malcolm Gladwell*
> > >> > >> > > > >
> > >> > >> > > > >
> > >> > >> > > > >
> > >> > >> > > >
> > >> > >> > >
> > >> > >>
> > >> > >
> > >> > >
> > >> >
> > >>
> > >
> > >
>

Re: [Discussion] Fineract CN SMS & Email Notifications Project

Posted by Myrle Krantz <my...@apache.org>.
Hey Ebenezer,

Here are the 5 lines you put into pastebin:

12:28:48.386 [DefaultMessageListenerContainer-1] DEBUG
notification-logger - customerActivatedEvent has been invoked
12:28:48.566 [DefaultMessageListenerContainer-1] DEBUG
notification-logger - sendSMS invoked
12:30:55.867 [DefaultMessageListenerContainer-1] DEBUG
notification-logger - Caused
by:com.sun.mail.util.MailConnectException: Couldn't connect to host,
port: smtp.gmail.com, 587; timeout -1;
  nested exception is:
    java.net.ConnectException: Connection timed out (Connection timed out)

Based on those it looks like sms was successful, and then mail sending
failed.  But with so little context I can only make wild guesses at
the reason.  However I did recently check something in which could
help you debug the problem yourself.  Pull the latest from demo-server
and service-starter.  Then start demo-server with the parameter
runInDebug set to true (-Ddemoserver.runInDebug=true).  Once
demoServer is started, you can use your development environment to
connect to the running service.  I'm not sure whether you are using
IntelliJ or Eclipse, the process will be different depending which one
you're using.

Once your dev environment is connected to the process you can set
break points and try to debug what's going on.  In particular, you can
examine that exception for more information, and figure out where in
the call stack it is coming from.

I doubt this has anything to do with the Fineract CN security though.
That shouldn't effect calls outside of Fineract CN.

Best Regards,
Myrle

On Mon, Aug 27, 2018 at 6:03 PM Ebenezer Graham
<eg...@alustudent.com> wrote:
>
> Hi all,
>
> I am having a connection issue with the java mail.  https://pastebin.com
> /f8UAkvsa
>
> I can send emails when I run it from the component test but the connection
> times out when the service is started by the demo-server. The SMS service
> works fine and only the email service times out.
>
> Does anyone have ideas on how to solve this? I have tried a lot of
> solutions on the web but I believe that this timeout is caused by security
> constraints in Fineract CN
>
> *At your service,*
>
> *Ebenezer Graham*
>
> *BSc (Hons) Computing*
>
>
> [image: EmailSignature.png]
>
> African Leadership University,
>
> Power Mill Road, Pamplemousses,
>
> Mauritius.
>
>
>
> *skype*:
> ebenezer.graham
> GitHub <https://github.com/ebenezergraham> | LinkedIn
> <https://www.linkedin.com/in/ebenezer-graham/> | Twitter
> <https://twitter.com/pactmart> | Facebook
> <https://www.facebook.com/pactmart>
> www.pactmart.com | Freelancing made easy.
>
>
> *“Talk is cheap, show me the code.” *- *Linus Torvalds*
>
>
>
> On 23 August 2018 at 18:05, Ebenezer Graham <eg...@alustudent.com>
> wrote:
>
> > Hi all,
> >
> > @Markus: The ActiveMQ configuration worked :). I am now getting one
> > invocation. Thanks for the support,
> >
> > However, the entity creation is still not working but I think Myrle's
> > feedback on my PR might do the trick.
> >
> > @Myrle: I have updated the private cwiki page with the credentials,
> > thanks. Also, I have incorporated most of the feedback shared on the PRs
> > and added a few comments.
> > For the Domain objects, I have created tests for each of them. I will add
> > more rigorous tests to it after making significant progress with the
> > web-app interface
> > and the connection timeout problem when the system is up. More about the
> > issue below
> > The issue has to do with service timeouts. https://pastebin.com/f8UAkvsa
> > *N*
> > * B: *the email and SMS services are correctly configured and do send out
> > emails and SMS
> > in the component test. However, when I make an actual build the mail
> > connection times out even though it
> > has been invoked
> >
> > @Awasum like you suggested, I have changed the JavaMail version to 1.4.1
> > RELEASE and it works fine. Thanks
> > I have created values in the ext.versions for the Twilio API and
> > JavaMail in the shared.gradle
> >
> > My best guess is that there is something interrupting or inhibiting the
> > connection when the entire system is
> > up and running.
> >
> > Looking forward to your feedback.
> >
> > On 22 August 2018 at 16:03, Markus Geiss <ma...@kuelap.io> wrote:
> >
> >> Hey Ebenezer,
> >>
> >> hope this finds you well. (;
> >>
> >> looking at the two stack traces you've provided here is my take on it.
> >>
> >> The error while storing configuration is caused by a field in the database
> >> 'sender_number' being declared as not null, but no data is provided. In
> >> the
> >> create method of SMSConfiguration you are not handling the sender number
> >> at
> >> all. I would recommend to either use a builder pattern or just use plain
> >> getter/setter to create the instance.
> >>
> >> With regards to receiving multiple (3) events, this is caused by the way
> >> acitvemq is configured in your service. The default
> >> for activemq.concurrency is 3-10, if you set this to 1-1 it will only
> >> listen with 1 concurrent thread.
> >>
> >> Hope this helps.
> >>
> >> Cheers
> >>
> >> Markus
> >>
> >>
> >>
> >> On Wed, Aug 22, 2018 at 1:40 PM Ebenezer Graham <egraham15@alustudent.com
> >> >
> >> wrote:
> >>
> >> > Thanks myrle,
> >> >
> >> > I have already created a demo email account called
> >> > fineractcnnotificationdemo@gmail.com and I created it for the sole
> >> purpose
> >> > of testing emails for this service and for other contributors to use.
> >> > Please advise me on this approach.
> >> >
> >> > Also, the password for ebenezergraham69@gmail.com and akyencorp@gmail
> >> are
> >> > no longer valid. I created app passwords and so I have already deleted
> >> > those app passwords for my live account and are no longer valid.
> >> >
> >> > *Error:*
> >> > In an attempt to store configurations from the repository I get this
> >> error:
> >> > https://pastebin.com/WqvRwXvB
> >> >
> >> > Please check: shouldCreateSMSConfigurationEntity()
> >> > https://github.com/ebenezergraham/fineract-cn-notifications/
> >> > blob/develop/component-test/src/main/java/org/apache/
> >> > fineract/cn/notification/TestSMSService.java
> >> >
> >> > I am able to retrieve stored configurations but I am unable to create a
> >> > configuration and store. Same issue for email repository
> >> >
> >> > Second Issue: https://pastebin.com/LKz7HcGy
> >> > I have managed to authenticate with identity and getting customer
> >> object,
> >> > however, when I trigger an invent from the fims web app, I get 3
> >> > invocations from the ActiveMQ. How can I resolve this issue? Are my
> >> > assumptions correct to begin with?
> >> >
> >> >
> >> > *At your service,*
> >> >
> >> > *Ebenezer Graham*
> >> >
> >> > *BSc (Hons) Computing*
> >> >
> >> >
> >> > [image: EmailSignature.png]
> >> >
> >> > African Leadership University,
> >> >
> >> > Power Mill Road, Pamplemousses,
> >> >
> >> > Mauritius.
> >> >
> >> >
> >> >
> >> > *skype*:
> >> > ebenezer.graham
> >> > GitHub <https://github.com/ebenezergraham> | LinkedIn
> >> > <https://www.linkedin.com/in/ebenezer-graham/> | Twitter
> >> > <https://twitter.com/pactmart> | Facebook
> >> > <https://www.facebook.com/pactmart>
> >> > www.pactmart.com | Freelancing made easy.
> >> >
> >> >
> >> > *“Talk is cheap, show me the code.” *- *Linus Torvalds*
> >> >
> >> >
> >> >
> >> > On 22 August 2018 at 15:10, Ebenezer Graham <eg...@alustudent.com>
> >> > wrote:
> >> >
> >> > > Thanks myrle,
> >> > >
> >> > > I have already created a demo email account called
> >> > > fineractcnnotificationdemo@gmail.com and I created it for the sole
> >> > > purpose of testing emails for this service and for other contributors
> >> > > to use. Please advise me on this approach.
> >> > >
> >> > > Also, the password for ebenezergraham69@gmail.com and akyencorp@gmail
> >> > are
> >> > > not the real passwords. I created app passwords and so I have already
> >> > > deleted those app passwords for my live account and are no longer
> >> valid.
> >> > >
> >> > > *Error:*
> >> > > In an attempt to store configurations from the repository I get this
> >> > error:
> >> > >
> >> > > Please check: shouldCreateSMSConfigurationEntity()
> >> > >
> >> > https://github.com/ebenezergraham/fineract-cn-notifications/
> >> blob/develop/
> >> > > component-test/src/main/java/org/apache/fineract/cn/
> >> > > notification/TestSMSService.java
> >> > >
> >> > > I am able to retrieve stored configurations but I am unable to create
> >> a
> >> > > configuration and store. Same issue for email repository
> >> > >
> >> > > Second Issue: https://pastebin.com/LKz7HcGy
> >> > > I have managed to authenticate with identity and getting customer
> >> object,
> >> > > however, when I trigger an invent from the fims web app, I get 3
> >> > > invocations from the ActiveMQ. How can I resolve this issue? Are my
> >> > > assumptions correct to begin with?
> >> > >
> >> > >
> >> > > *At your service,*
> >> > >
> >> > > *Ebenezer Graham*
> >> > >
> >> > > *BSc (Hons) Computing*
> >> > >
> >> > >
> >> > > [image: EmailSignature.png]
> >> > >
> >> > > African Leadership University,
> >> > >
> >> > > Power Mill Road, Pamplemousses,
> >> > >
> >> > > Mauritius.
> >> > >
> >> > >
> >> > >
> >> > > *skype*:
> >> > > ebenezer.graham
> >> > > GitHub <https://github.com/ebenezergraham> | LinkedIn
> >> > > <https://www.linkedin.com/in/ebenezer-graham/> | Twitter
> >> > > <https://twitter.com/pactmart> | Facebook
> >> > > <https://www.facebook.com/pactmart>
> >> > > www.pactmart.com | Freelancing made easy.
> >> > >
> >> > >
> >> > > *“Talk is cheap, show me the code.” *- *Linus Torvalds*
> >> > >
> >> > >
> >> > >
> >> > > On 22 August 2018 at 14:45, Myrle Krantz <my...@apache.org> wrote:
> >> > >
> >> > >> Hey Ebenezer,
> >> > >>
> >> > >> I was just reviewing your PR and realized that you had included
> >> > >> passwords in it.  They look like they might be passwords to live
> >> > >> accounts.  I strongly suggest you remove them from your latest PR.
> >> > >>
> >> > >> I also checked and it appears you have passwords in code that has
> >> > >> already been merged.  If this is true, I suggest you change the
> >> > >> password on the e-mail account: ebenezergraham69@gmail.com
> >> > >>
> >> > >> In general, we don't change git history.  It's okay to make mistakes,
> >> > >> and it's important to preserve the commit history of a project.
> >> There
> >> > >> are few exceptions I would make, but one of those is for passwords or
> >> > >> other secrets.  But only if those passwords or other secrets can't
> >> > >> easily be replaced.  I don't believe this is the case here.
> >> > >>
> >> > >> Beyond that, I'm working on putting together feedback on your code
> >> and
> >> > >> will post that by the end of the day.
> >> > >>
> >> > >> Best Regards,
> >> > >> Myrle
> >> > >>
> >> > >>
> >> > >>
> >> > >>
> >> > >> On Wed, Aug 22, 2018 at 9:12 AM Ebenezer Graham
> >> > >> <eg...@alustudent.com> wrote:
> >> > >> >
> >> > >> > Hi Awasum,
> >> > >> >
> >> > >> > I have been able to resolve the authentication problem and now
> >> able to
> >> > >> > retrieve customers.
> >> > >> >
> >> > >> > I have also written a component test for the email and sms service.
> >> > >> >
> >> > >> > In an attempt to clean up my repository and squash the commits I
> >> > messed
> >> > >> up
> >> > >> > my repo hence I have deleted it and forked a new one.
> >> > >> >
> >> > >> > In light of this, would like to find out if it is possible to force
> >> > >> merge
> >> > >> > them so that apache repository takes commits from mine.  This is
> >> > because
> >> > >> > the one on Apache has some unwanted files such as the sample
> >> classes
> >> > and
> >> > >> > travis.yml. Please let me know if this is possible.
> >> > >> >
> >> > >> > Also, I have made new PRs. Please review it and provide feedback
> >> > >> >
> >> > >> > Looking forward to your response.
> >> > >> >
> >> > >> > *At your service,*
> >> > >> >
> >> > >> > *Ebenezer Graham*
> >> > >> >
> >> > >> > *BSc (Hons) Computing*
> >> > >> >
> >> > >> >
> >> > >> > [image: EmailSignature.png]
> >> > >> >
> >> > >> > African Leadership University,
> >> > >> >
> >> > >> > Power Mill Road, Pamplemousses,
> >> > >> >
> >> > >> > Mauritius.
> >> > >> >
> >> > >> >
> >> > >> >
> >> > >> > *skype*:
> >> > >> > ebenezer.graham
> >> > >> > GitHub <https://github.com/ebenezergraham> | LinkedIn
> >> > >> > <https://www.linkedin.com/in/ebenezer-graham/> | Twitter
> >> > >> > <https://twitter.com/pactmart> | Facebook
> >> > >> > <https://www.facebook.com/pactmart>
> >> > >> > www.pactmart.com | Freelancing made easy.
> >> > >> >
> >> > >> >
> >> > >> > *“Talk is cheap, show me the code.” *- *Linus Torvalds*
> >> > >> >
> >> > >> >
> >> > >> >
> >> > >> > On 9 July 2018 at 12:25, Awasum Yannick <aw...@apache.org> wrote:
> >> > >> >
> >> > >> > > Hello Graham,
> >> > >> > >
> >> > >> > > You need to create a user, maybe use *operator* and make sure the
> >> > >> user has
> >> > >> > > permission to access customer (READ). Then you have to create a
> >> > class
> >> > >> which
> >> > >> > > uses this user to connect and authenticate each time with the
> >> > identity
> >> > >> > > service before each customer information is retrieved.
> >> > >> > >
> >> > >> > > This user could be defined in the yml file of your service and
> >> then
> >> > >> > > injected into the Authentication Class you create.
> >> > >> > >
> >> > >> > > Each event which is emitted most often has the tenant within the
> >> > >> message.
> >> > >> > > just get this tenant and check and set the *TenantContextHolder
> >> *if
> >> > >> not
> >> > >> > > already set just before you authenticate. Immediately after
> >> > >> authentication,
> >> > >> > > Set the *UserContextHolder* too
> >> > >> > >
> >> > >> > > Another point is to remember to trim or remove the quotes from
> >> the
> >> > >> customer
> >> > >> > > identifier before trying to get more contact details about  that
> >> > >> customer:
> >> > >> > > {String}.replaceAll("^\"|\"$", "")
> >> > >> > >
> >> > >> > > I hope this helps
> >> > >> > >
> >> > >> > > Thanks.
> >> > >> > > Awasum Yannick
> >> > >> > >
> >> > >> > > On Tue, Jul 3, 2018 at 11:18 PM Ebenezer Graham <
> >> > >> egraham15@alustudent.com>
> >> > >> > > wrote:
> >> > >> > >
> >> > >> > > > Hello there,
> >> > >> > > >
> >> > >> > > > I would like to retrieve a customer after it has been created,
> >> or
> >> > >> > > activated
> >> > >> > > > etc.
> >> > >> > > >
> >> > >> > > > I have coded the logic to send the SMS and email after getting
> >> the
> >> > >> > > contact
> >> > >> > > > details, however, I have to get the customer to get the contact
> >> > >> details.
> >> > >> > > >
> >> > >> > > > This is the error I get during my call:
> >> > >> https://pastebin.com/zrebwE8v
> >> > >> > > >
> >> > >> > > > I would like to get clarifications on how to set the tenant and
> >> > >> correctly
> >> > >> > > > make authentication during a rest call.
> >> > >> > > >
> >> > >> > > > I would also like to get a better understanding of how to use
> >> the
> >> > >> Anubis,
> >> > >> > > > test and identity microservice in this case
> >> > >> > > >
> >> > >> > > > *At your service,*
> >> > >> > > >
> >> > >> > > > *Ebenezer Graham*
> >> > >> > > >
> >> > >> > > > *BSc (Hons) Computing*
> >> > >> > > >
> >> > >> > > >
> >> > >> > > > [image: EmailSignature.png]
> >> > >> > > >
> >> > >> > > > African Leadership University,
> >> > >> > > >
> >> > >> > > > Power Mill Road, Pamplemousses,
> >> > >> > > >
> >> > >> > > > Mauritius.
> >> > >> > > >
> >> > >> > > >
> >> > >> > > > *skype*:
> >> > >> > > > ebenezer.graham
> >> > >> > > > GitHub <https://github.com/ebenezergraham> | LinkedIn
> >> > >> > > > <https://www.linkedin.com/in/ebenezer-graham/> | Twitter
> >> > >> > > > <https://twitter.com/pactmart> | Facebook
> >> > >> > > > <https://www.facebook.com/pactmart>
> >> > >> > > > www.pactmart.com | Freelancing made easy.
> >> > >> > > >
> >> > >> > > >
> >> > >> > > > *“Talk is cheap, show me the code.” *- *Linus Torvalds*
> >> > >> > > >
> >> > >> > > >
> >> > >> > > >
> >> > >> > > > On 19 May 2018 at 00:41, Ebenezer Graham <
> >> > egraham15@alustudent.com>
> >> > >> > > wrote:
> >> > >> > > >
> >> > >> > > > > Hi everyone,
> >> > >> > > > >
> >> > >> > > > > I am Ebenezer a student from the African Leadership
> >> University
> >> > >> and I
> >> > >> > > will
> >> > >> > > > > be working on this project under the mentorship of Isaac
> >> Kamga.
> >> > >> > > > >
> >> > >> > > > > The idea is to use this thread to discuss the decisions being
> >> > >> made on
> >> > >> > > > this
> >> > >> > > > > project so that the community has visibility on what's
> >> happening
> >> > >> and
> >> > >> > > most
> >> > >> > > > > importantly give constructive feedback.
> >> > >> > > > >
> >> > >> > > > > *EventListeners:*
> >> > >> > > > > This is the Doc
> >> > >> > > > > <
> >> > >> > > > https://docs.google.com/document/d/1kme5qrxOrO0WGUEvNgzv5XVk
> >> gWtpg
> >> > >> > > 0lbX-CrBH4js7o/edit?usp=sharing
> >> > >> > > > >
> >> > >> > > > > containing the shortlisted events which I believe qualify
> >> for an
> >> > >> Email
> >> > >> > > or
> >> > >> > > > > SMS notification. Please review and comment on the doc
> >> > suggesting
> >> > >> any
> >> > >> > > > > addition or deletion or related feedback.
> >> > >> > > > >
> >> > >> > > > > *UI for the service:*
> >> > >> > > > > This is a link <https://wireframe.cc/pro/pp/5fb6b2e61167290>
> >> to
> >> > >> the
> >> > >> > > > > wireframes for the UI of the service. Please give pointers on
> >> > what
> >> > >> > > could
> >> > >> > > > be
> >> > >> > > > > added and what should be taken out.
> >> > >> > > > >
> >> > >> > > > >
> >> > >> > > > > *At your service*
> >> > >> > > > > *,*
> >> > >> > > > >
> >> > >> > > > > *Ebenezer Graham*
> >> > >> > > > >
> >> > >> > > > > *BSc (Hons) Computing*
> >> > >> > > > >
> >> > >> > > > >
> >> > >> > > > > [image: EmailSignature.png]
> >> > >> > > > >
> >> > >> > > > > Beau Plan Business Park | West Building
> >> > >> > > > >
> >> > >> > > > > Pamplemousses |  Mauritius
> >> > >> > > > >
> >> > >> > > > >
> >> > >> > > > > <http://www.pactmart.com/>
> >> > >> > > > > <http://www.pactmart.com/>
> >> > >> > > > > www.pactmart.com | Freelancing made easy.
> >> > >> > > > > GitHub <https://github.com/ebenezergraham> | LinkedIn
> >> > >> > > > > <https://www.linkedin.com/in/ebenezer-graham/> | Twitter
> >> > >> > > > > <https://twitter.com/pactmart> | Facebook
> >> > >> > > > > <https://www.facebook.com/pactmart> | Website
> >> > >> > > > > <http://ebenezergraham.github.io/>
> >> > >> > > > >
> >> > >> > > > > *skype*:
> >> > >> > > > > ebenezer.graham
> >> > >> > > > > | *Phone*:
> >> > >> > > > > +230 5840 9206 <+230%205840%209206>
> >> > >> > > > >
> >> > >> > > > >
> >> > >> > > > > *“Practice isn’t the thing you do once you’re good. It’s the
> >> > >> thing you
> >> > >> > > do
> >> > >> > > > > that makes you good.”*
> >> > >> > > > > -*Malcolm Gladwell*
> >> > >> > > > >
> >> > >> > > > >
> >> > >> > > > >
> >> > >> > > >
> >> > >> > >
> >> > >>
> >> > >
> >> > >
> >> >
> >>
> >
> >

Re: [Discussion] Fineract CN SMS & Email Notifications Project

Posted by Isaac Kamga <is...@mifos.org>.
Hi Graham,

Thanks for your feedback.

Please reach out to me so we have a call on how to fix this.

Cheers,
Isaac Kamga

On Fri, Sep 7, 2018 at 7:07 PM Ebenezer Graham <eg...@alustudent.com>
wrote:

> Hello Isaac,
>
> Yes, you are right. Looking at this approach, there is a lot of room for
> improvement. This was when I was wrapping my head around permissions and
> this is one of the section which will be refactored in subsequent PRs.
>
> Myrle suggested the approach used by rhythm and I will be using that
> approach when refactoring the code. Its much secured, simpler and
> efficient.
>
> Also, I have tested my build and everything looks good here.
>
> *At your service,*
>
> *Ebenezer Graham*
>
> *BSc (Hons) Computing*
>
>
> [image: EmailSignature.png]
>
> African Leadership University,
>
> Power Mill Road, Pamplemousses,
>
> Mauritius.
>
>
> ​
> *skype*:
> ​ebenezer.graham
> GitHub <https://github.com/ebenezergraham> | LinkedIn
> <https://www.linkedin.com/in/ebenezer-graham/> | Twitter
> <https://twitter.com/pactmart> | Facebook
> <https://www.facebook.com/pactmart>
> www.pactmart.com | Freelancing made easy.
>
>
> *“Talk is cheap, show me the code.” *- *Linus Torvalds*
>
>
>
> On 7 September 2018 at 19:46, Isaac Kamga <is...@mifos.org> wrote:
>
> > Hello Graham,
> >
> > I encounter this error <https://pastebin.com/VHA0mh5p> when testing your
> > latest PR to the Notifications service.
> >
> > I think it comes from you creating a new Notifications admin user with
> > separate privileges. Don't you think it'll better to grant the already
> > existing admin ( operator ) privileges to access the customer service and
> > use it rather than creating a new one ?
> >
> > I hope this helps.
> >
> > Cheers,
> > Isaac Kamga.
> >
> > On Sun, Sep 2, 2018 at 10:08 AM Ebenezer Graham <
> egraham15@alustudent.com>
> > wrote:
> >
> > > Hi Yannick,
> > >
> > > I have tried the approach suggested above, however, I am getting the
> same
> > > results.
> > >
> > > Also, I have resolved the conflicts in the apache/fineract-cn-
> > notification
> > > PR
> > >
> > > *At your service,*
> > >
> > > *Ebenezer Graham*
> > >
> > > *BSc (Hons) Computing*
> > >
> > >
> > > [image: EmailSignature.png]
> > >
> > > African Leadership University,
> > >
> > > Power Mill Road, Pamplemousses,
> > >
> > > Mauritius.
> > >
> > >
> > > ​
> > > *skype*:
> > > ​ebenezer.graham
> > > GitHub <https://github.com/ebenezergraham> | LinkedIn
> > > <https://www.linkedin.com/in/ebenezer-graham/> | Twitter
> > > <https://twitter.com/pactmart> | Facebook
> > > <https://www.facebook.com/pactmart>
> > > www.pactmart.com | Freelancing made easy.
> > >
> > >
> > > *“Talk is cheap, show me the code.” *- *Linus Torvalds*
> > >
> > >
> > >
> > > On 29 August 2018 at 22:19, Awasum Yannick <aw...@apache.org> wrote:
> > >
> > > > Hey Graham,
> > > >
> > > > Are you using Gmail? If so then you might want to give your app
> > (unsecure
> > > > in the eyes of Gmail) permission to send out mails from the email
> > account
> > > > you are using.
> > > >
> > > > Check these:
> https://support.google.com/accounts/answer/6010255?hl=en
> > > > https://myaccount.google.com/lesssecureapps
> > > >
> > > > So allowing less secure apps to send mail by clicking the toggle
> button
> > > > might solve your problem.
> > > > Try that lets see. If there are still problems, please keep them
> > coming.
> > > >
> > > > Thanks.
> > > > Awasum
> > > >
> > > > On Mon, Aug 27, 2018 at 5:03 PM Ebenezer Graham <
> > > egraham15@alustudent.com>
> > > > wrote:
> > > >
> > > > > Hi all,
> > > > >
> > > > > I am having a connection issue with the java mail.
> > > https://pastebin.com
> > > > > /f8UAkvsa
> > > > >
> > > > > I can send emails when I run it from the component test but the
> > > > connection
> > > > > times out when the service is started by the demo-server. The SMS
> > > service
> > > > > works fine and only the email service times out.
> > > > >
> > > > > Does anyone have ideas on how to solve this? I have tried a lot of
> > > > > solutions on the web but I believe that this timeout is caused by
> > > > security
> > > > > constraints in Fineract CN
> > > > >
> > > > > *At your service,*
> > > > >
> > > > > *Ebenezer Graham*
> > > > >
> > > > > *BSc (Hons) Computing*
> > > > >
> > > > >
> > > > > [image: EmailSignature.png]
> > > > >
> > > > > African Leadership University,
> > > > >
> > > > > Power Mill Road, Pamplemousses,
> > > > >
> > > > > Mauritius.
> > > > >
> > > > >
> > > > > ​
> > > > > *skype*:
> > > > > ​ebenezer.graham
> > > > > GitHub <https://github.com/ebenezergraham> | LinkedIn
> > > > > <https://www.linkedin.com/in/ebenezer-graham/> | Twitter
> > > > > <https://twitter.com/pactmart> | Facebook
> > > > > <https://www.facebook.com/pactmart>
> > > > > www.pactmart.com | Freelancing made easy.
> > > > >
> > > > >
> > > > > *“Talk is cheap, show me the code.” *- *Linus Torvalds*
> > > > >
> > > > >
> > > > >
> > > > > On 23 August 2018 at 18:05, Ebenezer Graham <
> > egraham15@alustudent.com>
> > > > > wrote:
> > > > >
> > > > > > Hi all,
> > > > > >
> > > > > > @Markus: The ActiveMQ configuration worked :). I am now getting
> one
> > > > > > invocation. Thanks for the support,
> > > > > >
> > > > > > However, the entity creation is still not working but I think
> > Myrle's
> > > > > > feedback on my PR might do the trick.
> > > > > >
> > > > > > @Myrle: I have updated the private cwiki page with the
> credentials,
> > > > > > thanks. Also, I have incorporated most of the feedback shared on
> > the
> > > > PRs
> > > > > > and added a few comments.
> > > > > > For the Domain objects, I have created tests for each of them. I
> > will
> > > > add
> > > > > > more rigorous tests to it after making significant progress with
> > the
> > > > > > web-app interface
> > > > > > and the connection timeout problem when the system is up. More
> > about
> > > > the
> > > > > > issue below
> > > > > > The issue has to do with service timeouts.
> > > > https://pastebin.com/f8UAkvsa
> > > > > > *N*
> > > > > > * B: *the email and SMS services are correctly configured and do
> > send
> > > > out
> > > > > > emails and SMS
> > > > > > in the component test. However, when I make an actual build the
> > mail
> > > > > > connection times out even though it
> > > > > > has been invoked
> > > > > >
> > > > > > @Awasum like you suggested, I have changed the JavaMail version
> to
> > > > 1.4.1
> > > > > > RELEASE and it works fine. Thanks
> > > > > > I have created values in the ext.versions for the Twilio API and
> > > > > > JavaMail in the shared.gradle
> > > > > >
> > > > > > My best guess is that there is something interrupting or
> inhibiting
> > > the
> > > > > > connection when the entire system is
> > > > > > up and running.
> > > > > >
> > > > > > Looking forward to your feedback.
> > > > > >
> > > > > > On 22 August 2018 at 16:03, Markus Geiss <markus.geiss@kuelap.io
> >
> > > > wrote:
> > > > > >
> > > > > >> Hey Ebenezer,
> > > > > >>
> > > > > >> hope this finds you well. (;
> > > > > >>
> > > > > >> looking at the two stack traces you've provided here is my take
> on
> > > it.
> > > > > >>
> > > > > >> The error while storing configuration is caused by a field in
> the
> > > > > database
> > > > > >> 'sender_number' being declared as not null, but no data is
> > provided.
> > > > In
> > > > > >> the
> > > > > >> create method of SMSConfiguration you are not handling the
> sender
> > > > number
> > > > > >> at
> > > > > >> all. I would recommend to either use a builder pattern or just
> use
> > > > plain
> > > > > >> getter/setter to create the instance.
> > > > > >>
> > > > > >> With regards to receiving multiple (3) events, this is caused by
> > the
> > > > way
> > > > > >> acitvemq is configured in your service. The default
> > > > > >> for activemq.concurrency is 3-10, if you set this to 1-1 it will
> > > only
> > > > > >> listen with 1 concurrent thread.
> > > > > >>
> > > > > >> Hope this helps.
> > > > > >>
> > > > > >> Cheers
> > > > > >>
> > > > > >> Markus
> > > > > >>
> > > > > >>
> > > > > >>
> > > > > >> On Wed, Aug 22, 2018 at 1:40 PM Ebenezer Graham <
> > > > > egraham15@alustudent.com
> > > > > >> >
> > > > > >> wrote:
> > > > > >>
> > > > > >> > Thanks myrle,
> > > > > >> >
> > > > > >> > I have already created a demo email account called
> > > > > >> > fineractcnnotificationdemo@gmail.com and I created it for the
> > > sole
> > > > > >> purpose
> > > > > >> > of testing emails for this service and for other contributors
> to
> > > > use.
> > > > > >> > Please advise me on this approach.
> > > > > >> >
> > > > > >> > Also, the password for ebenezergraham69@gmail.com and
> > > > akyencorp@gmail
> > > > > >> are
> > > > > >> > no longer valid. I created app passwords and so I have already
> > > > deleted
> > > > > >> > those app passwords for my live account and are no longer
> valid.
> > > > > >> >
> > > > > >> > *Error:*
> > > > > >> > In an attempt to store configurations from the repository I
> get
> > > this
> > > > > >> error:
> > > > > >> > https://pastebin.com/WqvRwXvB
> > > > > >> >
> > > > > >> > Please check: shouldCreateSMSConfigurationEntity()
> > > > > >> > https://github.com/ebenezergraham/fineract-cn-notifications/
> > > > > >> > blob/develop/component-test/src/main/java/org/apache/
> > > > > >> > fineract/cn/notification/TestSMSService.java
> > > > > >> >
> > > > > >> > I am able to retrieve stored configurations but I am unable to
> > > > create
> > > > > a
> > > > > >> > configuration and store. Same issue for email repository
> > > > > >> >
> > > > > >> > Second Issue: https://pastebin.com/LKz7HcGy
> > > > > >> > I have managed to authenticate with identity and getting
> > customer
> > > > > >> object,
> > > > > >> > however, when I trigger an invent from the fims web app, I
> get 3
> > > > > >> > invocations from the ActiveMQ. How can I resolve this issue?
> Are
> > > my
> > > > > >> > assumptions correct to begin with?
> > > > > >> >
> > > > > >> >
> > > > > >> > *At your service,*
> > > > > >> >
> > > > > >> > *Ebenezer Graham*
> > > > > >> >
> > > > > >> > *BSc (Hons) Computing*
> > > > > >> >
> > > > > >> >
> > > > > >> > [image: EmailSignature.png]
> > > > > >> >
> > > > > >> > African Leadership University,
> > > > > >> >
> > > > > >> > Power Mill Road, Pamplemousses,
> > > > > >> >
> > > > > >> > Mauritius.
> > > > > >> >
> > > > > >> >
> > > > > >> >
> > > > > >> > *skype*:
> > > > > >> > ebenezer.graham
> > > > > >> > GitHub <https://github.com/ebenezergraham> | LinkedIn
> > > > > >> > <https://www.linkedin.com/in/ebenezer-graham/> | Twitter
> > > > > >> > <https://twitter.com/pactmart> | Facebook
> > > > > >> > <https://www.facebook.com/pactmart>
> > > > > >> > www.pactmart.com | Freelancing made easy.
> > > > > >> >
> > > > > >> >
> > > > > >> > *“Talk is cheap, show me the code.” *- *Linus Torvalds*
> > > > > >> >
> > > > > >> >
> > > > > >> >
> > > > > >> > On 22 August 2018 at 15:10, Ebenezer Graham <
> > > > egraham15@alustudent.com
> > > > > >
> > > > > >> > wrote:
> > > > > >> >
> > > > > >> > > Thanks myrle,
> > > > > >> > >
> > > > > >> > > I have already created a demo email account called
> > > > > >> > > fineractcnnotificationdemo@gmail.com and I created it for
> the
> > > > sole
> > > > > >> > > purpose of testing emails for this service and for other
> > > > > contributors
> > > > > >> > > to use. Please advise me on this approach.
> > > > > >> > >
> > > > > >> > > Also, the password for ebenezergraham69@gmail.com and
> > > > > akyencorp@gmail
> > > > > >> > are
> > > > > >> > > not the real passwords. I created app passwords and so I
> have
> > > > > already
> > > > > >> > > deleted those app passwords for my live account and are no
> > > longer
> > > > > >> valid.
> > > > > >> > >
> > > > > >> > > *Error:*
> > > > > >> > > In an attempt to store configurations from the repository I
> > get
> > > > this
> > > > > >> > error:
> > > > > >> > >
> > > > > >> > > Please check: shouldCreateSMSConfigurationEntity()
> > > > > >> > >
> > > > > >> > https://github.com/ebenezergraham/fineract-cn-notifications/
> > > > > >> blob/develop/
> > > > > >> > > component-test/src/main/java/org/apache/fineract/cn/
> > > > > >> > > notification/TestSMSService.java
> > > > > >> > >
> > > > > >> > > I am able to retrieve stored configurations but I am unable
> to
> > > > > create
> > > > > >> a
> > > > > >> > > configuration and store. Same issue for email repository
> > > > > >> > >
> > > > > >> > > Second Issue: https://pastebin.com/LKz7HcGy
> > > > > >> > > I have managed to authenticate with identity and getting
> > > customer
> > > > > >> object,
> > > > > >> > > however, when I trigger an invent from the fims web app, I
> > get 3
> > > > > >> > > invocations from the ActiveMQ. How can I resolve this issue?
> > Are
> > > > my
> > > > > >> > > assumptions correct to begin with?
> > > > > >> > >
> > > > > >> > >
> > > > > >> > > *At your service,*
> > > > > >> > >
> > > > > >> > > *Ebenezer Graham*
> > > > > >> > >
> > > > > >> > > *BSc (Hons) Computing*
> > > > > >> > >
> > > > > >> > >
> > > > > >> > > [image: EmailSignature.png]
> > > > > >> > >
> > > > > >> > > African Leadership University,
> > > > > >> > >
> > > > > >> > > Power Mill Road, Pamplemousses,
> > > > > >> > >
> > > > > >> > > Mauritius.
> > > > > >> > >
> > > > > >> > >
> > > > > >> > >
> > > > > >> > > *skype*:
> > > > > >> > > ebenezer.graham
> > > > > >> > > GitHub <https://github.com/ebenezergraham> | LinkedIn
> > > > > >> > > <https://www.linkedin.com/in/ebenezer-graham/> | Twitter
> > > > > >> > > <https://twitter.com/pactmart> | Facebook
> > > > > >> > > <https://www.facebook.com/pactmart>
> > > > > >> > > www.pactmart.com | Freelancing made easy.
> > > > > >> > >
> > > > > >> > >
> > > > > >> > > *“Talk is cheap, show me the code.” *- *Linus Torvalds*
> > > > > >> > >
> > > > > >> > >
> > > > > >> > >
> > > > > >> > > On 22 August 2018 at 14:45, Myrle Krantz <my...@apache.org>
> > > > wrote:
> > > > > >> > >
> > > > > >> > >> Hey Ebenezer,
> > > > > >> > >>
> > > > > >> > >> I was just reviewing your PR and realized that you had
> > included
> > > > > >> > >> passwords in it.  They look like they might be passwords to
> > > live
> > > > > >> > >> accounts.  I strongly suggest you remove them from your
> > latest
> > > > PR.
> > > > > >> > >>
> > > > > >> > >> I also checked and it appears you have passwords in code
> that
> > > has
> > > > > >> > >> already been merged.  If this is true, I suggest you change
> > the
> > > > > >> > >> password on the e-mail account: ebenezergraham69@gmail.com
> > > > > >> > >>
> > > > > >> > >> In general, we don't change git history.  It's okay to make
> > > > > mistakes,
> > > > > >> > >> and it's important to preserve the commit history of a
> > project.
> > > > > >> There
> > > > > >> > >> are few exceptions I would make, but one of those is for
> > > > passwords
> > > > > or
> > > > > >> > >> other secrets.  But only if those passwords or other
> secrets
> > > > can't
> > > > > >> > >> easily be replaced.  I don't believe this is the case here.
> > > > > >> > >>
> > > > > >> > >> Beyond that, I'm working on putting together feedback on
> your
> > > > code
> > > > > >> and
> > > > > >> > >> will post that by the end of the day.
> > > > > >> > >>
> > > > > >> > >> Best Regards,
> > > > > >> > >> Myrle
> > > > > >> > >>
> > > > > >> > >>
> > > > > >> > >>
> > > > > >> > >>
> > > > > >> > >> On Wed, Aug 22, 2018 at 9:12 AM Ebenezer Graham
> > > > > >> > >> <eg...@alustudent.com> wrote:
> > > > > >> > >> >
> > > > > >> > >> > Hi Awasum,
> > > > > >> > >> >
> > > > > >> > >> > I have been able to resolve the authentication problem
> and
> > > now
> > > > > >> able to
> > > > > >> > >> > retrieve customers.
> > > > > >> > >> >
> > > > > >> > >> > I have also written a component test for the email and
> sms
> > > > > service.
> > > > > >> > >> >
> > > > > >> > >> > In an attempt to clean up my repository and squash the
> > > commits
> > > > I
> > > > > >> > messed
> > > > > >> > >> up
> > > > > >> > >> > my repo hence I have deleted it and forked a new one.
> > > > > >> > >> >
> > > > > >> > >> > In light of this, would like to find out if it is
> possible
> > to
> > > > > force
> > > > > >> > >> merge
> > > > > >> > >> > them so that apache repository takes commits from mine.
> > This
> > > > is
> > > > > >> > because
> > > > > >> > >> > the one on Apache has some unwanted files such as the
> > sample
> > > > > >> classes
> > > > > >> > and
> > > > > >> > >> > travis.yml. Please let me know if this is possible.
> > > > > >> > >> >
> > > > > >> > >> > Also, I have made new PRs. Please review it and provide
> > > > feedback
> > > > > >> > >> >
> > > > > >> > >> > Looking forward to your response.
> > > > > >> > >> >
> > > > > >> > >> > *At your service,*
> > > > > >> > >> >
> > > > > >> > >> > *Ebenezer Graham*
> > > > > >> > >> >
> > > > > >> > >> > *BSc (Hons) Computing*
> > > > > >> > >> >
> > > > > >> > >> >
> > > > > >> > >> > [image: EmailSignature.png]
> > > > > >> > >> >
> > > > > >> > >> > African Leadership University,
> > > > > >> > >> >
> > > > > >> > >> > Power Mill Road, Pamplemousses,
> > > > > >> > >> >
> > > > > >> > >> > Mauritius.
> > > > > >> > >> >
> > > > > >> > >> >
> > > > > >> > >> >
> > > > > >> > >> > *skype*:
> > > > > >> > >> > ebenezer.graham
> > > > > >> > >> > GitHub <https://github.com/ebenezergraham> | LinkedIn
> > > > > >> > >> > <https://www.linkedin.com/in/ebenezer-graham/> | Twitter
> > > > > >> > >> > <https://twitter.com/pactmart> | Facebook
> > > > > >> > >> > <https://www.facebook.com/pactmart>
> > > > > >> > >> > www.pactmart.com | Freelancing made easy.
> > > > > >> > >> >
> > > > > >> > >> >
> > > > > >> > >> > *“Talk is cheap, show me the code.” *- *Linus Torvalds*
> > > > > >> > >> >
> > > > > >> > >> >
> > > > > >> > >> >
> > > > > >> > >> > On 9 July 2018 at 12:25, Awasum Yannick <
> awasum@apache.org
> > >
> > > > > wrote:
> > > > > >> > >> >
> > > > > >> > >> > > Hello Graham,
> > > > > >> > >> > >
> > > > > >> > >> > > You need to create a user, maybe use *operator* and
> make
> > > sure
> > > > > the
> > > > > >> > >> user has
> > > > > >> > >> > > permission to access customer (READ). Then you have to
> > > > create a
> > > > > >> > class
> > > > > >> > >> which
> > > > > >> > >> > > uses this user to connect and authenticate each time
> with
> > > the
> > > > > >> > identity
> > > > > >> > >> > > service before each customer information is retrieved.
> > > > > >> > >> > >
> > > > > >> > >> > > This user could be defined in the yml file of your
> > service
> > > > and
> > > > > >> then
> > > > > >> > >> > > injected into the Authentication Class you create.
> > > > > >> > >> > >
> > > > > >> > >> > > Each event which is emitted most often has the tenant
> > > within
> > > > > the
> > > > > >> > >> message.
> > > > > >> > >> > > just get this tenant and check and set the
> > > > *TenantContextHolder
> > > > > >> *if
> > > > > >> > >> not
> > > > > >> > >> > > already set just before you authenticate. Immediately
> > after
> > > > > >> > >> authentication,
> > > > > >> > >> > > Set the *UserContextHolder* too
> > > > > >> > >> > >
> > > > > >> > >> > > Another point is to remember to trim or remove the
> quotes
> > > > from
> > > > > >> the
> > > > > >> > >> customer
> > > > > >> > >> > > identifier before trying to get more contact details
> > about
> > > > > that
> > > > > >> > >> customer:
> > > > > >> > >> > > {String}.replaceAll("^\"|\"$", "")
> > > > > >> > >> > >
> > > > > >> > >> > > I hope this helps
> > > > > >> > >> > >
> > > > > >> > >> > > Thanks.
> > > > > >> > >> > > Awasum Yannick
> > > > > >> > >> > >
> > > > > >> > >> > > On Tue, Jul 3, 2018 at 11:18 PM Ebenezer Graham <
> > > > > >> > >> egraham15@alustudent.com>
> > > > > >> > >> > > wrote:
> > > > > >> > >> > >
> > > > > >> > >> > > > Hello there,
> > > > > >> > >> > > >
> > > > > >> > >> > > > I would like to retrieve a customer after it has been
> > > > > created,
> > > > > >> or
> > > > > >> > >> > > activated
> > > > > >> > >> > > > etc.
> > > > > >> > >> > > >
> > > > > >> > >> > > > I have coded the logic to send the SMS and email
> after
> > > > > getting
> > > > > >> the
> > > > > >> > >> > > contact
> > > > > >> > >> > > > details, however, I have to get the customer to get
> the
> > > > > contact
> > > > > >> > >> details.
> > > > > >> > >> > > >
> > > > > >> > >> > > > This is the error I get during my call:
> > > > > >> > >> https://pastebin.com/zrebwE8v
> > > > > >> > >> > > >
> > > > > >> > >> > > > I would like to get clarifications on how to set the
> > > tenant
> > > > > and
> > > > > >> > >> correctly
> > > > > >> > >> > > > make authentication during a rest call.
> > > > > >> > >> > > >
> > > > > >> > >> > > > I would also like to get a better understanding of
> how
> > to
> > > > use
> > > > > >> the
> > > > > >> > >> Anubis,
> > > > > >> > >> > > > test and identity microservice in this case
> > > > > >> > >> > > >
> > > > > >> > >> > > > *At your service,*
> > > > > >> > >> > > >
> > > > > >> > >> > > > *Ebenezer Graham*
> > > > > >> > >> > > >
> > > > > >> > >> > > > *BSc (Hons) Computing*
> > > > > >> > >> > > >
> > > > > >> > >> > > >
> > > > > >> > >> > > > [image: EmailSignature.png]
> > > > > >> > >> > > >
> > > > > >> > >> > > > African Leadership University,
> > > > > >> > >> > > >
> > > > > >> > >> > > > Power Mill Road, Pamplemousses,
> > > > > >> > >> > > >
> > > > > >> > >> > > > Mauritius.
> > > > > >> > >> > > >
> > > > > >> > >> > > >
> > > > > >> > >> > > > *skype*:
> > > > > >> > >> > > > ebenezer.graham
> > > > > >> > >> > > > GitHub <https://github.com/ebenezergraham> |
> LinkedIn
> > > > > >> > >> > > > <https://www.linkedin.com/in/ebenezer-graham/> |
> > Twitter
> > > > > >> > >> > > > <https://twitter.com/pactmart> | Facebook
> > > > > >> > >> > > > <https://www.facebook.com/pactmart>
> > > > > >> > >> > > > www.pactmart.com | Freelancing made easy.
> > > > > >> > >> > > >
> > > > > >> > >> > > >
> > > > > >> > >> > > > *“Talk is cheap, show me the code.” *- *Linus
> Torvalds*
> > > > > >> > >> > > >
> > > > > >> > >> > > >
> > > > > >> > >> > > >
> > > > > >> > >> > > > On 19 May 2018 at 00:41, Ebenezer Graham <
> > > > > >> > egraham15@alustudent.com>
> > > > > >> > >> > > wrote:
> > > > > >> > >> > > >
> > > > > >> > >> > > > > Hi everyone,
> > > > > >> > >> > > > >
> > > > > >> > >> > > > > I am Ebenezer a student from the African Leadership
> > > > > >> University
> > > > > >> > >> and I
> > > > > >> > >> > > will
> > > > > >> > >> > > > > be working on this project under the mentorship of
> > > Isaac
> > > > > >> Kamga.
> > > > > >> > >> > > > >
> > > > > >> > >> > > > > The idea is to use this thread to discuss the
> > decisions
> > > > > being
> > > > > >> > >> made on
> > > > > >> > >> > > > this
> > > > > >> > >> > > > > project so that the community has visibility on
> > what's
> > > > > >> happening
> > > > > >> > >> and
> > > > > >> > >> > > most
> > > > > >> > >> > > > > importantly give constructive feedback.
> > > > > >> > >> > > > >
> > > > > >> > >> > > > > *EventListeners:*
> > > > > >> > >> > > > > This is the Doc
> > > > > >> > >> > > > > <
> > > > > >> > >> > > > https://docs.google.com/document/d/
> > > > 1kme5qrxOrO0WGUEvNgzv5XVk
> > > > > >> gWtpg
> > > > > >> > >> > > 0lbX-CrBH4js7o/edit?usp=sharing
> > > > > >> > >> > > > >
> > > > > >> > >> > > > > containing the shortlisted events which I believe
> > > qualify
> > > > > >> for an
> > > > > >> > >> Email
> > > > > >> > >> > > or
> > > > > >> > >> > > > > SMS notification. Please review and comment on the
> > doc
> > > > > >> > suggesting
> > > > > >> > >> any
> > > > > >> > >> > > > > addition or deletion or related feedback.
> > > > > >> > >> > > > >
> > > > > >> > >> > > > > *UI for the service:*
> > > > > >> > >> > > > > This is a link <
> > > > > https://wireframe.cc/pro/pp/5fb6b2e61167290>
> > > > > >> to
> > > > > >> > >> the
> > > > > >> > >> > > > > wireframes for the UI of the service. Please give
> > > > pointers
> > > > > on
> > > > > >> > what
> > > > > >> > >> > > could
> > > > > >> > >> > > > be
> > > > > >> > >> > > > > added and what should be taken out.
> > > > > >> > >> > > > >
> > > > > >> > >> > > > >
> > > > > >> > >> > > > > *At your service*
> > > > > >> > >> > > > > *,*
> > > > > >> > >> > > > >
> > > > > >> > >> > > > > *Ebenezer Graham*
> > > > > >> > >> > > > >
> > > > > >> > >> > > > > *BSc (Hons) Computing*
> > > > > >> > >> > > > >
> > > > > >> > >> > > > >
> > > > > >> > >> > > > > [image: EmailSignature.png]
> > > > > >> > >> > > > >
> > > > > >> > >> > > > > Beau Plan Business Park | West Building
> > > > > >> > >> > > > >
> > > > > >> > >> > > > > Pamplemousses |  Mauritius
> > > > > >> > >> > > > >
> > > > > >> > >> > > > >
> > > > > >> > >> > > > > <http://www.pactmart.com/>
> > > > > >> > >> > > > > <http://www.pactmart.com/>
> > > > > >> > >> > > > > www.pactmart.com | Freelancing made easy.
> > > > > >> > >> > > > > GitHub <https://github.com/ebenezergraham> |
> > LinkedIn
> > > > > >> > >> > > > > <https://www.linkedin.com/in/ebenezer-graham/> |
> > > Twitter
> > > > > >> > >> > > > > <https://twitter.com/pactmart> | Facebook
> > > > > >> > >> > > > > <https://www.facebook.com/pactmart> | Website
> > > > > >> > >> > > > > <http://ebenezergraham.github.io/>
> > > > > >> > >> > > > >
> > > > > >> > >> > > > > *skype*:
> > > > > >> > >> > > > > ebenezer.graham
> > > > > >> > >> > > > > | *Phone*:
> > > > > >> > >> > > > > +230 5840 9206 <+230%205840%209206>
> > > > > >> > >> > > > >
> > > > > >> > >> > > > >
> > > > > >> > >> > > > > *“Practice isn’t the thing you do once you’re good.
> > > It’s
> > > > > the
> > > > > >> > >> thing you
> > > > > >> > >> > > do
> > > > > >> > >> > > > > that makes you good.”*
> > > > > >> > >> > > > > -*Malcolm Gladwell*
> > > > > >> > >> > > > >
> > > > > >> > >> > > > >
> > > > > >> > >> > > > >
> > > > > >> > >> > > >
> > > > > >> > >> > >
> > > > > >> > >>
> > > > > >> > >
> > > > > >> > >
> > > > > >> >
> > > > > >>
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>

Re: [Discussion] Fineract CN SMS & Email Notifications Project

Posted by Ebenezer Graham <eg...@alustudent.com>.
Hello Isaac,

Yes, you are right. Looking at this approach, there is a lot of room for
improvement. This was when I was wrapping my head around permissions and
this is one of the section which will be refactored in subsequent PRs.

Myrle suggested the approach used by rhythm and I will be using that
approach when refactoring the code. Its much secured, simpler and efficient.

Also, I have tested my build and everything looks good here.

*At your service,*

*Ebenezer Graham*

*BSc (Hons) Computing*


[image: EmailSignature.png]

African Leadership University,

Power Mill Road, Pamplemousses,

Mauritius.


​
*skype*:
​ebenezer.graham
GitHub <https://github.com/ebenezergraham> | LinkedIn
<https://www.linkedin.com/in/ebenezer-graham/> | Twitter
<https://twitter.com/pactmart> | Facebook
<https://www.facebook.com/pactmart>
www.pactmart.com | Freelancing made easy.


*“Talk is cheap, show me the code.” *- *Linus Torvalds*



On 7 September 2018 at 19:46, Isaac Kamga <is...@mifos.org> wrote:

> Hello Graham,
>
> I encounter this error <https://pastebin.com/VHA0mh5p> when testing your
> latest PR to the Notifications service.
>
> I think it comes from you creating a new Notifications admin user with
> separate privileges. Don't you think it'll better to grant the already
> existing admin ( operator ) privileges to access the customer service and
> use it rather than creating a new one ?
>
> I hope this helps.
>
> Cheers,
> Isaac Kamga.
>
> On Sun, Sep 2, 2018 at 10:08 AM Ebenezer Graham <eg...@alustudent.com>
> wrote:
>
> > Hi Yannick,
> >
> > I have tried the approach suggested above, however, I am getting the same
> > results.
> >
> > Also, I have resolved the conflicts in the apache/fineract-cn-
> notification
> > PR
> >
> > *At your service,*
> >
> > *Ebenezer Graham*
> >
> > *BSc (Hons) Computing*
> >
> >
> > [image: EmailSignature.png]
> >
> > African Leadership University,
> >
> > Power Mill Road, Pamplemousses,
> >
> > Mauritius.
> >
> >
> > ​
> > *skype*:
> > ​ebenezer.graham
> > GitHub <https://github.com/ebenezergraham> | LinkedIn
> > <https://www.linkedin.com/in/ebenezer-graham/> | Twitter
> > <https://twitter.com/pactmart> | Facebook
> > <https://www.facebook.com/pactmart>
> > www.pactmart.com | Freelancing made easy.
> >
> >
> > *“Talk is cheap, show me the code.” *- *Linus Torvalds*
> >
> >
> >
> > On 29 August 2018 at 22:19, Awasum Yannick <aw...@apache.org> wrote:
> >
> > > Hey Graham,
> > >
> > > Are you using Gmail? If so then you might want to give your app
> (unsecure
> > > in the eyes of Gmail) permission to send out mails from the email
> account
> > > you are using.
> > >
> > > Check these: https://support.google.com/accounts/answer/6010255?hl=en
> > > https://myaccount.google.com/lesssecureapps
> > >
> > > So allowing less secure apps to send mail by clicking the toggle button
> > > might solve your problem.
> > > Try that lets see. If there are still problems, please keep them
> coming.
> > >
> > > Thanks.
> > > Awasum
> > >
> > > On Mon, Aug 27, 2018 at 5:03 PM Ebenezer Graham <
> > egraham15@alustudent.com>
> > > wrote:
> > >
> > > > Hi all,
> > > >
> > > > I am having a connection issue with the java mail.
> > https://pastebin.com
> > > > /f8UAkvsa
> > > >
> > > > I can send emails when I run it from the component test but the
> > > connection
> > > > times out when the service is started by the demo-server. The SMS
> > service
> > > > works fine and only the email service times out.
> > > >
> > > > Does anyone have ideas on how to solve this? I have tried a lot of
> > > > solutions on the web but I believe that this timeout is caused by
> > > security
> > > > constraints in Fineract CN
> > > >
> > > > *At your service,*
> > > >
> > > > *Ebenezer Graham*
> > > >
> > > > *BSc (Hons) Computing*
> > > >
> > > >
> > > > [image: EmailSignature.png]
> > > >
> > > > African Leadership University,
> > > >
> > > > Power Mill Road, Pamplemousses,
> > > >
> > > > Mauritius.
> > > >
> > > >
> > > > ​
> > > > *skype*:
> > > > ​ebenezer.graham
> > > > GitHub <https://github.com/ebenezergraham> | LinkedIn
> > > > <https://www.linkedin.com/in/ebenezer-graham/> | Twitter
> > > > <https://twitter.com/pactmart> | Facebook
> > > > <https://www.facebook.com/pactmart>
> > > > www.pactmart.com | Freelancing made easy.
> > > >
> > > >
> > > > *“Talk is cheap, show me the code.” *- *Linus Torvalds*
> > > >
> > > >
> > > >
> > > > On 23 August 2018 at 18:05, Ebenezer Graham <
> egraham15@alustudent.com>
> > > > wrote:
> > > >
> > > > > Hi all,
> > > > >
> > > > > @Markus: The ActiveMQ configuration worked :). I am now getting one
> > > > > invocation. Thanks for the support,
> > > > >
> > > > > However, the entity creation is still not working but I think
> Myrle's
> > > > > feedback on my PR might do the trick.
> > > > >
> > > > > @Myrle: I have updated the private cwiki page with the credentials,
> > > > > thanks. Also, I have incorporated most of the feedback shared on
> the
> > > PRs
> > > > > and added a few comments.
> > > > > For the Domain objects, I have created tests for each of them. I
> will
> > > add
> > > > > more rigorous tests to it after making significant progress with
> the
> > > > > web-app interface
> > > > > and the connection timeout problem when the system is up. More
> about
> > > the
> > > > > issue below
> > > > > The issue has to do with service timeouts.
> > > https://pastebin.com/f8UAkvsa
> > > > > *N*
> > > > > * B: *the email and SMS services are correctly configured and do
> send
> > > out
> > > > > emails and SMS
> > > > > in the component test. However, when I make an actual build the
> mail
> > > > > connection times out even though it
> > > > > has been invoked
> > > > >
> > > > > @Awasum like you suggested, I have changed the JavaMail version to
> > > 1.4.1
> > > > > RELEASE and it works fine. Thanks
> > > > > I have created values in the ext.versions for the Twilio API and
> > > > > JavaMail in the shared.gradle
> > > > >
> > > > > My best guess is that there is something interrupting or inhibiting
> > the
> > > > > connection when the entire system is
> > > > > up and running.
> > > > >
> > > > > Looking forward to your feedback.
> > > > >
> > > > > On 22 August 2018 at 16:03, Markus Geiss <ma...@kuelap.io>
> > > wrote:
> > > > >
> > > > >> Hey Ebenezer,
> > > > >>
> > > > >> hope this finds you well. (;
> > > > >>
> > > > >> looking at the two stack traces you've provided here is my take on
> > it.
> > > > >>
> > > > >> The error while storing configuration is caused by a field in the
> > > > database
> > > > >> 'sender_number' being declared as not null, but no data is
> provided.
> > > In
> > > > >> the
> > > > >> create method of SMSConfiguration you are not handling the sender
> > > number
> > > > >> at
> > > > >> all. I would recommend to either use a builder pattern or just use
> > > plain
> > > > >> getter/setter to create the instance.
> > > > >>
> > > > >> With regards to receiving multiple (3) events, this is caused by
> the
> > > way
> > > > >> acitvemq is configured in your service. The default
> > > > >> for activemq.concurrency is 3-10, if you set this to 1-1 it will
> > only
> > > > >> listen with 1 concurrent thread.
> > > > >>
> > > > >> Hope this helps.
> > > > >>
> > > > >> Cheers
> > > > >>
> > > > >> Markus
> > > > >>
> > > > >>
> > > > >>
> > > > >> On Wed, Aug 22, 2018 at 1:40 PM Ebenezer Graham <
> > > > egraham15@alustudent.com
> > > > >> >
> > > > >> wrote:
> > > > >>
> > > > >> > Thanks myrle,
> > > > >> >
> > > > >> > I have already created a demo email account called
> > > > >> > fineractcnnotificationdemo@gmail.com and I created it for the
> > sole
> > > > >> purpose
> > > > >> > of testing emails for this service and for other contributors to
> > > use.
> > > > >> > Please advise me on this approach.
> > > > >> >
> > > > >> > Also, the password for ebenezergraham69@gmail.com and
> > > akyencorp@gmail
> > > > >> are
> > > > >> > no longer valid. I created app passwords and so I have already
> > > deleted
> > > > >> > those app passwords for my live account and are no longer valid.
> > > > >> >
> > > > >> > *Error:*
> > > > >> > In an attempt to store configurations from the repository I get
> > this
> > > > >> error:
> > > > >> > https://pastebin.com/WqvRwXvB
> > > > >> >
> > > > >> > Please check: shouldCreateSMSConfigurationEntity()
> > > > >> > https://github.com/ebenezergraham/fineract-cn-notifications/
> > > > >> > blob/develop/component-test/src/main/java/org/apache/
> > > > >> > fineract/cn/notification/TestSMSService.java
> > > > >> >
> > > > >> > I am able to retrieve stored configurations but I am unable to
> > > create
> > > > a
> > > > >> > configuration and store. Same issue for email repository
> > > > >> >
> > > > >> > Second Issue: https://pastebin.com/LKz7HcGy
> > > > >> > I have managed to authenticate with identity and getting
> customer
> > > > >> object,
> > > > >> > however, when I trigger an invent from the fims web app, I get 3
> > > > >> > invocations from the ActiveMQ. How can I resolve this issue? Are
> > my
> > > > >> > assumptions correct to begin with?
> > > > >> >
> > > > >> >
> > > > >> > *At your service,*
> > > > >> >
> > > > >> > *Ebenezer Graham*
> > > > >> >
> > > > >> > *BSc (Hons) Computing*
> > > > >> >
> > > > >> >
> > > > >> > [image: EmailSignature.png]
> > > > >> >
> > > > >> > African Leadership University,
> > > > >> >
> > > > >> > Power Mill Road, Pamplemousses,
> > > > >> >
> > > > >> > Mauritius.
> > > > >> >
> > > > >> >
> > > > >> >
> > > > >> > *skype*:
> > > > >> > ebenezer.graham
> > > > >> > GitHub <https://github.com/ebenezergraham> | LinkedIn
> > > > >> > <https://www.linkedin.com/in/ebenezer-graham/> | Twitter
> > > > >> > <https://twitter.com/pactmart> | Facebook
> > > > >> > <https://www.facebook.com/pactmart>
> > > > >> > www.pactmart.com | Freelancing made easy.
> > > > >> >
> > > > >> >
> > > > >> > *“Talk is cheap, show me the code.” *- *Linus Torvalds*
> > > > >> >
> > > > >> >
> > > > >> >
> > > > >> > On 22 August 2018 at 15:10, Ebenezer Graham <
> > > egraham15@alustudent.com
> > > > >
> > > > >> > wrote:
> > > > >> >
> > > > >> > > Thanks myrle,
> > > > >> > >
> > > > >> > > I have already created a demo email account called
> > > > >> > > fineractcnnotificationdemo@gmail.com and I created it for the
> > > sole
> > > > >> > > purpose of testing emails for this service and for other
> > > > contributors
> > > > >> > > to use. Please advise me on this approach.
> > > > >> > >
> > > > >> > > Also, the password for ebenezergraham69@gmail.com and
> > > > akyencorp@gmail
> > > > >> > are
> > > > >> > > not the real passwords. I created app passwords and so I have
> > > > already
> > > > >> > > deleted those app passwords for my live account and are no
> > longer
> > > > >> valid.
> > > > >> > >
> > > > >> > > *Error:*
> > > > >> > > In an attempt to store configurations from the repository I
> get
> > > this
> > > > >> > error:
> > > > >> > >
> > > > >> > > Please check: shouldCreateSMSConfigurationEntity()
> > > > >> > >
> > > > >> > https://github.com/ebenezergraham/fineract-cn-notifications/
> > > > >> blob/develop/
> > > > >> > > component-test/src/main/java/org/apache/fineract/cn/
> > > > >> > > notification/TestSMSService.java
> > > > >> > >
> > > > >> > > I am able to retrieve stored configurations but I am unable to
> > > > create
> > > > >> a
> > > > >> > > configuration and store. Same issue for email repository
> > > > >> > >
> > > > >> > > Second Issue: https://pastebin.com/LKz7HcGy
> > > > >> > > I have managed to authenticate with identity and getting
> > customer
> > > > >> object,
> > > > >> > > however, when I trigger an invent from the fims web app, I
> get 3
> > > > >> > > invocations from the ActiveMQ. How can I resolve this issue?
> Are
> > > my
> > > > >> > > assumptions correct to begin with?
> > > > >> > >
> > > > >> > >
> > > > >> > > *At your service,*
> > > > >> > >
> > > > >> > > *Ebenezer Graham*
> > > > >> > >
> > > > >> > > *BSc (Hons) Computing*
> > > > >> > >
> > > > >> > >
> > > > >> > > [image: EmailSignature.png]
> > > > >> > >
> > > > >> > > African Leadership University,
> > > > >> > >
> > > > >> > > Power Mill Road, Pamplemousses,
> > > > >> > >
> > > > >> > > Mauritius.
> > > > >> > >
> > > > >> > >
> > > > >> > >
> > > > >> > > *skype*:
> > > > >> > > ebenezer.graham
> > > > >> > > GitHub <https://github.com/ebenezergraham> | LinkedIn
> > > > >> > > <https://www.linkedin.com/in/ebenezer-graham/> | Twitter
> > > > >> > > <https://twitter.com/pactmart> | Facebook
> > > > >> > > <https://www.facebook.com/pactmart>
> > > > >> > > www.pactmart.com | Freelancing made easy.
> > > > >> > >
> > > > >> > >
> > > > >> > > *“Talk is cheap, show me the code.” *- *Linus Torvalds*
> > > > >> > >
> > > > >> > >
> > > > >> > >
> > > > >> > > On 22 August 2018 at 14:45, Myrle Krantz <my...@apache.org>
> > > wrote:
> > > > >> > >
> > > > >> > >> Hey Ebenezer,
> > > > >> > >>
> > > > >> > >> I was just reviewing your PR and realized that you had
> included
> > > > >> > >> passwords in it.  They look like they might be passwords to
> > live
> > > > >> > >> accounts.  I strongly suggest you remove them from your
> latest
> > > PR.
> > > > >> > >>
> > > > >> > >> I also checked and it appears you have passwords in code that
> > has
> > > > >> > >> already been merged.  If this is true, I suggest you change
> the
> > > > >> > >> password on the e-mail account: ebenezergraham69@gmail.com
> > > > >> > >>
> > > > >> > >> In general, we don't change git history.  It's okay to make
> > > > mistakes,
> > > > >> > >> and it's important to preserve the commit history of a
> project.
> > > > >> There
> > > > >> > >> are few exceptions I would make, but one of those is for
> > > passwords
> > > > or
> > > > >> > >> other secrets.  But only if those passwords or other secrets
> > > can't
> > > > >> > >> easily be replaced.  I don't believe this is the case here.
> > > > >> > >>
> > > > >> > >> Beyond that, I'm working on putting together feedback on your
> > > code
> > > > >> and
> > > > >> > >> will post that by the end of the day.
> > > > >> > >>
> > > > >> > >> Best Regards,
> > > > >> > >> Myrle
> > > > >> > >>
> > > > >> > >>
> > > > >> > >>
> > > > >> > >>
> > > > >> > >> On Wed, Aug 22, 2018 at 9:12 AM Ebenezer Graham
> > > > >> > >> <eg...@alustudent.com> wrote:
> > > > >> > >> >
> > > > >> > >> > Hi Awasum,
> > > > >> > >> >
> > > > >> > >> > I have been able to resolve the authentication problem and
> > now
> > > > >> able to
> > > > >> > >> > retrieve customers.
> > > > >> > >> >
> > > > >> > >> > I have also written a component test for the email and sms
> > > > service.
> > > > >> > >> >
> > > > >> > >> > In an attempt to clean up my repository and squash the
> > commits
> > > I
> > > > >> > messed
> > > > >> > >> up
> > > > >> > >> > my repo hence I have deleted it and forked a new one.
> > > > >> > >> >
> > > > >> > >> > In light of this, would like to find out if it is possible
> to
> > > > force
> > > > >> > >> merge
> > > > >> > >> > them so that apache repository takes commits from mine.
> This
> > > is
> > > > >> > because
> > > > >> > >> > the one on Apache has some unwanted files such as the
> sample
> > > > >> classes
> > > > >> > and
> > > > >> > >> > travis.yml. Please let me know if this is possible.
> > > > >> > >> >
> > > > >> > >> > Also, I have made new PRs. Please review it and provide
> > > feedback
> > > > >> > >> >
> > > > >> > >> > Looking forward to your response.
> > > > >> > >> >
> > > > >> > >> > *At your service,*
> > > > >> > >> >
> > > > >> > >> > *Ebenezer Graham*
> > > > >> > >> >
> > > > >> > >> > *BSc (Hons) Computing*
> > > > >> > >> >
> > > > >> > >> >
> > > > >> > >> > [image: EmailSignature.png]
> > > > >> > >> >
> > > > >> > >> > African Leadership University,
> > > > >> > >> >
> > > > >> > >> > Power Mill Road, Pamplemousses,
> > > > >> > >> >
> > > > >> > >> > Mauritius.
> > > > >> > >> >
> > > > >> > >> >
> > > > >> > >> >
> > > > >> > >> > *skype*:
> > > > >> > >> > ebenezer.graham
> > > > >> > >> > GitHub <https://github.com/ebenezergraham> | LinkedIn
> > > > >> > >> > <https://www.linkedin.com/in/ebenezer-graham/> | Twitter
> > > > >> > >> > <https://twitter.com/pactmart> | Facebook
> > > > >> > >> > <https://www.facebook.com/pactmart>
> > > > >> > >> > www.pactmart.com | Freelancing made easy.
> > > > >> > >> >
> > > > >> > >> >
> > > > >> > >> > *“Talk is cheap, show me the code.” *- *Linus Torvalds*
> > > > >> > >> >
> > > > >> > >> >
> > > > >> > >> >
> > > > >> > >> > On 9 July 2018 at 12:25, Awasum Yannick <awasum@apache.org
> >
> > > > wrote:
> > > > >> > >> >
> > > > >> > >> > > Hello Graham,
> > > > >> > >> > >
> > > > >> > >> > > You need to create a user, maybe use *operator* and make
> > sure
> > > > the
> > > > >> > >> user has
> > > > >> > >> > > permission to access customer (READ). Then you have to
> > > create a
> > > > >> > class
> > > > >> > >> which
> > > > >> > >> > > uses this user to connect and authenticate each time with
> > the
> > > > >> > identity
> > > > >> > >> > > service before each customer information is retrieved.
> > > > >> > >> > >
> > > > >> > >> > > This user could be defined in the yml file of your
> service
> > > and
> > > > >> then
> > > > >> > >> > > injected into the Authentication Class you create.
> > > > >> > >> > >
> > > > >> > >> > > Each event which is emitted most often has the tenant
> > within
> > > > the
> > > > >> > >> message.
> > > > >> > >> > > just get this tenant and check and set the
> > > *TenantContextHolder
> > > > >> *if
> > > > >> > >> not
> > > > >> > >> > > already set just before you authenticate. Immediately
> after
> > > > >> > >> authentication,
> > > > >> > >> > > Set the *UserContextHolder* too
> > > > >> > >> > >
> > > > >> > >> > > Another point is to remember to trim or remove the quotes
> > > from
> > > > >> the
> > > > >> > >> customer
> > > > >> > >> > > identifier before trying to get more contact details
> about
> > > > that
> > > > >> > >> customer:
> > > > >> > >> > > {String}.replaceAll("^\"|\"$", "")
> > > > >> > >> > >
> > > > >> > >> > > I hope this helps
> > > > >> > >> > >
> > > > >> > >> > > Thanks.
> > > > >> > >> > > Awasum Yannick
> > > > >> > >> > >
> > > > >> > >> > > On Tue, Jul 3, 2018 at 11:18 PM Ebenezer Graham <
> > > > >> > >> egraham15@alustudent.com>
> > > > >> > >> > > wrote:
> > > > >> > >> > >
> > > > >> > >> > > > Hello there,
> > > > >> > >> > > >
> > > > >> > >> > > > I would like to retrieve a customer after it has been
> > > > created,
> > > > >> or
> > > > >> > >> > > activated
> > > > >> > >> > > > etc.
> > > > >> > >> > > >
> > > > >> > >> > > > I have coded the logic to send the SMS and email after
> > > > getting
> > > > >> the
> > > > >> > >> > > contact
> > > > >> > >> > > > details, however, I have to get the customer to get the
> > > > contact
> > > > >> > >> details.
> > > > >> > >> > > >
> > > > >> > >> > > > This is the error I get during my call:
> > > > >> > >> https://pastebin.com/zrebwE8v
> > > > >> > >> > > >
> > > > >> > >> > > > I would like to get clarifications on how to set the
> > tenant
> > > > and
> > > > >> > >> correctly
> > > > >> > >> > > > make authentication during a rest call.
> > > > >> > >> > > >
> > > > >> > >> > > > I would also like to get a better understanding of how
> to
> > > use
> > > > >> the
> > > > >> > >> Anubis,
> > > > >> > >> > > > test and identity microservice in this case
> > > > >> > >> > > >
> > > > >> > >> > > > *At your service,*
> > > > >> > >> > > >
> > > > >> > >> > > > *Ebenezer Graham*
> > > > >> > >> > > >
> > > > >> > >> > > > *BSc (Hons) Computing*
> > > > >> > >> > > >
> > > > >> > >> > > >
> > > > >> > >> > > > [image: EmailSignature.png]
> > > > >> > >> > > >
> > > > >> > >> > > > African Leadership University,
> > > > >> > >> > > >
> > > > >> > >> > > > Power Mill Road, Pamplemousses,
> > > > >> > >> > > >
> > > > >> > >> > > > Mauritius.
> > > > >> > >> > > >
> > > > >> > >> > > >
> > > > >> > >> > > > *skype*:
> > > > >> > >> > > > ebenezer.graham
> > > > >> > >> > > > GitHub <https://github.com/ebenezergraham> | LinkedIn
> > > > >> > >> > > > <https://www.linkedin.com/in/ebenezer-graham/> |
> Twitter
> > > > >> > >> > > > <https://twitter.com/pactmart> | Facebook
> > > > >> > >> > > > <https://www.facebook.com/pactmart>
> > > > >> > >> > > > www.pactmart.com | Freelancing made easy.
> > > > >> > >> > > >
> > > > >> > >> > > >
> > > > >> > >> > > > *“Talk is cheap, show me the code.” *- *Linus Torvalds*
> > > > >> > >> > > >
> > > > >> > >> > > >
> > > > >> > >> > > >
> > > > >> > >> > > > On 19 May 2018 at 00:41, Ebenezer Graham <
> > > > >> > egraham15@alustudent.com>
> > > > >> > >> > > wrote:
> > > > >> > >> > > >
> > > > >> > >> > > > > Hi everyone,
> > > > >> > >> > > > >
> > > > >> > >> > > > > I am Ebenezer a student from the African Leadership
> > > > >> University
> > > > >> > >> and I
> > > > >> > >> > > will
> > > > >> > >> > > > > be working on this project under the mentorship of
> > Isaac
> > > > >> Kamga.
> > > > >> > >> > > > >
> > > > >> > >> > > > > The idea is to use this thread to discuss the
> decisions
> > > > being
> > > > >> > >> made on
> > > > >> > >> > > > this
> > > > >> > >> > > > > project so that the community has visibility on
> what's
> > > > >> happening
> > > > >> > >> and
> > > > >> > >> > > most
> > > > >> > >> > > > > importantly give constructive feedback.
> > > > >> > >> > > > >
> > > > >> > >> > > > > *EventListeners:*
> > > > >> > >> > > > > This is the Doc
> > > > >> > >> > > > > <
> > > > >> > >> > > > https://docs.google.com/document/d/
> > > 1kme5qrxOrO0WGUEvNgzv5XVk
> > > > >> gWtpg
> > > > >> > >> > > 0lbX-CrBH4js7o/edit?usp=sharing
> > > > >> > >> > > > >
> > > > >> > >> > > > > containing the shortlisted events which I believe
> > qualify
> > > > >> for an
> > > > >> > >> Email
> > > > >> > >> > > or
> > > > >> > >> > > > > SMS notification. Please review and comment on the
> doc
> > > > >> > suggesting
> > > > >> > >> any
> > > > >> > >> > > > > addition or deletion or related feedback.
> > > > >> > >> > > > >
> > > > >> > >> > > > > *UI for the service:*
> > > > >> > >> > > > > This is a link <
> > > > https://wireframe.cc/pro/pp/5fb6b2e61167290>
> > > > >> to
> > > > >> > >> the
> > > > >> > >> > > > > wireframes for the UI of the service. Please give
> > > pointers
> > > > on
> > > > >> > what
> > > > >> > >> > > could
> > > > >> > >> > > > be
> > > > >> > >> > > > > added and what should be taken out.
> > > > >> > >> > > > >
> > > > >> > >> > > > >
> > > > >> > >> > > > > *At your service*
> > > > >> > >> > > > > *,*
> > > > >> > >> > > > >
> > > > >> > >> > > > > *Ebenezer Graham*
> > > > >> > >> > > > >
> > > > >> > >> > > > > *BSc (Hons) Computing*
> > > > >> > >> > > > >
> > > > >> > >> > > > >
> > > > >> > >> > > > > [image: EmailSignature.png]
> > > > >> > >> > > > >
> > > > >> > >> > > > > Beau Plan Business Park | West Building
> > > > >> > >> > > > >
> > > > >> > >> > > > > Pamplemousses |  Mauritius
> > > > >> > >> > > > >
> > > > >> > >> > > > >
> > > > >> > >> > > > > <http://www.pactmart.com/>
> > > > >> > >> > > > > <http://www.pactmart.com/>
> > > > >> > >> > > > > www.pactmart.com | Freelancing made easy.
> > > > >> > >> > > > > GitHub <https://github.com/ebenezergraham> |
> LinkedIn
> > > > >> > >> > > > > <https://www.linkedin.com/in/ebenezer-graham/> |
> > Twitter
> > > > >> > >> > > > > <https://twitter.com/pactmart> | Facebook
> > > > >> > >> > > > > <https://www.facebook.com/pactmart> | Website
> > > > >> > >> > > > > <http://ebenezergraham.github.io/>
> > > > >> > >> > > > >
> > > > >> > >> > > > > *skype*:
> > > > >> > >> > > > > ebenezer.graham
> > > > >> > >> > > > > | *Phone*:
> > > > >> > >> > > > > +230 5840 9206 <+230%205840%209206>
> > > > >> > >> > > > >
> > > > >> > >> > > > >
> > > > >> > >> > > > > *“Practice isn’t the thing you do once you’re good.
> > It’s
> > > > the
> > > > >> > >> thing you
> > > > >> > >> > > do
> > > > >> > >> > > > > that makes you good.”*
> > > > >> > >> > > > > -*Malcolm Gladwell*
> > > > >> > >> > > > >
> > > > >> > >> > > > >
> > > > >> > >> > > > >
> > > > >> > >> > > >
> > > > >> > >> > >
> > > > >> > >>
> > > > >> > >
> > > > >> > >
> > > > >> >
> > > > >>
> > > > >
> > > > >
> > > >
> > >
> >
>

Re: [Discussion] Fineract CN SMS & Email Notifications Project

Posted by Isaac Kamga <is...@mifos.org>.
Hello Graham,

I encounter this error <https://pastebin.com/VHA0mh5p> when testing your
latest PR to the Notifications service.

I think it comes from you creating a new Notifications admin user with
separate privileges. Don't you think it'll better to grant the already
existing admin ( operator ) privileges to access the customer service and
use it rather than creating a new one ?

I hope this helps.

Cheers,
Isaac Kamga.

On Sun, Sep 2, 2018 at 10:08 AM Ebenezer Graham <eg...@alustudent.com>
wrote:

> Hi Yannick,
>
> I have tried the approach suggested above, however, I am getting the same
> results.
>
> Also, I have resolved the conflicts in the apache/fineract-cn-notification
> PR
>
> *At your service,*
>
> *Ebenezer Graham*
>
> *BSc (Hons) Computing*
>
>
> [image: EmailSignature.png]
>
> African Leadership University,
>
> Power Mill Road, Pamplemousses,
>
> Mauritius.
>
>
> ​
> *skype*:
> ​ebenezer.graham
> GitHub <https://github.com/ebenezergraham> | LinkedIn
> <https://www.linkedin.com/in/ebenezer-graham/> | Twitter
> <https://twitter.com/pactmart> | Facebook
> <https://www.facebook.com/pactmart>
> www.pactmart.com | Freelancing made easy.
>
>
> *“Talk is cheap, show me the code.” *- *Linus Torvalds*
>
>
>
> On 29 August 2018 at 22:19, Awasum Yannick <aw...@apache.org> wrote:
>
> > Hey Graham,
> >
> > Are you using Gmail? If so then you might want to give your app (unsecure
> > in the eyes of Gmail) permission to send out mails from the email account
> > you are using.
> >
> > Check these: https://support.google.com/accounts/answer/6010255?hl=en
> > https://myaccount.google.com/lesssecureapps
> >
> > So allowing less secure apps to send mail by clicking the toggle button
> > might solve your problem.
> > Try that lets see. If there are still problems, please keep them coming.
> >
> > Thanks.
> > Awasum
> >
> > On Mon, Aug 27, 2018 at 5:03 PM Ebenezer Graham <
> egraham15@alustudent.com>
> > wrote:
> >
> > > Hi all,
> > >
> > > I am having a connection issue with the java mail.
> https://pastebin.com
> > > /f8UAkvsa
> > >
> > > I can send emails when I run it from the component test but the
> > connection
> > > times out when the service is started by the demo-server. The SMS
> service
> > > works fine and only the email service times out.
> > >
> > > Does anyone have ideas on how to solve this? I have tried a lot of
> > > solutions on the web but I believe that this timeout is caused by
> > security
> > > constraints in Fineract CN
> > >
> > > *At your service,*
> > >
> > > *Ebenezer Graham*
> > >
> > > *BSc (Hons) Computing*
> > >
> > >
> > > [image: EmailSignature.png]
> > >
> > > African Leadership University,
> > >
> > > Power Mill Road, Pamplemousses,
> > >
> > > Mauritius.
> > >
> > >
> > > ​
> > > *skype*:
> > > ​ebenezer.graham
> > > GitHub <https://github.com/ebenezergraham> | LinkedIn
> > > <https://www.linkedin.com/in/ebenezer-graham/> | Twitter
> > > <https://twitter.com/pactmart> | Facebook
> > > <https://www.facebook.com/pactmart>
> > > www.pactmart.com | Freelancing made easy.
> > >
> > >
> > > *“Talk is cheap, show me the code.” *- *Linus Torvalds*
> > >
> > >
> > >
> > > On 23 August 2018 at 18:05, Ebenezer Graham <eg...@alustudent.com>
> > > wrote:
> > >
> > > > Hi all,
> > > >
> > > > @Markus: The ActiveMQ configuration worked :). I am now getting one
> > > > invocation. Thanks for the support,
> > > >
> > > > However, the entity creation is still not working but I think Myrle's
> > > > feedback on my PR might do the trick.
> > > >
> > > > @Myrle: I have updated the private cwiki page with the credentials,
> > > > thanks. Also, I have incorporated most of the feedback shared on the
> > PRs
> > > > and added a few comments.
> > > > For the Domain objects, I have created tests for each of them. I will
> > add
> > > > more rigorous tests to it after making significant progress with the
> > > > web-app interface
> > > > and the connection timeout problem when the system is up. More about
> > the
> > > > issue below
> > > > The issue has to do with service timeouts.
> > https://pastebin.com/f8UAkvsa
> > > > *N*
> > > > * B: *the email and SMS services are correctly configured and do send
> > out
> > > > emails and SMS
> > > > in the component test. However, when I make an actual build the mail
> > > > connection times out even though it
> > > > has been invoked
> > > >
> > > > @Awasum like you suggested, I have changed the JavaMail version to
> > 1.4.1
> > > > RELEASE and it works fine. Thanks
> > > > I have created values in the ext.versions for the Twilio API and
> > > > JavaMail in the shared.gradle
> > > >
> > > > My best guess is that there is something interrupting or inhibiting
> the
> > > > connection when the entire system is
> > > > up and running.
> > > >
> > > > Looking forward to your feedback.
> > > >
> > > > On 22 August 2018 at 16:03, Markus Geiss <ma...@kuelap.io>
> > wrote:
> > > >
> > > >> Hey Ebenezer,
> > > >>
> > > >> hope this finds you well. (;
> > > >>
> > > >> looking at the two stack traces you've provided here is my take on
> it.
> > > >>
> > > >> The error while storing configuration is caused by a field in the
> > > database
> > > >> 'sender_number' being declared as not null, but no data is provided.
> > In
> > > >> the
> > > >> create method of SMSConfiguration you are not handling the sender
> > number
> > > >> at
> > > >> all. I would recommend to either use a builder pattern or just use
> > plain
> > > >> getter/setter to create the instance.
> > > >>
> > > >> With regards to receiving multiple (3) events, this is caused by the
> > way
> > > >> acitvemq is configured in your service. The default
> > > >> for activemq.concurrency is 3-10, if you set this to 1-1 it will
> only
> > > >> listen with 1 concurrent thread.
> > > >>
> > > >> Hope this helps.
> > > >>
> > > >> Cheers
> > > >>
> > > >> Markus
> > > >>
> > > >>
> > > >>
> > > >> On Wed, Aug 22, 2018 at 1:40 PM Ebenezer Graham <
> > > egraham15@alustudent.com
> > > >> >
> > > >> wrote:
> > > >>
> > > >> > Thanks myrle,
> > > >> >
> > > >> > I have already created a demo email account called
> > > >> > fineractcnnotificationdemo@gmail.com and I created it for the
> sole
> > > >> purpose
> > > >> > of testing emails for this service and for other contributors to
> > use.
> > > >> > Please advise me on this approach.
> > > >> >
> > > >> > Also, the password for ebenezergraham69@gmail.com and
> > akyencorp@gmail
> > > >> are
> > > >> > no longer valid. I created app passwords and so I have already
> > deleted
> > > >> > those app passwords for my live account and are no longer valid.
> > > >> >
> > > >> > *Error:*
> > > >> > In an attempt to store configurations from the repository I get
> this
> > > >> error:
> > > >> > https://pastebin.com/WqvRwXvB
> > > >> >
> > > >> > Please check: shouldCreateSMSConfigurationEntity()
> > > >> > https://github.com/ebenezergraham/fineract-cn-notifications/
> > > >> > blob/develop/component-test/src/main/java/org/apache/
> > > >> > fineract/cn/notification/TestSMSService.java
> > > >> >
> > > >> > I am able to retrieve stored configurations but I am unable to
> > create
> > > a
> > > >> > configuration and store. Same issue for email repository
> > > >> >
> > > >> > Second Issue: https://pastebin.com/LKz7HcGy
> > > >> > I have managed to authenticate with identity and getting customer
> > > >> object,
> > > >> > however, when I trigger an invent from the fims web app, I get 3
> > > >> > invocations from the ActiveMQ. How can I resolve this issue? Are
> my
> > > >> > assumptions correct to begin with?
> > > >> >
> > > >> >
> > > >> > *At your service,*
> > > >> >
> > > >> > *Ebenezer Graham*
> > > >> >
> > > >> > *BSc (Hons) Computing*
> > > >> >
> > > >> >
> > > >> > [image: EmailSignature.png]
> > > >> >
> > > >> > African Leadership University,
> > > >> >
> > > >> > Power Mill Road, Pamplemousses,
> > > >> >
> > > >> > Mauritius.
> > > >> >
> > > >> >
> > > >> >
> > > >> > *skype*:
> > > >> > ebenezer.graham
> > > >> > GitHub <https://github.com/ebenezergraham> | LinkedIn
> > > >> > <https://www.linkedin.com/in/ebenezer-graham/> | Twitter
> > > >> > <https://twitter.com/pactmart> | Facebook
> > > >> > <https://www.facebook.com/pactmart>
> > > >> > www.pactmart.com | Freelancing made easy.
> > > >> >
> > > >> >
> > > >> > *“Talk is cheap, show me the code.” *- *Linus Torvalds*
> > > >> >
> > > >> >
> > > >> >
> > > >> > On 22 August 2018 at 15:10, Ebenezer Graham <
> > egraham15@alustudent.com
> > > >
> > > >> > wrote:
> > > >> >
> > > >> > > Thanks myrle,
> > > >> > >
> > > >> > > I have already created a demo email account called
> > > >> > > fineractcnnotificationdemo@gmail.com and I created it for the
> > sole
> > > >> > > purpose of testing emails for this service and for other
> > > contributors
> > > >> > > to use. Please advise me on this approach.
> > > >> > >
> > > >> > > Also, the password for ebenezergraham69@gmail.com and
> > > akyencorp@gmail
> > > >> > are
> > > >> > > not the real passwords. I created app passwords and so I have
> > > already
> > > >> > > deleted those app passwords for my live account and are no
> longer
> > > >> valid.
> > > >> > >
> > > >> > > *Error:*
> > > >> > > In an attempt to store configurations from the repository I get
> > this
> > > >> > error:
> > > >> > >
> > > >> > > Please check: shouldCreateSMSConfigurationEntity()
> > > >> > >
> > > >> > https://github.com/ebenezergraham/fineract-cn-notifications/
> > > >> blob/develop/
> > > >> > > component-test/src/main/java/org/apache/fineract/cn/
> > > >> > > notification/TestSMSService.java
> > > >> > >
> > > >> > > I am able to retrieve stored configurations but I am unable to
> > > create
> > > >> a
> > > >> > > configuration and store. Same issue for email repository
> > > >> > >
> > > >> > > Second Issue: https://pastebin.com/LKz7HcGy
> > > >> > > I have managed to authenticate with identity and getting
> customer
> > > >> object,
> > > >> > > however, when I trigger an invent from the fims web app, I get 3
> > > >> > > invocations from the ActiveMQ. How can I resolve this issue? Are
> > my
> > > >> > > assumptions correct to begin with?
> > > >> > >
> > > >> > >
> > > >> > > *At your service,*
> > > >> > >
> > > >> > > *Ebenezer Graham*
> > > >> > >
> > > >> > > *BSc (Hons) Computing*
> > > >> > >
> > > >> > >
> > > >> > > [image: EmailSignature.png]
> > > >> > >
> > > >> > > African Leadership University,
> > > >> > >
> > > >> > > Power Mill Road, Pamplemousses,
> > > >> > >
> > > >> > > Mauritius.
> > > >> > >
> > > >> > >
> > > >> > >
> > > >> > > *skype*:
> > > >> > > ebenezer.graham
> > > >> > > GitHub <https://github.com/ebenezergraham> | LinkedIn
> > > >> > > <https://www.linkedin.com/in/ebenezer-graham/> | Twitter
> > > >> > > <https://twitter.com/pactmart> | Facebook
> > > >> > > <https://www.facebook.com/pactmart>
> > > >> > > www.pactmart.com | Freelancing made easy.
> > > >> > >
> > > >> > >
> > > >> > > *“Talk is cheap, show me the code.” *- *Linus Torvalds*
> > > >> > >
> > > >> > >
> > > >> > >
> > > >> > > On 22 August 2018 at 14:45, Myrle Krantz <my...@apache.org>
> > wrote:
> > > >> > >
> > > >> > >> Hey Ebenezer,
> > > >> > >>
> > > >> > >> I was just reviewing your PR and realized that you had included
> > > >> > >> passwords in it.  They look like they might be passwords to
> live
> > > >> > >> accounts.  I strongly suggest you remove them from your latest
> > PR.
> > > >> > >>
> > > >> > >> I also checked and it appears you have passwords in code that
> has
> > > >> > >> already been merged.  If this is true, I suggest you change the
> > > >> > >> password on the e-mail account: ebenezergraham69@gmail.com
> > > >> > >>
> > > >> > >> In general, we don't change git history.  It's okay to make
> > > mistakes,
> > > >> > >> and it's important to preserve the commit history of a project.
> > > >> There
> > > >> > >> are few exceptions I would make, but one of those is for
> > passwords
> > > or
> > > >> > >> other secrets.  But only if those passwords or other secrets
> > can't
> > > >> > >> easily be replaced.  I don't believe this is the case here.
> > > >> > >>
> > > >> > >> Beyond that, I'm working on putting together feedback on your
> > code
> > > >> and
> > > >> > >> will post that by the end of the day.
> > > >> > >>
> > > >> > >> Best Regards,
> > > >> > >> Myrle
> > > >> > >>
> > > >> > >>
> > > >> > >>
> > > >> > >>
> > > >> > >> On Wed, Aug 22, 2018 at 9:12 AM Ebenezer Graham
> > > >> > >> <eg...@alustudent.com> wrote:
> > > >> > >> >
> > > >> > >> > Hi Awasum,
> > > >> > >> >
> > > >> > >> > I have been able to resolve the authentication problem and
> now
> > > >> able to
> > > >> > >> > retrieve customers.
> > > >> > >> >
> > > >> > >> > I have also written a component test for the email and sms
> > > service.
> > > >> > >> >
> > > >> > >> > In an attempt to clean up my repository and squash the
> commits
> > I
> > > >> > messed
> > > >> > >> up
> > > >> > >> > my repo hence I have deleted it and forked a new one.
> > > >> > >> >
> > > >> > >> > In light of this, would like to find out if it is possible to
> > > force
> > > >> > >> merge
> > > >> > >> > them so that apache repository takes commits from mine.  This
> > is
> > > >> > because
> > > >> > >> > the one on Apache has some unwanted files such as the sample
> > > >> classes
> > > >> > and
> > > >> > >> > travis.yml. Please let me know if this is possible.
> > > >> > >> >
> > > >> > >> > Also, I have made new PRs. Please review it and provide
> > feedback
> > > >> > >> >
> > > >> > >> > Looking forward to your response.
> > > >> > >> >
> > > >> > >> > *At your service,*
> > > >> > >> >
> > > >> > >> > *Ebenezer Graham*
> > > >> > >> >
> > > >> > >> > *BSc (Hons) Computing*
> > > >> > >> >
> > > >> > >> >
> > > >> > >> > [image: EmailSignature.png]
> > > >> > >> >
> > > >> > >> > African Leadership University,
> > > >> > >> >
> > > >> > >> > Power Mill Road, Pamplemousses,
> > > >> > >> >
> > > >> > >> > Mauritius.
> > > >> > >> >
> > > >> > >> >
> > > >> > >> >
> > > >> > >> > *skype*:
> > > >> > >> > ebenezer.graham
> > > >> > >> > GitHub <https://github.com/ebenezergraham> | LinkedIn
> > > >> > >> > <https://www.linkedin.com/in/ebenezer-graham/> | Twitter
> > > >> > >> > <https://twitter.com/pactmart> | Facebook
> > > >> > >> > <https://www.facebook.com/pactmart>
> > > >> > >> > www.pactmart.com | Freelancing made easy.
> > > >> > >> >
> > > >> > >> >
> > > >> > >> > *“Talk is cheap, show me the code.” *- *Linus Torvalds*
> > > >> > >> >
> > > >> > >> >
> > > >> > >> >
> > > >> > >> > On 9 July 2018 at 12:25, Awasum Yannick <aw...@apache.org>
> > > wrote:
> > > >> > >> >
> > > >> > >> > > Hello Graham,
> > > >> > >> > >
> > > >> > >> > > You need to create a user, maybe use *operator* and make
> sure
> > > the
> > > >> > >> user has
> > > >> > >> > > permission to access customer (READ). Then you have to
> > create a
> > > >> > class
> > > >> > >> which
> > > >> > >> > > uses this user to connect and authenticate each time with
> the
> > > >> > identity
> > > >> > >> > > service before each customer information is retrieved.
> > > >> > >> > >
> > > >> > >> > > This user could be defined in the yml file of your service
> > and
> > > >> then
> > > >> > >> > > injected into the Authentication Class you create.
> > > >> > >> > >
> > > >> > >> > > Each event which is emitted most often has the tenant
> within
> > > the
> > > >> > >> message.
> > > >> > >> > > just get this tenant and check and set the
> > *TenantContextHolder
> > > >> *if
> > > >> > >> not
> > > >> > >> > > already set just before you authenticate. Immediately after
> > > >> > >> authentication,
> > > >> > >> > > Set the *UserContextHolder* too
> > > >> > >> > >
> > > >> > >> > > Another point is to remember to trim or remove the quotes
> > from
> > > >> the
> > > >> > >> customer
> > > >> > >> > > identifier before trying to get more contact details about
> > > that
> > > >> > >> customer:
> > > >> > >> > > {String}.replaceAll("^\"|\"$", "")
> > > >> > >> > >
> > > >> > >> > > I hope this helps
> > > >> > >> > >
> > > >> > >> > > Thanks.
> > > >> > >> > > Awasum Yannick
> > > >> > >> > >
> > > >> > >> > > On Tue, Jul 3, 2018 at 11:18 PM Ebenezer Graham <
> > > >> > >> egraham15@alustudent.com>
> > > >> > >> > > wrote:
> > > >> > >> > >
> > > >> > >> > > > Hello there,
> > > >> > >> > > >
> > > >> > >> > > > I would like to retrieve a customer after it has been
> > > created,
> > > >> or
> > > >> > >> > > activated
> > > >> > >> > > > etc.
> > > >> > >> > > >
> > > >> > >> > > > I have coded the logic to send the SMS and email after
> > > getting
> > > >> the
> > > >> > >> > > contact
> > > >> > >> > > > details, however, I have to get the customer to get the
> > > contact
> > > >> > >> details.
> > > >> > >> > > >
> > > >> > >> > > > This is the error I get during my call:
> > > >> > >> https://pastebin.com/zrebwE8v
> > > >> > >> > > >
> > > >> > >> > > > I would like to get clarifications on how to set the
> tenant
> > > and
> > > >> > >> correctly
> > > >> > >> > > > make authentication during a rest call.
> > > >> > >> > > >
> > > >> > >> > > > I would also like to get a better understanding of how to
> > use
> > > >> the
> > > >> > >> Anubis,
> > > >> > >> > > > test and identity microservice in this case
> > > >> > >> > > >
> > > >> > >> > > > *At your service,*
> > > >> > >> > > >
> > > >> > >> > > > *Ebenezer Graham*
> > > >> > >> > > >
> > > >> > >> > > > *BSc (Hons) Computing*
> > > >> > >> > > >
> > > >> > >> > > >
> > > >> > >> > > > [image: EmailSignature.png]
> > > >> > >> > > >
> > > >> > >> > > > African Leadership University,
> > > >> > >> > > >
> > > >> > >> > > > Power Mill Road, Pamplemousses,
> > > >> > >> > > >
> > > >> > >> > > > Mauritius.
> > > >> > >> > > >
> > > >> > >> > > >
> > > >> > >> > > > *skype*:
> > > >> > >> > > > ebenezer.graham
> > > >> > >> > > > GitHub <https://github.com/ebenezergraham> | LinkedIn
> > > >> > >> > > > <https://www.linkedin.com/in/ebenezer-graham/> | Twitter
> > > >> > >> > > > <https://twitter.com/pactmart> | Facebook
> > > >> > >> > > > <https://www.facebook.com/pactmart>
> > > >> > >> > > > www.pactmart.com | Freelancing made easy.
> > > >> > >> > > >
> > > >> > >> > > >
> > > >> > >> > > > *“Talk is cheap, show me the code.” *- *Linus Torvalds*
> > > >> > >> > > >
> > > >> > >> > > >
> > > >> > >> > > >
> > > >> > >> > > > On 19 May 2018 at 00:41, Ebenezer Graham <
> > > >> > egraham15@alustudent.com>
> > > >> > >> > > wrote:
> > > >> > >> > > >
> > > >> > >> > > > > Hi everyone,
> > > >> > >> > > > >
> > > >> > >> > > > > I am Ebenezer a student from the African Leadership
> > > >> University
> > > >> > >> and I
> > > >> > >> > > will
> > > >> > >> > > > > be working on this project under the mentorship of
> Isaac
> > > >> Kamga.
> > > >> > >> > > > >
> > > >> > >> > > > > The idea is to use this thread to discuss the decisions
> > > being
> > > >> > >> made on
> > > >> > >> > > > this
> > > >> > >> > > > > project so that the community has visibility on what's
> > > >> happening
> > > >> > >> and
> > > >> > >> > > most
> > > >> > >> > > > > importantly give constructive feedback.
> > > >> > >> > > > >
> > > >> > >> > > > > *EventListeners:*
> > > >> > >> > > > > This is the Doc
> > > >> > >> > > > > <
> > > >> > >> > > > https://docs.google.com/document/d/
> > 1kme5qrxOrO0WGUEvNgzv5XVk
> > > >> gWtpg
> > > >> > >> > > 0lbX-CrBH4js7o/edit?usp=sharing
> > > >> > >> > > > >
> > > >> > >> > > > > containing the shortlisted events which I believe
> qualify
> > > >> for an
> > > >> > >> Email
> > > >> > >> > > or
> > > >> > >> > > > > SMS notification. Please review and comment on the doc
> > > >> > suggesting
> > > >> > >> any
> > > >> > >> > > > > addition or deletion or related feedback.
> > > >> > >> > > > >
> > > >> > >> > > > > *UI for the service:*
> > > >> > >> > > > > This is a link <
> > > https://wireframe.cc/pro/pp/5fb6b2e61167290>
> > > >> to
> > > >> > >> the
> > > >> > >> > > > > wireframes for the UI of the service. Please give
> > pointers
> > > on
> > > >> > what
> > > >> > >> > > could
> > > >> > >> > > > be
> > > >> > >> > > > > added and what should be taken out.
> > > >> > >> > > > >
> > > >> > >> > > > >
> > > >> > >> > > > > *At your service*
> > > >> > >> > > > > *,*
> > > >> > >> > > > >
> > > >> > >> > > > > *Ebenezer Graham*
> > > >> > >> > > > >
> > > >> > >> > > > > *BSc (Hons) Computing*
> > > >> > >> > > > >
> > > >> > >> > > > >
> > > >> > >> > > > > [image: EmailSignature.png]
> > > >> > >> > > > >
> > > >> > >> > > > > Beau Plan Business Park | West Building
> > > >> > >> > > > >
> > > >> > >> > > > > Pamplemousses |  Mauritius
> > > >> > >> > > > >
> > > >> > >> > > > >
> > > >> > >> > > > > <http://www.pactmart.com/>
> > > >> > >> > > > > <http://www.pactmart.com/>
> > > >> > >> > > > > www.pactmart.com | Freelancing made easy.
> > > >> > >> > > > > GitHub <https://github.com/ebenezergraham> | LinkedIn
> > > >> > >> > > > > <https://www.linkedin.com/in/ebenezer-graham/> |
> Twitter
> > > >> > >> > > > > <https://twitter.com/pactmart> | Facebook
> > > >> > >> > > > > <https://www.facebook.com/pactmart> | Website
> > > >> > >> > > > > <http://ebenezergraham.github.io/>
> > > >> > >> > > > >
> > > >> > >> > > > > *skype*:
> > > >> > >> > > > > ebenezer.graham
> > > >> > >> > > > > | *Phone*:
> > > >> > >> > > > > +230 5840 9206 <+230%205840%209206>
> > > >> > >> > > > >
> > > >> > >> > > > >
> > > >> > >> > > > > *“Practice isn’t the thing you do once you’re good.
> It’s
> > > the
> > > >> > >> thing you
> > > >> > >> > > do
> > > >> > >> > > > > that makes you good.”*
> > > >> > >> > > > > -*Malcolm Gladwell*
> > > >> > >> > > > >
> > > >> > >> > > > >
> > > >> > >> > > > >
> > > >> > >> > > >
> > > >> > >> > >
> > > >> > >>
> > > >> > >
> > > >> > >
> > > >> >
> > > >>
> > > >
> > > >
> > >
> >
>

Re: [Discussion] Fineract CN SMS & Email Notifications Project

Posted by Ebenezer Graham <eg...@alustudent.com>.
Hi Yannick,

I have tried the approach suggested above, however, I am getting the same
results.

Also, I have resolved the conflicts in the apache/fineract-cn-notification
PR

*At your service,*

*Ebenezer Graham*

*BSc (Hons) Computing*


[image: EmailSignature.png]

African Leadership University,

Power Mill Road, Pamplemousses,

Mauritius.


​
*skype*:
​ebenezer.graham
GitHub <https://github.com/ebenezergraham> | LinkedIn
<https://www.linkedin.com/in/ebenezer-graham/> | Twitter
<https://twitter.com/pactmart> | Facebook
<https://www.facebook.com/pactmart>
www.pactmart.com | Freelancing made easy.


*“Talk is cheap, show me the code.” *- *Linus Torvalds*



On 29 August 2018 at 22:19, Awasum Yannick <aw...@apache.org> wrote:

> Hey Graham,
>
> Are you using Gmail? If so then you might want to give your app (unsecure
> in the eyes of Gmail) permission to send out mails from the email account
> you are using.
>
> Check these: https://support.google.com/accounts/answer/6010255?hl=en
> https://myaccount.google.com/lesssecureapps
>
> So allowing less secure apps to send mail by clicking the toggle button
> might solve your problem.
> Try that lets see. If there are still problems, please keep them coming.
>
> Thanks.
> Awasum
>
> On Mon, Aug 27, 2018 at 5:03 PM Ebenezer Graham <eg...@alustudent.com>
> wrote:
>
> > Hi all,
> >
> > I am having a connection issue with the java mail.  https://pastebin.com
> > /f8UAkvsa
> >
> > I can send emails when I run it from the component test but the
> connection
> > times out when the service is started by the demo-server. The SMS service
> > works fine and only the email service times out.
> >
> > Does anyone have ideas on how to solve this? I have tried a lot of
> > solutions on the web but I believe that this timeout is caused by
> security
> > constraints in Fineract CN
> >
> > *At your service,*
> >
> > *Ebenezer Graham*
> >
> > *BSc (Hons) Computing*
> >
> >
> > [image: EmailSignature.png]
> >
> > African Leadership University,
> >
> > Power Mill Road, Pamplemousses,
> >
> > Mauritius.
> >
> >
> > ​
> > *skype*:
> > ​ebenezer.graham
> > GitHub <https://github.com/ebenezergraham> | LinkedIn
> > <https://www.linkedin.com/in/ebenezer-graham/> | Twitter
> > <https://twitter.com/pactmart> | Facebook
> > <https://www.facebook.com/pactmart>
> > www.pactmart.com | Freelancing made easy.
> >
> >
> > *“Talk is cheap, show me the code.” *- *Linus Torvalds*
> >
> >
> >
> > On 23 August 2018 at 18:05, Ebenezer Graham <eg...@alustudent.com>
> > wrote:
> >
> > > Hi all,
> > >
> > > @Markus: The ActiveMQ configuration worked :). I am now getting one
> > > invocation. Thanks for the support,
> > >
> > > However, the entity creation is still not working but I think Myrle's
> > > feedback on my PR might do the trick.
> > >
> > > @Myrle: I have updated the private cwiki page with the credentials,
> > > thanks. Also, I have incorporated most of the feedback shared on the
> PRs
> > > and added a few comments.
> > > For the Domain objects, I have created tests for each of them. I will
> add
> > > more rigorous tests to it after making significant progress with the
> > > web-app interface
> > > and the connection timeout problem when the system is up. More about
> the
> > > issue below
> > > The issue has to do with service timeouts.
> https://pastebin.com/f8UAkvsa
> > > *N*
> > > * B: *the email and SMS services are correctly configured and do send
> out
> > > emails and SMS
> > > in the component test. However, when I make an actual build the mail
> > > connection times out even though it
> > > has been invoked
> > >
> > > @Awasum like you suggested, I have changed the JavaMail version to
> 1.4.1
> > > RELEASE and it works fine. Thanks
> > > I have created values in the ext.versions for the Twilio API and
> > > JavaMail in the shared.gradle
> > >
> > > My best guess is that there is something interrupting or inhibiting the
> > > connection when the entire system is
> > > up and running.
> > >
> > > Looking forward to your feedback.
> > >
> > > On 22 August 2018 at 16:03, Markus Geiss <ma...@kuelap.io>
> wrote:
> > >
> > >> Hey Ebenezer,
> > >>
> > >> hope this finds you well. (;
> > >>
> > >> looking at the two stack traces you've provided here is my take on it.
> > >>
> > >> The error while storing configuration is caused by a field in the
> > database
> > >> 'sender_number' being declared as not null, but no data is provided.
> In
> > >> the
> > >> create method of SMSConfiguration you are not handling the sender
> number
> > >> at
> > >> all. I would recommend to either use a builder pattern or just use
> plain
> > >> getter/setter to create the instance.
> > >>
> > >> With regards to receiving multiple (3) events, this is caused by the
> way
> > >> acitvemq is configured in your service. The default
> > >> for activemq.concurrency is 3-10, if you set this to 1-1 it will only
> > >> listen with 1 concurrent thread.
> > >>
> > >> Hope this helps.
> > >>
> > >> Cheers
> > >>
> > >> Markus
> > >>
> > >>
> > >>
> > >> On Wed, Aug 22, 2018 at 1:40 PM Ebenezer Graham <
> > egraham15@alustudent.com
> > >> >
> > >> wrote:
> > >>
> > >> > Thanks myrle,
> > >> >
> > >> > I have already created a demo email account called
> > >> > fineractcnnotificationdemo@gmail.com and I created it for the sole
> > >> purpose
> > >> > of testing emails for this service and for other contributors to
> use.
> > >> > Please advise me on this approach.
> > >> >
> > >> > Also, the password for ebenezergraham69@gmail.com and
> akyencorp@gmail
> > >> are
> > >> > no longer valid. I created app passwords and so I have already
> deleted
> > >> > those app passwords for my live account and are no longer valid.
> > >> >
> > >> > *Error:*
> > >> > In an attempt to store configurations from the repository I get this
> > >> error:
> > >> > https://pastebin.com/WqvRwXvB
> > >> >
> > >> > Please check: shouldCreateSMSConfigurationEntity()
> > >> > https://github.com/ebenezergraham/fineract-cn-notifications/
> > >> > blob/develop/component-test/src/main/java/org/apache/
> > >> > fineract/cn/notification/TestSMSService.java
> > >> >
> > >> > I am able to retrieve stored configurations but I am unable to
> create
> > a
> > >> > configuration and store. Same issue for email repository
> > >> >
> > >> > Second Issue: https://pastebin.com/LKz7HcGy
> > >> > I have managed to authenticate with identity and getting customer
> > >> object,
> > >> > however, when I trigger an invent from the fims web app, I get 3
> > >> > invocations from the ActiveMQ. How can I resolve this issue? Are my
> > >> > assumptions correct to begin with?
> > >> >
> > >> >
> > >> > *At your service,*
> > >> >
> > >> > *Ebenezer Graham*
> > >> >
> > >> > *BSc (Hons) Computing*
> > >> >
> > >> >
> > >> > [image: EmailSignature.png]
> > >> >
> > >> > African Leadership University,
> > >> >
> > >> > Power Mill Road, Pamplemousses,
> > >> >
> > >> > Mauritius.
> > >> >
> > >> >
> > >> >
> > >> > *skype*:
> > >> > ebenezer.graham
> > >> > GitHub <https://github.com/ebenezergraham> | LinkedIn
> > >> > <https://www.linkedin.com/in/ebenezer-graham/> | Twitter
> > >> > <https://twitter.com/pactmart> | Facebook
> > >> > <https://www.facebook.com/pactmart>
> > >> > www.pactmart.com | Freelancing made easy.
> > >> >
> > >> >
> > >> > *“Talk is cheap, show me the code.” *- *Linus Torvalds*
> > >> >
> > >> >
> > >> >
> > >> > On 22 August 2018 at 15:10, Ebenezer Graham <
> egraham15@alustudent.com
> > >
> > >> > wrote:
> > >> >
> > >> > > Thanks myrle,
> > >> > >
> > >> > > I have already created a demo email account called
> > >> > > fineractcnnotificationdemo@gmail.com and I created it for the
> sole
> > >> > > purpose of testing emails for this service and for other
> > contributors
> > >> > > to use. Please advise me on this approach.
> > >> > >
> > >> > > Also, the password for ebenezergraham69@gmail.com and
> > akyencorp@gmail
> > >> > are
> > >> > > not the real passwords. I created app passwords and so I have
> > already
> > >> > > deleted those app passwords for my live account and are no longer
> > >> valid.
> > >> > >
> > >> > > *Error:*
> > >> > > In an attempt to store configurations from the repository I get
> this
> > >> > error:
> > >> > >
> > >> > > Please check: shouldCreateSMSConfigurationEntity()
> > >> > >
> > >> > https://github.com/ebenezergraham/fineract-cn-notifications/
> > >> blob/develop/
> > >> > > component-test/src/main/java/org/apache/fineract/cn/
> > >> > > notification/TestSMSService.java
> > >> > >
> > >> > > I am able to retrieve stored configurations but I am unable to
> > create
> > >> a
> > >> > > configuration and store. Same issue for email repository
> > >> > >
> > >> > > Second Issue: https://pastebin.com/LKz7HcGy
> > >> > > I have managed to authenticate with identity and getting customer
> > >> object,
> > >> > > however, when I trigger an invent from the fims web app, I get 3
> > >> > > invocations from the ActiveMQ. How can I resolve this issue? Are
> my
> > >> > > assumptions correct to begin with?
> > >> > >
> > >> > >
> > >> > > *At your service,*
> > >> > >
> > >> > > *Ebenezer Graham*
> > >> > >
> > >> > > *BSc (Hons) Computing*
> > >> > >
> > >> > >
> > >> > > [image: EmailSignature.png]
> > >> > >
> > >> > > African Leadership University,
> > >> > >
> > >> > > Power Mill Road, Pamplemousses,
> > >> > >
> > >> > > Mauritius.
> > >> > >
> > >> > >
> > >> > >
> > >> > > *skype*:
> > >> > > ebenezer.graham
> > >> > > GitHub <https://github.com/ebenezergraham> | LinkedIn
> > >> > > <https://www.linkedin.com/in/ebenezer-graham/> | Twitter
> > >> > > <https://twitter.com/pactmart> | Facebook
> > >> > > <https://www.facebook.com/pactmart>
> > >> > > www.pactmart.com | Freelancing made easy.
> > >> > >
> > >> > >
> > >> > > *“Talk is cheap, show me the code.” *- *Linus Torvalds*
> > >> > >
> > >> > >
> > >> > >
> > >> > > On 22 August 2018 at 14:45, Myrle Krantz <my...@apache.org>
> wrote:
> > >> > >
> > >> > >> Hey Ebenezer,
> > >> > >>
> > >> > >> I was just reviewing your PR and realized that you had included
> > >> > >> passwords in it.  They look like they might be passwords to live
> > >> > >> accounts.  I strongly suggest you remove them from your latest
> PR.
> > >> > >>
> > >> > >> I also checked and it appears you have passwords in code that has
> > >> > >> already been merged.  If this is true, I suggest you change the
> > >> > >> password on the e-mail account: ebenezergraham69@gmail.com
> > >> > >>
> > >> > >> In general, we don't change git history.  It's okay to make
> > mistakes,
> > >> > >> and it's important to preserve the commit history of a project.
> > >> There
> > >> > >> are few exceptions I would make, but one of those is for
> passwords
> > or
> > >> > >> other secrets.  But only if those passwords or other secrets
> can't
> > >> > >> easily be replaced.  I don't believe this is the case here.
> > >> > >>
> > >> > >> Beyond that, I'm working on putting together feedback on your
> code
> > >> and
> > >> > >> will post that by the end of the day.
> > >> > >>
> > >> > >> Best Regards,
> > >> > >> Myrle
> > >> > >>
> > >> > >>
> > >> > >>
> > >> > >>
> > >> > >> On Wed, Aug 22, 2018 at 9:12 AM Ebenezer Graham
> > >> > >> <eg...@alustudent.com> wrote:
> > >> > >> >
> > >> > >> > Hi Awasum,
> > >> > >> >
> > >> > >> > I have been able to resolve the authentication problem and now
> > >> able to
> > >> > >> > retrieve customers.
> > >> > >> >
> > >> > >> > I have also written a component test for the email and sms
> > service.
> > >> > >> >
> > >> > >> > In an attempt to clean up my repository and squash the commits
> I
> > >> > messed
> > >> > >> up
> > >> > >> > my repo hence I have deleted it and forked a new one.
> > >> > >> >
> > >> > >> > In light of this, would like to find out if it is possible to
> > force
> > >> > >> merge
> > >> > >> > them so that apache repository takes commits from mine.  This
> is
> > >> > because
> > >> > >> > the one on Apache has some unwanted files such as the sample
> > >> classes
> > >> > and
> > >> > >> > travis.yml. Please let me know if this is possible.
> > >> > >> >
> > >> > >> > Also, I have made new PRs. Please review it and provide
> feedback
> > >> > >> >
> > >> > >> > Looking forward to your response.
> > >> > >> >
> > >> > >> > *At your service,*
> > >> > >> >
> > >> > >> > *Ebenezer Graham*
> > >> > >> >
> > >> > >> > *BSc (Hons) Computing*
> > >> > >> >
> > >> > >> >
> > >> > >> > [image: EmailSignature.png]
> > >> > >> >
> > >> > >> > African Leadership University,
> > >> > >> >
> > >> > >> > Power Mill Road, Pamplemousses,
> > >> > >> >
> > >> > >> > Mauritius.
> > >> > >> >
> > >> > >> >
> > >> > >> >
> > >> > >> > *skype*:
> > >> > >> > ebenezer.graham
> > >> > >> > GitHub <https://github.com/ebenezergraham> | LinkedIn
> > >> > >> > <https://www.linkedin.com/in/ebenezer-graham/> | Twitter
> > >> > >> > <https://twitter.com/pactmart> | Facebook
> > >> > >> > <https://www.facebook.com/pactmart>
> > >> > >> > www.pactmart.com | Freelancing made easy.
> > >> > >> >
> > >> > >> >
> > >> > >> > *“Talk is cheap, show me the code.” *- *Linus Torvalds*
> > >> > >> >
> > >> > >> >
> > >> > >> >
> > >> > >> > On 9 July 2018 at 12:25, Awasum Yannick <aw...@apache.org>
> > wrote:
> > >> > >> >
> > >> > >> > > Hello Graham,
> > >> > >> > >
> > >> > >> > > You need to create a user, maybe use *operator* and make sure
> > the
> > >> > >> user has
> > >> > >> > > permission to access customer (READ). Then you have to
> create a
> > >> > class
> > >> > >> which
> > >> > >> > > uses this user to connect and authenticate each time with the
> > >> > identity
> > >> > >> > > service before each customer information is retrieved.
> > >> > >> > >
> > >> > >> > > This user could be defined in the yml file of your service
> and
> > >> then
> > >> > >> > > injected into the Authentication Class you create.
> > >> > >> > >
> > >> > >> > > Each event which is emitted most often has the tenant within
> > the
> > >> > >> message.
> > >> > >> > > just get this tenant and check and set the
> *TenantContextHolder
> > >> *if
> > >> > >> not
> > >> > >> > > already set just before you authenticate. Immediately after
> > >> > >> authentication,
> > >> > >> > > Set the *UserContextHolder* too
> > >> > >> > >
> > >> > >> > > Another point is to remember to trim or remove the quotes
> from
> > >> the
> > >> > >> customer
> > >> > >> > > identifier before trying to get more contact details about
> > that
> > >> > >> customer:
> > >> > >> > > {String}.replaceAll("^\"|\"$", "")
> > >> > >> > >
> > >> > >> > > I hope this helps
> > >> > >> > >
> > >> > >> > > Thanks.
> > >> > >> > > Awasum Yannick
> > >> > >> > >
> > >> > >> > > On Tue, Jul 3, 2018 at 11:18 PM Ebenezer Graham <
> > >> > >> egraham15@alustudent.com>
> > >> > >> > > wrote:
> > >> > >> > >
> > >> > >> > > > Hello there,
> > >> > >> > > >
> > >> > >> > > > I would like to retrieve a customer after it has been
> > created,
> > >> or
> > >> > >> > > activated
> > >> > >> > > > etc.
> > >> > >> > > >
> > >> > >> > > > I have coded the logic to send the SMS and email after
> > getting
> > >> the
> > >> > >> > > contact
> > >> > >> > > > details, however, I have to get the customer to get the
> > contact
> > >> > >> details.
> > >> > >> > > >
> > >> > >> > > > This is the error I get during my call:
> > >> > >> https://pastebin.com/zrebwE8v
> > >> > >> > > >
> > >> > >> > > > I would like to get clarifications on how to set the tenant
> > and
> > >> > >> correctly
> > >> > >> > > > make authentication during a rest call.
> > >> > >> > > >
> > >> > >> > > > I would also like to get a better understanding of how to
> use
> > >> the
> > >> > >> Anubis,
> > >> > >> > > > test and identity microservice in this case
> > >> > >> > > >
> > >> > >> > > > *At your service,*
> > >> > >> > > >
> > >> > >> > > > *Ebenezer Graham*
> > >> > >> > > >
> > >> > >> > > > *BSc (Hons) Computing*
> > >> > >> > > >
> > >> > >> > > >
> > >> > >> > > > [image: EmailSignature.png]
> > >> > >> > > >
> > >> > >> > > > African Leadership University,
> > >> > >> > > >
> > >> > >> > > > Power Mill Road, Pamplemousses,
> > >> > >> > > >
> > >> > >> > > > Mauritius.
> > >> > >> > > >
> > >> > >> > > >
> > >> > >> > > > *skype*:
> > >> > >> > > > ebenezer.graham
> > >> > >> > > > GitHub <https://github.com/ebenezergraham> | LinkedIn
> > >> > >> > > > <https://www.linkedin.com/in/ebenezer-graham/> | Twitter
> > >> > >> > > > <https://twitter.com/pactmart> | Facebook
> > >> > >> > > > <https://www.facebook.com/pactmart>
> > >> > >> > > > www.pactmart.com | Freelancing made easy.
> > >> > >> > > >
> > >> > >> > > >
> > >> > >> > > > *“Talk is cheap, show me the code.” *- *Linus Torvalds*
> > >> > >> > > >
> > >> > >> > > >
> > >> > >> > > >
> > >> > >> > > > On 19 May 2018 at 00:41, Ebenezer Graham <
> > >> > egraham15@alustudent.com>
> > >> > >> > > wrote:
> > >> > >> > > >
> > >> > >> > > > > Hi everyone,
> > >> > >> > > > >
> > >> > >> > > > > I am Ebenezer a student from the African Leadership
> > >> University
> > >> > >> and I
> > >> > >> > > will
> > >> > >> > > > > be working on this project under the mentorship of Isaac
> > >> Kamga.
> > >> > >> > > > >
> > >> > >> > > > > The idea is to use this thread to discuss the decisions
> > being
> > >> > >> made on
> > >> > >> > > > this
> > >> > >> > > > > project so that the community has visibility on what's
> > >> happening
> > >> > >> and
> > >> > >> > > most
> > >> > >> > > > > importantly give constructive feedback.
> > >> > >> > > > >
> > >> > >> > > > > *EventListeners:*
> > >> > >> > > > > This is the Doc
> > >> > >> > > > > <
> > >> > >> > > > https://docs.google.com/document/d/
> 1kme5qrxOrO0WGUEvNgzv5XVk
> > >> gWtpg
> > >> > >> > > 0lbX-CrBH4js7o/edit?usp=sharing
> > >> > >> > > > >
> > >> > >> > > > > containing the shortlisted events which I believe qualify
> > >> for an
> > >> > >> Email
> > >> > >> > > or
> > >> > >> > > > > SMS notification. Please review and comment on the doc
> > >> > suggesting
> > >> > >> any
> > >> > >> > > > > addition or deletion or related feedback.
> > >> > >> > > > >
> > >> > >> > > > > *UI for the service:*
> > >> > >> > > > > This is a link <
> > https://wireframe.cc/pro/pp/5fb6b2e61167290>
> > >> to
> > >> > >> the
> > >> > >> > > > > wireframes for the UI of the service. Please give
> pointers
> > on
> > >> > what
> > >> > >> > > could
> > >> > >> > > > be
> > >> > >> > > > > added and what should be taken out.
> > >> > >> > > > >
> > >> > >> > > > >
> > >> > >> > > > > *At your service*
> > >> > >> > > > > *,*
> > >> > >> > > > >
> > >> > >> > > > > *Ebenezer Graham*
> > >> > >> > > > >
> > >> > >> > > > > *BSc (Hons) Computing*
> > >> > >> > > > >
> > >> > >> > > > >
> > >> > >> > > > > [image: EmailSignature.png]
> > >> > >> > > > >
> > >> > >> > > > > Beau Plan Business Park | West Building
> > >> > >> > > > >
> > >> > >> > > > > Pamplemousses |  Mauritius
> > >> > >> > > > >
> > >> > >> > > > >
> > >> > >> > > > > <http://www.pactmart.com/>
> > >> > >> > > > > <http://www.pactmart.com/>
> > >> > >> > > > > www.pactmart.com | Freelancing made easy.
> > >> > >> > > > > GitHub <https://github.com/ebenezergraham> | LinkedIn
> > >> > >> > > > > <https://www.linkedin.com/in/ebenezer-graham/> | Twitter
> > >> > >> > > > > <https://twitter.com/pactmart> | Facebook
> > >> > >> > > > > <https://www.facebook.com/pactmart> | Website
> > >> > >> > > > > <http://ebenezergraham.github.io/>
> > >> > >> > > > >
> > >> > >> > > > > *skype*:
> > >> > >> > > > > ebenezer.graham
> > >> > >> > > > > | *Phone*:
> > >> > >> > > > > +230 5840 9206 <+230%205840%209206>
> > >> > >> > > > >
> > >> > >> > > > >
> > >> > >> > > > > *“Practice isn’t the thing you do once you’re good. It’s
> > the
> > >> > >> thing you
> > >> > >> > > do
> > >> > >> > > > > that makes you good.”*
> > >> > >> > > > > -*Malcolm Gladwell*
> > >> > >> > > > >
> > >> > >> > > > >
> > >> > >> > > > >
> > >> > >> > > >
> > >> > >> > >
> > >> > >>
> > >> > >
> > >> > >
> > >> >
> > >>
> > >
> > >
> >
>

Re: [Discussion] Fineract CN SMS & Email Notifications Project

Posted by Awasum Yannick <aw...@apache.org>.
Hey Graham,

Are you using Gmail? If so then you might want to give your app (unsecure
in the eyes of Gmail) permission to send out mails from the email account
you are using.

Check these: https://support.google.com/accounts/answer/6010255?hl=en
https://myaccount.google.com/lesssecureapps

So allowing less secure apps to send mail by clicking the toggle button
might solve your problem.
Try that lets see. If there are still problems, please keep them coming.

Thanks.
Awasum

On Mon, Aug 27, 2018 at 5:03 PM Ebenezer Graham <eg...@alustudent.com>
wrote:

> Hi all,
>
> I am having a connection issue with the java mail.  https://pastebin.com
> /f8UAkvsa
>
> I can send emails when I run it from the component test but the connection
> times out when the service is started by the demo-server. The SMS service
> works fine and only the email service times out.
>
> Does anyone have ideas on how to solve this? I have tried a lot of
> solutions on the web but I believe that this timeout is caused by security
> constraints in Fineract CN
>
> *At your service,*
>
> *Ebenezer Graham*
>
> *BSc (Hons) Computing*
>
>
> [image: EmailSignature.png]
>
> African Leadership University,
>
> Power Mill Road, Pamplemousses,
>
> Mauritius.
>
>
> ​
> *skype*:
> ​ebenezer.graham
> GitHub <https://github.com/ebenezergraham> | LinkedIn
> <https://www.linkedin.com/in/ebenezer-graham/> | Twitter
> <https://twitter.com/pactmart> | Facebook
> <https://www.facebook.com/pactmart>
> www.pactmart.com | Freelancing made easy.
>
>
> *“Talk is cheap, show me the code.” *- *Linus Torvalds*
>
>
>
> On 23 August 2018 at 18:05, Ebenezer Graham <eg...@alustudent.com>
> wrote:
>
> > Hi all,
> >
> > @Markus: The ActiveMQ configuration worked :). I am now getting one
> > invocation. Thanks for the support,
> >
> > However, the entity creation is still not working but I think Myrle's
> > feedback on my PR might do the trick.
> >
> > @Myrle: I have updated the private cwiki page with the credentials,
> > thanks. Also, I have incorporated most of the feedback shared on the PRs
> > and added a few comments.
> > For the Domain objects, I have created tests for each of them. I will add
> > more rigorous tests to it after making significant progress with the
> > web-app interface
> > and the connection timeout problem when the system is up. More about the
> > issue below
> > The issue has to do with service timeouts. https://pastebin.com/f8UAkvsa
> > *N*
> > * B: *the email and SMS services are correctly configured and do send out
> > emails and SMS
> > in the component test. However, when I make an actual build the mail
> > connection times out even though it
> > has been invoked
> >
> > @Awasum like you suggested, I have changed the JavaMail version to 1.4.1
> > RELEASE and it works fine. Thanks
> > I have created values in the ext.versions for the Twilio API and
> > JavaMail in the shared.gradle
> >
> > My best guess is that there is something interrupting or inhibiting the
> > connection when the entire system is
> > up and running.
> >
> > Looking forward to your feedback.
> >
> > On 22 August 2018 at 16:03, Markus Geiss <ma...@kuelap.io> wrote:
> >
> >> Hey Ebenezer,
> >>
> >> hope this finds you well. (;
> >>
> >> looking at the two stack traces you've provided here is my take on it.
> >>
> >> The error while storing configuration is caused by a field in the
> database
> >> 'sender_number' being declared as not null, but no data is provided. In
> >> the
> >> create method of SMSConfiguration you are not handling the sender number
> >> at
> >> all. I would recommend to either use a builder pattern or just use plain
> >> getter/setter to create the instance.
> >>
> >> With regards to receiving multiple (3) events, this is caused by the way
> >> acitvemq is configured in your service. The default
> >> for activemq.concurrency is 3-10, if you set this to 1-1 it will only
> >> listen with 1 concurrent thread.
> >>
> >> Hope this helps.
> >>
> >> Cheers
> >>
> >> Markus
> >>
> >>
> >>
> >> On Wed, Aug 22, 2018 at 1:40 PM Ebenezer Graham <
> egraham15@alustudent.com
> >> >
> >> wrote:
> >>
> >> > Thanks myrle,
> >> >
> >> > I have already created a demo email account called
> >> > fineractcnnotificationdemo@gmail.com and I created it for the sole
> >> purpose
> >> > of testing emails for this service and for other contributors to use.
> >> > Please advise me on this approach.
> >> >
> >> > Also, the password for ebenezergraham69@gmail.com and akyencorp@gmail
> >> are
> >> > no longer valid. I created app passwords and so I have already deleted
> >> > those app passwords for my live account and are no longer valid.
> >> >
> >> > *Error:*
> >> > In an attempt to store configurations from the repository I get this
> >> error:
> >> > https://pastebin.com/WqvRwXvB
> >> >
> >> > Please check: shouldCreateSMSConfigurationEntity()
> >> > https://github.com/ebenezergraham/fineract-cn-notifications/
> >> > blob/develop/component-test/src/main/java/org/apache/
> >> > fineract/cn/notification/TestSMSService.java
> >> >
> >> > I am able to retrieve stored configurations but I am unable to create
> a
> >> > configuration and store. Same issue for email repository
> >> >
> >> > Second Issue: https://pastebin.com/LKz7HcGy
> >> > I have managed to authenticate with identity and getting customer
> >> object,
> >> > however, when I trigger an invent from the fims web app, I get 3
> >> > invocations from the ActiveMQ. How can I resolve this issue? Are my
> >> > assumptions correct to begin with?
> >> >
> >> >
> >> > *At your service,*
> >> >
> >> > *Ebenezer Graham*
> >> >
> >> > *BSc (Hons) Computing*
> >> >
> >> >
> >> > [image: EmailSignature.png]
> >> >
> >> > African Leadership University,
> >> >
> >> > Power Mill Road, Pamplemousses,
> >> >
> >> > Mauritius.
> >> >
> >> >
> >> >
> >> > *skype*:
> >> > ebenezer.graham
> >> > GitHub <https://github.com/ebenezergraham> | LinkedIn
> >> > <https://www.linkedin.com/in/ebenezer-graham/> | Twitter
> >> > <https://twitter.com/pactmart> | Facebook
> >> > <https://www.facebook.com/pactmart>
> >> > www.pactmart.com | Freelancing made easy.
> >> >
> >> >
> >> > *“Talk is cheap, show me the code.” *- *Linus Torvalds*
> >> >
> >> >
> >> >
> >> > On 22 August 2018 at 15:10, Ebenezer Graham <egraham15@alustudent.com
> >
> >> > wrote:
> >> >
> >> > > Thanks myrle,
> >> > >
> >> > > I have already created a demo email account called
> >> > > fineractcnnotificationdemo@gmail.com and I created it for the sole
> >> > > purpose of testing emails for this service and for other
> contributors
> >> > > to use. Please advise me on this approach.
> >> > >
> >> > > Also, the password for ebenezergraham69@gmail.com and
> akyencorp@gmail
> >> > are
> >> > > not the real passwords. I created app passwords and so I have
> already
> >> > > deleted those app passwords for my live account and are no longer
> >> valid.
> >> > >
> >> > > *Error:*
> >> > > In an attempt to store configurations from the repository I get this
> >> > error:
> >> > >
> >> > > Please check: shouldCreateSMSConfigurationEntity()
> >> > >
> >> > https://github.com/ebenezergraham/fineract-cn-notifications/
> >> blob/develop/
> >> > > component-test/src/main/java/org/apache/fineract/cn/
> >> > > notification/TestSMSService.java
> >> > >
> >> > > I am able to retrieve stored configurations but I am unable to
> create
> >> a
> >> > > configuration and store. Same issue for email repository
> >> > >
> >> > > Second Issue: https://pastebin.com/LKz7HcGy
> >> > > I have managed to authenticate with identity and getting customer
> >> object,
> >> > > however, when I trigger an invent from the fims web app, I get 3
> >> > > invocations from the ActiveMQ. How can I resolve this issue? Are my
> >> > > assumptions correct to begin with?
> >> > >
> >> > >
> >> > > *At your service,*
> >> > >
> >> > > *Ebenezer Graham*
> >> > >
> >> > > *BSc (Hons) Computing*
> >> > >
> >> > >
> >> > > [image: EmailSignature.png]
> >> > >
> >> > > African Leadership University,
> >> > >
> >> > > Power Mill Road, Pamplemousses,
> >> > >
> >> > > Mauritius.
> >> > >
> >> > >
> >> > >
> >> > > *skype*:
> >> > > ebenezer.graham
> >> > > GitHub <https://github.com/ebenezergraham> | LinkedIn
> >> > > <https://www.linkedin.com/in/ebenezer-graham/> | Twitter
> >> > > <https://twitter.com/pactmart> | Facebook
> >> > > <https://www.facebook.com/pactmart>
> >> > > www.pactmart.com | Freelancing made easy.
> >> > >
> >> > >
> >> > > *“Talk is cheap, show me the code.” *- *Linus Torvalds*
> >> > >
> >> > >
> >> > >
> >> > > On 22 August 2018 at 14:45, Myrle Krantz <my...@apache.org> wrote:
> >> > >
> >> > >> Hey Ebenezer,
> >> > >>
> >> > >> I was just reviewing your PR and realized that you had included
> >> > >> passwords in it.  They look like they might be passwords to live
> >> > >> accounts.  I strongly suggest you remove them from your latest PR.
> >> > >>
> >> > >> I also checked and it appears you have passwords in code that has
> >> > >> already been merged.  If this is true, I suggest you change the
> >> > >> password on the e-mail account: ebenezergraham69@gmail.com
> >> > >>
> >> > >> In general, we don't change git history.  It's okay to make
> mistakes,
> >> > >> and it's important to preserve the commit history of a project.
> >> There
> >> > >> are few exceptions I would make, but one of those is for passwords
> or
> >> > >> other secrets.  But only if those passwords or other secrets can't
> >> > >> easily be replaced.  I don't believe this is the case here.
> >> > >>
> >> > >> Beyond that, I'm working on putting together feedback on your code
> >> and
> >> > >> will post that by the end of the day.
> >> > >>
> >> > >> Best Regards,
> >> > >> Myrle
> >> > >>
> >> > >>
> >> > >>
> >> > >>
> >> > >> On Wed, Aug 22, 2018 at 9:12 AM Ebenezer Graham
> >> > >> <eg...@alustudent.com> wrote:
> >> > >> >
> >> > >> > Hi Awasum,
> >> > >> >
> >> > >> > I have been able to resolve the authentication problem and now
> >> able to
> >> > >> > retrieve customers.
> >> > >> >
> >> > >> > I have also written a component test for the email and sms
> service.
> >> > >> >
> >> > >> > In an attempt to clean up my repository and squash the commits I
> >> > messed
> >> > >> up
> >> > >> > my repo hence I have deleted it and forked a new one.
> >> > >> >
> >> > >> > In light of this, would like to find out if it is possible to
> force
> >> > >> merge
> >> > >> > them so that apache repository takes commits from mine.  This is
> >> > because
> >> > >> > the one on Apache has some unwanted files such as the sample
> >> classes
> >> > and
> >> > >> > travis.yml. Please let me know if this is possible.
> >> > >> >
> >> > >> > Also, I have made new PRs. Please review it and provide feedback
> >> > >> >
> >> > >> > Looking forward to your response.
> >> > >> >
> >> > >> > *At your service,*
> >> > >> >
> >> > >> > *Ebenezer Graham*
> >> > >> >
> >> > >> > *BSc (Hons) Computing*
> >> > >> >
> >> > >> >
> >> > >> > [image: EmailSignature.png]
> >> > >> >
> >> > >> > African Leadership University,
> >> > >> >
> >> > >> > Power Mill Road, Pamplemousses,
> >> > >> >
> >> > >> > Mauritius.
> >> > >> >
> >> > >> >
> >> > >> >
> >> > >> > *skype*:
> >> > >> > ebenezer.graham
> >> > >> > GitHub <https://github.com/ebenezergraham> | LinkedIn
> >> > >> > <https://www.linkedin.com/in/ebenezer-graham/> | Twitter
> >> > >> > <https://twitter.com/pactmart> | Facebook
> >> > >> > <https://www.facebook.com/pactmart>
> >> > >> > www.pactmart.com | Freelancing made easy.
> >> > >> >
> >> > >> >
> >> > >> > *“Talk is cheap, show me the code.” *- *Linus Torvalds*
> >> > >> >
> >> > >> >
> >> > >> >
> >> > >> > On 9 July 2018 at 12:25, Awasum Yannick <aw...@apache.org>
> wrote:
> >> > >> >
> >> > >> > > Hello Graham,
> >> > >> > >
> >> > >> > > You need to create a user, maybe use *operator* and make sure
> the
> >> > >> user has
> >> > >> > > permission to access customer (READ). Then you have to create a
> >> > class
> >> > >> which
> >> > >> > > uses this user to connect and authenticate each time with the
> >> > identity
> >> > >> > > service before each customer information is retrieved.
> >> > >> > >
> >> > >> > > This user could be defined in the yml file of your service and
> >> then
> >> > >> > > injected into the Authentication Class you create.
> >> > >> > >
> >> > >> > > Each event which is emitted most often has the tenant within
> the
> >> > >> message.
> >> > >> > > just get this tenant and check and set the *TenantContextHolder
> >> *if
> >> > >> not
> >> > >> > > already set just before you authenticate. Immediately after
> >> > >> authentication,
> >> > >> > > Set the *UserContextHolder* too
> >> > >> > >
> >> > >> > > Another point is to remember to trim or remove the quotes from
> >> the
> >> > >> customer
> >> > >> > > identifier before trying to get more contact details about
> that
> >> > >> customer:
> >> > >> > > {String}.replaceAll("^\"|\"$", "")
> >> > >> > >
> >> > >> > > I hope this helps
> >> > >> > >
> >> > >> > > Thanks.
> >> > >> > > Awasum Yannick
> >> > >> > >
> >> > >> > > On Tue, Jul 3, 2018 at 11:18 PM Ebenezer Graham <
> >> > >> egraham15@alustudent.com>
> >> > >> > > wrote:
> >> > >> > >
> >> > >> > > > Hello there,
> >> > >> > > >
> >> > >> > > > I would like to retrieve a customer after it has been
> created,
> >> or
> >> > >> > > activated
> >> > >> > > > etc.
> >> > >> > > >
> >> > >> > > > I have coded the logic to send the SMS and email after
> getting
> >> the
> >> > >> > > contact
> >> > >> > > > details, however, I have to get the customer to get the
> contact
> >> > >> details.
> >> > >> > > >
> >> > >> > > > This is the error I get during my call:
> >> > >> https://pastebin.com/zrebwE8v
> >> > >> > > >
> >> > >> > > > I would like to get clarifications on how to set the tenant
> and
> >> > >> correctly
> >> > >> > > > make authentication during a rest call.
> >> > >> > > >
> >> > >> > > > I would also like to get a better understanding of how to use
> >> the
> >> > >> Anubis,
> >> > >> > > > test and identity microservice in this case
> >> > >> > > >
> >> > >> > > > *At your service,*
> >> > >> > > >
> >> > >> > > > *Ebenezer Graham*
> >> > >> > > >
> >> > >> > > > *BSc (Hons) Computing*
> >> > >> > > >
> >> > >> > > >
> >> > >> > > > [image: EmailSignature.png]
> >> > >> > > >
> >> > >> > > > African Leadership University,
> >> > >> > > >
> >> > >> > > > Power Mill Road, Pamplemousses,
> >> > >> > > >
> >> > >> > > > Mauritius.
> >> > >> > > >
> >> > >> > > >
> >> > >> > > > *skype*:
> >> > >> > > > ebenezer.graham
> >> > >> > > > GitHub <https://github.com/ebenezergraham> | LinkedIn
> >> > >> > > > <https://www.linkedin.com/in/ebenezer-graham/> | Twitter
> >> > >> > > > <https://twitter.com/pactmart> | Facebook
> >> > >> > > > <https://www.facebook.com/pactmart>
> >> > >> > > > www.pactmart.com | Freelancing made easy.
> >> > >> > > >
> >> > >> > > >
> >> > >> > > > *“Talk is cheap, show me the code.” *- *Linus Torvalds*
> >> > >> > > >
> >> > >> > > >
> >> > >> > > >
> >> > >> > > > On 19 May 2018 at 00:41, Ebenezer Graham <
> >> > egraham15@alustudent.com>
> >> > >> > > wrote:
> >> > >> > > >
> >> > >> > > > > Hi everyone,
> >> > >> > > > >
> >> > >> > > > > I am Ebenezer a student from the African Leadership
> >> University
> >> > >> and I
> >> > >> > > will
> >> > >> > > > > be working on this project under the mentorship of Isaac
> >> Kamga.
> >> > >> > > > >
> >> > >> > > > > The idea is to use this thread to discuss the decisions
> being
> >> > >> made on
> >> > >> > > > this
> >> > >> > > > > project so that the community has visibility on what's
> >> happening
> >> > >> and
> >> > >> > > most
> >> > >> > > > > importantly give constructive feedback.
> >> > >> > > > >
> >> > >> > > > > *EventListeners:*
> >> > >> > > > > This is the Doc
> >> > >> > > > > <
> >> > >> > > > https://docs.google.com/document/d/1kme5qrxOrO0WGUEvNgzv5XVk
> >> gWtpg
> >> > >> > > 0lbX-CrBH4js7o/edit?usp=sharing
> >> > >> > > > >
> >> > >> > > > > containing the shortlisted events which I believe qualify
> >> for an
> >> > >> Email
> >> > >> > > or
> >> > >> > > > > SMS notification. Please review and comment on the doc
> >> > suggesting
> >> > >> any
> >> > >> > > > > addition or deletion or related feedback.
> >> > >> > > > >
> >> > >> > > > > *UI for the service:*
> >> > >> > > > > This is a link <
> https://wireframe.cc/pro/pp/5fb6b2e61167290>
> >> to
> >> > >> the
> >> > >> > > > > wireframes for the UI of the service. Please give pointers
> on
> >> > what
> >> > >> > > could
> >> > >> > > > be
> >> > >> > > > > added and what should be taken out.
> >> > >> > > > >
> >> > >> > > > >
> >> > >> > > > > *At your service*
> >> > >> > > > > *,*
> >> > >> > > > >
> >> > >> > > > > *Ebenezer Graham*
> >> > >> > > > >
> >> > >> > > > > *BSc (Hons) Computing*
> >> > >> > > > >
> >> > >> > > > >
> >> > >> > > > > [image: EmailSignature.png]
> >> > >> > > > >
> >> > >> > > > > Beau Plan Business Park | West Building
> >> > >> > > > >
> >> > >> > > > > Pamplemousses |  Mauritius
> >> > >> > > > >
> >> > >> > > > >
> >> > >> > > > > <http://www.pactmart.com/>
> >> > >> > > > > <http://www.pactmart.com/>
> >> > >> > > > > www.pactmart.com | Freelancing made easy.
> >> > >> > > > > GitHub <https://github.com/ebenezergraham> | LinkedIn
> >> > >> > > > > <https://www.linkedin.com/in/ebenezer-graham/> | Twitter
> >> > >> > > > > <https://twitter.com/pactmart> | Facebook
> >> > >> > > > > <https://www.facebook.com/pactmart> | Website
> >> > >> > > > > <http://ebenezergraham.github.io/>
> >> > >> > > > >
> >> > >> > > > > *skype*:
> >> > >> > > > > ebenezer.graham
> >> > >> > > > > | *Phone*:
> >> > >> > > > > +230 5840 9206 <+230%205840%209206>
> >> > >> > > > >
> >> > >> > > > >
> >> > >> > > > > *“Practice isn’t the thing you do once you’re good. It’s
> the
> >> > >> thing you
> >> > >> > > do
> >> > >> > > > > that makes you good.”*
> >> > >> > > > > -*Malcolm Gladwell*
> >> > >> > > > >
> >> > >> > > > >
> >> > >> > > > >
> >> > >> > > >
> >> > >> > >
> >> > >>
> >> > >
> >> > >
> >> >
> >>
> >
> >
>

Re: [Discussion] Fineract CN SMS & Email Notifications Project

Posted by Ebenezer Graham <eg...@alustudent.com>.
Hi all,

I am having a connection issue with the java mail.  https://pastebin.com
/f8UAkvsa

I can send emails when I run it from the component test but the connection
times out when the service is started by the demo-server. The SMS service
works fine and only the email service times out.

Does anyone have ideas on how to solve this? I have tried a lot of
solutions on the web but I believe that this timeout is caused by security
constraints in Fineract CN

*At your service,*

*Ebenezer Graham*

*BSc (Hons) Computing*


[image: EmailSignature.png]

African Leadership University,

Power Mill Road, Pamplemousses,

Mauritius.


​
*skype*:
​ebenezer.graham
GitHub <https://github.com/ebenezergraham> | LinkedIn
<https://www.linkedin.com/in/ebenezer-graham/> | Twitter
<https://twitter.com/pactmart> | Facebook
<https://www.facebook.com/pactmart>
www.pactmart.com | Freelancing made easy.


*“Talk is cheap, show me the code.” *- *Linus Torvalds*



On 23 August 2018 at 18:05, Ebenezer Graham <eg...@alustudent.com>
wrote:

> Hi all,
>
> @Markus: The ActiveMQ configuration worked :). I am now getting one
> invocation. Thanks for the support,
>
> However, the entity creation is still not working but I think Myrle's
> feedback on my PR might do the trick.
>
> @Myrle: I have updated the private cwiki page with the credentials,
> thanks. Also, I have incorporated most of the feedback shared on the PRs
> and added a few comments.
> For the Domain objects, I have created tests for each of them. I will add
> more rigorous tests to it after making significant progress with the
> web-app interface
> and the connection timeout problem when the system is up. More about the
> issue below
> The issue has to do with service timeouts. https://pastebin.com/f8UAkvsa
> *N*
> * B: *the email and SMS services are correctly configured and do send out
> emails and SMS
> in the component test. However, when I make an actual build the mail
> connection times out even though it
> has been invoked
>
> @Awasum like you suggested, I have changed the JavaMail version to 1.4.1
> RELEASE and it works fine. Thanks
> I have created values in the ext.versions for the Twilio API and
> JavaMail in the shared.gradle
>
> My best guess is that there is something interrupting or inhibiting the
> connection when the entire system is
> up and running.
>
> Looking forward to your feedback.
>
> On 22 August 2018 at 16:03, Markus Geiss <ma...@kuelap.io> wrote:
>
>> Hey Ebenezer,
>>
>> hope this finds you well. (;
>>
>> looking at the two stack traces you've provided here is my take on it.
>>
>> The error while storing configuration is caused by a field in the database
>> 'sender_number' being declared as not null, but no data is provided. In
>> the
>> create method of SMSConfiguration you are not handling the sender number
>> at
>> all. I would recommend to either use a builder pattern or just use plain
>> getter/setter to create the instance.
>>
>> With regards to receiving multiple (3) events, this is caused by the way
>> acitvemq is configured in your service. The default
>> for activemq.concurrency is 3-10, if you set this to 1-1 it will only
>> listen with 1 concurrent thread.
>>
>> Hope this helps.
>>
>> Cheers
>>
>> Markus
>>
>>
>>
>> On Wed, Aug 22, 2018 at 1:40 PM Ebenezer Graham <egraham15@alustudent.com
>> >
>> wrote:
>>
>> > Thanks myrle,
>> >
>> > I have already created a demo email account called
>> > fineractcnnotificationdemo@gmail.com and I created it for the sole
>> purpose
>> > of testing emails for this service and for other contributors to use.
>> > Please advise me on this approach.
>> >
>> > Also, the password for ebenezergraham69@gmail.com and akyencorp@gmail
>> are
>> > no longer valid. I created app passwords and so I have already deleted
>> > those app passwords for my live account and are no longer valid.
>> >
>> > *Error:*
>> > In an attempt to store configurations from the repository I get this
>> error:
>> > https://pastebin.com/WqvRwXvB
>> >
>> > Please check: shouldCreateSMSConfigurationEntity()
>> > https://github.com/ebenezergraham/fineract-cn-notifications/
>> > blob/develop/component-test/src/main/java/org/apache/
>> > fineract/cn/notification/TestSMSService.java
>> >
>> > I am able to retrieve stored configurations but I am unable to create a
>> > configuration and store. Same issue for email repository
>> >
>> > Second Issue: https://pastebin.com/LKz7HcGy
>> > I have managed to authenticate with identity and getting customer
>> object,
>> > however, when I trigger an invent from the fims web app, I get 3
>> > invocations from the ActiveMQ. How can I resolve this issue? Are my
>> > assumptions correct to begin with?
>> >
>> >
>> > *At your service,*
>> >
>> > *Ebenezer Graham*
>> >
>> > *BSc (Hons) Computing*
>> >
>> >
>> > [image: EmailSignature.png]
>> >
>> > African Leadership University,
>> >
>> > Power Mill Road, Pamplemousses,
>> >
>> > Mauritius.
>> >
>> >
>> >
>> > *skype*:
>> > ebenezer.graham
>> > GitHub <https://github.com/ebenezergraham> | LinkedIn
>> > <https://www.linkedin.com/in/ebenezer-graham/> | Twitter
>> > <https://twitter.com/pactmart> | Facebook
>> > <https://www.facebook.com/pactmart>
>> > www.pactmart.com | Freelancing made easy.
>> >
>> >
>> > *“Talk is cheap, show me the code.” *- *Linus Torvalds*
>> >
>> >
>> >
>> > On 22 August 2018 at 15:10, Ebenezer Graham <eg...@alustudent.com>
>> > wrote:
>> >
>> > > Thanks myrle,
>> > >
>> > > I have already created a demo email account called
>> > > fineractcnnotificationdemo@gmail.com and I created it for the sole
>> > > purpose of testing emails for this service and for other contributors
>> > > to use. Please advise me on this approach.
>> > >
>> > > Also, the password for ebenezergraham69@gmail.com and akyencorp@gmail
>> > are
>> > > not the real passwords. I created app passwords and so I have already
>> > > deleted those app passwords for my live account and are no longer
>> valid.
>> > >
>> > > *Error:*
>> > > In an attempt to store configurations from the repository I get this
>> > error:
>> > >
>> > > Please check: shouldCreateSMSConfigurationEntity()
>> > >
>> > https://github.com/ebenezergraham/fineract-cn-notifications/
>> blob/develop/
>> > > component-test/src/main/java/org/apache/fineract/cn/
>> > > notification/TestSMSService.java
>> > >
>> > > I am able to retrieve stored configurations but I am unable to create
>> a
>> > > configuration and store. Same issue for email repository
>> > >
>> > > Second Issue: https://pastebin.com/LKz7HcGy
>> > > I have managed to authenticate with identity and getting customer
>> object,
>> > > however, when I trigger an invent from the fims web app, I get 3
>> > > invocations from the ActiveMQ. How can I resolve this issue? Are my
>> > > assumptions correct to begin with?
>> > >
>> > >
>> > > *At your service,*
>> > >
>> > > *Ebenezer Graham*
>> > >
>> > > *BSc (Hons) Computing*
>> > >
>> > >
>> > > [image: EmailSignature.png]
>> > >
>> > > African Leadership University,
>> > >
>> > > Power Mill Road, Pamplemousses,
>> > >
>> > > Mauritius.
>> > >
>> > >
>> > >
>> > > *skype*:
>> > > ebenezer.graham
>> > > GitHub <https://github.com/ebenezergraham> | LinkedIn
>> > > <https://www.linkedin.com/in/ebenezer-graham/> | Twitter
>> > > <https://twitter.com/pactmart> | Facebook
>> > > <https://www.facebook.com/pactmart>
>> > > www.pactmart.com | Freelancing made easy.
>> > >
>> > >
>> > > *“Talk is cheap, show me the code.” *- *Linus Torvalds*
>> > >
>> > >
>> > >
>> > > On 22 August 2018 at 14:45, Myrle Krantz <my...@apache.org> wrote:
>> > >
>> > >> Hey Ebenezer,
>> > >>
>> > >> I was just reviewing your PR and realized that you had included
>> > >> passwords in it.  They look like they might be passwords to live
>> > >> accounts.  I strongly suggest you remove them from your latest PR.
>> > >>
>> > >> I also checked and it appears you have passwords in code that has
>> > >> already been merged.  If this is true, I suggest you change the
>> > >> password on the e-mail account: ebenezergraham69@gmail.com
>> > >>
>> > >> In general, we don't change git history.  It's okay to make mistakes,
>> > >> and it's important to preserve the commit history of a project.
>> There
>> > >> are few exceptions I would make, but one of those is for passwords or
>> > >> other secrets.  But only if those passwords or other secrets can't
>> > >> easily be replaced.  I don't believe this is the case here.
>> > >>
>> > >> Beyond that, I'm working on putting together feedback on your code
>> and
>> > >> will post that by the end of the day.
>> > >>
>> > >> Best Regards,
>> > >> Myrle
>> > >>
>> > >>
>> > >>
>> > >>
>> > >> On Wed, Aug 22, 2018 at 9:12 AM Ebenezer Graham
>> > >> <eg...@alustudent.com> wrote:
>> > >> >
>> > >> > Hi Awasum,
>> > >> >
>> > >> > I have been able to resolve the authentication problem and now
>> able to
>> > >> > retrieve customers.
>> > >> >
>> > >> > I have also written a component test for the email and sms service.
>> > >> >
>> > >> > In an attempt to clean up my repository and squash the commits I
>> > messed
>> > >> up
>> > >> > my repo hence I have deleted it and forked a new one.
>> > >> >
>> > >> > In light of this, would like to find out if it is possible to force
>> > >> merge
>> > >> > them so that apache repository takes commits from mine.  This is
>> > because
>> > >> > the one on Apache has some unwanted files such as the sample
>> classes
>> > and
>> > >> > travis.yml. Please let me know if this is possible.
>> > >> >
>> > >> > Also, I have made new PRs. Please review it and provide feedback
>> > >> >
>> > >> > Looking forward to your response.
>> > >> >
>> > >> > *At your service,*
>> > >> >
>> > >> > *Ebenezer Graham*
>> > >> >
>> > >> > *BSc (Hons) Computing*
>> > >> >
>> > >> >
>> > >> > [image: EmailSignature.png]
>> > >> >
>> > >> > African Leadership University,
>> > >> >
>> > >> > Power Mill Road, Pamplemousses,
>> > >> >
>> > >> > Mauritius.
>> > >> >
>> > >> >
>> > >> >
>> > >> > *skype*:
>> > >> > ebenezer.graham
>> > >> > GitHub <https://github.com/ebenezergraham> | LinkedIn
>> > >> > <https://www.linkedin.com/in/ebenezer-graham/> | Twitter
>> > >> > <https://twitter.com/pactmart> | Facebook
>> > >> > <https://www.facebook.com/pactmart>
>> > >> > www.pactmart.com | Freelancing made easy.
>> > >> >
>> > >> >
>> > >> > *“Talk is cheap, show me the code.” *- *Linus Torvalds*
>> > >> >
>> > >> >
>> > >> >
>> > >> > On 9 July 2018 at 12:25, Awasum Yannick <aw...@apache.org> wrote:
>> > >> >
>> > >> > > Hello Graham,
>> > >> > >
>> > >> > > You need to create a user, maybe use *operator* and make sure the
>> > >> user has
>> > >> > > permission to access customer (READ). Then you have to create a
>> > class
>> > >> which
>> > >> > > uses this user to connect and authenticate each time with the
>> > identity
>> > >> > > service before each customer information is retrieved.
>> > >> > >
>> > >> > > This user could be defined in the yml file of your service and
>> then
>> > >> > > injected into the Authentication Class you create.
>> > >> > >
>> > >> > > Each event which is emitted most often has the tenant within the
>> > >> message.
>> > >> > > just get this tenant and check and set the *TenantContextHolder
>> *if
>> > >> not
>> > >> > > already set just before you authenticate. Immediately after
>> > >> authentication,
>> > >> > > Set the *UserContextHolder* too
>> > >> > >
>> > >> > > Another point is to remember to trim or remove the quotes from
>> the
>> > >> customer
>> > >> > > identifier before trying to get more contact details about  that
>> > >> customer:
>> > >> > > {String}.replaceAll("^\"|\"$", "")
>> > >> > >
>> > >> > > I hope this helps
>> > >> > >
>> > >> > > Thanks.
>> > >> > > Awasum Yannick
>> > >> > >
>> > >> > > On Tue, Jul 3, 2018 at 11:18 PM Ebenezer Graham <
>> > >> egraham15@alustudent.com>
>> > >> > > wrote:
>> > >> > >
>> > >> > > > Hello there,
>> > >> > > >
>> > >> > > > I would like to retrieve a customer after it has been created,
>> or
>> > >> > > activated
>> > >> > > > etc.
>> > >> > > >
>> > >> > > > I have coded the logic to send the SMS and email after getting
>> the
>> > >> > > contact
>> > >> > > > details, however, I have to get the customer to get the contact
>> > >> details.
>> > >> > > >
>> > >> > > > This is the error I get during my call:
>> > >> https://pastebin.com/zrebwE8v
>> > >> > > >
>> > >> > > > I would like to get clarifications on how to set the tenant and
>> > >> correctly
>> > >> > > > make authentication during a rest call.
>> > >> > > >
>> > >> > > > I would also like to get a better understanding of how to use
>> the
>> > >> Anubis,
>> > >> > > > test and identity microservice in this case
>> > >> > > >
>> > >> > > > *At your service,*
>> > >> > > >
>> > >> > > > *Ebenezer Graham*
>> > >> > > >
>> > >> > > > *BSc (Hons) Computing*
>> > >> > > >
>> > >> > > >
>> > >> > > > [image: EmailSignature.png]
>> > >> > > >
>> > >> > > > African Leadership University,
>> > >> > > >
>> > >> > > > Power Mill Road, Pamplemousses,
>> > >> > > >
>> > >> > > > Mauritius.
>> > >> > > >
>> > >> > > >
>> > >> > > > *skype*:
>> > >> > > > ebenezer.graham
>> > >> > > > GitHub <https://github.com/ebenezergraham> | LinkedIn
>> > >> > > > <https://www.linkedin.com/in/ebenezer-graham/> | Twitter
>> > >> > > > <https://twitter.com/pactmart> | Facebook
>> > >> > > > <https://www.facebook.com/pactmart>
>> > >> > > > www.pactmart.com | Freelancing made easy.
>> > >> > > >
>> > >> > > >
>> > >> > > > *“Talk is cheap, show me the code.” *- *Linus Torvalds*
>> > >> > > >
>> > >> > > >
>> > >> > > >
>> > >> > > > On 19 May 2018 at 00:41, Ebenezer Graham <
>> > egraham15@alustudent.com>
>> > >> > > wrote:
>> > >> > > >
>> > >> > > > > Hi everyone,
>> > >> > > > >
>> > >> > > > > I am Ebenezer a student from the African Leadership
>> University
>> > >> and I
>> > >> > > will
>> > >> > > > > be working on this project under the mentorship of Isaac
>> Kamga.
>> > >> > > > >
>> > >> > > > > The idea is to use this thread to discuss the decisions being
>> > >> made on
>> > >> > > > this
>> > >> > > > > project so that the community has visibility on what's
>> happening
>> > >> and
>> > >> > > most
>> > >> > > > > importantly give constructive feedback.
>> > >> > > > >
>> > >> > > > > *EventListeners:*
>> > >> > > > > This is the Doc
>> > >> > > > > <
>> > >> > > > https://docs.google.com/document/d/1kme5qrxOrO0WGUEvNgzv5XVk
>> gWtpg
>> > >> > > 0lbX-CrBH4js7o/edit?usp=sharing
>> > >> > > > >
>> > >> > > > > containing the shortlisted events which I believe qualify
>> for an
>> > >> Email
>> > >> > > or
>> > >> > > > > SMS notification. Please review and comment on the doc
>> > suggesting
>> > >> any
>> > >> > > > > addition or deletion or related feedback.
>> > >> > > > >
>> > >> > > > > *UI for the service:*
>> > >> > > > > This is a link <https://wireframe.cc/pro/pp/5fb6b2e61167290>
>> to
>> > >> the
>> > >> > > > > wireframes for the UI of the service. Please give pointers on
>> > what
>> > >> > > could
>> > >> > > > be
>> > >> > > > > added and what should be taken out.
>> > >> > > > >
>> > >> > > > >
>> > >> > > > > *At your service*
>> > >> > > > > *,*
>> > >> > > > >
>> > >> > > > > *Ebenezer Graham*
>> > >> > > > >
>> > >> > > > > *BSc (Hons) Computing*
>> > >> > > > >
>> > >> > > > >
>> > >> > > > > [image: EmailSignature.png]
>> > >> > > > >
>> > >> > > > > Beau Plan Business Park | West Building
>> > >> > > > >
>> > >> > > > > Pamplemousses |  Mauritius
>> > >> > > > >
>> > >> > > > >
>> > >> > > > > <http://www.pactmart.com/>
>> > >> > > > > <http://www.pactmart.com/>
>> > >> > > > > www.pactmart.com | Freelancing made easy.
>> > >> > > > > GitHub <https://github.com/ebenezergraham> | LinkedIn
>> > >> > > > > <https://www.linkedin.com/in/ebenezer-graham/> | Twitter
>> > >> > > > > <https://twitter.com/pactmart> | Facebook
>> > >> > > > > <https://www.facebook.com/pactmart> | Website
>> > >> > > > > <http://ebenezergraham.github.io/>
>> > >> > > > >
>> > >> > > > > *skype*:
>> > >> > > > > ebenezer.graham
>> > >> > > > > | *Phone*:
>> > >> > > > > +230 5840 9206 <+230%205840%209206>
>> > >> > > > >
>> > >> > > > >
>> > >> > > > > *“Practice isn’t the thing you do once you’re good. It’s the
>> > >> thing you
>> > >> > > do
>> > >> > > > > that makes you good.”*
>> > >> > > > > -*Malcolm Gladwell*
>> > >> > > > >
>> > >> > > > >
>> > >> > > > >
>> > >> > > >
>> > >> > >
>> > >>
>> > >
>> > >
>> >
>>
>
>

Re: [Discussion] Fineract CN SMS & Email Notifications Project

Posted by Ebenezer Graham <eg...@alustudent.com>.
Hi all,

@Markus: The ActiveMQ configuration worked :). I am now getting one
invocation. Thanks for the support,

However, the entity creation is still not working but I think Myrle's
feedback on my PR might do the trick.

@Myrle: I have updated the private cwiki page with the credentials, thanks.
Also, I have incorporated most of the feedback shared on the PRs
and added a few comments.
For the Domain objects, I have created tests for each of them. I will add
more rigorous tests to it after making significant progress with the
web-app interface
and the connection timeout problem when the system is up. More about the
issue below
The issue has to do with service timeouts. https://pastebin.com/f8UAkvsa
*N*
* B: *the email and SMS services are correctly configured and do send out
emails and SMS
in the component test. However, when I make an actual build the mail
connection times out even though it
has been invoked

@Awasum like you suggested, I have changed the JavaMail version to 1.4.1
RELEASE and it works fine. Thanks
I have created values in the ext.versions for the Twilio API and
JavaMail in the shared.gradle

My best guess is that there is something interrupting or inhibiting the
connection when the entire system is
up and running.

Looking forward to your feedback.

On 22 August 2018 at 16:03, Markus Geiss <ma...@kuelap.io> wrote:

> Hey Ebenezer,
>
> hope this finds you well. (;
>
> looking at the two stack traces you've provided here is my take on it.
>
> The error while storing configuration is caused by a field in the database
> 'sender_number' being declared as not null, but no data is provided. In the
> create method of SMSConfiguration you are not handling the sender number at
> all. I would recommend to either use a builder pattern or just use plain
> getter/setter to create the instance.
>
> With regards to receiving multiple (3) events, this is caused by the way
> acitvemq is configured in your service. The default
> for activemq.concurrency is 3-10, if you set this to 1-1 it will only
> listen with 1 concurrent thread.
>
> Hope this helps.
>
> Cheers
>
> Markus
>
>
>
> On Wed, Aug 22, 2018 at 1:40 PM Ebenezer Graham <eg...@alustudent.com>
> wrote:
>
> > Thanks myrle,
> >
> > I have already created a demo email account called
> > fineractcnnotificationdemo@gmail.com and I created it for the sole
> purpose
> > of testing emails for this service and for other contributors to use.
> > Please advise me on this approach.
> >
> > Also, the password for ebenezergraham69@gmail.com and akyencorp@gmail
> are
> > no longer valid. I created app passwords and so I have already deleted
> > those app passwords for my live account and are no longer valid.
> >
> > *Error:*
> > In an attempt to store configurations from the repository I get this
> error:
> > https://pastebin.com/WqvRwXvB
> >
> > Please check: shouldCreateSMSConfigurationEntity()
> > https://github.com/ebenezergraham/fineract-cn-notifications/
> > blob/develop/component-test/src/main/java/org/apache/
> > fineract/cn/notification/TestSMSService.java
> >
> > I am able to retrieve stored configurations but I am unable to create a
> > configuration and store. Same issue for email repository
> >
> > Second Issue: https://pastebin.com/LKz7HcGy
> > I have managed to authenticate with identity and getting customer object,
> > however, when I trigger an invent from the fims web app, I get 3
> > invocations from the ActiveMQ. How can I resolve this issue? Are my
> > assumptions correct to begin with?
> >
> >
> > *At your service,*
> >
> > *Ebenezer Graham*
> >
> > *BSc (Hons) Computing*
> >
> >
> > [image: EmailSignature.png]
> >
> > African Leadership University,
> >
> > Power Mill Road, Pamplemousses,
> >
> > Mauritius.
> >
> >
> >
> > *skype*:
> > ebenezer.graham
> > GitHub <https://github.com/ebenezergraham> | LinkedIn
> > <https://www.linkedin.com/in/ebenezer-graham/> | Twitter
> > <https://twitter.com/pactmart> | Facebook
> > <https://www.facebook.com/pactmart>
> > www.pactmart.com | Freelancing made easy.
> >
> >
> > *“Talk is cheap, show me the code.” *- *Linus Torvalds*
> >
> >
> >
> > On 22 August 2018 at 15:10, Ebenezer Graham <eg...@alustudent.com>
> > wrote:
> >
> > > Thanks myrle,
> > >
> > > I have already created a demo email account called
> > > fineractcnnotificationdemo@gmail.com and I created it for the sole
> > > purpose of testing emails for this service and for other contributors
> > > to use. Please advise me on this approach.
> > >
> > > Also, the password for ebenezergraham69@gmail.com and akyencorp@gmail
> > are
> > > not the real passwords. I created app passwords and so I have already
> > > deleted those app passwords for my live account and are no longer
> valid.
> > >
> > > *Error:*
> > > In an attempt to store configurations from the repository I get this
> > error:
> > >
> > > Please check: shouldCreateSMSConfigurationEntity()
> > >
> > https://github.com/ebenezergraham/fineract-cn-notifications/
> blob/develop/
> > > component-test/src/main/java/org/apache/fineract/cn/
> > > notification/TestSMSService.java
> > >
> > > I am able to retrieve stored configurations but I am unable to create a
> > > configuration and store. Same issue for email repository
> > >
> > > Second Issue: https://pastebin.com/LKz7HcGy
> > > I have managed to authenticate with identity and getting customer
> object,
> > > however, when I trigger an invent from the fims web app, I get 3
> > > invocations from the ActiveMQ. How can I resolve this issue? Are my
> > > assumptions correct to begin with?
> > >
> > >
> > > *At your service,*
> > >
> > > *Ebenezer Graham*
> > >
> > > *BSc (Hons) Computing*
> > >
> > >
> > > [image: EmailSignature.png]
> > >
> > > African Leadership University,
> > >
> > > Power Mill Road, Pamplemousses,
> > >
> > > Mauritius.
> > >
> > >
> > >
> > > *skype*:
> > > ebenezer.graham
> > > GitHub <https://github.com/ebenezergraham> | LinkedIn
> > > <https://www.linkedin.com/in/ebenezer-graham/> | Twitter
> > > <https://twitter.com/pactmart> | Facebook
> > > <https://www.facebook.com/pactmart>
> > > www.pactmart.com | Freelancing made easy.
> > >
> > >
> > > *“Talk is cheap, show me the code.” *- *Linus Torvalds*
> > >
> > >
> > >
> > > On 22 August 2018 at 14:45, Myrle Krantz <my...@apache.org> wrote:
> > >
> > >> Hey Ebenezer,
> > >>
> > >> I was just reviewing your PR and realized that you had included
> > >> passwords in it.  They look like they might be passwords to live
> > >> accounts.  I strongly suggest you remove them from your latest PR.
> > >>
> > >> I also checked and it appears you have passwords in code that has
> > >> already been merged.  If this is true, I suggest you change the
> > >> password on the e-mail account: ebenezergraham69@gmail.com
> > >>
> > >> In general, we don't change git history.  It's okay to make mistakes,
> > >> and it's important to preserve the commit history of a project.  There
> > >> are few exceptions I would make, but one of those is for passwords or
> > >> other secrets.  But only if those passwords or other secrets can't
> > >> easily be replaced.  I don't believe this is the case here.
> > >>
> > >> Beyond that, I'm working on putting together feedback on your code and
> > >> will post that by the end of the day.
> > >>
> > >> Best Regards,
> > >> Myrle
> > >>
> > >>
> > >>
> > >>
> > >> On Wed, Aug 22, 2018 at 9:12 AM Ebenezer Graham
> > >> <eg...@alustudent.com> wrote:
> > >> >
> > >> > Hi Awasum,
> > >> >
> > >> > I have been able to resolve the authentication problem and now able
> to
> > >> > retrieve customers.
> > >> >
> > >> > I have also written a component test for the email and sms service.
> > >> >
> > >> > In an attempt to clean up my repository and squash the commits I
> > messed
> > >> up
> > >> > my repo hence I have deleted it and forked a new one.
> > >> >
> > >> > In light of this, would like to find out if it is possible to force
> > >> merge
> > >> > them so that apache repository takes commits from mine.  This is
> > because
> > >> > the one on Apache has some unwanted files such as the sample classes
> > and
> > >> > travis.yml. Please let me know if this is possible.
> > >> >
> > >> > Also, I have made new PRs. Please review it and provide feedback
> > >> >
> > >> > Looking forward to your response.
> > >> >
> > >> > *At your service,*
> > >> >
> > >> > *Ebenezer Graham*
> > >> >
> > >> > *BSc (Hons) Computing*
> > >> >
> > >> >
> > >> > [image: EmailSignature.png]
> > >> >
> > >> > African Leadership University,
> > >> >
> > >> > Power Mill Road, Pamplemousses,
> > >> >
> > >> > Mauritius.
> > >> >
> > >> >
> > >> >
> > >> > *skype*:
> > >> > ebenezer.graham
> > >> > GitHub <https://github.com/ebenezergraham> | LinkedIn
> > >> > <https://www.linkedin.com/in/ebenezer-graham/> | Twitter
> > >> > <https://twitter.com/pactmart> | Facebook
> > >> > <https://www.facebook.com/pactmart>
> > >> > www.pactmart.com | Freelancing made easy.
> > >> >
> > >> >
> > >> > *“Talk is cheap, show me the code.” *- *Linus Torvalds*
> > >> >
> > >> >
> > >> >
> > >> > On 9 July 2018 at 12:25, Awasum Yannick <aw...@apache.org> wrote:
> > >> >
> > >> > > Hello Graham,
> > >> > >
> > >> > > You need to create a user, maybe use *operator* and make sure the
> > >> user has
> > >> > > permission to access customer (READ). Then you have to create a
> > class
> > >> which
> > >> > > uses this user to connect and authenticate each time with the
> > identity
> > >> > > service before each customer information is retrieved.
> > >> > >
> > >> > > This user could be defined in the yml file of your service and
> then
> > >> > > injected into the Authentication Class you create.
> > >> > >
> > >> > > Each event which is emitted most often has the tenant within the
> > >> message.
> > >> > > just get this tenant and check and set the *TenantContextHolder
> *if
> > >> not
> > >> > > already set just before you authenticate. Immediately after
> > >> authentication,
> > >> > > Set the *UserContextHolder* too
> > >> > >
> > >> > > Another point is to remember to trim or remove the quotes from the
> > >> customer
> > >> > > identifier before trying to get more contact details about  that
> > >> customer:
> > >> > > {String}.replaceAll("^\"|\"$", "")
> > >> > >
> > >> > > I hope this helps
> > >> > >
> > >> > > Thanks.
> > >> > > Awasum Yannick
> > >> > >
> > >> > > On Tue, Jul 3, 2018 at 11:18 PM Ebenezer Graham <
> > >> egraham15@alustudent.com>
> > >> > > wrote:
> > >> > >
> > >> > > > Hello there,
> > >> > > >
> > >> > > > I would like to retrieve a customer after it has been created,
> or
> > >> > > activated
> > >> > > > etc.
> > >> > > >
> > >> > > > I have coded the logic to send the SMS and email after getting
> the
> > >> > > contact
> > >> > > > details, however, I have to get the customer to get the contact
> > >> details.
> > >> > > >
> > >> > > > This is the error I get during my call:
> > >> https://pastebin.com/zrebwE8v
> > >> > > >
> > >> > > > I would like to get clarifications on how to set the tenant and
> > >> correctly
> > >> > > > make authentication during a rest call.
> > >> > > >
> > >> > > > I would also like to get a better understanding of how to use
> the
> > >> Anubis,
> > >> > > > test and identity microservice in this case
> > >> > > >
> > >> > > > *At your service,*
> > >> > > >
> > >> > > > *Ebenezer Graham*
> > >> > > >
> > >> > > > *BSc (Hons) Computing*
> > >> > > >
> > >> > > >
> > >> > > > [image: EmailSignature.png]
> > >> > > >
> > >> > > > African Leadership University,
> > >> > > >
> > >> > > > Power Mill Road, Pamplemousses,
> > >> > > >
> > >> > > > Mauritius.
> > >> > > >
> > >> > > >
> > >> > > > *skype*:
> > >> > > > ebenezer.graham
> > >> > > > GitHub <https://github.com/ebenezergraham> | LinkedIn
> > >> > > > <https://www.linkedin.com/in/ebenezer-graham/> | Twitter
> > >> > > > <https://twitter.com/pactmart> | Facebook
> > >> > > > <https://www.facebook.com/pactmart>
> > >> > > > www.pactmart.com | Freelancing made easy.
> > >> > > >
> > >> > > >
> > >> > > > *“Talk is cheap, show me the code.” *- *Linus Torvalds*
> > >> > > >
> > >> > > >
> > >> > > >
> > >> > > > On 19 May 2018 at 00:41, Ebenezer Graham <
> > egraham15@alustudent.com>
> > >> > > wrote:
> > >> > > >
> > >> > > > > Hi everyone,
> > >> > > > >
> > >> > > > > I am Ebenezer a student from the African Leadership University
> > >> and I
> > >> > > will
> > >> > > > > be working on this project under the mentorship of Isaac
> Kamga.
> > >> > > > >
> > >> > > > > The idea is to use this thread to discuss the decisions being
> > >> made on
> > >> > > > this
> > >> > > > > project so that the community has visibility on what's
> happening
> > >> and
> > >> > > most
> > >> > > > > importantly give constructive feedback.
> > >> > > > >
> > >> > > > > *EventListeners:*
> > >> > > > > This is the Doc
> > >> > > > > <
> > >> > > > https://docs.google.com/document/d/1kme5qrxOrO0WGUEvNgzv5XVk
> gWtpg
> > >> > > 0lbX-CrBH4js7o/edit?usp=sharing
> > >> > > > >
> > >> > > > > containing the shortlisted events which I believe qualify for
> an
> > >> Email
> > >> > > or
> > >> > > > > SMS notification. Please review and comment on the doc
> > suggesting
> > >> any
> > >> > > > > addition or deletion or related feedback.
> > >> > > > >
> > >> > > > > *UI for the service:*
> > >> > > > > This is a link <https://wireframe.cc/pro/pp/5fb6b2e61167290>
> to
> > >> the
> > >> > > > > wireframes for the UI of the service. Please give pointers on
> > what
> > >> > > could
> > >> > > > be
> > >> > > > > added and what should be taken out.
> > >> > > > >
> > >> > > > >
> > >> > > > > *At your service*
> > >> > > > > *,*
> > >> > > > >
> > >> > > > > *Ebenezer Graham*
> > >> > > > >
> > >> > > > > *BSc (Hons) Computing*
> > >> > > > >
> > >> > > > >
> > >> > > > > [image: EmailSignature.png]
> > >> > > > >
> > >> > > > > Beau Plan Business Park | West Building
> > >> > > > >
> > >> > > > > Pamplemousses |  Mauritius
> > >> > > > >
> > >> > > > >
> > >> > > > > <http://www.pactmart.com/>
> > >> > > > > <http://www.pactmart.com/>
> > >> > > > > www.pactmart.com | Freelancing made easy.
> > >> > > > > GitHub <https://github.com/ebenezergraham> | LinkedIn
> > >> > > > > <https://www.linkedin.com/in/ebenezer-graham/> | Twitter
> > >> > > > > <https://twitter.com/pactmart> | Facebook
> > >> > > > > <https://www.facebook.com/pactmart> | Website
> > >> > > > > <http://ebenezergraham.github.io/>
> > >> > > > >
> > >> > > > > *skype*:
> > >> > > > > ebenezer.graham
> > >> > > > > | *Phone*:
> > >> > > > > +230 5840 9206 <+230%205840%209206>
> > >> > > > >
> > >> > > > >
> > >> > > > > *“Practice isn’t the thing you do once you’re good. It’s the
> > >> thing you
> > >> > > do
> > >> > > > > that makes you good.”*
> > >> > > > > -*Malcolm Gladwell*
> > >> > > > >
> > >> > > > >
> > >> > > > >
> > >> > > >
> > >> > >
> > >>
> > >
> > >
> >
>

Re: [Discussion] Fineract CN SMS & Email Notifications Project

Posted by Markus Geiss <ma...@kuelap.io>.
Hey Ebenezer,

hope this finds you well. (;

looking at the two stack traces you've provided here is my take on it.

The error while storing configuration is caused by a field in the database
'sender_number' being declared as not null, but no data is provided. In the
create method of SMSConfiguration you are not handling the sender number at
all. I would recommend to either use a builder pattern or just use plain
getter/setter to create the instance.

With regards to receiving multiple (3) events, this is caused by the way
acitvemq is configured in your service. The default
for activemq.concurrency is 3-10, if you set this to 1-1 it will only
listen with 1 concurrent thread.

Hope this helps.

Cheers

Markus



On Wed, Aug 22, 2018 at 1:40 PM Ebenezer Graham <eg...@alustudent.com>
wrote:

> Thanks myrle,
>
> I have already created a demo email account called
> fineractcnnotificationdemo@gmail.com and I created it for the sole purpose
> of testing emails for this service and for other contributors to use.
> Please advise me on this approach.
>
> Also, the password for ebenezergraham69@gmail.com and akyencorp@gmail are
> no longer valid. I created app passwords and so I have already deleted
> those app passwords for my live account and are no longer valid.
>
> *Error:*
> In an attempt to store configurations from the repository I get this error:
> https://pastebin.com/WqvRwXvB
>
> Please check: shouldCreateSMSConfigurationEntity()
> https://github.com/ebenezergraham/fineract-cn-notifications/
> blob/develop/component-test/src/main/java/org/apache/
> fineract/cn/notification/TestSMSService.java
>
> I am able to retrieve stored configurations but I am unable to create a
> configuration and store. Same issue for email repository
>
> Second Issue: https://pastebin.com/LKz7HcGy
> I have managed to authenticate with identity and getting customer object,
> however, when I trigger an invent from the fims web app, I get 3
> invocations from the ActiveMQ. How can I resolve this issue? Are my
> assumptions correct to begin with?
>
>
> *At your service,*
>
> *Ebenezer Graham*
>
> *BSc (Hons) Computing*
>
>
> [image: EmailSignature.png]
>
> African Leadership University,
>
> Power Mill Road, Pamplemousses,
>
> Mauritius.
>
>
> ​
> *skype*:
> ​ebenezer.graham
> GitHub <https://github.com/ebenezergraham> | LinkedIn
> <https://www.linkedin.com/in/ebenezer-graham/> | Twitter
> <https://twitter.com/pactmart> | Facebook
> <https://www.facebook.com/pactmart>
> www.pactmart.com | Freelancing made easy.
>
>
> *“Talk is cheap, show me the code.” *- *Linus Torvalds*
>
>
>
> On 22 August 2018 at 15:10, Ebenezer Graham <eg...@alustudent.com>
> wrote:
>
> > Thanks myrle,
> >
> > I have already created a demo email account called
> > fineractcnnotificationdemo@gmail.com and I created it for the sole
> > purpose of testing emails for this service and for other contributors
> > to use. Please advise me on this approach.
> >
> > Also, the password for ebenezergraham69@gmail.com and akyencorp@gmail
> are
> > not the real passwords. I created app passwords and so I have already
> > deleted those app passwords for my live account and are no longer valid.
> >
> > *Error:*
> > In an attempt to store configurations from the repository I get this
> error:
> >
> > Please check: shouldCreateSMSConfigurationEntity()
> >
> https://github.com/ebenezergraham/fineract-cn-notifications/blob/develop/
> > component-test/src/main/java/org/apache/fineract/cn/
> > notification/TestSMSService.java
> >
> > I am able to retrieve stored configurations but I am unable to create a
> > configuration and store. Same issue for email repository
> >
> > Second Issue: https://pastebin.com/LKz7HcGy
> > I have managed to authenticate with identity and getting customer object,
> > however, when I trigger an invent from the fims web app, I get 3
> > invocations from the ActiveMQ. How can I resolve this issue? Are my
> > assumptions correct to begin with?
> >
> >
> > *At your service,*
> >
> > *Ebenezer Graham*
> >
> > *BSc (Hons) Computing*
> >
> >
> > [image: EmailSignature.png]
> >
> > African Leadership University,
> >
> > Power Mill Road, Pamplemousses,
> >
> > Mauritius.
> >
> >
> > ​
> > *skype*:
> > ​ebenezer.graham
> > GitHub <https://github.com/ebenezergraham> | LinkedIn
> > <https://www.linkedin.com/in/ebenezer-graham/> | Twitter
> > <https://twitter.com/pactmart> | Facebook
> > <https://www.facebook.com/pactmart>
> > www.pactmart.com | Freelancing made easy.
> >
> >
> > *“Talk is cheap, show me the code.” *- *Linus Torvalds*
> >
> >
> >
> > On 22 August 2018 at 14:45, Myrle Krantz <my...@apache.org> wrote:
> >
> >> Hey Ebenezer,
> >>
> >> I was just reviewing your PR and realized that you had included
> >> passwords in it.  They look like they might be passwords to live
> >> accounts.  I strongly suggest you remove them from your latest PR.
> >>
> >> I also checked and it appears you have passwords in code that has
> >> already been merged.  If this is true, I suggest you change the
> >> password on the e-mail account: ebenezergraham69@gmail.com
> >>
> >> In general, we don't change git history.  It's okay to make mistakes,
> >> and it's important to preserve the commit history of a project.  There
> >> are few exceptions I would make, but one of those is for passwords or
> >> other secrets.  But only if those passwords or other secrets can't
> >> easily be replaced.  I don't believe this is the case here.
> >>
> >> Beyond that, I'm working on putting together feedback on your code and
> >> will post that by the end of the day.
> >>
> >> Best Regards,
> >> Myrle
> >>
> >>
> >>
> >>
> >> On Wed, Aug 22, 2018 at 9:12 AM Ebenezer Graham
> >> <eg...@alustudent.com> wrote:
> >> >
> >> > Hi Awasum,
> >> >
> >> > I have been able to resolve the authentication problem and now able to
> >> > retrieve customers.
> >> >
> >> > I have also written a component test for the email and sms service.
> >> >
> >> > In an attempt to clean up my repository and squash the commits I
> messed
> >> up
> >> > my repo hence I have deleted it and forked a new one.
> >> >
> >> > In light of this, would like to find out if it is possible to force
> >> merge
> >> > them so that apache repository takes commits from mine.  This is
> because
> >> > the one on Apache has some unwanted files such as the sample classes
> and
> >> > travis.yml. Please let me know if this is possible.
> >> >
> >> > Also, I have made new PRs. Please review it and provide feedback
> >> >
> >> > Looking forward to your response.
> >> >
> >> > *At your service,*
> >> >
> >> > *Ebenezer Graham*
> >> >
> >> > *BSc (Hons) Computing*
> >> >
> >> >
> >> > [image: EmailSignature.png]
> >> >
> >> > African Leadership University,
> >> >
> >> > Power Mill Road, Pamplemousses,
> >> >
> >> > Mauritius.
> >> >
> >> >
> >> >
> >> > *skype*:
> >> > ebenezer.graham
> >> > GitHub <https://github.com/ebenezergraham> | LinkedIn
> >> > <https://www.linkedin.com/in/ebenezer-graham/> | Twitter
> >> > <https://twitter.com/pactmart> | Facebook
> >> > <https://www.facebook.com/pactmart>
> >> > www.pactmart.com | Freelancing made easy.
> >> >
> >> >
> >> > *“Talk is cheap, show me the code.” *- *Linus Torvalds*
> >> >
> >> >
> >> >
> >> > On 9 July 2018 at 12:25, Awasum Yannick <aw...@apache.org> wrote:
> >> >
> >> > > Hello Graham,
> >> > >
> >> > > You need to create a user, maybe use *operator* and make sure the
> >> user has
> >> > > permission to access customer (READ). Then you have to create a
> class
> >> which
> >> > > uses this user to connect and authenticate each time with the
> identity
> >> > > service before each customer information is retrieved.
> >> > >
> >> > > This user could be defined in the yml file of your service and then
> >> > > injected into the Authentication Class you create.
> >> > >
> >> > > Each event which is emitted most often has the tenant within the
> >> message.
> >> > > just get this tenant and check and set the *TenantContextHolder *if
> >> not
> >> > > already set just before you authenticate. Immediately after
> >> authentication,
> >> > > Set the *UserContextHolder* too
> >> > >
> >> > > Another point is to remember to trim or remove the quotes from the
> >> customer
> >> > > identifier before trying to get more contact details about  that
> >> customer:
> >> > > {String}.replaceAll("^\"|\"$", "")
> >> > >
> >> > > I hope this helps
> >> > >
> >> > > Thanks.
> >> > > Awasum Yannick
> >> > >
> >> > > On Tue, Jul 3, 2018 at 11:18 PM Ebenezer Graham <
> >> egraham15@alustudent.com>
> >> > > wrote:
> >> > >
> >> > > > Hello there,
> >> > > >
> >> > > > I would like to retrieve a customer after it has been created, or
> >> > > activated
> >> > > > etc.
> >> > > >
> >> > > > I have coded the logic to send the SMS and email after getting the
> >> > > contact
> >> > > > details, however, I have to get the customer to get the contact
> >> details.
> >> > > >
> >> > > > This is the error I get during my call:
> >> https://pastebin.com/zrebwE8v
> >> > > >
> >> > > > I would like to get clarifications on how to set the tenant and
> >> correctly
> >> > > > make authentication during a rest call.
> >> > > >
> >> > > > I would also like to get a better understanding of how to use the
> >> Anubis,
> >> > > > test and identity microservice in this case
> >> > > >
> >> > > > *At your service,*
> >> > > >
> >> > > > *Ebenezer Graham*
> >> > > >
> >> > > > *BSc (Hons) Computing*
> >> > > >
> >> > > >
> >> > > > [image: EmailSignature.png]
> >> > > >
> >> > > > African Leadership University,
> >> > > >
> >> > > > Power Mill Road, Pamplemousses,
> >> > > >
> >> > > > Mauritius.
> >> > > >
> >> > > >
> >> > > > *skype*:
> >> > > > ebenezer.graham
> >> > > > GitHub <https://github.com/ebenezergraham> | LinkedIn
> >> > > > <https://www.linkedin.com/in/ebenezer-graham/> | Twitter
> >> > > > <https://twitter.com/pactmart> | Facebook
> >> > > > <https://www.facebook.com/pactmart>
> >> > > > www.pactmart.com | Freelancing made easy.
> >> > > >
> >> > > >
> >> > > > *“Talk is cheap, show me the code.” *- *Linus Torvalds*
> >> > > >
> >> > > >
> >> > > >
> >> > > > On 19 May 2018 at 00:41, Ebenezer Graham <
> egraham15@alustudent.com>
> >> > > wrote:
> >> > > >
> >> > > > > Hi everyone,
> >> > > > >
> >> > > > > I am Ebenezer a student from the African Leadership University
> >> and I
> >> > > will
> >> > > > > be working on this project under the mentorship of Isaac Kamga.
> >> > > > >
> >> > > > > The idea is to use this thread to discuss the decisions being
> >> made on
> >> > > > this
> >> > > > > project so that the community has visibility on what's happening
> >> and
> >> > > most
> >> > > > > importantly give constructive feedback.
> >> > > > >
> >> > > > > *EventListeners:*
> >> > > > > This is the Doc
> >> > > > > <
> >> > > > https://docs.google.com/document/d/1kme5qrxOrO0WGUEvNgzv5XVkgWtpg
> >> > > 0lbX-CrBH4js7o/edit?usp=sharing
> >> > > > >
> >> > > > > containing the shortlisted events which I believe qualify for an
> >> Email
> >> > > or
> >> > > > > SMS notification. Please review and comment on the doc
> suggesting
> >> any
> >> > > > > addition or deletion or related feedback.
> >> > > > >
> >> > > > > *UI for the service:*
> >> > > > > This is a link <https://wireframe.cc/pro/pp/5fb6b2e61167290> to
> >> the
> >> > > > > wireframes for the UI of the service. Please give pointers on
> what
> >> > > could
> >> > > > be
> >> > > > > added and what should be taken out.
> >> > > > >
> >> > > > >
> >> > > > > *At your service*
> >> > > > > *,*
> >> > > > >
> >> > > > > *Ebenezer Graham*
> >> > > > >
> >> > > > > *BSc (Hons) Computing*
> >> > > > >
> >> > > > >
> >> > > > > [image: EmailSignature.png]
> >> > > > >
> >> > > > > Beau Plan Business Park | West Building
> >> > > > >
> >> > > > > Pamplemousses |  Mauritius
> >> > > > >
> >> > > > >
> >> > > > > <http://www.pactmart.com/>
> >> > > > > <http://www.pactmart.com/>
> >> > > > > www.pactmart.com | Freelancing made easy.
> >> > > > > GitHub <https://github.com/ebenezergraham> | LinkedIn
> >> > > > > <https://www.linkedin.com/in/ebenezer-graham/> | Twitter
> >> > > > > <https://twitter.com/pactmart> | Facebook
> >> > > > > <https://www.facebook.com/pactmart> | Website
> >> > > > > <http://ebenezergraham.github.io/>
> >> > > > >
> >> > > > > *skype*:
> >> > > > > ebenezer.graham
> >> > > > > | *Phone*:
> >> > > > > +230 5840 9206 <+230%205840%209206>
> >> > > > >
> >> > > > >
> >> > > > > *“Practice isn’t the thing you do once you’re good. It’s the
> >> thing you
> >> > > do
> >> > > > > that makes you good.”*
> >> > > > > -*Malcolm Gladwell*
> >> > > > >
> >> > > > >
> >> > > > >
> >> > > >
> >> > >
> >>
> >
> >
>

Re: [Discussion] Fineract CN SMS & Email Notifications Project

Posted by Ebenezer Graham <eg...@alustudent.com>.
Hi Myrle,

I am refactoring the authentication process in the notification service to
use the permitted-feign-client just like you suggested on this branch
<https://github.com/ebenezergraham/fineract-cn-notifications/tree/permitted-feign-client-auth>
.

Whenever I try setting application
<https://github.com/ebenezergraham/fineract-cn-demo-server/commit/17a303f5f7bd4baeef1e5bb34ef1497e67e7bc42#diff-38191dbf1fa40b24acfd43d9d7d36f0dR451#L451-L461>
permission for the scheduler user, I get a service exception. Details here
<https://pastebin.com/P6Chet1h>.

*At your service,*

*Ebenezer Graham*

*BSc (Hons) Computing*


[image: EmailSignature.png]

African Leadership University,

Power Mill Road, Pamplemousses,

Mauritius.


*skype*:
ebenezer.graham
GitHub <https://github.com/ebenezergraham> | LinkedIn
<https://www.linkedin.com/in/ebenezer-graham/> | Twitter
<https://twitter.com/pactmart> | Facebook
<https://www.facebook.com/pactmart>
www.pactmart.com | Freelancing made easy.


*“Talk is cheap, show me the code.” *- *Linus Torvalds*




On Wed, 22 Aug 2018 at 17:15, Myrle Krantz <my...@apache.org> wrote:

> Hey Ebenezer,
>
> There's a better way to get permissions for accessing customer.  I
> recommend you use the permitted-feign-client.  You can see an example of
> this in Rhythm.
>
> You would be accessing customer like rhythm acesses identity here:
>
> https://github.com/apache/fineract-cn-rhythm/blob/develop/service/src/main/java/org/apache/fineract/cn/rhythm/service/internal/identity/ApplicationPermissionRequestCreator.java
>
> You would still need to define a user in whose name to access customer,
> but you would no longer need that user's password.  Instead you'd give your
> application permission to act as that user in the provisioning, like it is
> done here:
>
> https://github.com/apache/fineract-cn-demo-server/blob/develop/src/main/java/org/apache/fineract/cn/dev/ServiceRunner.java#L432
>
> This limits the scope of the rights of the application to just what it
> needs reducing the damage possible via a security break.  And it means you
> don't have to save a powerful user's password in plain text in code or in a
> configuration file.
>
> If you need a pair-programming round to help you understand this, ping me
> offlist.  It's a confusing topic.
>
> Best Regards,
> Myrle
>
>
> On Wed, Aug 22, 2018 at 1:40 PM Ebenezer Graham <eg...@alustudent.com>
> wrote:
>
>> Thanks myrle,
>>
>> I have already created a demo email account called
>> fineractcnnotificationdemo@gmail.com and I created it for the sole
>> purpose of testing emails for this service and for other contributors
>> to use. Please advise me on this approach.
>>
>> Also, the password for ebenezergraham69@gmail.com and akyencorp@gmail
>> are no longer valid. I created app passwords and so I have already deleted
>> those app passwords for my live account and are no longer valid.
>>
>> *Error:*
>> In an attempt to store configurations from the repository I get this
>> error: https://pastebin.com/WqvRwXvB
>>
>> Please check: shouldCreateSMSConfigurationEntity()
>>
>> https://github.com/ebenezergraham/fineract-cn-notifications/blob/develop/component-test/src/main/java/org/apache/fineract/cn/notification/TestSMSService.java
>>
>> I am able to retrieve stored configurations but I am unable to create a
>> configuration and store. Same issue for email repository
>>
>> Second Issue: https://pastebin.com/LKz7HcGy
>> I have managed to authenticate with identity and getting customer object,
>> however, when I trigger an invent from the fims web app, I get 3
>> invocations from the ActiveMQ. How can I resolve this issue? Are my
>> assumptions correct to begin with?
>>
>>
>> *At your service,*
>>
>> *Ebenezer Graham*
>>
>> *BSc (Hons) Computing*
>>
>>
>> [image: EmailSignature.png]
>>
>> African Leadership University,
>>
>> Power Mill Road, Pamplemousses,
>>
>> Mauritius.
>>
>>
>> ​
>> *skype*:
>> ​ebenezer.graham
>> GitHub <https://github.com/ebenezergraham> | LinkedIn
>> <https://www.linkedin.com/in/ebenezer-graham/> | Twitter
>> <https://twitter.com/pactmart> | Facebook
>> <https://www.facebook.com/pactmart>
>> www.pactmart.com | Freelancing made easy.
>>
>>
>> *“Talk is cheap, show me the code.” *- *Linus Torvalds*
>>
>>
>>
>> On 22 August 2018 at 15:10, Ebenezer Graham <eg...@alustudent.com>
>> wrote:
>>
>>> Thanks myrle,
>>>
>>> I have already created a demo email account called
>>> fineractcnnotificationdemo@gmail.com and I created it for the sole
>>> purpose of testing emails for this service and for other contributors
>>> to use. Please advise me on this approach.
>>>
>>> Also, the password for ebenezergraham69@gmail.com and akyencorp@gmail
>>> are not the real passwords. I created app passwords and so I have already
>>> deleted those app passwords for my live account and are no longer valid.
>>>
>>> *Error:*
>>> In an attempt to store configurations from the repository I get this
>>> error:
>>>
>>> Please check: shouldCreateSMSConfigurationEntity()
>>>
>>> https://github.com/ebenezergraham/fineract-cn-notifications/blob/develop/component-test/src/main/java/org/apache/fineract/cn/notification/TestSMSService.java
>>>
>>> I am able to retrieve stored configurations but I am unable to create a
>>> configuration and store. Same issue for email repository
>>>
>>> Second Issue: https://pastebin.com/LKz7HcGy
>>> I have managed to authenticate with identity and getting customer
>>> object, however, when I trigger an invent from the fims web app, I get 3
>>> invocations from the ActiveMQ. How can I resolve this issue? Are my
>>> assumptions correct to begin with?
>>>
>>>
>>> *At your service,*
>>>
>>> *Ebenezer Graham*
>>>
>>> *BSc (Hons) Computing*
>>>
>>>
>>> [image: EmailSignature.png]
>>>
>>> African Leadership University,
>>>
>>> Power Mill Road, Pamplemousses,
>>>
>>> Mauritius.
>>>
>>>
>>> ​
>>> *skype*:
>>> ​ebenezer.graham
>>> GitHub <https://github.com/ebenezergraham> | LinkedIn
>>> <https://www.linkedin.com/in/ebenezer-graham/> | Twitter
>>> <https://twitter.com/pactmart> | Facebook
>>> <https://www.facebook.com/pactmart>
>>> www.pactmart.com | Freelancing made easy.
>>>
>>>
>>> *“Talk is cheap, show me the code.” *- *Linus Torvalds*
>>>
>>>
>>>
>>> On 22 August 2018 at 14:45, Myrle Krantz <my...@apache.org> wrote:
>>>
>>>> Hey Ebenezer,
>>>>
>>>> I was just reviewing your PR and realized that you had included
>>>> passwords in it.  They look like they might be passwords to live
>>>> accounts.  I strongly suggest you remove them from your latest PR.
>>>>
>>>> I also checked and it appears you have passwords in code that has
>>>> already been merged.  If this is true, I suggest you change the
>>>> password on the e-mail account: ebenezergraham69@gmail.com
>>>>
>>>> In general, we don't change git history.  It's okay to make mistakes,
>>>> and it's important to preserve the commit history of a project.  There
>>>> are few exceptions I would make, but one of those is for passwords or
>>>> other secrets.  But only if those passwords or other secrets can't
>>>> easily be replaced.  I don't believe this is the case here.
>>>>
>>>> Beyond that, I'm working on putting together feedback on your code and
>>>> will post that by the end of the day.
>>>>
>>>> Best Regards,
>>>> Myrle
>>>>
>>>>
>>>>
>>>>
>>>> On Wed, Aug 22, 2018 at 9:12 AM Ebenezer Graham
>>>> <eg...@alustudent.com> wrote:
>>>> >
>>>> > Hi Awasum,
>>>> >
>>>> > I have been able to resolve the authentication problem and now able to
>>>> > retrieve customers.
>>>> >
>>>> > I have also written a component test for the email and sms service.
>>>> >
>>>> > In an attempt to clean up my repository and squash the commits I
>>>> messed up
>>>> > my repo hence I have deleted it and forked a new one.
>>>> >
>>>> > In light of this, would like to find out if it is possible to force
>>>> merge
>>>> > them so that apache repository takes commits from mine.  This is
>>>> because
>>>> > the one on Apache has some unwanted files such as the sample classes
>>>> and
>>>> > travis.yml. Please let me know if this is possible.
>>>> >
>>>> > Also, I have made new PRs. Please review it and provide feedback
>>>> >
>>>> > Looking forward to your response.
>>>> >
>>>> > *At your service,*
>>>> >
>>>> > *Ebenezer Graham*
>>>> >
>>>> > *BSc (Hons) Computing*
>>>> >
>>>> >
>>>> > [image: EmailSignature.png]
>>>> >
>>>> > African Leadership University,
>>>> >
>>>> > Power Mill Road, Pamplemousses,
>>>> >
>>>> > Mauritius.
>>>> >
>>>> >
>>>> >
>>>> > *skype*:
>>>> > ebenezer.graham
>>>> > GitHub <https://github.com/ebenezergraham> | LinkedIn
>>>> > <https://www.linkedin.com/in/ebenezer-graham/> | Twitter
>>>> > <https://twitter.com/pactmart> | Facebook
>>>> > <https://www.facebook.com/pactmart>
>>>> > www.pactmart.com | Freelancing made easy.
>>>> >
>>>> >
>>>> > *“Talk is cheap, show me the code.” *- *Linus Torvalds*
>>>> >
>>>> >
>>>> >
>>>> > On 9 July 2018 at 12:25, Awasum Yannick <aw...@apache.org> wrote:
>>>> >
>>>> > > Hello Graham,
>>>> > >
>>>> > > You need to create a user, maybe use *operator* and make sure the
>>>> user has
>>>> > > permission to access customer (READ). Then you have to create a
>>>> class which
>>>> > > uses this user to connect and authenticate each time with the
>>>> identity
>>>> > > service before each customer information is retrieved.
>>>> > >
>>>> > > This user could be defined in the yml file of your service and then
>>>> > > injected into the Authentication Class you create.
>>>> > >
>>>> > > Each event which is emitted most often has the tenant within the
>>>> message.
>>>> > > just get this tenant and check and set the *TenantContextHolder *if
>>>> not
>>>> > > already set just before you authenticate. Immediately after
>>>> authentication,
>>>> > > Set the *UserContextHolder* too
>>>> > >
>>>> > > Another point is to remember to trim or remove the quotes from the
>>>> customer
>>>> > > identifier before trying to get more contact details about  that
>>>> customer:
>>>> > > {String}.replaceAll("^\"|\"$", "")
>>>> > >
>>>> > > I hope this helps
>>>> > >
>>>> > > Thanks.
>>>> > > Awasum Yannick
>>>> > >
>>>> > > On Tue, Jul 3, 2018 at 11:18 PM Ebenezer Graham <
>>>> egraham15@alustudent.com>
>>>> > > wrote:
>>>> > >
>>>> > > > Hello there,
>>>> > > >
>>>> > > > I would like to retrieve a customer after it has been created, or
>>>> > > activated
>>>> > > > etc.
>>>> > > >
>>>> > > > I have coded the logic to send the SMS and email after getting the
>>>> > > contact
>>>> > > > details, however, I have to get the customer to get the contact
>>>> details.
>>>> > > >
>>>> > > > This is the error I get during my call:
>>>> https://pastebin.com/zrebwE8v
>>>> > > >
>>>> > > > I would like to get clarifications on how to set the tenant and
>>>> correctly
>>>> > > > make authentication during a rest call.
>>>> > > >
>>>> > > > I would also like to get a better understanding of how to use the
>>>> Anubis,
>>>> > > > test and identity microservice in this case
>>>> > > >
>>>> > > > *At your service,*
>>>> > > >
>>>> > > > *Ebenezer Graham*
>>>> > > >
>>>> > > > *BSc (Hons) Computing*
>>>> > > >
>>>> > > >
>>>> > > > [image: EmailSignature.png]
>>>> > > >
>>>> > > > African Leadership University,
>>>> > > >
>>>> > > > Power Mill Road, Pamplemousses,
>>>> > > >
>>>> > > > Mauritius.
>>>> > > >
>>>> > > >
>>>> > > > *skype*:
>>>> > > > ebenezer.graham
>>>> > > > GitHub <https://github.com/ebenezergraham> | LinkedIn
>>>> > > > <https://www.linkedin.com/in/ebenezer-graham/> | Twitter
>>>> > > > <https://twitter.com/pactmart> | Facebook
>>>> > > > <https://www.facebook.com/pactmart>
>>>> > > > www.pactmart.com | Freelancing made easy.
>>>> > > >
>>>> > > >
>>>> > > > *“Talk is cheap, show me the code.” *- *Linus Torvalds*
>>>> > > >
>>>> > > >
>>>> > > >
>>>> > > > On 19 May 2018 at 00:41, Ebenezer Graham <
>>>> egraham15@alustudent.com>
>>>> > > wrote:
>>>> > > >
>>>> > > > > Hi everyone,
>>>> > > > >
>>>> > > > > I am Ebenezer a student from the African Leadership University
>>>> and I
>>>> > > will
>>>> > > > > be working on this project under the mentorship of Isaac Kamga.
>>>> > > > >
>>>> > > > > The idea is to use this thread to discuss the decisions being
>>>> made on
>>>> > > > this
>>>> > > > > project so that the community has visibility on what's
>>>> happening and
>>>> > > most
>>>> > > > > importantly give constructive feedback.
>>>> > > > >
>>>> > > > > *EventListeners:*
>>>> > > > > This is the Doc
>>>> > > > > <
>>>> > > > https://docs.google.com/document/d/1kme5qrxOrO0WGUEvNgzv5XVkgWtpg
>>>> > > 0lbX-CrBH4js7o/edit?usp=sharing
>>>> > > > >
>>>> > > > > containing the shortlisted events which I believe qualify for
>>>> an Email
>>>> > > or
>>>> > > > > SMS notification. Please review and comment on the doc
>>>> suggesting any
>>>> > > > > addition or deletion or related feedback.
>>>> > > > >
>>>> > > > > *UI for the service:*
>>>> > > > > This is a link <https://wireframe.cc/pro/pp/5fb6b2e61167290>
>>>> to the
>>>> > > > > wireframes for the UI of the service. Please give pointers on
>>>> what
>>>> > > could
>>>> > > > be
>>>> > > > > added and what should be taken out.
>>>> > > > >
>>>> > > > >
>>>> > > > > *At your service*
>>>> > > > > *,*
>>>> > > > >
>>>> > > > > *Ebenezer Graham*
>>>> > > > >
>>>> > > > > *BSc (Hons) Computing*
>>>> > > > >
>>>> > > > >
>>>> > > > > [image: EmailSignature.png]
>>>> > > > >
>>>> > > > > Beau Plan Business Park | West Building
>>>> > > > >
>>>> > > > > Pamplemousses |  Mauritius
>>>> > > > >
>>>> > > > >
>>>> > > > > <http://www.pactmart.com/>
>>>> > > > > <http://www.pactmart.com/>
>>>> > > > > www.pactmart.com | Freelancing made easy.
>>>> > > > > GitHub <https://github.com/ebenezergraham> | LinkedIn
>>>> > > > > <https://www.linkedin.com/in/ebenezer-graham/> | Twitter
>>>> > > > > <https://twitter.com/pactmart> | Facebook
>>>> > > > > <https://www.facebook.com/pactmart> | Website
>>>> > > > > <http://ebenezergraham.github.io/>
>>>> > > > >
>>>> > > > > *skype*:
>>>> > > > > ebenezer.graham
>>>> > > > > | *Phone*:
>>>> > > > > +230 5840 9206
>>>> > > > >
>>>> > > > >
>>>> > > > > *“Practice isn’t the thing you do once you’re good. It’s the
>>>> thing you
>>>> > > do
>>>> > > > > that makes you good.”*
>>>> > > > > -*Malcolm Gladwell*
>>>> > > > >
>>>> > > > >
>>>> > > > >
>>>> > > >
>>>> > >
>>>>
>>>
>>>
>>

Re: [Discussion] Fineract CN SMS & Email Notifications Project

Posted by Myrle Krantz <my...@apache.org>.
Hey Ebenezer,

There's a better way to get permissions for accessing customer.  I
recommend you use the permitted-feign-client.  You can see an example of
this in Rhythm.

You would be accessing customer like rhythm acesses identity here:
https://github.com/apache/fineract-cn-rhythm/blob/develop/service/src/main/java/org/apache/fineract/cn/rhythm/service/internal/identity/ApplicationPermissionRequestCreator.java

You would still need to define a user in whose name to access customer, but
you would no longer need that user's password.  Instead you'd give your
application permission to act as that user in the provisioning, like it is
done here:
https://github.com/apache/fineract-cn-demo-server/blob/develop/src/main/java/org/apache/fineract/cn/dev/ServiceRunner.java#L432

This limits the scope of the rights of the application to just what it
needs reducing the damage possible via a security break.  And it means you
don't have to save a powerful user's password in plain text in code or in a
configuration file.

If you need a pair-programming round to help you understand this, ping me
offlist.  It's a confusing topic.

Best Regards,
Myrle


On Wed, Aug 22, 2018 at 1:40 PM Ebenezer Graham <eg...@alustudent.com>
wrote:

> Thanks myrle,
>
> I have already created a demo email account called
> fineractcnnotificationdemo@gmail.com and I created it for the sole
> purpose of testing emails for this service and for other contributors
> to use. Please advise me on this approach.
>
> Also, the password for ebenezergraham69@gmail.com and akyencorp@gmail are
> no longer valid. I created app passwords and so I have already deleted
> those app passwords for my live account and are no longer valid.
>
> *Error:*
> In an attempt to store configurations from the repository I get this
> error: https://pastebin.com/WqvRwXvB
>
> Please check: shouldCreateSMSConfigurationEntity()
>
> https://github.com/ebenezergraham/fineract-cn-notifications/blob/develop/component-test/src/main/java/org/apache/fineract/cn/notification/TestSMSService.java
>
> I am able to retrieve stored configurations but I am unable to create a
> configuration and store. Same issue for email repository
>
> Second Issue: https://pastebin.com/LKz7HcGy
> I have managed to authenticate with identity and getting customer object,
> however, when I trigger an invent from the fims web app, I get 3
> invocations from the ActiveMQ. How can I resolve this issue? Are my
> assumptions correct to begin with?
>
>
> *At your service,*
>
> *Ebenezer Graham*
>
> *BSc (Hons) Computing*
>
>
> [image: EmailSignature.png]
>
> African Leadership University,
>
> Power Mill Road, Pamplemousses,
>
> Mauritius.
>
>
> ​
> *skype*:
> ​ebenezer.graham
> GitHub <https://github.com/ebenezergraham> | LinkedIn
> <https://www.linkedin.com/in/ebenezer-graham/> | Twitter
> <https://twitter.com/pactmart> | Facebook
> <https://www.facebook.com/pactmart>
> www.pactmart.com | Freelancing made easy.
>
>
> *“Talk is cheap, show me the code.” *- *Linus Torvalds*
>
>
>
> On 22 August 2018 at 15:10, Ebenezer Graham <eg...@alustudent.com>
> wrote:
>
>> Thanks myrle,
>>
>> I have already created a demo email account called
>> fineractcnnotificationdemo@gmail.com and I created it for the sole
>> purpose of testing emails for this service and for other contributors
>> to use. Please advise me on this approach.
>>
>> Also, the password for ebenezergraham69@gmail.com and akyencorp@gmail
>> are not the real passwords. I created app passwords and so I have already
>> deleted those app passwords for my live account and are no longer valid.
>>
>> *Error:*
>> In an attempt to store configurations from the repository I get this
>> error:
>>
>> Please check: shouldCreateSMSConfigurationEntity()
>>
>> https://github.com/ebenezergraham/fineract-cn-notifications/blob/develop/component-test/src/main/java/org/apache/fineract/cn/notification/TestSMSService.java
>>
>> I am able to retrieve stored configurations but I am unable to create a
>> configuration and store. Same issue for email repository
>>
>> Second Issue: https://pastebin.com/LKz7HcGy
>> I have managed to authenticate with identity and getting customer object,
>> however, when I trigger an invent from the fims web app, I get 3
>> invocations from the ActiveMQ. How can I resolve this issue? Are my
>> assumptions correct to begin with?
>>
>>
>> *At your service,*
>>
>> *Ebenezer Graham*
>>
>> *BSc (Hons) Computing*
>>
>>
>> [image: EmailSignature.png]
>>
>> African Leadership University,
>>
>> Power Mill Road, Pamplemousses,
>>
>> Mauritius.
>>
>>
>> ​
>> *skype*:
>> ​ebenezer.graham
>> GitHub <https://github.com/ebenezergraham> | LinkedIn
>> <https://www.linkedin.com/in/ebenezer-graham/> | Twitter
>> <https://twitter.com/pactmart> | Facebook
>> <https://www.facebook.com/pactmart>
>> www.pactmart.com | Freelancing made easy.
>>
>>
>> *“Talk is cheap, show me the code.” *- *Linus Torvalds*
>>
>>
>>
>> On 22 August 2018 at 14:45, Myrle Krantz <my...@apache.org> wrote:
>>
>>> Hey Ebenezer,
>>>
>>> I was just reviewing your PR and realized that you had included
>>> passwords in it.  They look like they might be passwords to live
>>> accounts.  I strongly suggest you remove them from your latest PR.
>>>
>>> I also checked and it appears you have passwords in code that has
>>> already been merged.  If this is true, I suggest you change the
>>> password on the e-mail account: ebenezergraham69@gmail.com
>>>
>>> In general, we don't change git history.  It's okay to make mistakes,
>>> and it's important to preserve the commit history of a project.  There
>>> are few exceptions I would make, but one of those is for passwords or
>>> other secrets.  But only if those passwords or other secrets can't
>>> easily be replaced.  I don't believe this is the case here.
>>>
>>> Beyond that, I'm working on putting together feedback on your code and
>>> will post that by the end of the day.
>>>
>>> Best Regards,
>>> Myrle
>>>
>>>
>>>
>>>
>>> On Wed, Aug 22, 2018 at 9:12 AM Ebenezer Graham
>>> <eg...@alustudent.com> wrote:
>>> >
>>> > Hi Awasum,
>>> >
>>> > I have been able to resolve the authentication problem and now able to
>>> > retrieve customers.
>>> >
>>> > I have also written a component test for the email and sms service.
>>> >
>>> > In an attempt to clean up my repository and squash the commits I
>>> messed up
>>> > my repo hence I have deleted it and forked a new one.
>>> >
>>> > In light of this, would like to find out if it is possible to force
>>> merge
>>> > them so that apache repository takes commits from mine.  This is
>>> because
>>> > the one on Apache has some unwanted files such as the sample classes
>>> and
>>> > travis.yml. Please let me know if this is possible.
>>> >
>>> > Also, I have made new PRs. Please review it and provide feedback
>>> >
>>> > Looking forward to your response.
>>> >
>>> > *At your service,*
>>> >
>>> > *Ebenezer Graham*
>>> >
>>> > *BSc (Hons) Computing*
>>> >
>>> >
>>> > [image: EmailSignature.png]
>>> >
>>> > African Leadership University,
>>> >
>>> > Power Mill Road, Pamplemousses,
>>> >
>>> > Mauritius.
>>> >
>>> >
>>> >
>>> > *skype*:
>>> > ebenezer.graham
>>> > GitHub <https://github.com/ebenezergraham> | LinkedIn
>>> > <https://www.linkedin.com/in/ebenezer-graham/> | Twitter
>>> > <https://twitter.com/pactmart> | Facebook
>>> > <https://www.facebook.com/pactmart>
>>> > www.pactmart.com | Freelancing made easy.
>>> >
>>> >
>>> > *“Talk is cheap, show me the code.” *- *Linus Torvalds*
>>> >
>>> >
>>> >
>>> > On 9 July 2018 at 12:25, Awasum Yannick <aw...@apache.org> wrote:
>>> >
>>> > > Hello Graham,
>>> > >
>>> > > You need to create a user, maybe use *operator* and make sure the
>>> user has
>>> > > permission to access customer (READ). Then you have to create a
>>> class which
>>> > > uses this user to connect and authenticate each time with the
>>> identity
>>> > > service before each customer information is retrieved.
>>> > >
>>> > > This user could be defined in the yml file of your service and then
>>> > > injected into the Authentication Class you create.
>>> > >
>>> > > Each event which is emitted most often has the tenant within the
>>> message.
>>> > > just get this tenant and check and set the *TenantContextHolder *if
>>> not
>>> > > already set just before you authenticate. Immediately after
>>> authentication,
>>> > > Set the *UserContextHolder* too
>>> > >
>>> > > Another point is to remember to trim or remove the quotes from the
>>> customer
>>> > > identifier before trying to get more contact details about  that
>>> customer:
>>> > > {String}.replaceAll("^\"|\"$", "")
>>> > >
>>> > > I hope this helps
>>> > >
>>> > > Thanks.
>>> > > Awasum Yannick
>>> > >
>>> > > On Tue, Jul 3, 2018 at 11:18 PM Ebenezer Graham <
>>> egraham15@alustudent.com>
>>> > > wrote:
>>> > >
>>> > > > Hello there,
>>> > > >
>>> > > > I would like to retrieve a customer after it has been created, or
>>> > > activated
>>> > > > etc.
>>> > > >
>>> > > > I have coded the logic to send the SMS and email after getting the
>>> > > contact
>>> > > > details, however, I have to get the customer to get the contact
>>> details.
>>> > > >
>>> > > > This is the error I get during my call:
>>> https://pastebin.com/zrebwE8v
>>> > > >
>>> > > > I would like to get clarifications on how to set the tenant and
>>> correctly
>>> > > > make authentication during a rest call.
>>> > > >
>>> > > > I would also like to get a better understanding of how to use the
>>> Anubis,
>>> > > > test and identity microservice in this case
>>> > > >
>>> > > > *At your service,*
>>> > > >
>>> > > > *Ebenezer Graham*
>>> > > >
>>> > > > *BSc (Hons) Computing*
>>> > > >
>>> > > >
>>> > > > [image: EmailSignature.png]
>>> > > >
>>> > > > African Leadership University,
>>> > > >
>>> > > > Power Mill Road, Pamplemousses,
>>> > > >
>>> > > > Mauritius.
>>> > > >
>>> > > >
>>> > > > *skype*:
>>> > > > ebenezer.graham
>>> > > > GitHub <https://github.com/ebenezergraham> | LinkedIn
>>> > > > <https://www.linkedin.com/in/ebenezer-graham/> | Twitter
>>> > > > <https://twitter.com/pactmart> | Facebook
>>> > > > <https://www.facebook.com/pactmart>
>>> > > > www.pactmart.com | Freelancing made easy.
>>> > > >
>>> > > >
>>> > > > *“Talk is cheap, show me the code.” *- *Linus Torvalds*
>>> > > >
>>> > > >
>>> > > >
>>> > > > On 19 May 2018 at 00:41, Ebenezer Graham <egraham15@alustudent.com
>>> >
>>> > > wrote:
>>> > > >
>>> > > > > Hi everyone,
>>> > > > >
>>> > > > > I am Ebenezer a student from the African Leadership University
>>> and I
>>> > > will
>>> > > > > be working on this project under the mentorship of Isaac Kamga.
>>> > > > >
>>> > > > > The idea is to use this thread to discuss the decisions being
>>> made on
>>> > > > this
>>> > > > > project so that the community has visibility on what's happening
>>> and
>>> > > most
>>> > > > > importantly give constructive feedback.
>>> > > > >
>>> > > > > *EventListeners:*
>>> > > > > This is the Doc
>>> > > > > <
>>> > > > https://docs.google.com/document/d/1kme5qrxOrO0WGUEvNgzv5XVkgWtpg
>>> > > 0lbX-CrBH4js7o/edit?usp=sharing
>>> > > > >
>>> > > > > containing the shortlisted events which I believe qualify for an
>>> Email
>>> > > or
>>> > > > > SMS notification. Please review and comment on the doc
>>> suggesting any
>>> > > > > addition or deletion or related feedback.
>>> > > > >
>>> > > > > *UI for the service:*
>>> > > > > This is a link <https://wireframe.cc/pro/pp/5fb6b2e61167290> to
>>> the
>>> > > > > wireframes for the UI of the service. Please give pointers on
>>> what
>>> > > could
>>> > > > be
>>> > > > > added and what should be taken out.
>>> > > > >
>>> > > > >
>>> > > > > *At your service*
>>> > > > > *,*
>>> > > > >
>>> > > > > *Ebenezer Graham*
>>> > > > >
>>> > > > > *BSc (Hons) Computing*
>>> > > > >
>>> > > > >
>>> > > > > [image: EmailSignature.png]
>>> > > > >
>>> > > > > Beau Plan Business Park | West Building
>>> > > > >
>>> > > > > Pamplemousses |  Mauritius
>>> > > > >
>>> > > > >
>>> > > > > <http://www.pactmart.com/>
>>> > > > > <http://www.pactmart.com/>
>>> > > > > www.pactmart.com | Freelancing made easy.
>>> > > > > GitHub <https://github.com/ebenezergraham> | LinkedIn
>>> > > > > <https://www.linkedin.com/in/ebenezer-graham/> | Twitter
>>> > > > > <https://twitter.com/pactmart> | Facebook
>>> > > > > <https://www.facebook.com/pactmart> | Website
>>> > > > > <http://ebenezergraham.github.io/>
>>> > > > >
>>> > > > > *skype*:
>>> > > > > ebenezer.graham
>>> > > > > | *Phone*:
>>> > > > > +230 5840 9206
>>> > > > >
>>> > > > >
>>> > > > > *“Practice isn’t the thing you do once you’re good. It’s the
>>> thing you
>>> > > do
>>> > > > > that makes you good.”*
>>> > > > > -*Malcolm Gladwell*
>>> > > > >
>>> > > > >
>>> > > > >
>>> > > >
>>> > >
>>>
>>
>>
>

Re: [Discussion] Fineract CN SMS & Email Notifications Project

Posted by Ebenezer Graham <eg...@alustudent.com>.
Thanks myrle,

I have already created a demo email account called
fineractcnnotificationdemo@gmail.com and I created it for the sole purpose
of testing emails for this service and for other contributors to use.
Please advise me on this approach.

Also, the password for ebenezergraham69@gmail.com and akyencorp@gmail are
no longer valid. I created app passwords and so I have already deleted
those app passwords for my live account and are no longer valid.

*Error:*
In an attempt to store configurations from the repository I get this error:
https://pastebin.com/WqvRwXvB

Please check: shouldCreateSMSConfigurationEntity()
https://github.com/ebenezergraham/fineract-cn-notifications/
blob/develop/component-test/src/main/java/org/apache/
fineract/cn/notification/TestSMSService.java

I am able to retrieve stored configurations but I am unable to create a
configuration and store. Same issue for email repository

Second Issue: https://pastebin.com/LKz7HcGy
I have managed to authenticate with identity and getting customer object,
however, when I trigger an invent from the fims web app, I get 3
invocations from the ActiveMQ. How can I resolve this issue? Are my
assumptions correct to begin with?


*At your service,*

*Ebenezer Graham*

*BSc (Hons) Computing*


[image: EmailSignature.png]

African Leadership University,

Power Mill Road, Pamplemousses,

Mauritius.


​
*skype*:
​ebenezer.graham
GitHub <https://github.com/ebenezergraham> | LinkedIn
<https://www.linkedin.com/in/ebenezer-graham/> | Twitter
<https://twitter.com/pactmart> | Facebook
<https://www.facebook.com/pactmart>
www.pactmart.com | Freelancing made easy.


*“Talk is cheap, show me the code.” *- *Linus Torvalds*



On 22 August 2018 at 15:10, Ebenezer Graham <eg...@alustudent.com>
wrote:

> Thanks myrle,
>
> I have already created a demo email account called
> fineractcnnotificationdemo@gmail.com and I created it for the sole
> purpose of testing emails for this service and for other contributors
> to use. Please advise me on this approach.
>
> Also, the password for ebenezergraham69@gmail.com and akyencorp@gmail are
> not the real passwords. I created app passwords and so I have already
> deleted those app passwords for my live account and are no longer valid.
>
> *Error:*
> In an attempt to store configurations from the repository I get this error:
>
> Please check: shouldCreateSMSConfigurationEntity()
> https://github.com/ebenezergraham/fineract-cn-notifications/blob/develop/
> component-test/src/main/java/org/apache/fineract/cn/
> notification/TestSMSService.java
>
> I am able to retrieve stored configurations but I am unable to create a
> configuration and store. Same issue for email repository
>
> Second Issue: https://pastebin.com/LKz7HcGy
> I have managed to authenticate with identity and getting customer object,
> however, when I trigger an invent from the fims web app, I get 3
> invocations from the ActiveMQ. How can I resolve this issue? Are my
> assumptions correct to begin with?
>
>
> *At your service,*
>
> *Ebenezer Graham*
>
> *BSc (Hons) Computing*
>
>
> [image: EmailSignature.png]
>
> African Leadership University,
>
> Power Mill Road, Pamplemousses,
>
> Mauritius.
>
>
> ​
> *skype*:
> ​ebenezer.graham
> GitHub <https://github.com/ebenezergraham> | LinkedIn
> <https://www.linkedin.com/in/ebenezer-graham/> | Twitter
> <https://twitter.com/pactmart> | Facebook
> <https://www.facebook.com/pactmart>
> www.pactmart.com | Freelancing made easy.
>
>
> *“Talk is cheap, show me the code.” *- *Linus Torvalds*
>
>
>
> On 22 August 2018 at 14:45, Myrle Krantz <my...@apache.org> wrote:
>
>> Hey Ebenezer,
>>
>> I was just reviewing your PR and realized that you had included
>> passwords in it.  They look like they might be passwords to live
>> accounts.  I strongly suggest you remove them from your latest PR.
>>
>> I also checked and it appears you have passwords in code that has
>> already been merged.  If this is true, I suggest you change the
>> password on the e-mail account: ebenezergraham69@gmail.com
>>
>> In general, we don't change git history.  It's okay to make mistakes,
>> and it's important to preserve the commit history of a project.  There
>> are few exceptions I would make, but one of those is for passwords or
>> other secrets.  But only if those passwords or other secrets can't
>> easily be replaced.  I don't believe this is the case here.
>>
>> Beyond that, I'm working on putting together feedback on your code and
>> will post that by the end of the day.
>>
>> Best Regards,
>> Myrle
>>
>>
>>
>>
>> On Wed, Aug 22, 2018 at 9:12 AM Ebenezer Graham
>> <eg...@alustudent.com> wrote:
>> >
>> > Hi Awasum,
>> >
>> > I have been able to resolve the authentication problem and now able to
>> > retrieve customers.
>> >
>> > I have also written a component test for the email and sms service.
>> >
>> > In an attempt to clean up my repository and squash the commits I messed
>> up
>> > my repo hence I have deleted it and forked a new one.
>> >
>> > In light of this, would like to find out if it is possible to force
>> merge
>> > them so that apache repository takes commits from mine.  This is because
>> > the one on Apache has some unwanted files such as the sample classes and
>> > travis.yml. Please let me know if this is possible.
>> >
>> > Also, I have made new PRs. Please review it and provide feedback
>> >
>> > Looking forward to your response.
>> >
>> > *At your service,*
>> >
>> > *Ebenezer Graham*
>> >
>> > *BSc (Hons) Computing*
>> >
>> >
>> > [image: EmailSignature.png]
>> >
>> > African Leadership University,
>> >
>> > Power Mill Road, Pamplemousses,
>> >
>> > Mauritius.
>> >
>> >
>> >
>> > *skype*:
>> > ebenezer.graham
>> > GitHub <https://github.com/ebenezergraham> | LinkedIn
>> > <https://www.linkedin.com/in/ebenezer-graham/> | Twitter
>> > <https://twitter.com/pactmart> | Facebook
>> > <https://www.facebook.com/pactmart>
>> > www.pactmart.com | Freelancing made easy.
>> >
>> >
>> > *“Talk is cheap, show me the code.” *- *Linus Torvalds*
>> >
>> >
>> >
>> > On 9 July 2018 at 12:25, Awasum Yannick <aw...@apache.org> wrote:
>> >
>> > > Hello Graham,
>> > >
>> > > You need to create a user, maybe use *operator* and make sure the
>> user has
>> > > permission to access customer (READ). Then you have to create a class
>> which
>> > > uses this user to connect and authenticate each time with the identity
>> > > service before each customer information is retrieved.
>> > >
>> > > This user could be defined in the yml file of your service and then
>> > > injected into the Authentication Class you create.
>> > >
>> > > Each event which is emitted most often has the tenant within the
>> message.
>> > > just get this tenant and check and set the *TenantContextHolder *if
>> not
>> > > already set just before you authenticate. Immediately after
>> authentication,
>> > > Set the *UserContextHolder* too
>> > >
>> > > Another point is to remember to trim or remove the quotes from the
>> customer
>> > > identifier before trying to get more contact details about  that
>> customer:
>> > > {String}.replaceAll("^\"|\"$", "")
>> > >
>> > > I hope this helps
>> > >
>> > > Thanks.
>> > > Awasum Yannick
>> > >
>> > > On Tue, Jul 3, 2018 at 11:18 PM Ebenezer Graham <
>> egraham15@alustudent.com>
>> > > wrote:
>> > >
>> > > > Hello there,
>> > > >
>> > > > I would like to retrieve a customer after it has been created, or
>> > > activated
>> > > > etc.
>> > > >
>> > > > I have coded the logic to send the SMS and email after getting the
>> > > contact
>> > > > details, however, I have to get the customer to get the contact
>> details.
>> > > >
>> > > > This is the error I get during my call:
>> https://pastebin.com/zrebwE8v
>> > > >
>> > > > I would like to get clarifications on how to set the tenant and
>> correctly
>> > > > make authentication during a rest call.
>> > > >
>> > > > I would also like to get a better understanding of how to use the
>> Anubis,
>> > > > test and identity microservice in this case
>> > > >
>> > > > *At your service,*
>> > > >
>> > > > *Ebenezer Graham*
>> > > >
>> > > > *BSc (Hons) Computing*
>> > > >
>> > > >
>> > > > [image: EmailSignature.png]
>> > > >
>> > > > African Leadership University,
>> > > >
>> > > > Power Mill Road, Pamplemousses,
>> > > >
>> > > > Mauritius.
>> > > >
>> > > >
>> > > > *skype*:
>> > > > ebenezer.graham
>> > > > GitHub <https://github.com/ebenezergraham> | LinkedIn
>> > > > <https://www.linkedin.com/in/ebenezer-graham/> | Twitter
>> > > > <https://twitter.com/pactmart> | Facebook
>> > > > <https://www.facebook.com/pactmart>
>> > > > www.pactmart.com | Freelancing made easy.
>> > > >
>> > > >
>> > > > *“Talk is cheap, show me the code.” *- *Linus Torvalds*
>> > > >
>> > > >
>> > > >
>> > > > On 19 May 2018 at 00:41, Ebenezer Graham <eg...@alustudent.com>
>> > > wrote:
>> > > >
>> > > > > Hi everyone,
>> > > > >
>> > > > > I am Ebenezer a student from the African Leadership University
>> and I
>> > > will
>> > > > > be working on this project under the mentorship of Isaac Kamga.
>> > > > >
>> > > > > The idea is to use this thread to discuss the decisions being
>> made on
>> > > > this
>> > > > > project so that the community has visibility on what's happening
>> and
>> > > most
>> > > > > importantly give constructive feedback.
>> > > > >
>> > > > > *EventListeners:*
>> > > > > This is the Doc
>> > > > > <
>> > > > https://docs.google.com/document/d/1kme5qrxOrO0WGUEvNgzv5XVkgWtpg
>> > > 0lbX-CrBH4js7o/edit?usp=sharing
>> > > > >
>> > > > > containing the shortlisted events which I believe qualify for an
>> Email
>> > > or
>> > > > > SMS notification. Please review and comment on the doc suggesting
>> any
>> > > > > addition or deletion or related feedback.
>> > > > >
>> > > > > *UI for the service:*
>> > > > > This is a link <https://wireframe.cc/pro/pp/5fb6b2e61167290> to
>> the
>> > > > > wireframes for the UI of the service. Please give pointers on what
>> > > could
>> > > > be
>> > > > > added and what should be taken out.
>> > > > >
>> > > > >
>> > > > > *At your service*
>> > > > > *,*
>> > > > >
>> > > > > *Ebenezer Graham*
>> > > > >
>> > > > > *BSc (Hons) Computing*
>> > > > >
>> > > > >
>> > > > > [image: EmailSignature.png]
>> > > > >
>> > > > > Beau Plan Business Park | West Building
>> > > > >
>> > > > > Pamplemousses |  Mauritius
>> > > > >
>> > > > >
>> > > > > <http://www.pactmart.com/>
>> > > > > <http://www.pactmart.com/>
>> > > > > www.pactmart.com | Freelancing made easy.
>> > > > > GitHub <https://github.com/ebenezergraham> | LinkedIn
>> > > > > <https://www.linkedin.com/in/ebenezer-graham/> | Twitter
>> > > > > <https://twitter.com/pactmart> | Facebook
>> > > > > <https://www.facebook.com/pactmart> | Website
>> > > > > <http://ebenezergraham.github.io/>
>> > > > >
>> > > > > *skype*:
>> > > > > ebenezer.graham
>> > > > > | *Phone*:
>> > > > > +230 5840 9206
>> > > > >
>> > > > >
>> > > > > *“Practice isn’t the thing you do once you’re good. It’s the
>> thing you
>> > > do
>> > > > > that makes you good.”*
>> > > > > -*Malcolm Gladwell*
>> > > > >
>> > > > >
>> > > > >
>> > > >
>> > >
>>
>
>

Re: [Discussion] Fineract CN SMS & Email Notifications Project

Posted by Ebenezer Graham <eg...@alustudent.com>.
Hi Awasum,

I have been able to resolve the authentication problem and now able to
retrieve customers.

I have also written a component test for the email and sms service.

In an attempt to clean up my repository and squash the commits I messed up
my repo hence I have deleted it and forked a new one.

In light of this, would like to find out if it is possible to force merge
them so that apache repository takes commits from mine.  This is because
the one on Apache has some unwanted files such as the sample classes and
travis.yml. Please let me know if this is possible.

Also, I have made new PRs. Please review it and provide feedback

Looking forward to your response.

*At your service,*

*Ebenezer Graham*

*BSc (Hons) Computing*


[image: EmailSignature.png]

African Leadership University,

Power Mill Road, Pamplemousses,

Mauritius.


​
*skype*:
​ebenezer.graham
GitHub <https://github.com/ebenezergraham> | LinkedIn
<https://www.linkedin.com/in/ebenezer-graham/> | Twitter
<https://twitter.com/pactmart> | Facebook
<https://www.facebook.com/pactmart>
www.pactmart.com | Freelancing made easy.


*“Talk is cheap, show me the code.” *- *Linus Torvalds*



On 9 July 2018 at 12:25, Awasum Yannick <aw...@apache.org> wrote:

> Hello Graham,
>
> You need to create a user, maybe use *operator* and make sure the user has
> permission to access customer (READ). Then you have to create a class which
> uses this user to connect and authenticate each time with the identity
> service before each customer information is retrieved.
>
> This user could be defined in the yml file of your service and then
> injected into the Authentication Class you create.
>
> Each event which is emitted most often has the tenant within the message.
> just get this tenant and check and set the *TenantContextHolder *if not
> already set just before you authenticate. Immediately after authentication,
> Set the *UserContextHolder* too
>
> Another point is to remember to trim or remove the quotes from the customer
> identifier before trying to get more contact details about  that customer:
> {String}.replaceAll("^\"|\"$", "")
>
> I hope this helps
>
> Thanks.
> Awasum Yannick
>
> On Tue, Jul 3, 2018 at 11:18 PM Ebenezer Graham <eg...@alustudent.com>
> wrote:
>
> > Hello there,
> >
> > I would like to retrieve a customer after it has been created, or
> activated
> > etc.
> >
> > I have coded the logic to send the SMS and email after getting the
> contact
> > details, however, I have to get the customer to get the contact details.
> >
> > This is the error I get during my call: https://pastebin.com/zrebwE8v
> >
> > I would like to get clarifications on how to set the tenant and correctly
> > make authentication during a rest call.
> >
> > I would also like to get a better understanding of how to use the Anubis,
> > test and identity microservice in this case
> >
> > *At your service,*
> >
> > *Ebenezer Graham*
> >
> > *BSc (Hons) Computing*
> >
> >
> > [image: EmailSignature.png]
> >
> > African Leadership University,
> >
> > Power Mill Road, Pamplemousses,
> >
> > Mauritius.
> >
> >
> > *skype*:
> > ​ebenezer.graham
> > GitHub <https://github.com/ebenezergraham> | LinkedIn
> > <https://www.linkedin.com/in/ebenezer-graham/> | Twitter
> > <https://twitter.com/pactmart> | Facebook
> > <https://www.facebook.com/pactmart>
> > www.pactmart.com | Freelancing made easy.
> >
> >
> > *“Talk is cheap, show me the code.” *- *Linus Torvalds*
> >
> >
> >
> > On 19 May 2018 at 00:41, Ebenezer Graham <eg...@alustudent.com>
> wrote:
> >
> > > Hi everyone,
> > >
> > > I am Ebenezer a student from the African Leadership University and I
> will
> > > be working on this project under the mentorship of Isaac Kamga.
> > >
> > > The idea is to use this thread to discuss the decisions being made on
> > this
> > > project so that the community has visibility on what's happening and
> most
> > > importantly give constructive feedback.
> > >
> > > *EventListeners:*
> > > This is the Doc
> > > <
> > https://docs.google.com/document/d/1kme5qrxOrO0WGUEvNgzv5XVkgWtpg
> 0lbX-CrBH4js7o/edit?usp=sharing
> > >
> > > containing the shortlisted events which I believe qualify for an Email
> or
> > > SMS notification. Please review and comment on the doc suggesting any
> > > addition or deletion or related feedback.
> > >
> > > *UI for the service:*
> > > This is a link <https://wireframe.cc/pro/pp/5fb6b2e61167290> to the
> > > wireframes for the UI of the service. Please give pointers on what
> could
> > be
> > > added and what should be taken out.
> > >
> > >
> > > *​At your service*
> > > *,*
> > >
> > > *Ebenezer Graham*
> > >
> > > *BSc (Hons) Computing*
> > >
> > >
> > > [image: EmailSignature.png]
> > >
> > > Beau Plan Business Park | West Building
> > >
> > > Pamplemousses |  Mauritius
> > >
> > >
> > > <http://www.pactmart.com/>
> > > <http://www.pactmart.com/>
> > > www.pactmart.com | Freelancing made easy.
> > > GitHub <https://github.com/ebenezergraham> | LinkedIn
> > > <https://www.linkedin.com/in/ebenezer-graham/> | Twitter
> > > <https://twitter.com/pactmart> | Facebook
> > > <https://www.facebook.com/pactmart> | Website
> > > <http://ebenezergraham.github.io/>
> > > ​
> > > *skype*:
> > > ​ebenezer.graham
> > > ​ | *Phone*:
> > > +230 5840 9206
> > >
> > >
> > > *“Practice isn’t the thing you do once you’re good. It’s the thing you
> do
> > > that makes you good.”*
> > > -*Malcolm Gladwell*
> > >
> > >
> > >
> >
>

Re: [Discussion] Fineract CN SMS & Email Notifications Project

Posted by Awasum Yannick <aw...@apache.org>.
Hello Graham,

You need to create a user, maybe use *operator* and make sure the user has
permission to access customer (READ). Then you have to create a class which
uses this user to connect and authenticate each time with the identity
service before each customer information is retrieved.

This user could be defined in the yml file of your service and then
injected into the Authentication Class you create.

Each event which is emitted most often has the tenant within the message.
just get this tenant and check and set the *TenantContextHolder *if not
already set just before you authenticate. Immediately after authentication,
Set the *UserContextHolder* too

Another point is to remember to trim or remove the quotes from the customer
identifier before trying to get more contact details about  that customer:
{String}.replaceAll("^\"|\"$", "")

I hope this helps

Thanks.
Awasum Yannick

On Tue, Jul 3, 2018 at 11:18 PM Ebenezer Graham <eg...@alustudent.com>
wrote:

> Hello there,
>
> I would like to retrieve a customer after it has been created, or activated
> etc.
>
> I have coded the logic to send the SMS and email after getting the contact
> details, however, I have to get the customer to get the contact details.
>
> This is the error I get during my call: https://pastebin.com/zrebwE8v
>
> I would like to get clarifications on how to set the tenant and correctly
> make authentication during a rest call.
>
> I would also like to get a better understanding of how to use the Anubis,
> test and identity microservice in this case
>
> *At your service,*
>
> *Ebenezer Graham*
>
> *BSc (Hons) Computing*
>
>
> [image: EmailSignature.png]
>
> African Leadership University,
>
> Power Mill Road, Pamplemousses,
>
> Mauritius.
>
>
> *skype*:
> ​ebenezer.graham
> GitHub <https://github.com/ebenezergraham> | LinkedIn
> <https://www.linkedin.com/in/ebenezer-graham/> | Twitter
> <https://twitter.com/pactmart> | Facebook
> <https://www.facebook.com/pactmart>
> www.pactmart.com | Freelancing made easy.
>
>
> *“Talk is cheap, show me the code.” *- *Linus Torvalds*
>
>
>
> On 19 May 2018 at 00:41, Ebenezer Graham <eg...@alustudent.com> wrote:
>
> > Hi everyone,
> >
> > I am Ebenezer a student from the African Leadership University and I will
> > be working on this project under the mentorship of Isaac Kamga.
> >
> > The idea is to use this thread to discuss the decisions being made on
> this
> > project so that the community has visibility on what's happening and most
> > importantly give constructive feedback.
> >
> > *EventListeners:*
> > This is the Doc
> > <
> https://docs.google.com/document/d/1kme5qrxOrO0WGUEvNgzv5XVkgWtpg0lbX-CrBH4js7o/edit?usp=sharing
> >
> > containing the shortlisted events which I believe qualify for an Email or
> > SMS notification. Please review and comment on the doc suggesting any
> > addition or deletion or related feedback.
> >
> > *UI for the service:*
> > This is a link <https://wireframe.cc/pro/pp/5fb6b2e61167290> to the
> > wireframes for the UI of the service. Please give pointers on what could
> be
> > added and what should be taken out.
> >
> >
> > *​At your service*
> > *,*
> >
> > *Ebenezer Graham*
> >
> > *BSc (Hons) Computing*
> >
> >
> > [image: EmailSignature.png]
> >
> > Beau Plan Business Park | West Building
> >
> > Pamplemousses |  Mauritius
> >
> >
> > <http://www.pactmart.com/>
> > <http://www.pactmart.com/>
> > www.pactmart.com | Freelancing made easy.
> > GitHub <https://github.com/ebenezergraham> | LinkedIn
> > <https://www.linkedin.com/in/ebenezer-graham/> | Twitter
> > <https://twitter.com/pactmart> | Facebook
> > <https://www.facebook.com/pactmart> | Website
> > <http://ebenezergraham.github.io/>
> > ​
> > *skype*:
> > ​ebenezer.graham
> > ​ | *Phone*:
> > +230 5840 9206
> >
> >
> > *“Practice isn’t the thing you do once you’re good. It’s the thing you do
> > that makes you good.”*
> > -*Malcolm Gladwell*
> >
> >
> >
>