<div dir="ltr">Hi all,<div>I&#39;d like to discuss missing @id and @name attributes on UI elements of Mapper Type Properties (related issue: <a href="https://issues.jboss.org/browse/KEYCLOAK-1885" target="_blank">https://issues.jboss.org/browse/KEYCLOAK-1885</a>).</div><div>This concerns e.g. creating/editing a Client Protocol Mapper. When you choose the Mapper Type, the following properties (like &quot;Token Claim Name&quot; in case of &quot;Hardcoded Claim&quot;) don&#39;t have any @id or @name.</div><div>This properties are used on more places all over the Keycloak (the template is &quot;kc-provider-config.html&quot; in &quot;keycloak-forms-common-themes&quot; module).</div><div><br></div><div>At QE we&#39;d like to add @id for every of these elements so we don&#39;t need to use relative XPath locators based on labels, AngularJS directives/attributes etc. which could be unstable.</div><div><br></div><div>The problem is there&#39;s no suitable (object) attribute of these properties to use as HTML @id or @name.</div><div>The closest thing to this is the <a href="http://mapperType.property.name">mapperType.property.name</a> but it&#39;s using illegal characters (spaces) for @id in some cases. E.g. &quot;Claim value&quot; uses the &quot;claim.value&quot; name which is OK but &quot;Claim JSON Type&quot; uses &quot;Claim JSON Type&quot; name (yes, the name is same as the label) which can&#39;t be used in HTML as @id because of spaces.</div><div><br></div><div>I&#39;ve got some solutions on my mind.</div><div><br></div><div><b>1) Replacing the spaces on the client site (using AngularJS controllers)</b> which is probably not a nice solution. The Mapper Types (and it&#39;s properties) are used on more than one sites/controllers and I haven&#39;t found any global getter or something like that for Mapper Types which could contain this replacement code. As far as I know, Mapper Types are fetched using ServerInfo service. But this service is pretty abstract and simple so I don&#39;t think it&#39;s a good idea to do the replacement there.</div><div>That means we need to add some getter and rewrite the controllers to use this getter or copy-paste the replacement code all over the controllers which is obviously out of the question.</div><div><br></div><div><b>2) Add a new ID attribute to the REST API</b> so the ServerInfo service would distribute this attribute to all controllers and templates.</div><div><br></div><div><b>3) Change the &quot;name&quot; attributes</b> so it can be used as @id. Possible problem could be compatibility and migration of current  Keycloak installations to the newer version.</div><div><br></div><div>Can come upon any other solution? Could you implement any of it?</div><div><br></div><div>Thank you!</div><div><br></div><div>Best regards,</div><div>Václav Muzikář</div><div>Keycloak QE</div></div>