Hi,<div><br></div><div>a few questions: </div><div>* for device registration will it be possible to perform the actual registration by using the variantID and its secret? (Please note that there is no &quot;user&quot; on the mobile device. Currently, for the registration, we perform http_basic authentification against a variant (via varianID /secret))</div>
<div><br></div><div><br></div><div>* isn&#39;t it possible to exclude a few URIs (e.g. security-constraint element(s) in web.xml) from Keycloak? That way &#39;sender&#39; (and &#39;device registration&#39;) cloud stay as they are: using their custom http_basic impl</div>
<div><br></div><div><br></div><div>I am NOT against changes, but I am a bit worried that we add new and instable code for the sender/registration endpoints (and our mobile clients and our senders), just a few weeks before we will have our 1.0.0 release.</div>
<div><br></div><div>Or are my concerns are invalid and the Android, Cordova, iOS SDKs, as well as our senders (java and node), will work just fine, without major changes </div><div><br></div><div>Thanks,</div><div>Matthias<span></span></div>
<div><br>On Thursday, June 19, 2014, Stian Thorgersen &lt;<a href="mailto:stian@redhat.com">stian@redhat.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Here&#39;s an idea on how it could be done (disclaimer: this is just a rough idea so take it with a pinch of salt ;)). Some benefits:<br>
<br>
* Relatively simple to maintain backwards compatibility<br>
* Support public clients directly (by using logged in users permissions)<br>
* One application can access multiple UPS Apps<br>
* No need to maintain master secret in UPS (and can support multiple methods to auth in the future, for example cert or jwt<br>
* Manage access through KC - what app/client or user can access what UPS App<br>
<br>
<br>
When creating a new UPS App create:<br>
<br>
* A role on unified-push-server - the name should be equal to id of UPS app<br>
<br>
Applications should have 3 options to authenticate:<br>
<br>
* As the logged in user (for client side applications)<br>
* As themselves (for server side applications)<br>
* HTTP Basic<br>
<br>
The master secret can also be removed from UPS App as it should no longer be required.<br>
<br>
As the logged in user<br>
---------------------<br>
This allows public applications to send push messages on behalf of the logged in user. The steps required are:<br>
<br>
1) Create an application/client in Keycloak<br>
    * Set to public client<br>
    * Add scope on UPS App role<br>
2) Create user<br>
    * Add role mapping on UPS App role<br>
3) Users logs in with username/password, social, etc through KC login<br>
   screens<br>
4) Application can send push messages with bearer token using users<br>
   permissions<br>
<br>
As themselves<br>
-------------<br>
This allows a server-side application to send push messages on behalf of itself. The steps required are:<br>
<br>
1) Create an application/client in Keycloak<br>
    * Add scope on UPS App role<br>
2) Create user<br>
    * Add role mapping on UPS App role<br>
    * Set a long unique password (equivalent of master secret)<br>
3) Application logs in with username/password (equal to UPS App<br>
   id/master-secret) using direct grant<br>
4) Application can send push messages with bearer token using its own<br>
   permissions<br>
<br>
In the future Keycloak will support additional mechanism for a server-side application to authenticate on behalf of itself (cert, jwts, etc).<br>
<br>
HTTP Basic<br>
----------<br>
For backwards compatibility we can add a valve that extracts the UPS App id and master secret from Basic auth. It will then use the direct grant mechanism to obtain a token from Keycloak. The steps required to configure is the same as &quot;As themselves&quot;.<br>

