<div dir="ltr">IoT devices are usually ZigBee or some other type of mesh protocol. It's clever stuff, my light bulbs can relay signals from each other, my laptops can't.</div><div class="gmail_extra"><br><div class="gmail_quote">On 20 January 2016 at 21:18, Pedro Igor Silva <span dir="ltr"><<a href="mailto:psilva@redhat.com" target="_blank">psilva@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">IETF already has some work around OAuth2 and IoT. It is interesting <a href="https://tools.ietf.org/html/draft-tschofenig-ace-oauth-iot-00" rel="noreferrer" target="_blank">https://tools.ietf.org/html/draft-tschofenig-ace-oauth-iot-00</a>.<br>
<br>
Also, I think IoT is usually based and preferable on UDP instead of TCP.<br>
<br>
Regards.<br>
<span class="HOEnZb"><font color="#888888">Pedro Igor<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
----- Original Message -----<br>
From: "Stian Thorgersen" <<a href="mailto:sthorger@redhat.com">sthorger@redhat.com</a>><br>
To: "Bill Burke" <<a href="mailto:bburke@redhat.com">bburke@redhat.com</a>><br>
Cc: "keycloak-user" <<a href="mailto:keycloak-user@lists.jboss.org">keycloak-user@lists.jboss.org</a>><br>
Sent: Wednesday, January 20, 2016 5:15:26 PM<br>
Subject: Re: [keycloak-user] Announce - Secret Store<br>
<br>
Another interesting aspect of this is that it can be useful in IoT.<br>
<br>
In IoT the devices themselves are often pretty dumb, they have small amount of storage and don't even talk http. The hub they connect to is generally more beefy and talks both zigbee (or whatever) and http. With IoT devices it would work something like:<br>
<br>
1. User registers a new IoT device through some sort of flow (click a button on the hub, through an app on the smartphone, through the web browser on the hub portal, or whatever)<br>
2. The hub creates a new "device" account for it in Keycloak, and also gets tokens from KC (refresh or offline whatever). It stores the refresh/offline token permanently, but access token only in memory<br>
3. The hub also creates a short token (token UUID, or key/secret pari, whatever)<br>
4. The hub sends the small short token to the device<br>
5. The device now only needs to store this short token and also only send this short token<br>
6. The hub looks up the real token based on the uuid or key/secret pair, and swaps it in any outgoing request<br>
<br>
Benefits here is that a small IoT device can communicate to a REST service secured with bearer tokens without having to deal with large bearer tokens, refreshing the token, etc..<br>
<br>
On 20 January 2016 at 18:50, Bill Burke < <a href="mailto:bburke@redhat.com">bburke@redhat.com</a> > wrote:<br>
<br>
<br>
<br>
<br>
<br>
On 1/20/2016 11:44 AM, Juraci Paixão Kröhling wrote:<br>
> On 20.01.2016 17:12, Bill Burke wrote:<br>
>> What you are describing MAKES ZERO SENSE. From your document:<br>
>><br>
>> "A token is created when an user reaches the path<br>
>> |/secret-store/v1/tokens/create| via GET (or passing the username and<br>
>> password as Basic authentication via POST) and stored into a Cassandra<br>
>> data store:"<br>
>><br>
>> You are doing EXACTLY what the direct grant REST api does except you are<br>
>> using basic auth. I still don't see the purpose of this service.<br>
> Those are performed in different steps. The user creates this token via<br>
> an UI (or CLI, if needed), then use this key/secret as the credentials<br>
> on the client.<br>
><br>
> The client has no knowledge about Keycloak, OAuth, or about any meta<br>
> data that was embedded into this opaque token. All it cares is that it's<br>
> going to call the end service using basic auth.<br>
><br>
> The secret store is *not* for every application: it's targeted to<br>
> clients where OAuth handling is costly, undesirable or even impossible<br>
> (like legacy applications). So, instead of entering the user's own<br>
> credentials there, the key/secret are used instead.<br>
><br>
> Our "metrics collector agent" is the main target for this: the knowledge<br>
> about auth doesn't belong there. All it needs to know is an "user" and<br>
> "password", which are the "key" and "secret" for the token. Where<br>
> Keycloak is, how to create an access token from an offline token, how<br>
> long to keep an access token, and so on is made at the secret store, as<br>
> we need to save every processing cycle possible, to not badly influence<br>
> a server that is being monitored (and possibly, already in a bad shape).<br>
><br>
> Of course, if you can live with your password being stored in plaintext<br>
> on the clients, you don't need the secret store. But honestly, that<br>
> seems ridiculous.<br>
Thanks for the explanation and sorry if I sounded rude. We have people<br>
suggesting crazy redundant shit all the time and I thought this just<br>
might have been yet another case of this. Makes sense now. Something<br>
interesting that we should add to Keycloak as an optional service<br>
sometime in the future.<br>
<br>
--<br>
Bill Burke<br>
JBoss, a division of Red Hat<br>
<a href="http://bill.burkecentral.com" rel="noreferrer" target="_blank">http://bill.burkecentral.com</a><br>
<br>
_______________________________________________<br>
keycloak-user mailing list<br>
<a href="mailto:keycloak-user@lists.jboss.org">keycloak-user@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/keycloak-user" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-user</a><br>
<br>
<br>
_______________________________________________<br>
keycloak-user mailing list<br>
<a href="mailto:keycloak-user@lists.jboss.org">keycloak-user@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/keycloak-user" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-user</a><br>
</div></div></blockquote></div><br></div>