<div dir="ltr">sounds like a nice idea, to add this to our scaffolding; Would safe a lot of time, when starting with a &quot;backend / service&quot; like that;<div><br></div><div style>Pretty cool!</div><div style><br></div>
<div style><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Apr 15, 2013 at 2:38 PM, Bruno Oliveira <span dir="ltr">&lt;<a href="mailto:bruno@abstractj.org" target="_blank">bruno@abstractj.org</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Monday, April 15, 2013 at 9:27 AM, Sebastien Blanc wrote:<br>
<div class="im">&gt;<br>
&gt;<br>
&gt;<br>
&gt; On Mon, Apr 15, 2013 at 2:05 PM, Bruno Oliveira &lt;<a href="mailto:bruno@abstractj.org">bruno@abstractj.org</a> (mailto:<a href="mailto:bruno@abstractj.org">bruno@abstractj.org</a>)&gt; wrote:<br>
&gt; &gt; Hi Sebi, I think this is a good idea, here comes few suggestion:<br>
&gt; &gt;<br>
&gt; &gt; * Replace create* for the entity only, into a scaffolding domain we assume that the user is willing to generate ALL the things. So for example: { &quot;security&quot;: &quot;users&quot; :[&quot;sebi&quot;,&quot;abtractj&quot;], //1 &quot;role&quot; :[&quot;simple&quot;,&quot;admin&quot;], //2 &quot;roleMap&quot;<br>

&gt; You mean creating users/role just for a particular entity ? Sorry I think I did not understand well this remark.<br>
<br>
</div>Keep the same concept, only renaming the attributes like &#39;createUsers&#39; to &#39;users&#39;. (Create is something implicit). Makes sense?<br>
<div class="im">&gt;<br>
&gt; &gt; * generateLoginForm and generateOTPPage. I&#39;d replace by otp: true, login: true. Why? In our scenario doesn&#39;t exist jsp pages only, but also endpoints for it. I&#39;m not specialist in this scaffolding topic, but my idea is: if the user specify true generate pages &amp; endpoints, if they don&#39;t want jsp pages, just delete it.<br>

&gt;<br>
&gt;<br>
&gt; Right, I have this idea just after sending the email, one thing should be &quot;loginForm&quot;:&quot;otp&quot;|&quot;classic&quot;<br>
</div>Maybe &quot;login&quot;:&quot;otp&quot;|&quot;default&quot;<br>
<div class="im">&gt;<br>
&gt; &gt;<br>
&gt; &gt; * Would be nice if we could provide an alternative to specify something more general for authentication/authorization, for example (ignore my poor scaffolding skills):<br>
&gt; &gt;<br>
&gt; &gt; <a href="https://gist.github.com/abstractj/ed6676b3106929cc23b0" target="_blank">https://gist.github.com/abstractj/ed6676b3106929cc23b0</a>. And something which allows me to specify the exception, for example: &quot;I want all of my endpoints requiring authentication, except the login endpoint.<br>

&gt;<br>
&gt; +1, invert the config, let me think on how we could define this in a clear way<br>
&gt; &gt;<br>
&gt; &gt; * You probably know about it, but just a reminder. Don&#39;t forget about configuration files from PicketLink (this would be something nice to be scaffolded). Maybe allow devs to specify persistence provider or database? For example: I want to use PicketLink with MySQL.<br>

&gt;<br>
&gt; +1, you could help me on this by providing me a complete list on the values and the locations that we could change, this way I can integrate it to the config.<br>
</div>Here comes the config file commented my friend <a href="https://gist.github.com/abstractj/53ce0a9faae482151da2" target="_blank">https://gist.github.com/abstractj/53ce0a9faae482151da2</a><br>
<div><div class="h5">&gt;<br>
&gt; &gt;<br>
&gt; &gt; Overall looks good.<br>
&gt; Abstractj++ for the feedback !!<br>
&gt; &gt;<br>
&gt; &gt; --<br>
&gt; &gt; &quot;The measure of a man is what he does with power&quot; - Plato<br>
&gt; &gt; -<br>
&gt; &gt; @abstractj<br>
&gt; &gt; -<br>
&gt; &gt; Volenti Nihil Difficile<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; On Monday, April 15, 2013 at 6:35 AM, Sebastien Blanc wrote:<br>
&gt; &gt;<br>
&gt; &gt; &gt; Good Morning !<br>
&gt; &gt; &gt; I&#39;ve been thinking about Security Scaffolding. It&#39;s a different beast than a simple CRUD scaffolding. It&#39;sa bit more difficult to make assumption when you want to generate security flows : which http method to protect ? using only authentification or also authorization ? etc ...<br>

&gt; &gt; &gt;<br>
&gt; &gt; &gt; Therefore, I&#39;ve been thinking of some kind of configuration that the user could provide before the scaffolding process. Keeping it really simple and &quot;human readable&quot; and that could really speed up setting up the security layer :<br>

&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; { &quot;security&quot;: &quot;createUsers&quot; :[&quot;sebi&quot;,&quot;abtractj&quot;], //1 &quot;createRole&quot; :[&quot;simple&quot;,&quot;admin&quot;], //2 &quot;roleMap&quot;: [&quot;simple&quot;:[&quot;abstractj&quot;,&quot;sebi&quot;],&quot;admin&quot;:[&quot;sebi&quot;]], //3 &quot;generateLoginForm&quot; : true, //4 &quot;generateOTPPage&quot; : true, //5 &quot;entities&quot; : { //6 &quot;org.sebi.Task&quot; : { &quot;GET&quot;: { &quot;authentification&quot; : false }, &quot;POST&quot;: { &quot;authentification&quot; : true, &quot;authorization&quot; : &quot;simple&quot; }, &quot;PUT&quot;: { &quot;authentification&quot; : true, &quot;authorization&quot; : &quot;admin&quot; }, &quot;DELETE&quot;: { &quot;authentification&quot; : true, &quot;authorization&quot; : &quot;admin&quot; } } } }<br>

&gt; &gt; &gt;<br>
&gt; &gt; &gt; Let me detail each of these points to make the discussion easier :<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; * 1. createUSers : We pass a list of users that we be inserted into the db : this will generate or a SQL script or a class creating the users like in <a href="https://github.com/aerogear/aerogear-controller-demo/blob/master/src/main/java/org/jboss/aerogear/controller/demo/config/PicketLinkDefaultUsers.java" target="_blank">https://github.com/aerogear/aerogear-controller-demo/blob/master/src/main/java/org/jboss/aerogear/controller/demo/config/PicketLinkDefaultUsers.java</a><br>

&gt; &gt; &gt; (<a href="https://github.com/aerogear/aerogear-controller-demo/blob/master/src/main/java/org/jboss/aerogear/controller/demo/config/PicketLinkDefaultUsers.java" target="_blank">https://github.com/aerogear/aerogear-controller-demo/blob/master/src/main/java/org/jboss/aerogear/controller/demo/config/PicketLinkDefaultUsers.java</a>)<br>

&gt; &gt; &gt;<br>
&gt; &gt; &gt; * 2. createAdmin : We pass a list of roles that we be inserted into the db : this will generate or a SQL script or a class creating the users like in <a href="https://github.com/aerogear/aerogear-controller-demo/blob/master/src/main/java/org/jboss/aerogear/controller/demo/config/PicketLinkDefaultUsers.java" target="_blank">https://github.com/aerogear/aerogear-controller-demo/blob/master/src/main/java/org/jboss/aerogear/controller/demo/config/PicketLinkDefaultUsers.java</a><br>

&gt; &gt; &gt;<br>
&gt; &gt; &gt; * 3. roleMap : We create here an association map between users and roles : this will generate or a SQL script or a class creating the users like in <a href="https://github.com/aerogear/aerogear-controller-demo/blob/master/src/main/java/org/jboss/aerogear/controller/demo/config/PicketLinkDefaultUsers.java" target="_blank">https://github.com/aerogear/aerogear-controller-demo/blob/master/src/main/java/org/jboss/aerogear/controller/demo/config/PicketLinkDefaultUsers.java</a><br>

&gt; &gt; &gt;<br>
&gt; &gt; &gt; (<a href="https://github.com/aerogear/aerogear-controller-demo/blob/master/src/main/java/org/jboss/aerogear/controller/demo/config/PicketLinkDefaultUsers.java" target="_blank">https://github.com/aerogear/aerogear-controller-demo/blob/master/src/main/java/org/jboss/aerogear/controller/demo/config/PicketLinkDefaultUsers.java</a>)<br>

&gt; &gt; &gt; * 4. generateLoginForm : if true, the UI scaffolding will also generate a login form (location and layout depending on the scaffolding provider (AngularJS+Bootstrap, AngularJS+JQM) or by providing a custom template fragment.<br>

&gt; &gt; &gt;<br>
&gt; &gt; &gt; * 5. generateOTPPage : if true, the UI scaffolding will also generate a OTP page (location and layout depending on the scaffolding provider (AngularJS+Bootstrap, AngularJS+JQM) or by providing a custom template fragment.<br>

&gt; &gt; &gt;<br>
&gt; &gt; &gt; * 6. Entities : Here we configure the security flow for each entity per HTTP methods. Concretely, this will mean :<br>
&gt; &gt; &gt; - On the backend, generate the right route, i.e :<br>
&gt; &gt; &gt; route().from(&quot;/task&quot;).roles(&quot;admin&quot;).on(RequestMethod.DELETE).to(Task.class).delete();<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; - On the frontend, setting the flag or not on a pipe to enable auth. Other option are possible, liking hiding links, disabling button depending on the authorization/authnetification. We should discuss these options.<br>

&gt; &gt; &gt;<br>
&gt; &gt; &gt; I think it could be a nice addition, and from the feedback I&#39;ve heard, this kind of feature really misses today in the current scaffolding tools regarding security. This could be really a killing feature and not hard to implement.<br>

&gt; &gt; &gt;<br>
&gt; &gt; &gt; Please comment, ask questions to polish the feature !<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Seb<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; _______________________________________________<br>
&gt; &gt; &gt; aerogear-dev mailing list<br>
</div></div>&gt; &gt; &gt; <a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a> (mailto:<a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a>) (mailto:<a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a>)<br>

<div class="HOEnZb"><div class="h5">&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;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; _______________________________________________<br>
&gt; &gt; aerogear-dev mailing list<br>
&gt; &gt; <a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a> (mailto:<a href="mailto:aerogear-dev@lists.jboss.org">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; aerogear-dev mailing list<br>
&gt; <a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a> (mailto:<a href="mailto:aerogear-dev@lists.jboss.org">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>
<br>
_______________________________________________<br>
aerogear-dev mailing list<br>
<a href="mailto:aerogear-dev@lists.jboss.org">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><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Matthias Wessendorf <br><br>blog: <a href="http://matthiaswessendorf.wordpress.com/" target="_blank">http://matthiaswessendorf.wordpress.com/</a><br>
sessions: <a href="http://www.slideshare.net/mwessendorf" target="_blank">http://www.slideshare.net/mwessendorf</a><br>twitter: <a href="http://twitter.com/mwessendorf" target="_blank">http://twitter.com/mwessendorf</a>
</div>