Customise default UI of Spring Boot Admin Server - spring-boot-admin

I want to customize the default page of spring boot admin, and manipulate it ( for eg. Change the order in the list of applications / group some of them as one component, etc. ).
Is it possible to do that, and if yes, what files needed to be changed and which functions need to be overridden.

I found a solution to the above question. The only way we can add customised UI/ Endpoint in SBA ( Spring Boot Admin ) is by developing a custom jar using the sample dependency code and adding it to your server project.
The detailed steps are described in the question: Spring boot admin add custom tab.

Related

Keycloak.X (quarkus based) on CloudFoundry

we want to deploy keycloak.X to cloudfoundry. I found older approaches (How to deploy keycloak to cloudfoundry) with two options:
wrapping it as a Spring application (the corresponding stuff on github seems abandoned, guess this is because keycloak switched to quarkus?)
using the docker image (diego_dockeris disabled in my target environment)
So I am stuck with the Quarkus distribution.
Ideally, I dont want to change too much on the application itself (risk assessment ...) but only wrap it for cloud foundry.
The start script targets a class named QuarkusEntryPoint, but I don't know how to put it into a buildpack.

Keycloak configure with PostgreSQL

I develop Spring Boot Rest API project using JDBC and the database is PostgreSQL. I added authorization with Keycloak. I wanna use User Federation because I would like to use Users in my PostgreSQL DB. How can I use it and other ways not to use User Federation?
I have faced the same problem recently. I have different clients with different RDBMS, so I have decided to address this problem so that I could reuse my solution across multiple clients.
I published my solution as a multi RDBMS implementation (oracle, mysql, postgresl, sqlserver) to solve simple database federation needs, supporting bcrypt and several types of hashes.
Just build and deploy this solution on keycloak and configure it through the admin console providing jdbc connection string, login, password, the required SQL queries and the type of hash used.
Feel free to clone, fork or do whatever you need to solve your issue.
GitHub repo:
https://github.com/opensingular/singular-keycloak-database-federation
I'm doing similar development but with Oracle and JSF.
I created a project with three classes:
one implementing UserStorageProvider, UserLookupProvider and CredentialInputValidator
one implementing UserStorageProviderFactory
one extending AbstractUserAdapter
Then I created another project which creates an ear file containing the jar file generated in the previous project plus the driver jar file (of PostgreSQL in your case) inside a lib folder.
Finally the ear file is copied in the /opt/jboss/keycloak/standalone/deployments/ folder of the Keycloak server and it gets autodeployed as a SPI. It's necessary to add this provider in the User federation section of the administration application of Keycloak.

grails spring secuirity ui without mail field on User domain class

In my Grails project I'm using the spring security plugins, that are core, ui and acl.
They works well together but I have a problem with forgot password functionality. Infact, when I try to recover password (/register/forgotPassword path), I have the following exception:
No such property: email for class: medicalofficemanager.SecUser
Possible solutions: all
Is it possible to create automatically the field email for the SecUser domain class, with some command in console, or do I need to create it manually?
For your information, versions currently used are (installed in proper plugin window in Intellij Idea IDE):
Grails 2.2.1
Spring security core: 2.0 RC2
Spring security acl: 2.0 RC1
Spring security ui: 1.0 RC1
Not familiar with the ACL plugin, but pretty sure there's no console command to add an email field. Just add it manually.

Configure custom Infinispan loader with JBoss AS 7.1

we are migrating one application from JBoss AS 6 to 7.
This new instance is useing the standalone-ha profile. On the previous version, we used a custom Infinispan loader which stored the cache entries into our custom database.
Now, on JBoss 7.1, when trying to change this configuration using the visual administration console, it don't work. The value that we type on the tab "Store Class Impl" on "Replicated caches" is not being stored on the profile configuration as it should be. So, here is my question: is it possible to change this configuration using xml? How can I configure this custom loader for our replicated caches? Does anyone here ever experience this kind of dificulty?
Unfortunately I can't provide you any valuable information about JBoss admin console.
Anyway, I would suggest you to set up cache stores/loaders for your Infinispan caches declaratively (using configuration xml file) or programmatically (using fluent API builder just in code).
Here you can find more details about stores/loaders and some example configurations: https://docs.jboss.org/author/display/ISPN/Cache+Loaders+and+Stores
And also take into account that in the recent Infinispan version (5.2) there is no possibility to change cache configuration "on fly". You need to restart your service with new configuration in case of any wanted change.
(What do you exactly mean by custom Infinispan loader?)

Spring batch application integration with spring batch admin

I developed one spring batch application which is deployed as executable jar using batch/shell script. It works fine.
Now recently I read about spring batch admin application release. As per their doc, they say you have to point to job-context.xml and that will allow to manage spring batch app to be started,restarted and stopped from admin app. Now my question is do I have to keep my job-context.xml outside the jar or what are the exact steps, i am confused about this configuration.
Any insight on this is very useful and by the way I am using spring batch 2.1.
Thanks
The Spring Batch admin application is a good reference implementation and is highly customizable. All interface implementations may be replaced via Spring DI using your own classes. UI is also template driven(FreeMarker I think) and therefore may be customized to display relevant information, change skin etc.
I had a similar need like yours - need admin functionality included in an app built as jar. I did not quite like the fact that I had to package my jobs as a .war file. Instead I extracted relevant configurations from Spring Batch Admin source and created a deployment that works off file system and runs on embedded Jetty server.
See screen shots here : https://github.com/regunathb/Trooper/wiki/Trooper-Batch-Web-Console
Source, configurations etc are available here : https://github.com/regunathb/Trooper/tree/master/batch-core . This project actually creates a .jar and not .war
If your application has custom classes and is deployed as a runnable jar and not contained within the spring batch admin, you cannot start jobs. You can only view the status of jobs and "kill" their status in the database.
If you look at http://static.springsource.org/spring-batch-admin/reference/reference.xhtml at the end of the Configuration Upload section it states
You can see a new entry in the job registry ("test-job") which is
launchable in-process because the application has a reference to the
Job. (Jobs which are not launchable were executed out of process, but
used the same database for its JobRepository, so they show up with
their executions in the UI.)
If your jobs are strictly configurable jobs, as-in you use only XML to define them and do not need to do any customized item readers/processors/writers or other custom classes, then you can upload the job XML and it will be runnable from within the admin site. If you have custom classes then, from my experience, you will have to have the spring batch application deployed within your web application and then upload an XML that contains the jobs you want to run separately.
I personally just used the Admin tool to view job status and provide me with statistics through some custom pages. I left the scheduler to run the jobs and I didn't want those with access to the admin site to kick off a job when they knew nothing about it. Basically, used it to give the users a warm fuzzy without allowing them to muck it up. (leave it to a user to find an edge case you didn't account for)