<br>
<br>
<br>
----- Original Message -----<br>
&gt; From: &quot;Bruno Oliveira&quot; &lt;<a href="javascript:;" onclick="_e(event, &#39;cvml&#39;, &#39;bruno@abstractj.org&#39;)">bruno@abstractj.org</a>&gt;<br>
&gt; To: &quot;AeroGear Developer Mailing List&quot; &lt;<a href="javascript:;" onclick="_e(event, &#39;cvml&#39;, &#39;aerogear-dev@lists.jboss.org&#39;)">aerogear-dev@lists.jboss.org</a>&gt;<br>
&gt; Sent: Wednesday, 18 June, 2014 8:12:55 PM<br>
&gt; Subject: Re: [aerogear-dev] Keycloak integration and UPS Sender<br>
&gt;<br>
&gt; Hi guys, let&#39;s see the result of the conversation with KC team and we<br>
&gt; can revisit this discussion if some changed is required.<br>
&gt;<br>
&gt; On 2014-06-18, Matthias Wessendorf wrote:<br>
&gt; &gt; On Wed, Jun 18, 2014 at 12:12 AM, Bruno Oliveira &lt;<a href="javascript:;" onclick="_e(event, &#39;cvml&#39;, &#39;bruno@abstractj.org&#39;)">bruno@abstractj.org</a>&gt;<br>
&gt; &gt; wrote:<br>
&gt; &gt;<br>
&gt; &gt; &gt; Answers inline.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; On 2014-06-17, Matthias Wessendorf wrote:<br>
&gt; &gt; &gt; &gt; On Tue, Jun 17, 2014 at 8:51 PM, Matthias Wessendorf<br>
&gt; &gt; &gt; &gt; &lt;<a href="javascript:;" onclick="_e(event, &#39;cvml&#39;, &#39;matzew@apache.org&#39;)">matzew@apache.org</a>&gt;<br>
&gt; &gt; &gt; &gt; wrote:<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; On Tue, Jun 17, 2014 at 7:17 PM, Bruno Oliveira &lt;<a href="javascript:;" onclick="_e(event, &#39;cvml&#39;, &#39;bruno@abstractj.org&#39;)">bruno@abstractj.org</a>&gt;<br>
&gt; &gt; &gt; &gt; &gt; wrote:<br>
&gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt; Hi Matthias, answer inline.<br>
&gt; &gt; &gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt; On 2014-06-17, Matthias Wessendorf wrote:<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; On Tue, Jun 17, 2014 at 4:26 PM, Bruno Oliveira &lt;<br>
&gt; &gt; &gt; <a href="javascript:;" onclick="_e(event, &#39;cvml&#39;, &#39;bruno@abstractj.org&#39;)">bruno@abstractj.org</a>&gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt; wrote:<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; &gt; Good morning peeps,<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; &gt; I have a problem to solve which might affect the Sender and<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; &gt; all the related clients.<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; &gt; Previously, the UPS Sender was protected by the basic<br>
&gt; &gt; &gt; authentication<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; &gt; method[1], so anyone in possession of _PushApplicationID_ and<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; &gt; _MasterSecret_ is able to send push messages.<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; &gt; After the integration with Keycloak now everything under _/rest_<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; &gt; is properly protect by KC which is totally correct. Our sender<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; &gt; is<br>
&gt; &gt; &gt; &gt; &gt;&gt; under<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; &gt; the same umbrella which means that now Bearer token<br>
&gt; &gt; &gt; authentication is<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; &gt; required[2] and Basic authentication won&#39;t exist anymore.<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; The device (un)registration endpoints are hit by this as well<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; (/rest/registry/device/*).<br>
&gt; &gt; &gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt; Currently Keycloak is protecting our endpoints under /rest/*<br>
&gt; &gt; &gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; I am wondering if it isn&#39;t it possible to keep those URLs<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; protected<br>
&gt; &gt; &gt; via<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; HTTP_BASIC, or does the keycloak.js usage deny this?<br>
&gt; &gt; &gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt; Is not the Keycloak.js usage responsible for this, but the correct<br>
&gt; &gt; &gt; &gt; &gt;&gt; configuration of the application atm. Please compare:<br>
&gt; &gt; &gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt; - master branch:<br>
&gt; &gt; &gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt; <a href="https://github.com/aerogear/aerogear-unifiedpush-server/blob/master/server/src/main/webapp/WEB-INF/web.xml#L56" target="_blank">https://github.com/aerogear/aerogear-unifiedpush-server/blob/master/server/src/main/webapp/WEB-INF/web.xml#L56</a><br>

&gt; &gt; &gt; &gt; &gt;&gt; - keycloak.js branch:<br>
&gt; &gt; &gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt; <a href="https://github.com/aerogear/aerogear-unifiedpush-server/blob/keycloak.js/server/src/main/webapp/WEB-INF/web.xml#L33" target="_blank">https://github.com/aerogear/aerogear-unifiedpush-server/blob/keycloak.js/server/src/main/webapp/WEB-INF/web.xml#L33</a><br>

&gt; &gt; &gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt; Now we&#39;re fully using Keycloak bearer tokens instead of Basic.<br>
&gt; &gt; &gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; Oh, I was following Bill&#39;s sample project, where he did not use the<br>
&gt; &gt; &gt; &gt; &gt; &#39;KEYCLOAK&#39; auth-method:<br>
&gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; <a href="https://github.com/keycloak/keycloak/blob/master/project-integrations/aerogear-ups/app/src/main/webapp/WEB-INF/web.xml#L44" target="_blank">https://github.com/keycloak/keycloak/blob/master/project-integrations/aerogear-ups/app/src/main/webapp/WEB-INF/web.xml#L44</a><br>

&gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; But we had the exclusion working w/ the KEYCLOAK &#39;auth-method&#39;, but<br>
&gt; &gt; &gt; this<br>
&gt; &gt; &gt; &gt; &gt; goes back to our initial starts in Dec/Jan.<br>
&gt; &gt; &gt; &gt; &gt; Here is a rebased commit based on your initial commit:<br>
&gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; <a href="https://github.com/aerogear/aerogear-unifiedpush-server/blob/2aabd073aaaafa79943ea41d2651f6f0c5e4248e/server/src/main/webapp/WEB-INF/web.xml#L42-L53" target="_blank">https://github.com/aerogear/aerogear-unifiedpush-server/blob/2aabd073aaaafa79943ea41d2651f6f0c5e4248e/server/src/main/webapp/WEB-INF/web.xml#L42-L53</a><br>

&gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; On master (plain keycloak; before keycloak.js usage) we are doing<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; an<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; exclude for those URLs:<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt; <a href="https://github.com/aerogear/aerogear-unifiedpush-server/blob/master/server/src/main/webapp/WEB-INF/web.xml#L46-L52" target="_blank">https://github.com/aerogear/aerogear-unifiedpush-server/blob/master/server/src/main/webapp/WEB-INF/web.xml#L46-L52</a><br>

&gt; &gt; &gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt; I tried to include your exclusions, but that didn&#39;t work for me.<br>
&gt; &gt; &gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; IMO if possible, keeping these &#39;exceptions&#39; (or excludes) under<br>
&gt; &gt; &gt; &gt; &gt;&gt; HTTP_BASIC<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; would be the simplest solution, as that means none of our client<br>
&gt; &gt; &gt; SDKs<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; (Android, iOS, Cordova, Node.js Sender, Java-Sendet etc) would<br>
&gt; &gt; &gt; require<br>
&gt; &gt; &gt; &gt; &gt;&gt; an<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; update.<br>
&gt; &gt; &gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt; I had a chat with Stian and looks like it&#39;s possible to support both<br>
&gt; &gt; &gt; &gt; &gt;&gt; auth methods in a single app, but that would involve changes on<br>
&gt; &gt; &gt; Keycloak.<br>
&gt; &gt; &gt; &gt; &gt;&gt; It&#39;s just the matter of discuss with KC team.<br>
&gt; &gt; &gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; I don&#39;t think we need to enable to &lt;auth-method&gt; settings in our<br>
&gt; &gt; &gt; web.xml;<br>
&gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; How do you manage login/logout/current logged in user on Angular.js? Is<br>
&gt; &gt; &gt; possible to do on the server side, but how do you control it on the<br>
&gt; &gt; &gt; client side?<br>
&gt; &gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; Sure, to protect the admin-ui and most of the /rest/* endpoints we need the<br>
&gt; &gt; one &lt;auth-method&gt;KEYCLOAK&lt;/auth-method&gt;. No question there. I was trying to<br>
&gt; &gt; say we do not need multiple &#39;auth-method&#39; elements on web.xml<br>
&gt; &gt;<br>
&gt; &gt; But I think it should be possible to exclude a few URLs, like &#39;/rest/foo&#39;<br>
&gt; &gt; and &#39;/rest/bar&#39;, so that they are completely unprotected in terms of<br>
&gt; &gt; Keycloak (e.g. via different security-constraint elements):<br>
&gt; &gt; <a href="https://github.com/aerogear/aerogear-unifiedpush-server/blob/2aabd073aaaafa79943ea41d2651f6f0c5e4248e/server/src/main/webapp/WEB-INF/web.xml" target="_blank">https://github.com/aerogear/aerogear-unifiedpush-server/blob/2aabd073aaaafa79943ea41d2651f6f0c5e4248e/server/src/main/webapp/WEB-INF/web.xml</a><br>

&gt; &gt;<br>
&gt; &gt; In terms of &quot;current logged in user on Angular.js&quot;:<br>
&gt; &gt; * For the &quot;/rest/sender&quot; and &quot;/rest/device/registration&quot; endpoints, I don&#39;t<br>
&gt; &gt; see a relationship to the user on Angular.js/AdminUI at all.<br>
&gt; &gt;<br>
&gt; &gt; Internally these &#39;unprotected&#39; (or excluded) endpoints implement the<br>
&gt; &gt; HTTP_BASIC scheme themselves:<br>
&gt; &gt; * They treat the Application/Variant like a &#39;user&#39;, by performing a DB<br>
&gt; &gt; lookup of the give application/variantID<br>
&gt; &gt; * If that (Application or Variant) is found, the endpoints compare the<br>
&gt; &gt; given &#39;password&#39; form the request w/ the &quot;secret&quot; on the  Application or<br>
&gt; &gt; Variant<br>
&gt; &gt;<br>
&gt; &gt; But for these endpoints (sender and device-registration) there is no real<br>
&gt; &gt; user here like &quot;Mr. Jay&quot; or &quot;Push-Admin Foo&quot;.<br>
&gt; &gt;<br>
&gt; &gt; The client (registration or sender SDK) performs the auth, by applying the<br>
&gt; &gt; ID and the secret:<br>
&gt; &gt; curl -3 -u &quot;{PushApplicationID}:{MasterSecret}&quot; .... <a href="https://server" target="_blank">https://server</a><br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; I mean: I think there is no need to enable multiple &lt;auth-method&gt; args,<br>
&gt; &gt; &gt; as<br>
&gt; &gt; &gt; &gt; we had the exclusion already working at some point, using their<br>
&gt; &gt; &gt; &gt; KEYCLOAK<br>
&gt; &gt; &gt; &gt; auth-method<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Stian did that inclusion which for me looks correct. An excerpt from KC<br>
&gt; &gt; &gt; documentation:<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; &quot;To be able to secure WAR apps deployed on JBoss AS 7.1.1, JBoss EAP 6.x,<br>
&gt; &gt; &gt; or Wildfly, you must install and configure the Keycloak Subsystem. You<br>
&gt; &gt; &gt; then have two options to secure your WARs. You can provide a keycloak<br>
&gt; &gt; &gt; config file in your WAR and change the auth-method to KEYCLOAK within<br>
&gt; &gt; &gt; web.xml. Alternatively, you don&#39;t have to crack open your WARs at all<br>
&gt; &gt; &gt; and can apply Keycloak via the Keycloak Subsystem configuration in<br>
&gt; &gt; &gt; standalone.xml. Both methods are described in this section.&quot;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; You can also stick with BASIC, but probably you end with implementations<br>
&gt; &gt; &gt; and customizations that don&#39;t take any benefit of Keycloak.js.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Either way I will talk tomorrow with Stian and let&#39;s see what we can do.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; My initial hope was to be able to simply exclude a few URLs from the<br>
&gt; &gt; &gt; &gt; &gt; overall Keycloak protection, like the above referenced commit:<br>
&gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; <a href="https://github.com/aerogear/aerogear-unifiedpush-server/blob/2aabd073aaaafa79943ea41d2651f6f0c5e4248e/server/src/main/webapp/WEB-INF/web.xml#L42-L53" target="_blank">https://github.com/aerogear/aerogear-unifiedpush-server/blob/2aabd073aaaafa79943ea41d2651f6f0c5e4248e/server/src/main/webapp/WEB-INF/web.xml#L42-L53</a><br>

&gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; That would be best as that would mean no API change at all, and our<br>
&gt; &gt; &gt; &gt; &gt; client-registration and sender SDKs could stay as they are.<br>
&gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt; My two cents is the fact that we should use bearer tokens only,<br>
&gt; &gt; &gt; instead<br>
&gt; &gt; &gt; &gt; &gt;&gt; of mix both auth methods in a single app — now that we have KC.<br>
&gt; &gt; &gt; &gt; &gt;&gt; And discuss the changes into our clients rather sooner than later.<br>
&gt; &gt; &gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt; But I&#39;m open for whatever you guys think it&#39;s the best.<br>
&gt; &gt; &gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; -Matthias<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; &gt; The consequence of this is the basic form being presented when<br>
&gt; &gt; &gt; you try<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; &gt; to send push notifications[3]. The problem didn&#39;t occur before,<br>
&gt; &gt; &gt; &gt; &gt;&gt; because<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; &gt; we were just using Basic authentication[4] instead of Bearer<br>
&gt; &gt; &gt; tokens.<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; &gt; Possible solutions:<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; &gt; 1- After the removal of Basic authentication, move<br>
&gt; &gt; &gt; _PushApplicationID_<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; &gt; and _MasterSecret to http headers like:<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; &gt; -H &quot;PushApplicationID: XXXXXX&quot; -H &quot;MasterSecret: 42&quot;<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; &gt; IMO it sounds correct and reasonable for me.<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; &gt; 2. Create a role specific for the sender like<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; &gt; _push-applications_<br>
&gt; &gt; &gt; and<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; &gt; dinamically add _PushApplicationID_ and _MasterSecret on<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; &gt; Keycloak<br>
&gt; &gt; &gt; &gt; &gt;&gt; where:<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; &gt; username: _PushApplicationID_<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; &gt; password: _MasterSecret_<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; &gt; The implications of this alternative is the fact of have to<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; &gt; manage<br>
&gt; &gt; &gt; &gt; &gt;&gt; those<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; &gt; credentials on the server side inclusion/exclusion/login<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; &gt; 3. Implement another authentication provider specifically for<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; &gt; the<br>
&gt; &gt; &gt; &gt; &gt;&gt; sender<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; &gt; and Basic authentication[5]<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; &gt; 4. Do nothing. The consequences of this alternative is to<br>
&gt; &gt; &gt; implement<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; &gt; everything already done by Keycloak.js and manage session tokens<br>
&gt; &gt; &gt; by<br>
&gt; &gt; &gt; &gt; &gt;&gt; hand<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; &gt; on the admin-ui.<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; &gt; To me the first alternative seems to be more simple, but I<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; &gt; really<br>
&gt; &gt; &gt; want<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; &gt; your feedback on it, once it affects the whole project.<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; &gt; [1] -<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt; <a href="https://github.com/aerogear/aerogear-unifiedpush-server/blob/6c1a0d3fedea8fb6ba918009fd8e9785779c151f/jaxrs/src/main/java/org/jboss/aerogear/unifiedpush/rest/sender/PushNotificationSenderEndpoint.java#L56" target="_blank">https://github.com/aerogear/aerogear-unifiedpush-server/blob/6c1a0d3fedea8fb6ba918009fd8e9785779c151f/jaxrs/src/main/java/org/jboss/aerogear/unifiedpush/rest/sender/PushNotificationSenderEndpoint.java#L56</a><br>

&gt; &gt; &gt; &gt; &gt;&gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; &gt; [2] -<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt; <a href="https://github.com/abstractj/aerogear-unifiedpush-server/tree/keycloak.js" target="_blank">https://github.com/abstractj/aerogear-unifiedpush-server/tree/keycloak.js</a><br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; &gt; [3] -<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt; <a href="http://photon.abstractj.org/AeroGear_UnifiedPush_Server_2014-06-17_10-00-09_2014-06-17_10-00-12.jpg" target="_blank">http://photon.abstractj.org/AeroGear_UnifiedPush_Server_2014-06-17_10-00-09_2014-06-17_10-00-12.jpg</a><br>

&gt; &gt; &gt; &gt; &gt;&gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; &gt; [4] -<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt; <a href="https://github.com/aerogear/aerogear-unifiedpush-server/blob/master/server/src/main/webapp/WEB-INF/web.xml#L57" target="_blank">https://github.com/aerogear/aerogear-unifiedpush-server/blob/master/server/src/main/webapp/WEB-INF/web.xml#L57</a><br>

&gt; &gt; &gt; &gt; &gt;&gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; &gt; [5] -<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt; <a href="https://github.com/keycloak/keycloak/tree/master/examples/providers/authentication-properties" target="_blank">https://github.com/keycloak/keycloak/tree/master/examples/providers/authentication-properties</a><br>

&gt; &gt; &gt; &gt; &gt;&gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; &gt; --<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; &gt; abstractj<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; &gt; _______________________________________________<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; &gt; aerogear-dev mailing list<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; &gt; <a href="javascript:;" onclick="_e(event, &#39;cvml&#39;, &#39;aerogear-dev@lists.jboss.org&#39;)">aerogear-dev@lists.jboss.org</a><br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; &gt; <a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; --<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; Matthias Wessendorf<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; blog: <a href="http://matthiaswessendorf.wordpress.com/" target="_blank">http://matthiaswessendorf.wordpress.com/</a><br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; sessions: <a href="http://www.slideshare.net/mwessendorf" target="_blank">http://www.slideshare.net/mwessendorf</a><br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; twitter: <a href="http://twitter.com/mwessendorf" target="_blank">http://twitter.com/mwessendorf</a><br>
&gt; &gt; &gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; _______________________________________________<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; aerogear-dev mailing list<br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; <a href="javascript:;" onclick="_e(event, &#39;cvml&#39;, &#39;aerogear-dev@lists.jboss.org&#39;)">aerogear-dev@lists.jboss.org</a><br>
&gt; &gt; &gt; &gt; &gt;&gt; &gt; <a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>
&gt; &gt; &gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt; --<br>
&gt; &gt; &gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt; abstractj<br>
&gt; &gt; &gt; &gt; &gt;&gt; _______________________________________________<br>
&gt; &gt; &gt; &gt; &gt;&gt; aerogear-dev mailing list<br>
&gt; &gt; &gt; &gt; &gt;&gt; <a href="javascript:;" onclick="_e(event, &#39;cvml&#39;, &#39;aerogear-dev@lists.jboss.org&#39;)">aerogear-dev@lists.jboss.org</a><br>
&gt; &gt; &gt; &gt; &gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>
&gt; &gt; &gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; --<br>
&gt; &gt; &gt; &gt; &gt; Matthias Wessendorf<br>
&gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; blog: <a href="http://matthiaswessendorf.wordpress.com/" target="_blank">http://matthiaswessendorf.wordpress.com/</a><br>
&gt; &gt; &gt; &gt; &gt; sessions: <a href="http://www.slideshare.net/mwessendorf" target="_blank">http://www.slideshare.net/mwessendorf</a><br>
&gt; &gt; &gt; &gt; &gt; twitter: <a href="http://twitter.com/mwessendorf" target="_blank">http://twitter.com/mwessendorf</a><br>
&gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; --<br>
&gt; &gt; &gt; &gt; Matthias Wessendorf<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; blog: <a href="http://matthiaswessendorf.wordpress.com/" target="_blank">http://matthiaswessendorf.wordpress.com/</a><br>
&gt; &gt; &gt; &gt; sessions: <a href="http://www.slideshare.net/mwessendorf" target="_blank">http://www.slideshare.net/mwessendorf</a><br>
&gt; &gt; &gt; &gt; twitter: <a href="http://twitter.com/mwessendorf" target="_blank">http://twitter.com/mwessendorf</a><br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; _______________________________________________<br>
&gt; &gt; &gt; &gt; aerogear-dev mailing list<br>
&gt; &gt; &gt; &gt; <a href="javascript:;" onclick="_e(event, &#39;cvml&#39;, &#39;aerogear-dev@lists.jboss.org&#39;)">aerogear-dev@lists.jboss.org</a><br>
&gt; &gt; &gt; &gt; <a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; --<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; abstractj<br>
&gt; &gt; &gt; _______________________________________________<br>
&gt; &gt; &gt; aerogear-dev mailing list<br>
&gt; &gt; &gt; <a href="javascript:;" onclick="_e(event, &#39;cvml&#39;, &#39;aerogear-dev@lists.jboss.org&#39;)">aerogear-dev@lists.jboss.org</a><br>
&gt; &gt; &gt; <a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>
&gt; &gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; --<br>
&gt; &gt; Matthias Wessendorf<br>
&gt; &gt;<br>
&gt; &gt; blog: <a href="http://matthiaswessendorf.wordpress.com/" target="_blank">http://matthiaswessendorf.wordpress.com/</a><br>
&gt; &gt; sessions: <a href="http://www.slideshare.net/mwessendorf" target="_blank">http://www.slideshare.net/mwessendorf</a><br>
&gt; &gt; twitter: <a href="http://twitter.com/mwessendorf" target="_blank">http://twitter.com/mwessendorf</a><br>
&gt;<br>
&gt; &gt; _______________________________________________<br>
&gt; &gt; aerogear-dev mailing list<br>
&gt; &gt; <a href="javascript:;" onclick="_e(event, &#39;cvml&#39;, &#39;aerogear-dev@lists.jboss.org&#39;)">aerogear-dev@lists.jboss.org</a><br>
&gt; &gt; <a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt;<br>
&gt; abstractj<br>
&gt; _______________________________________________<br>
&gt; aerogear-dev mailing list<br>
&gt; <a href="javascript:;" onclick="_e(event, &#39;cvml&#39;, &#39;aerogear-dev@lists.jboss.org&#39;)">aerogear-dev@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>
<br>
_______________________________________________<br>
aerogear-dev mailing list<br>
<a href="javascript:;" onclick="_e(event, &#39;cvml&#39;, &#39;aerogear-dev@lists.jboss.org&#39;)">aerogear-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a></blockquote></div><br><br>-- <br>Sent from Gmail Mobile<br>