change port in wso2 sample - wso2

I am executing sample programm of wso2. I have installed wso2is on different machine and tomcat is on local machine. I have changed localhost:9443 to my ipaddress(eg 192.168.1.xxx) from travelocity.properties and avi.properties. But when I execute sample from click on login button it always redirecting me localhost and giving error.

I think you need to try the following,
While the tomcat is running,
Open the travelocity.war with an archive manager
Edit the travelocity.properties file,
update SAML2.IdPURL value
eg : SAML2.IdPURL=https://192.168.1.7:9443/samlsso
Save and update the travelocity.com web app
Restart the tomcat server just to be sure (You don't really have to do this since tomcat hot deploys once it detects a change)
I tried this locally and it redirected me to the IP address I put in SAML2.IdpURL. Clearly the problem seems to be a configuration error on the travelocity.com web app side :)

You need to change <HostName> and <MgtHostName> attributes at repository/conf/carbon.xml of your Identity Server with your IP address. By default they are set as localhost, so when logging it will be redirected to location specified there.

Related

WSO2 5.11 Console trying to reach localhost instead server

I have WSO2 IS 5.11 installed on a server under https://server1.wso2.com.
When Im trying to reach new console app Im getting redirected to:
https://localhost:9443/oauth2/token/.well-known/openid-configuration
and then to authorize endpoint:
https://localhost:9443/oauth2/authorize?response_type=code&client_id=CONSOLE&scope=SYSTEM%20openid&redirect_uri=https://server1.wso2.com/console/login&response_mode=query&code_challenge_method=S256&code_challenge=sa3xryaGoX1IoyxZJfoIrE3tAJPUjep30j6izcDtOtc
Why Im getting redirected to localhost:9443? I checked my configuration and there is no localhost in resident IdP.
This can happen due to the server configurations set on WSO2IS, to change that go to <IS-HOME>/repository/conf directory and open deployment.toml configuration file and change the
[server]
hostname = "https://server1.wso2.com"
Also, you can check load balancer configurations/ port mapping and opening ports from the server configurations from the server that you use.

Click once application to connect to remote server

I have added this question on ServerFault but no one replied.
I have a .net application which calls a webservice deployed on my local windows server 2012 on IIS, and the sql server database resides on that server too. All employees connect to the same service and DB since we're all on the same domain, and I publish the app and webservice to the server through visual studio (2012).
Now I need to make employees access this application when they are outside the company's network, so I deployed the webservice on IIS on one of our remote windows 2012 servers, I created a public shared folder in my remote server and added to app webservice files to it and in visual studio I changed the publish method to web deploy and filled in the information as below:
Server: https://x.x.x.x/
Site Name: https://x.x.x.x/PublicFolder
Destication URL: https://x.x.x.x/PublicFolder/Application
When I click Validate Connection, it fails with the following message:
Could not connect to the remote computer ("x.x.x.x"). on the remote
computer make sure that Web Deploy is installed and that the required
process ("Web Management Service") is started. Learn more at:
http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_DESTINATION_NOT_REACHABLE.
Unable to connect to the remote server
Note that I tried to replace https with http and I got another error:
Could not connect to the remote computer ("x.x.x.x"). on the remote
computer make sure that Web Deploy is installed and that the required
process ("Web Management Service") is started. Learn more at:
http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_USER_NOT_ADMIN.
the remote server returned an error: (401)Unauthorized
I went to the previous link and I did what they suggested:
Create a separate user group MSDepSvcUsers on remote computer.
Create an local account A on both local & remote computer.
Add A to MSDepSvcUsers on remote computer.
Use account A to publish, this will allow you to publish without
needing to use built-in admin account.
but the same error (NOT_ADMIN) remained
UPDATE: I found another possible solution:
Add/modify windows registery key
“HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\”
and set it “1”.
After I added this registry key, the error changed to:
site 'http:' does not exist ... #ERROR_SITE_DOES_NOT_EXIST
So now if I put wrong credentials, I get the unauthorized error, if I use correct credentials I get side does not exist error.
What should I do?
It worked!!
I mean the connection, it's now validated, all I had to do is change site name from "http://x.x.x.x/PublicFolder" to "Default Web Site\SiteName" !!
This was really confusing, finally got it!

