<div dir="ltr">Sorry, forget about it. I put my new methods in the servlet facet :)</div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Jan 4, 2015 at 1:05 AM, Ivan St. Ivanov <span dir="ltr"><<a href="mailto:ivan.st.ivanov@gmail.com" target="_blank">ivan.st.ivanov@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">So, I am reworking this addon for the third time now.<div><br></div><div>I reached to the conclusion that I will create a mirroring SecurityFacet implementation for every ServletFacet implementation (2_5, 3_0, 3_1). Before you jumping at me, I would like to share some code. :)</div><div><br></div><div><pre style="color:rgb(0,0,0);font-family:Inconsolata"><font size="4"><span style="color:rgb(0,0,128);font-weight:bold">public interface </span>SecurityFacet<<span style="color:rgb(32,153,157)">DESCRIPTOR </span><span style="color:rgb(0,0,128);font-weight:bold">extends </span>WebAppCommonDescriptor>
{<br> <span style="color:rgb(0,0,128);font-weight:bold">public void </span>addLoggingConfig(AuthenticationMethod method, String realmName);<br>}</font><span style="font-size:22pt"><br></span></pre></div><div><pre style="color:rgb(0,0,0);font-family:Inconsolata"><pre style="font-family:Inconsolata"><font size="4"><span style="color:rgb(0,0,128);font-weight:bold">public interface </span>SecurityFacet_2_5 <span style="color:rgb(0,0,128);font-weight:bold">extends
</span> SecurityFacet<org.jboss.shrinkwrap.descriptor.api.webapp25.WebAppDescriptoWebAppDescriptor></font></pre></pre><pre style="color:rgb(0,0,0);font-family:Inconsolata"><font size="4"><span style="color:rgb(0,0,128);font-weight:bold">public class </span>SecurityFacetImpl_2_5 <span style="color:rgb(0,0,128);font-weight:bold">extends </span>ServletFacetImpl_2_5 <span style="color:rgb(0,0,128);font-weight:bold">implements </span>SecurityFacet_2_5<br></font></pre></div><div>Before that though, I wonder is there a possibility to somehow inject the needed ServletFacetImpl inside its corresponding SecurityFacetImpl, i.e. compose it? I am doing it now with inheritance, but I don't quite like it because of the DependencyInstaller dependency in the ServletFacetImpl constructors. Which I need to explicitly create a constructor in the SecurityFacetImpl for:</div><div><pre style="color:rgb(0,0,0);font-family:Inconsolata"><pre style="font-family:Inconsolata"><font size="4"><span style="color:rgb(128,128,0)">@Inject<br></span><span style="color:rgb(0,0,128);font-weight:bold">public </span>SecurityFacetImpl_2_5(DependencyInstaller installer)<br>{<br> <span style="color:rgb(0,0,128);font-weight:bold">super</span>(installer);<br>}</font><span style="font-size:22pt"><br></span></pre></pre></div><div><br></div><div>I will share later some code, but please tell me whether composition over inheritance will work in case of facets?</div><div><br></div><div>Thanks,</div><div>Ivan</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Oct 13, 2014 at 2:17 PM, Ivan St. Ivanov <span dir="ltr"><<a href="mailto:ivan.st.ivanov@gmail.com" target="_blank">ivan.st.ivanov@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">OK, George, should I read your answers as: "Yes, Ivan, go on and implement the security command(s) in the javaee addon. You may use the picketlink addon as reference, but follow the spec" :)</div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Oct 13, 2014 at 10:22 AM, George Gastaldi <span dir="ltr"><<a href="mailto:ggastald@redhat.com" target="_blank">ggastald@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div>I am not sure, since the PicketLink addon is specific to PicketLink, and not plain JavaEE security. Perhaps we need to introduce a new command in the javaee addon.<br><br><br></div><div><br>Em 13/10/2014, às 10:01, Ivan St. Ivanov <<a href="mailto:ivan.st.ivanov@gmail.com" target="_blank">ivan.st.ivanov@gmail.com</a>> escreveu:<br><br></div><div><div><blockquote type="cite"><div><div dir="ltr">Hi George,<div><br></div><div>Thanks, I'll look at it!</div><div><br></div><div>Do you think it is reasonable to close <a href="https://issues.jboss.org/browse/FORGEPLUGINS-152" style="font-size:13px;font-family:arial,sans-serif" target="_blank">https://issues.jboss.org/browse/FORGEPLUGINS-152</a>?</div><div><br></div><div>Regards,</div><div>Ivan</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Oct 13, 2014 at 12:05 AM, George Gastaldi <span dir="ltr"><<a href="mailto:ggastald@redhat.com" target="_blank">ggastald@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div>Have you checked the Picketlink addon? </div><div><br><a href="http://forge.jboss.org/addon/org.picketlink.tools.forge:picketlink-forge-addon" target="_blank">http://forge.jboss.org/addon/org.picketlink.tools.forge:picketlink-forge-addon</a><br><br></div><div>Check it out, because I believe it already does some stuff that you are looking for.</div><div><br>Em 12/10/2014, às 22:32, Ivan St. Ivanov <<a href="mailto:ivan.st.ivanov@gmail.com" target="_blank">ivan.st.ivanov@gmail.com</a>> escreveu:<br><br></div><div><div><blockquote type="cite"><div><div dir="ltr">Hi folks,<div><br></div><div>I wanted to add a new addon to Forge that handles the Java EE security topics:</div><div><br></div><div>- Add constraints to some resources</div><div>- Setup authentication mechanism (form, basic, digest, etc.)</div><div>- Assign realm to security constraints</div><div>- Create security roles</div><div>- If the realm is JDBC and JPA facet is installed, add an entity along with some named queries</div><div><br></div><div>I looked in the Forge JIRA whether there is something like that and I found this issue created almost a year and a half ago:</div><div><br></div><div><a href="https://issues.jboss.org/browse/FORGEPLUGINS-152" target="_blank">https://issues.jboss.org/browse/FORGEPLUGINS-152</a><br></div><div><br></div><div>I read in the description though, that the addon should be also able to setup groups and users inside a realm. Isn't that too server specific if the realm is not JDBC? Maybe we could continue the communication in the issue, so whoever is interested my add themselves as a watcher there?</div><div><br></div><div>Cheers,</div><div>Ivan</div></div>
</div></blockquote></div></div><blockquote type="cite"><div><span>_______________________________________________</span><br><span>forge-dev mailing list</span><br><span><a href="mailto:forge-dev@lists.jboss.org" target="_blank">forge-dev@lists.jboss.org</a></span><br><span><a href="https://lists.jboss.org/mailman/listinfo/forge-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/forge-dev</a></span></div></blockquote></div><br>_______________________________________________<br>
forge-dev mailing list<br>
<a href="mailto:forge-dev@lists.jboss.org" target="_blank">forge-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/forge-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/forge-dev</a><br></blockquote></div><br></div>
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>forge-dev mailing list</span><br><span><a href="mailto:forge-dev@lists.jboss.org" target="_blank">forge-dev@lists.jboss.org</a></span><br><span><a href="https://lists.jboss.org/mailman/listinfo/forge-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/forge-dev</a></span></div></blockquote></div></div></div><br>_______________________________________________<br>
forge-dev mailing list<br>
<a href="mailto:forge-dev@lists.jboss.org" target="_blank">forge-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/forge-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/forge-dev</a><br></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>