<div dir="ltr">I&#39;ve implemented encryption of push message payload for WebPush variant. Here are two different solutions for the same problem, which use different libs:<div><ol><li><a href="https://github.com/aerogear/aerogear-unifiedpush-server/pull/747">https://github.com/aerogear/aerogear-unifiedpush-server/pull/747</a><br></li><li><a href="https://github.com/aerogear/aerogear-unifiedpush-server/pull/742">https://github.com/aerogear/aerogear-unifiedpush-server/pull/742</a><br></li></ol></div><div>I also updated my previous example for js cookbook. Now it supports push notifications with payloads too: <a href="https://github.com/aerogear/aerogear-js-cookbook/pull/16">https://github.com/aerogear/aerogear-js-cookbook/pull/16</a></div><div><br></div><div>But I have a problem with java.security and Bouncy Castle provider. When you send a push message, a server gets an exception <i>java.security.InvalidAlgorithmParameterException: parameter object not a ECParameterSpec</i>. For more information and to look at the full stack trace, go to the PRs.</div><div><br></div><div>Could anyone look at this and help me to resolve this problem?</div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Thanks,<div>Idel Pivnitskiy</div><div>--<br></div><div>Twitter: <a href="https://twitter.com/idelpivnitskiy" target="_blank">@idelpivnitskiy</a></div><div>GitHub: <a href="https://github.com/idelpivnitskiy" target="_blank">@idelpivnitskiy</a></div></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote">On Tue, Jul 26, 2016 at 2:01 PM, Idel Pivnitskiy <span dir="ltr">&lt;<a href="mailto:idel.pivnitskiy@gmail.com" target="_blank">idel.pivnitskiy@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><span class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span style="font-size:12.8px">perhaps break it down, on the server into two different sending processes ? </span><div style="font-size:12.8px">native send (curernt)</div><div style="font-size:12.8px">wrbpush send ? </div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">where we would have a WebPushSender API ?  </div></blockquote><div><br></div></span><div>Hard to talk about separate unique API for WebPush right now, when here is just two implementations (FCM and MPS) and both of them have not implemented WebPush protocol yet. Think that temporal experimental solution may be enough now. Let&#39;s see what can I do today-tomorrow to allow sending push notifications to both (FCM and MPS) providers for WebPush variant [1].</div><div><br></div><div>[1] <a href="https://github.com/aerogear/aerogear-unifiedpush-server/pull/745#discussion_r72153644" target="_blank">https://github.com/<wbr>aerogear/aerogear-unifiedpush-<wbr>server/pull/745#discussion_<wbr>r72153644</a></div><div class="gmail_extra"><span class=""><br clear="all"><div><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Best regards,<div>Idel Pivnitskiy</div><div>--<br></div><div>Twitter: <a href="https://twitter.com/idelpivnitskiy" target="_blank">@idelpivnitskiy</a></div><div>GitHub: <a href="https://github.com/idelpivnitskiy" target="_blank">@idelpivnitskiy</a></div></div></div></div></div></div></div></div></div>
<br></span><div><div class="h5"><div class="gmail_quote">On Tue, Jul 26, 2016 at 1:17 PM, Matthias Wessendorf <span dir="ltr">&lt;<a href="mailto:matzew@apache.org" target="_blank">matzew@apache.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">perhaps break it down, on the server into two different sending processes ? <div>native send (curernt)</div><div>wrbpush send ? </div><div><br></div><div>where we would have a WebPushSender API ?  </div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jul 26, 2016 at 12:10 PM, Matthias Wessendorf <span dir="ltr">&lt;<a href="mailto:matzew@apache.org" target="_blank">matzew@apache.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">hrm, not sure I am that happy about these requirements :)<div><br></div><div>I guess we also need to change our data access layer to not just return tokens, but a more complex object, containing token, key and secret  - hrm :)</div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div>On Mon, Jul 25, 2016 at 3:19 AM, Idel Pivnitskiy <span dir="ltr">&lt;<a href="mailto:idel.pivnitskiy@gmail.com" target="_blank">idel.pivnitskiy@gmail.com</a>&gt;</span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div><div dir="ltr"><div>Hi all,</div><div><br></div><div>As we discussed previously, Firefox already supports sending push message data to browser if it will be encrypted. Since version 50, Google Chrome also support it [1]. But it requires for UPS to store &quot;public key&quot; and &quot;auth secret&quot; for each Installation [2]. See current example of sending push notifications with a payload[3].</div><div><br></div><div>Storing of two additional fields is not a big deal. But we also have to refactor <wbr>PushNotificationSender [4], because it consumes a collection of device tokens as a param instead of a collection of installations.</div><div><br></div><div>Any thoughts about how we can implement it with minimal changes?</div><div><br></div><div>[1] <a href="https://developer.mozilla.org/en-US/docs/Web/API/PushMessageData" target="_blank">https://developer.mozilla.<wbr>org/en-US/docs/Web/API/<wbr>PushMessageData</a></div><div>[2] <a href="https://github.com/aerogear/aerogear-unifiedpush-server/blob/master/model/api/src/main/java/org/jboss/aerogear/unifiedpush/api/Installation.java" target="_blank">https://github.com/<wbr>aerogear/aerogear-unifiedpush-<wbr>server/blob/master/model/api/<wbr>src/main/java/org/jboss/<wbr>aerogear/unifiedpush/api/<wbr>Installation.java</a></div><div>[3] <a href="https://serviceworke.rs/push-payload_index_doc.html" target="_blank">https://serviceworke.rs/<wbr>push-payload_index_doc.html</a></div><div>[4] <a href="https://github.com/aerogear/aerogear-unifiedpush-server/blob/master/push/sender/src/main/java/org/jboss/aerogear/unifiedpush/message/sender/PushNotificationSender.java" target="_blank">https://github.com/<wbr>aerogear/aerogear-unifiedpush-<wbr>server/blob/master/push/<wbr>sender/src/main/java/org/<wbr>jboss/aerogear/unifiedpush/<wbr>message/sender/<wbr>PushNotificationSender.java</a></div><br clear="all"><div><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Best regards,<div>Idel Pivnitskiy</div><div>--<br></div><div>Twitter: <a href="https://twitter.com/idelpivnitskiy" target="_blank">@idelpivnitskiy</a></div><div>GitHub: <a href="https://github.com/idelpivnitskiy" target="_blank">@idelpivnitskiy</a></div></div></div></div></div></div></div></div></div>
</div>
<br></div></div>______________________________<wbr>_________________<br>
aerogear-dev mailing list<br>
<a href="mailto:aerogear-dev@lists.jboss.org" target="_blank">aerogear-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/<wbr>mailman/listinfo/aerogear-dev</a><span><font color="#888888"><br></font></span></blockquote></div><span><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div><div dir="ltr"><div>Matthias Wessendorf <br><br>blog: <a href="http://matthiaswessendorf.wordpress.com/" target="_blank">http://matthiaswessendorf.<wbr>wordpress.com/</a><br>twitter: <a href="http://twitter.com/mwessendorf" target="_blank">http://twitter.com/mwessendorf</a></div></div></div>
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div><div dir="ltr"><div>Matthias Wessendorf <br><br>blog: <a href="http://matthiaswessendorf.wordpress.com/" target="_blank">http://matthiaswessendorf.<wbr>wordpress.com/</a><br>twitter: <a href="http://twitter.com/mwessendorf" target="_blank">http://twitter.com/mwessendorf</a></div></div></div>
</div>
</div></div><br>______________________________<wbr>_________________<br>
aerogear-dev mailing list<br>
<a href="mailto:aerogear-dev@lists.jboss.org" target="_blank">aerogear-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/<wbr>mailman/listinfo/aerogear-dev</a><br></blockquote></div><br></div></div></div></div>
</blockquote></div><br></div></div>