<div dir="ltr">We often derive the navigation in HAL from the management model tree. But it&#39;s also quite common that we shuffle things around and add own hierarchies to group resources differently. So I don&#39;t think that changing the hierarchy would make any difference in terms of HAL. <div><br></div><div>More important to me is a logical grouping of resources which belong together. This should be reflected in both the documentation and in HAL.  </div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 28, 2016 at 1:23 PM, Darran Lofthouse <span dir="ltr">&lt;<a href="mailto:darran.lofthouse@jboss.com" target="_blank">darran.lofthouse@jboss.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks Brian.<br>
<br>
I kind of think, even if we don&#39;t know the solution today but we do<br>
think usability is something we should handle in the admin tools then it<br>
will be better to leave the hierarchy as-is - alternatively if we felt<br>
this is insufficient information from the subsystem then modify the<br>
hierarchy there.<br>
<br>
In the documentation I want to add a structure similar to the grouping<br>
Claudio is using for HAL but generally if an administrator is looking to<br>
add a resource for a specific capability e.g. security-realm all<br>
resources will be listed together in the documentation.<br>
<br>
Another random CLI option: -<br>
<br>
Add an add-capability command relative to a point in the hierarchy.<br>
  - capability would be a parameter which can tab complete based on<br>
capabilities at that point.<br>
  - type can tab complete a much shorter list once we know the desired<br>
capability.<br>
  - name the name the new resource will have.<br>
