How to make a JBoss ESB configurable in the admin console - configuration

The JBoss AS Admin Console has a "configuration" tab for ESBs deployed on the server.
http://docs.jboss.org/jbossas/6/Admin_Console_Guide/en-US/html/Administration_Console_User_Guide-Updating_Resource_Configurations.html
It says that this is available for "resources that support configuration", but it is greyed out for an ESB service that I have written.
How can I make my service support configuration?

Without code changes to the ESB RHQ plugin, that's not really possible. The jbossesb RHQ plugin controls what's displayed there and there's nothing in your service configuration to allow run-time configuration through the admin-console.
If you're interested in changing that, you'd have to change the following files :
http://anonsvn.jboss.org/repos/labs/labs/jbossesb/trunk/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/ServiceComponent.java
http://anonsvn.jboss.org/repos/labs/labs/jbossesb/trunk/product/tools/jonplugin/as5/src/main/resources/META-INF/rhq-plugin.xml
Or submit a JIRA with a request of what service properties that you'd like to see configurable at runtime under JBoss ESB in the JBoss JIRA issue tracker :
https://issues.jboss.org/

Related

how to implement sso for openshift

I'd like to implement kind of SSO for openshift, what I mean: from my webapp a user can open openshift console in a new window without giving his credentials. I've configured Basic Authentication Remote and it's working, can open new window and post username/password but it's looks that openshift is protected with crsf token. Thus not sure if it's possible at all. It seems that developing custom identity provider is not supported either. Any idea ?
PS I'm aware of Request Header Identity Provider but that solution requires my webapp to provide idp functionality (not even sure if it's feasible), also apache (we use nginx), a lot of issues for dev to install it all on a single computer due to port conflicts, valid ssl etc etc
Best option will be to use oauth proxy. See if this helps in your case.
https://github.com/openshift/oauth-proxy
Finally I've implemented SSO using js postMessage to send user/token data and Basic Authentication Remote.

Should multiple Spring Boot App instances running behind a load balancer work with spring CAS user authentication?

I have a Spring Boot Application I am working on that uses CAS authentication. I have CAS working fine however once I start more than 1 copy of the application behind a load balancer the app fails to authenticate.
The app takes the user off to CAS and returns to the home page where once authenticated the user should see the main interface. But instead when it returns from CAS the spring security authenticated check still thinks the user isn't authenticated.
If I reduce my instances down to 1 it starts working fine again.
I am running this app behind an F5 load balancer so I am trying to figure out if there is some missing configuration on the F5 or if there is something I need to do in my app to deal with the switch from one server to another etc. I assume this is causing the issue but I want to keep my app stateless and not rely on making the F5 sticky for a given user. Actually I even tried setting the feature on the F5 but still get the same behavior so not sure what is really happening once more than 1 app instance is running.
My understanding was that this should just work because I have server.use-forward-headers=true configured.
Am I missing some other CAS, Spring Boot Server, or Spring Boot Security settings that are necessary to make this work?
Should this be working with CAS authentication.
I am using Spring Book 2.0.4.RELEASE
I am using spring-security-cas-client 3.0.8.RELEASE
I found the solution to this issue. It seems the Spring Boot Security defaults to a session based security so you need to implement your own Stateless Security to get this working in a stateless manner.
Thanks to this blog post and some additional help from the blog post author I was able to get this working perfectly in Spring Boot 2.x
Checkout the post, it's interesting and works perfectly.
https://www.dedicatedcode.com/posts/stateless-authentication/
Thanks to others who provide answers that sent me in the correct direction to find this solution.
I believe the problem is with multiple cas server cluster. When your spring boot application is looking for a valid ticket it fails to authenticate.
CAS has a support for these kind of situation try reading the link below
https://apereo.github.io/cas/5.2.x/installation/Hazelcast-Ticket-Registry.html
If the above solution works you have to add a dependency for the support and update your property files
Hope this helps
If you are using OAuth / SAML / Delegated Authentication, then you might need to set your F5 load balancer (or any load balancer) to enable "session persistence" in order for CAS server to function normally.

Database issues with deploying ASP.NET MVC web app in Azure

