Hi Björn,
Realm attributes are currently used to store Keycloak internal realm information, however there are tools like keycloak-config-cli that use the realm attributes to maintain state information about the realm.
If you store custom data in realm attributes, then you need to use some kind of namespacing or prefix for your custom attributes in order to avoid potential clashes with Keycloak internal data.
I think it would be useful to have direct access to realm attributes in templates via form beans if this would be officially supported.
In the meantime, you can create your own LoginFormsProvider that inherits from FreeMarkerLoginFormsProvider. In the "processTemplate" method, you can
add your own beans to the "attributes" map that is passed to the template engine. With this you can effectively wrap / extend the RealmBean and add the attribute access logic there.
Here is an example for this:
Cheers,
Thomas