<br>
At that point additional parameters could tab complete as we know the<br>
resource type.<br>
<span class="HOEnZb"><font color="#888888"><br>
Darran.<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
On 27/09/16 16:59, Brian Stansberry wrote:<br>
&gt;<br>
&gt;&gt; On Sep 27, 2016, at 9:47 AM, Darran Lofthouse &lt;<a href="mailto:darran.lofthouse@jboss.com">darran.lofthouse@jboss.com</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; I have received the following request regarding the hierarchy of the<br>
&gt;&gt; Elytron subystem so just wanted to get some additional opinions: -<br>
&gt;&gt;<br>
&gt;&gt; <a href="https://issues.jboss.org/browse/WFLY-7190" rel="noreferrer" target="_blank">https://issues.jboss.org/<wbr>browse/WFLY-7190</a><br>
&gt;&gt;<br>
&gt;&gt; The Elytron subsystem is implemented by having a number of different<br>
&gt;&gt; capabilities that are then chained together in the model to expose four<br>
&gt;&gt; / five capabilities that are then used across the application server to<br>
&gt;&gt; access security related services.<br>
&gt;&gt;<br>
&gt;&gt; <a href="https://github.com/wildfly-security-incubator/wildfly-capabilities/tree/elytron_integration/org/wildfly/security" rel="noreferrer" target="_blank">https://github.com/wildfly-<wbr>security-incubator/wildfly-<wbr>capabilities/tree/elytron_<wbr>integration/org/wildfly/<wbr>security</a><br>
&gt;&gt;<br>
&gt;&gt; The reason for following the capability approach along with a component<br>
&gt;&gt; assembly approach to assembling the configuration is so that we are<br>
&gt;&gt; ready for other subsystems to be added to the server potentially<br>
&gt;&gt; providing their own implementations of these capabilities.<br>
&gt;&gt;<br>
&gt;&gt; For our capabilities we have one or more resource definitions making it<br>
&gt;&gt; possible to configure different implementations of the capabilities<br>
&gt;&gt; whilst having the configuration fully described in the model unlike the<br>
&gt;&gt; previous map approach for login modules.<br>
&gt;&gt;<br>
&gt;&gt; So the general problem is how should an administrator be able to see the<br>
&gt;&gt; resources by type.<br>
&gt;&gt;<br>
&gt;&gt; Within the admin console Claudio it looking at a tabbed interface where<br>
&gt;&gt; different tabs can contain different resources so that seems to be<br>
&gt;&gt; reasonably covered.<br>
&gt;&gt;<br>
&gt;&gt; Within the CLI however an administrator is just presented by all<br>
&gt;&gt; resource types within the subsystem when they use tab completion.<br>
&gt;&gt;<br>
&gt;&gt; One option could be for us to introduce an arbitrary layer in the<br>
&gt;&gt; subsystem and group our resources, e.g.<br>
&gt;&gt;<br>
&gt;&gt;   /subsystem=elytron/component=<wbr>name-rewriter/<br>
&gt;&gt;   /subsystem=elytron/component=<wbr>security-realm/<br>
&gt;&gt;<br>
&gt;<br>
&gt; So then<br>
&gt;<br>
&gt; /subsystem=elytron/component=<wbr>name-rewriter/custom-name-<wbr>rewriter=foo<br>
&gt; /subsystem=elytron/component=<wbr>security-realm/jdbc-realm=bar<br>
&gt;<br>
&gt; That’s not clearly a benefit; it may be worse.<br>
&gt;<br>
&gt; The point here is better navigation. So the user isn’t sure:<br>
&gt;<br>
&gt; /subsystem=elytron/&lt;TAB&gt;<br>
&gt;<br>
&gt; Now unless there are no normal children, you see whatever stuff remains at the top, and ‘component’. Picking a couple at random to provide an example<br>
&gt;<br>
&gt; component dir-context empty-role-decoder ...<br>
&gt;<br>
&gt; Now ‘component’ isn’t intuitive at all. But if the list is only 3-4 or less then maybe they guess it. Otherwise it is both obscure and buried amongst other things.<br>
&gt;<br>
&gt; /subsystem=elytron/component=&lt;<wbr>TAB&gt;<br>
&gt;<br>
&gt; Now they get a more refined list, and there is some benefit<br>
&gt;<br>
&gt; name-writer security-realm …<br>
&gt;<br>
&gt; /subsystem=elytron/component=<wbr>name-rewriter/&lt;TAB&gt;<br>
&gt;<br>
&gt; custom-name-rewriter constant-name-rewriter  …..<br>
&gt;<br>
&gt; And finally they get to<br>
&gt;<br>
&gt; /subsystem=elytron/component=<wbr>name-rewriter/custom-name-<wbr>rewriter<br>
&gt;<br>
&gt; That’s 2 extra tab completes (four if you count the extra ‘=‘ and ‘/‘ in the path), the decision that ‘component’ is what they want, and the recognition that the thing they want, a ‘custom-name-rewriter’ is a form of ‘name-rewriter’.<br>
&gt;<br>
&gt; So it’s dubious there is much of a gain. And of course for other use cases where people know what they want it’s added superfluous typing.<br>
&gt;<br>
&gt; A side benefit of the added level is it provides a place to describe the general characteristics of the component category in the read-resource-description output.<br>
&gt;<br>
&gt;&gt; But before taking that approach it feels as though this information is<br>
&gt;&gt; already there and there are possibly some other alternatives we could<br>
&gt;&gt; consider.<br>
&gt;&gt;<br>
&gt;&gt; Firstly I wonder if some of the read-* operations could have an<br>
&gt;&gt; opportunity to take into account capabilities of child resources to<br>
&gt;&gt; offer a filtered view?<br>
&gt;&gt;<br>
&gt;<br>
&gt; So<br>
&gt;<br>
&gt; /subsystem=elytron:read-<wbr>children-types(provided-<wbr>capability=org.wildfly.<wbr>elytron.name-rewriter)<br>
&gt;<br>
&gt; I’m not sure how much that helps. This call would be used by the CLI to feed tab completion, not the user. But somehow the CLI needs the value &#39;org.wildfly.elytron.name-<wbr>rewriter’ and that cannot be inferred; it requires user input.<br>
&gt;<br>
&gt; Or<br>
&gt;<br>
&gt; /subsystem=elytron:read-<wbr>children-resources(provided-<wbr>capability=org.wildfly.<wbr>elytron.name-rewriter)<br>
&gt;<br>
&gt; Here there’s some benefit but CLI would need to offer tab completion for &#39;provided-capability’.<br>
&gt;<br>
&gt; Before I’d want to invest energy in implementing that I’d like to see some concrete demand for that exact use case. It’s a pretty big jump from ‘the subsystem is too flat’ to “significant numbers of users will make use of this specific read-children-resources variant&quot;<br>
&gt;<br>
&gt;&gt; Another possible option could be CLI commands e.g. add-name-rewriter,<br>
&gt;&gt; add-security-realm - not sure if that would be one way to give a better<br>
&gt;&gt; user experience.<br>
&gt;&gt;<br>
&gt;<br>
&gt; This seems more direct. TBH though I’ve spent most of my thinking on my bits above and haven’t thought hard about this one. :)<br>
&gt;<br>
&gt;&gt; Anyway just some random thoughts for the moment but wanted to open this<br>
&gt;&gt; up before jumping immediately to the artificial hierarchy solution.<br>
&gt;&gt;<br>
&gt;&gt; Regards,<br>
&gt;&gt; Darran Lofthouse.<br>
&gt;&gt;<br>
&gt;&gt; ______________________________<wbr>_________________<br>
&gt;&gt; wildfly-dev mailing list<br>
&gt;&gt; <a href="mailto:wildfly-dev@lists.jboss.org">wildfly-dev@lists.jboss.org</a><br>
&gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/wildfly-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/<wbr>mailman/listinfo/wildfly-dev</a><br>
&gt;<br>
______________________________<wbr>_________________<br>
wildfly-dev mailing list<br>
<a href="mailto:wildfly-dev@lists.jboss.org">wildfly-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/wildfly-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/<wbr>mailman/listinfo/wildfly-dev</a></div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">







---<br>Harald Pehl<br>JBoss by Red Hat<br><a href="http://hpehl.info" target="_blank">http://hpehl.info</a></div></div>
</div>