WSO2 EMM emm-agent-android download

I have successefully installed WSO2 EMM.
Now, i want to download the emm-agent-android app.
I accessed from my adroid device to my_url:9443/emm -> Device management and i clicked on "Enroll a device" button.
I got this follewed url : my_url:9443/emm/api/device_enroll that i accessed from may device and i clicked on "Download Agent" button.
I got be then redirected to the url: http://my_url:9763/emm/client_app/emm-agent-android.apk web page not found
So I change the url to https://my_url:9443/emm/client_app/emm-agent-android.apk
The download starts but with failure what is the problem?
I assume you have logged to the EMM console using admin / tenant admin credentials for at-least once. If the everything works fine the address to download the agent should be something like "http://10.100.5.37:9763/emm/client_app/emm-agent-android.apk". Make sure you have the client app in "/repository/deployment/server/jaggeryapps/emm/client_app" folder. Try to invoke the download agent address directly from the browser without going through "https://my_url:9443/emm/api/device_enroll". You can not download the agent from "https" endpoint unless the SSL setup is configured properly.
I have checked that the emm-agent-android.apk is in "/repository/deployment/server/jaggeryapps/emm/client_app" but the url "http://my_ip:9763/emm/client_app/emm-agent-android.apk" not found
So I checked listening ports netstat | grep 9443 show lines but nestat|grep 9763 display nothing Is there config file to edit?
Is your Device and the Server in the same network? (Unless your server is hosted in a proper host and it has a public IP which you can access from anywhere)

WSO2 IS 5.0.0 saml authentication always redirects to localhost

I'm playing with travelocity sample application, but I'm having a problem:
when I access the application at 10.0.3.124:8080/travelocity.com I end up at https://localhost:9444/commonauth?SAMLRequest=... even though I configured the "host" parameter in carbon.xml. I've also searched for localhost in authenticators.xml and application-authentication.xml and found IdentityProviderSSOServiceURL that i changed from localhost to machine ip.
I'm on a laptop and my application server and IS istances run on a different machine with the 10.0.3.124 IP.
I successfully access the IS admin console.
Where's the problem?
It seems that I also had to configure the <MgtHostName>10.0.3.124</MgtHostName> in carbon.xml.
Thanks
There is a file named identity.xml in side IS_HOME/repository/conf which carries following configuration.
<SSOService>
<IdentityProviderURL>https://localhost:9443/samlsso</IdentityProviderURL>
Please configuring this with your environment parameters.
Thanks,
Pushpalanka

Facebook Debugger unable to test localhost

I am building a Facebook app using Django. So, for development, I connected the app to localhost. My app is loading on canvas and working fine but the Facebook debugger is unable to test it correctly when I give localhost address as input.
These are the requests I tried in debugger
http://localhost
https://localhost/
http://127.0.0.1/
localhost
etc
Almost for all possible combinations.. It showed me
Error Parsing URL: Error parsing input URL, no data was scraped.
When I deployed the same code on heroku and tried.. It was working!
So,
Can't I debug the project on localhost? What's the point in working on it then??
If I can work, how should I fix it?
Can't I debug the project on localhost? What's the point in working on it then??
You can debug your code etc. on localhost – but of course you can’t have Facebook’s debug tool reach a site on your localhost, because Facebook (and everyone else on the web) does have no idea what machine your localhost actually is. (Absolute bascis, dude!)
If I can work, how should I fix it?
You have to make your web server accessible from the “outside”, over the internet.
Set up your test server so that it accepts requests from outside IPs, and get a DynDNS address (basically something that can be resolved by third parties like Facebook over the DNS).
You can access Facebook apps locally but you need to fake the domain of your local computer. You can do this by adding
127.0.0.1 mysite.test.example.com
to /etc/hosts. You should update mysite.test.example.com to your domain. Your Facebook app needs to be configured for that domain. You can then use the Facebook app locally and debug your project.
The alternative is to setup up a web server and use its domain for testing purposes (but this is not ideal because you'll need to commit and build the code before you can see your changes).