AeroGear Crypto Java 0.1.2 released
by Bruno Oliveira
Good morning, just to let you know we released today the bits for digital signatures and some bug fixes.
Have a happy new year sweet hearts.
--
abstractj
2 years, 7 months
[UPS] Advanced Analytics
by Sebastien Blanc
Folks !
For AGPUSH-969[1] and to kick off the discussions, I started a small POC
mainly focused on the backend. To sum up quickly : we want to know how many
installations/users has opened the application after that a Push
Notification has been touched.
So, the very first thing that had to be done was to give the Push
Notification a unique identifier, so that we can track it and do the
metrics on it.
For that, I have been using an existing model object that we have , the
PushMessageInformation[2], and that is currently used to provide
information for our dashboard.
This object has now some extra fields, like a appOpenCounter etc ...
The ID of this PushMessageInformation is now passed into the payload of the
Push Message, just before we send it, this way the client library can use
this ID to pass extra information to the UPS when a notification is
touched.
For this POC, I hijacked the cordova-helloworld, so that it extracts the ID
from the payload and pass it as header when registering.
When the UPS receive the request, it looks for the header and if it exist
it updates the existing PushMessageInformation instance.
Please note, that for this POC, all is happening on Application level and
not on Variant level but that can be easily changed. It depends on how
fined grained we want to have these analytics.
I did a small screencast that shows this in action :
https://www.youtube.com/watch?v=PseBBJZLz6s&feature=youtu.be
The UPS branch containing the changes is here (the 2 latests commits are
relevant) :
https://github.com/sebastienblanc/aerogear-unified-push-server/tree/analy...
The client app is not really relevant since I really hacked badly the app
(and the push plugin) ;) , however if interested I may share it.
Now, let's discuss :)
Sebi
[1] https://issues.jboss.org/browse/AGPUSH-969
[2]
https://github.com/aerogear/aerogear-unifiedpush-server/blob/master/model...
9 years, 8 months
[UPS] issues with UPS 1.1 on OpenShift (manual deploy)
by Sebastien Blanc
Hi !
I was trying (and so was Lukas) to deploy UPS 1.1 (master branch) to an
openshift gear (Wildfly 8.2 cartridge). After tweaking a bit the
datasources to get it deployed, when trying to access /ag-push , I'm get an
500 internal server error.
The wildfly logs show me the following :
2015-03-31 09:40:47,240 ERROR [io.undertow.request] (default task-8)
UT005023: Exception handling request to /ag-push/index.html:
java.lang.RuntimeException: Unable to resolve realm public key
remotely
at org.keycloak.adapters.AdapterDeploymentContext.resolveRealmKey(AdapterDeploymentContext.java:134)
[keycloak-adapter-core-1.1.0.Final.jar:1.1.0.Final]
at org.keycloak.adapters.AdapterDeploymentContext.resolveDeployment(AdapterDeploymentContext.java:83)
[keycloak-adapter-core-1.1.0.Final.jar:1.1.0.Final]
at org.keycloak.adapters.PreAuthActionsHandler.preflightCors(PreAuthActionsHandler.java:71)
[keycloak-adapter-core-1.1.0.Final.jar:1.1.0.Final]
at org.keycloak.adapters.PreAuthActionsHandler.handleRequest(PreAuthActionsHandler.java:47)
[keycloak-adapter-core-1.1.0.Final.jar:1.1.0.Final]
at org.keycloak.adapters.undertow.ServletPreAuthActionsHandler.handleRequest(ServletPreAuthActionsHandler.java:68)
[keycloak-undertow-adapter-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
[undertow-core-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:261)
[undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:247)
[undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:76)
[undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:166)
[undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.server.Connectors.executeRootHandler(Connectors.java:197)
[undertow-core-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:759)
[undertow-core-1.1.0.Final.jar:1.1.0.Final]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[rt.jar:1.8.0_31]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[rt.jar:1.8.0_31]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_31]
Caused by: javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated
at sun.security.ssl.SSLSessionImpl.getPeerCertificates(SSLSessionImpl.java:431)
[jsse.jar:1.8.0_31]
at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:128)
[httpclient-4.2.1.jar:4.2.1]
at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:572)
[httpclient-4.2.1.jar:4.2.1]
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180)
[httpclient-4.2.1.jar:4.2.1]
So "peer not authenticated" seems pretty obvious for the reason it fails.
The question is what do we need to do for this ? Anyone an idea ?
Thx,
Sebi
9 years, 8 months
Automatic quickstart ftesting solution
by Stefan Miklosovic
Hi,
I think few days ago there was some information from Karel Piwko that we
developed fully automatic functional tests when it comes to Cordova
quickstarts (1) (hello world and shoot and share)
We think that it could be useful for developers as well. This tests the
whole life cycle of the push from creation of UPS cartridge through
building of the example to the functional test in a fully automatic manner
from zero setup to push notification receive at mobile device you have
connected to your notebook and it could be useful for developers in order
to not execute it manually every time and set it up all over again.
By what I mean "fully automatic" is the following scenario:
1) Automatic creation of UPS cartridge on OpenShift right from our test,
patched with this extension * (2), (3)
2) Because of the deployed extension to UPS in 1), we can login via REST
and we do not need to change passwords so we can create application with
some variant directly from our test script (4)
3) After this is done, quickstart example is downloaded from GH, Android
SDK is installed locally at your PC, quickstart is filled with application
and google credentials automatically and after that it is built
4) APK built in 3) is then used in functional test by Arquillian Droidium
(5) which deploys that APK to physical device and in that test, we send
push notification request to UPS
5) Once push notification comes to UPS, it sends it to GCM which in turn
sends it to physical device and Droidium test asserts that the message
really came and appeared on the mobile device.
It takes about 10 minutes, you have to have Android device attached to your
PC since test will communicate with it. Time could be massively decreased
when you do not expect new OS UPS instance to be created every time.
You execute it like this in
https://github.com/aerogear/aerogear-unifiedpush-server-integration-tests
repository
./gradlew test -Pprofile=helloWorldCordovaQuickstart \
-PgoogleProjectNumber=<your project number> \
-PgoogleKey=<your google key> \
-PopenShiftUsername=<email of your openshift account>
-PopenShiftPassword=<password for your openshift account> \
-PopenShiftCartridge=
https://cartreflect-claytondev.rhcloud.com/reflect?github=aerogear/opensh...
\
-PopenShiftAppDirectory=aerogear-push
Similar process is executed with Shoot & Share demo where we send image to
Facebook. All triggered by one shell command from integration tests and
after that the above magic happens.
I case you want to use it and you struggle with it, feel free to ask me for
guidance.
* unified-test-extension adds custom functionality to UPS cartridge, it
adds fancy performance test endpoints where you can feed UPS instance with
custom number of generated installations / categories / variants and so on.
More to it, it can put proxy behind sender API so push notifications goes
nowhere in the end but it seems like they were indeed sent from UPS point
of view. This is particularly handy in test environment where you really do
not want to send anything to APNS or GCM.
(1) https://github.com/jboss-mobile/unified-push-helloworld
(2)
https://github.com/aerogear/aerogear-testing-tools/tree/master/unifiedpus...
(3)
https://github.com/aerogear/aerogear-unifiedpush-server-integration-tests...
(4)
https://github.com/aerogear/aerogear-unifiedpush-server-integration-tests...
(5)
https://github.com/aerogear/aerogear-unifiedpush-server-integration-tests...
--
Stefan Miklosovic
Red Hat Brno - JBoss Mobile Platform
e-mail: smikloso(a)redhat.com
irc: smikloso
9 years, 8 months
GSoC project for WebPush Server
by Idel Pivnitskiy
Hi all,
I participated in GSoC 2014 with Twitter and worked on Netty last year.
Unfortunately, this year Google does not accept Twitter as a mentoring
organization. So I'm trying to find a new organization and a new project
for this summer.
I know that time for student applications is over, but I have one opened
proposal for JBoss Community. I found WebPush Server at the last day of
student applications' deadline. I'm really interested in it and I want to
change my proposal and work on WebPush Server!
WebPush Server is a new project which should have many tasks and plan to
use new features of Netty 5 (HTTP/2) and Java 8. All of these are very
interesting for me. Also I have 2 years experience of server-side
development of other services (mobile API, administrative panels, etc.) on
Jetty, WildFly and JBoss AS7. So I will be able to work on any part of
WebPush Server and not only on server-netty subproject.
I began to get acquainted with the WebPush Server code base, WebPush
Protocol and Push API last weekend. Also I I've used AeroGear UnifiedPush
Server in one of my projects on my work. And it's perfect! AeroGear is easy
to configure and push notifications. Thanks to all for this work!
Could you, please, help me to find a project idea for my new proposal
for WebPush Server?
Best regards,
Idel Pivnitskiy
--
E-mail: Idel.Pivnitskiy(a)gmail.com
GitHub: @idelpivnitskiy <https://github.com/idelpivnitskiy>
Resume: https://www.dropbox.com/s/q99epi9jyygvaxf/Idel.Pivnitskiy.resume.pdf
9 years, 8 months