REST API stays even composite application is undeployed - wso2

Using WSO2EI 6.4.0 Integrator (ESB). We develop a composite application containing some proxies, sequences and rest api definitions.
We intend to deploy the carbon app (.car) using the maven-car-deploy-plugin or we could just copy the carbon app into the server/carbonapps folder.
After some updates we'd like to redeploy the application (undeploy the old application, deploy a new one). After undeploying the carbon app, the carbon app disappear, the proxies disappear, but the rest apis stay (visible in /carbon/api/index.jsp).
The consequence is that new definitions (from the new car file) are not deployed. Is it a bug, or a feature, or I am missing something?

I haven't experienced any of this in integrator but in the old ESB (4.8.1) I've seen this behavior before, I can only give pointers:
check if there is any file resembling the name of the project or the
name of the API that stays around after removal. Might be that this
is messing up your undeployments. Remove those files and try again.
Always deploy locally to see if there are errors during deployment.
Usually this sort of behavior starts when the deployment goes wrong.

Related

How to implement AWS Cognito (ionic)

I am trying to implement AWS cognito service into my app (ionic 2/3), from scratch. I have no previous experience with AWS.
I did make work the ionic2-starter-aws project (even if the tutorial was missing a lot of things) but since I was importing a project into the mobile hub, I did not learn anything useful for my App.
What I did:
Made my app work without any AWS service.
Created a mobile hub, added a user pool (User Sign-in)
Activated Hosting And Streaming (from the Mobile Hub) and downloaded aws-config.js
Copy/pasted providers files from https://github.com/ionic-team/ionic2-starter-aws /src/providers/ (they were made for aws connection, no point in re-writing them I guess)
Here I tried adding aws-config.js different way (into src/assets, same place than index.html, at the project root, ...) without success, all I get is AWSCognito is not defined. This error laid almost no result so I guess I forgot/did something wrong at some point (I am guessing it come from declare var AWSCognito: any; inside aws.cognito.ts but it wasn't declared before, but why does it work with ionic2-starter-aws then ?)
What are the steps to implement Cognito ? Lots have been made for javascript but they doesn't seem to work for typescript ?

WSO2 ESB Tutorial Issue

I just want know if somebody here already tried this tutorial:
https://docs.wso2.com/display/ESB490/Sending+a+Simple+Message+Through+the+ESB
I followed the instructions strictly but after I deployed my SampleCApp Composite Application project to carbon 4.4 based server(wso2esb-5.0.0), the SimpleStockQuoteProxy is nowhere to be located in the management console.
I hope you can help me with this especially those who have encountered this issue. I want to know, how did you fix this?
Thank you in advance.
What kind of OS are you using? If you are using Windows, unfortunately, it doesn't work. At least I haven't found a way to make it work through the Developer Studio.
But you can login into the management console, then in the Main tab, Carbon Applications, Add and upload your exported .car file. Refresh the List of Carbon Applications a few times until you see it there or until it shows the red message that the uploaded Carbon Application is faulty. You can click on the message and remove the faulty application, if this happens.
You can export the file by right-clicking on the Composite Application Project in the Developer studio and selecting Export Composite Application Project.

Configuring WSO2 Identity Server as Key Manager with API Manager

I'm looking for some guidance about two specific WSO2 products, API Manager and Identity Server and for the best solution to solve the problem I'm going to explain below.
In my company, we are using ADFS 3.0 for Single Sign On support in our applications. However we are now building applications that will require OpenID Connect Specification (SPA's+Rest API's) and ADFS does not support this out of the box so we've decided to use WSO2 products for that purpose.
I already managed to install WSO2 Identity Server 5.0.0 SP1 and configured ADFS as a federated Identity Provider (the new applications will still have to authenticate users using ADFS). I also installed WSO2 API Manager 1.9.1 and configured it to use WSO2 Identity Server as the Key Manager (Configuration tutorial).
Now the problem:
Using WSO2 Identity Server 5.0.0 SP1 I couldn't get the Logout feature to work due to the issue reported here. It seems that this issue has been solved in version 5.1.0M4 so I tried to install version 5.1.0-alpha and managed to make the logout to work with ADFS (I tested it by enabling SSO for the carbon administration). However, now I'm not able to install the Key Manager feature through the carbon repositories due to incompatibilities.
As a result, with the first combination (wso2is 5.0.0 SP1/wso2am 1.9.1) I had the logout issue with ADFS and with the second combination (wso2is 5.1.0-alpha/wso2am 1.9.1), I'm not able to install the Key Manager feature in Identity Server.
Is there any way to apply a patch to solve the logout issue in the first combination? Is there a way to install the key manager feature on WSO2IS 5.1.0-alpha? Or can someone point me to another solution to solve this issue?
The issue you pointed above, marked as it type as "Patch". Usually that means WSO2 have fixed this issue for a earlier version and provided a patch to its customer. Easiest thing would be, if you are already a customer of WSO2 ask for the patch directly from their support.
If you are not a paid customer of WSO2 you are in bit of a trouble. As per this question, the source of the Service Pack also not available in public.
But luckily in your case, the component which need to have this fix not a core component. So you wouldn't be in trouble if you change the authenticator code bit. But the warning is, it would lose any fixes done for org.wso2.carbon.identity.application.authenticator.samlsso_4.2.1.jar in the service pack.
Anyway, these are the steps you should follow.
Checkout the source. Lazy path would be checkout the whole source from here. That is the most easy way which you will face less troubles when you try to build the source but the downside of that is, it would take bit of time to checkout. If you know how to build specific component from WSO2 source, you can directly checkout component it needed to changed.
Try to build the component without doing any change just to make sure there are not any issues upto this point.
Goto the class DefaultSAML2SSOManager and do the same change done in the PR.
Build the component again.
Create folder named like "patch9000" inside the <IS_HOME>/repository/components/patches/ folder.
Copy build jar (org.wso2.carbon.identity.application.authenticator.samlsso-4.2.1.jar ) in step 4 from the target folder to the <IS_HOME>/repository/components/patches/patch9000 folder.
Restart the server. If you have done everything to the point, in the server startup it would print a log like, org.wso2.carbon.server.extensions.PatchInstaller - Patch changes detected
Now retry the your flow and it would work as expected.
If you too lazy to do all above, you can wait until Identity Server Service Pack 2, which will have your fix.

How to run appfacotry in local machine?

I have downloaded WSO2 appfacotry and ran it locally for testing purposes. It first gives carbon login and in the running application list I could see the /appmgt jaggery application is running. Then I tried to go to the url through the link provided in Action column in that application list. Initially I was routed to http://{some_ip_address}:9763/appmgt/ and then I was re routed to https://appfactory.example.com:9443/samlsso which gives me error. (because I don't have appfacotry.example.com domain.) How can I run appfactory without this faulty URL?
Here's documentation on installing App Factory: https://docs.wso2.com/display/AF201/Installing+On-Premise
Also, note that there is now a hosted version, which you can use in the cloud with no configuration required: http://wso2.com/cloud/app-cloud/
Other than the 3rd party tools mentioned above, you need App Factory, AS, API manager, Stratos Controller and ELB to have all App Factory features

Wso2 ESB don't deploy car

I am trying to remove the car of an Aplication.
I removed the .car by management console and removing the file in wso2esb-4.0.3/repository/deployment/server/carbonapps but wso2 dont put nothing in the log and dont remove the artifacts, I cant shutdown the server.
When I remove de .car and upload the file again the server dont re-deploy anything
The initial problem was that some artifacts had disapeared from management console, but the .car was deployed, a other instance of the .car are in the temp directory.
This was a known issue [1] and fixed from WSO2 ESB 4.5.0. I think its recommended to use the latest version of the product since in that case many bugs fixed and many new features are added to the product. You can find the latest distribution of WSO2 ESB 4.7.0 latest release here [2]
Hope this will help you.
[1] https://wso2.org/jira/browse/ESBJAVA-940
[2] http://wso2.com/products/enterprise-service-bus/
We had this problem too. It can also happen when you have deactivated a proxy within the web console.
Be sure all components from the specific .car file are running.
Uninstall the application (within the web-console)
Wait until all components are gone
If this is not working - you need to stop the server and remove all components (from that .car) from the file system manually. We did that a couple of times and it worked. (search for all affected components and remove them).
We finally solved the issue by upgrading to a new version of WSO2 ESB.