I have a web app published to Azure built in Visual Studio MVC. Many times after publishing updated files the app will fail when querying the database so it seems. For instance the home page will load fine but the app will crash when a link is selected that connects to my database. It is a MySQL database hosted remotely.
Here's the error for the deployed version:
I'm not sure how to interpret the error either and I've looked into enabling development mode in my app but as far as I can tell it is enabled.
Occasionally after a few restarts through Azure the app will start working fine and the app consistently works when I build and launch through Visual Studio. It leads me to believe this is an Azure issue conflicting with my data base setup.
It's making testing a real hassle and I don't have confidence the app/database will be up when I need it to.
Thank you for your help!
I think that you need to get the detailed error message to interpret the error.
To get the error message in azure, we can watch the diagnostic logs, about how to do this, we can refer to: Enable diagnostics logging for web apps in Azure App Service
We can also display the error message directly on browser. For example, if you are using ASP.NET core MVC, we can do as below:
Replace the below code of Startup class:
if (env.IsDevelopment())
{
app.UseBrowserLink();
app.UseDeveloperExceptionPage();
}
else
{
app.UseExceptionHandler("/Home/Error");
}
With:
app.UseBrowserLink();
app.UseDeveloperExceptionPage();
When the error occurs again, we can see the error message at browser directly

click to deploy Hadoop on GCE not working

I'm trying "Click-to-deploy Hadoop on Google Compute Engine" here
Unfortunately this doesn't seems to work : either the process stops almost immediately, or it's like it's frozen.
message displayed is
Deployment may take 3 to 10 minutes to complete, depending on the size of your cluster
Creating deployment
In any case, I can't have any cluster. Tried several zones, Hadoop versions, nothing.
Any thought ?
The problem is occurring because your Cloud project does not have a project id associated with it, but only a project number, which is true for some long-standing Cloud projects.
https://developers.google.com/console/help/new/#projectnumber
You can fix this by going into Developers Console, selecting your project from the project list, selecting Billing & settings from the left-hand navigation, and adding the project id there.
The following URL should take you there directly:
https://console.developers.google.com/project/_/settings
Thanks,
-Matt
A few items to help diagnose the problem:
Go to the Compute Engine instance list and check if there are any instances created for the deployment.
Check if there are any errors raised to the Javascript Console for your browser.
BTW, what browser and version are you using?
Thanks.
No instance deployed (however I can (and had) deployed compute engine VM instances)
I have a 404 in console :
POST https://console.developers.google.com/m/deploy?pid=1090158225078&cmd=custom…ion=europe-west1&app=hadoop&xsrf=R5Ezthkrr1L8xU1STye3sXUiHiA:1414055456964 404 (Not Found)
on Chrome, Windows7
I tried on Firefox too : no 404 in console but same effect : no deployment at all.
The "customdeploy" command should not be returning a 404, so let's check if there's something going on with your Cloud project.
Click to Deploy uses the preview version of Deployment Manager on the backend. Let's check the objects (if any) that Deployment Manager has created for the Hadoop deployment.
To do this, you will need to:
Install the Google Cloud SDK (if you have not already)
Add the preview component
Query for Deployment Manager templates
Query for Deployment Manager deployments
Install the Google Cloud SDK:
Instructions are here: https://cloud.google.com/sdk/
Add the preview component:
gcloud components update preview
Query for Deployment Manager templates
gcloud preview --project=<projectid> deployment-manager templates list
Query for Deployment Manager deployments
gcloud preview --project=<projectid> deployment-manager deployments --region europe-west1 list
One last question. Is this a relatively "new" or "old" Google Cloud project? Sometimes old projects need a feature to be enabled that is automatically enabled on new projects.
Thanks.

WSO2 ESB Carbon application deployment fails

I have grouped family of services as a Carbon Application and then deploying the same on WSO2 ESB. If one of those services fails during deployment then none of the other services are deployed on ESB, instead i get an Service laready exists exception upon retry.
It will be of great help if you could help me.
EDIT
I am using WSO2 3.0.1.
Make sure you donot have any traces of CAR file that you uploaded in the following paths.
1) <ESB_HOME>--> tmp--> carbonappuploads
2) <ESB_HOME>--> repository-->deployment-->server-->carbonapps
3) <ESB_HOME>--> carbonapps.
After deleting any traces of carbonapps in the above mentioned apps, Restart the ESB server. Then try to upload CAR file again. Hope this will work.Thanks.
According to your description I guess that you are trying to deploy a Carbon Application aRchive (CAR) file which contains a set of services in WSO2 ESB. First of all I would like to suggest to use WSO2 Application Server [1] to deploy services instead of the ESB.
Regarding the error you get during the deployment I guess you may have defined two services with the same name or you may have already deployed this CAR file before. Hope this will help. If this is not the case please provide more information about your problem so that we could try to identify the problem.
[1] http://docs.wso2.org/display/DVS320/Creating+JAX-WS+and+JAX-RS+Service+Projects
Thanks