Deploy WSO2 Enterprise App Store in EC2 using ELB - amazon-ec2

I am deploying the WSO2 Enterprise App Store into EC2 behind an elastic load balancer (ELB) and having some trouble getting things configured properly.
I have configured $INSTALL_PATH/repository/conf/carbon.xml with the proper HostName and MgtHostName of the ELB DNS name and I can get to the front-end of the app store and to the admin console.
I am unable to:
get user registrations working throuth the front end app store
get to the back-office console
The issue appears to be in routing requests to the identity service. I get an error like the following:
You are now being redirected to Identity Server. If the redirection fails, please click on the button below.
I then get a timeout on the redirect to this RFC1918, non-routed, address:
https://10.x.x.x:9443/adminsamlsso
I see no errors in the logs on startup or throughout execution of the application.
How can I configure this application such that all requests are re-routed through the AWS ELB (not the WSO2 load balancer) and not through the direct, local, IP address?

Please modify following configurations as well,
Update the AssertionConsumerService property for all apps(store, publisher, social) within /repository/conf/sso-idp-config.xml
You can find few jaggery apps within /repository/deployment/server/jaggeryapps/ directory. Each app has its own json config file within config directory.
Eg :- for store app /repository/deployment/server/jaggeryapps/store/config/store.json
You have to update the identityProviderURL property within ssoConfiguration in those apps as well.(store, publisher and social)

If you are using ES-1.0.0 It's better if you can move to the latest 1.2.0 M2.
We also faced similar issue and now fixed in the master branch.
If you need to continue with the same 1.0.0 you can get rid of this issue by updating,
<ES_HOME>/repository/deployment/server/jaggeryapps/store/controllers/login.jag, <ES_HOME>/repository/deployment/server/jaggeryapps/publisher/controllers/login.jag
<ES_HOME>/repository/deployment/server/jaggeryapps/store/controllers/logout.jag, <ES_HOME>/repository/deployment/server/jaggeryapps/publisher/controllers/logout.jag
You have to update the postUrl in above four files correctly.
NOW : postUrl = "https://" + process.getProperty('carbon.local.ip') + ":" + process.getProperty('https.port');
It should be something like https://localhost:9443/
At the end post URL should be something like https://localhost:9443/admin/samlsso
<form method="post" action="<%=postUrl%>/admin/samlsso">

Related

springdoc-openapi-ui(Swagger UI) is appending :80 port to the base URL

I have a spring boot application running on the spring-boot-starter-parent:2.6.1 version and springdoc-openapi-ui:1.2.32. Swagger is working fine locally. The problem comes when I deploy the app inside Kubernetes cluster. That time spring doc open API is automatically redirecting to HTTP(:80) instead of HTTPS. If I remove :80 from the base URL then swagger-ui is coming up. Using the example given here I have changed the generated server URL, so my REST APIs are working fine now. But how to get rid of the :80 port getting appended in the base URL automatically? What is the issue here?
Switching to the latest version of springdoc-openapi-ui:1.6.6 solved the problem.

ERR_SSL_UNRECOGNIZED_NAME_ALERT when trying to access my heroku app

I created a sandbox Angular application on Heroku.
The application is available (using the default https://mysampleapp.herokuapp.com ) and I want to have my domain name pointing to this application.
I followed the custom domain documentation to add a custom sub domain: https://devcenter.heroku.com/articles/custom-domains#configuring-dns-for-subdomains
In my Heroku application settings i can see the added domain :
www.mydomain.fr --> something-somethingelse-1234567890.herokudns.com
Then in my DNS provider, I removed my previous "A" / "CNAME" entries (no need anymore) and I added one :
CNAME / www.mydomain.fr. / something-somethingelse-1234567890.herokudns.com.
Using https://zone.vision/#/www.mydomain.fr , I can correctly see the DNS responding:
When trying to reach my app using the browser and the url www.mydomain.fr, I am getting an ERR_SSL_UNRECOGNIZED_NAME_ALERT error message.
Do you know what I am missing ?
I am using a single free application on Heroku, without any certificates.
Thank you in advance.
Found the root cause: I needed to enable ACM: https://devcenter.heroku.com/articles/automated-certificate-management

ChunkLoadError after deployment to Production ( Vapor + AWS ) [Laravel & Vuejs]

I have developed a small appointment system using Laravel and Vue.js. For deployment purpose, this system has been deployed using Vapor(https://vapor.laravel.com/) and AWS. While the deployment has been successful i.e I can see the login page, login successfully and even perform some functions. However most of the navigation links are not working. The errors that I see in browser console : ChunkLoadError: Loading chunk XY failed at path https://hosturl/js/[file].js
Before deployment when I execute npm run production, I can see that files are being generated in root/public/js. But after deployment the system seems to be unable to find/access them. All the routing has been handled using vue router in the development.
Is this issue somehow related to webpack.mix.js or is the expected folder structure different after being deployed? Am I missing something important here that is needed for production? I am new to Vapor and AWS so help will be really appreciated.

AWS Beanstalk https troubles

in my beanstalk app (built using laravel framework), I have the following error :
I configured the load balancer as follow :
I moved the dns servers to route 53 and created the redirection in route43.
Accessing the website through http is working correctly. Accessing it through HTTPS do not work correctly. THe first page is well called but all other calls like /image/xx.jpg or css/xx.jpg is returning a 502 Bad gateway error.
Please help me !
found it. THe rules was not well declared in fact.
THe path pattern should be /* and not just /

Getting a 404 using App Harbor and BitBucket

I'm new to AppHarbour and I'm trying to deploy my MVC app on a free account.
I keep getting a 404 error.
The app is coming from Bit-bucket and it was deployed successfully.
In my Hostnames section i see the following
so i have added the following to the Hosts file in my machine:
176.34.122.158 camelotfaultmanagement.apphb.com
but i still get a 404 ..
What am i doing wrong ?
And a follow-up question how can i edit one of the files to be able to edit the connection ?string to my DB?
It looks like you may not have any successful builds yet - You have to push to Bitbucket to trigger your first build. You can see a list of builds on the app dashboard: https://appharbor.com/applications/camelotfaultmanagement
To use the built-in .apphb.com domain, you don't have to mess with any DNS setup.

Resources