Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-16191] CLI: Add Java login test to CLI connection diagnosis tool

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2014-01-27T07:54:35.000+0000
Affected Version/sn/a
Fix Version/s2014 Sprint 02, 2014 Sprint 02 Tooling, Release 3.3.0
ComponentsCLI
LabelsTi.UI.DashboardView, qe-closed-3.3.0, qe-testadded
ReporterIngo Muschenetz
AssigneeMichael Xia
Created2014-01-15T03:25:35.000+0000
Updated2014-05-06T21:14:35.000+0000

Description

On the heels of APPTS-1213 and other SSLPeerUnverifiedExceptions, I would like to update our configuration test to also test logging in via Java as opposed to Node.js I have to believe there is something weird about the appcelerator login library or certificate. Using the existing network proxy settings for the connection test: * Make a simple app to use the straight Java lib to log in to 360 * Make a simple app using the 360 lib to log in to 360 https://github.com/appcelerator/titanium-connection-test

Attachments

FileDateSize
dashboard-login-1.0.0.jar2014-01-15T16:45:26.000+00002635

Comments

  1. Christopher Williams 2014-01-15

    Here's a very simple JAR to try logging in against the dashboard.appcelerator.com API. It takes no arguments itself and will attempt to login using known good credentials (our unit test account). Basically you just download the file and then in it'd directory you run:
       java -jar dashboard-login-1.0.0.jar
       
    If it worked, you'll see the response output like so:
       {"success":true,"result":{"success":true,"username":"unit_tests@aptana.com","email":"unit_tests@aptana.com","guid":"61643c9465ea8d339a3f9d6c01278f7f","eula":"1.1","org_id":14301,"connect.sid":"s:wMPa7AIxVo-qWTDBTh4ZXrtQ.d7qM+U1LB61gIAOPJ1FUJVgsdXwtBKehw58ecTfTCA0","clusterType":"enterprise","apiServer":"api.appcelerator.net","concerto":"https://appctest-2.appcelerator.com/concerto","touchtest":"http://appctest-2.appcelerator.com/concerto/touchtest","acsBaseUrl":"https://api.cloud.appcelerator.com","acsAuthBaseUrl":"https://secure-identity.cloud.appcelerator.com","acsAppEndpoint":"https://api.cloud.appcelerator.com/v1/apps/create.json?ct=enterprise","acsLoginEndpoint":"https://api.cloud.appcelerator.com/v1/admins/studio_login.json?ct=enterprise","nodeACSEndpoint":"http://admin.cloudapp-enterprise.appcelerator.com"}}
       
    If you need to set up a proxy you'd use standard ENV variables to do so. Here's an example with an https proxy:
       java -Dhttps.proxyHost=www.example.com -Dhttps.proxyPort=8080 -jar dashboard-login-1.0.0.jar
       
    And with an authenticated https proxy:
       java -Dhttps.proxyHost=www.example.com -Dhttps.proxyPort=8080 -Dhttps.proxyUser=username -Dhttps.proxyPassword=secret -jar dashboard-login-1.0.0.jar
       
  2. Michael Xia 2014-01-27

    This has been added.
  3. Olga Romero 2014-05-06

    Environment

    Mac osx 10.9.2 Mavericks Appcelerator Studio, build: 3.3.0.201405011408 Titanium SDK, build: 3.3.0.v20140505115416 Node.JS Version: v0.10.13 NPM Version: 1.3.2 acs@1.0.14 alloy@1.4.0-dev npm@1.3.2 titanium@3.3.0-dev titanium-code-processor@1.1.1 Tested [~cwilliams] command
       java -jar dashboard-login-1.0.0.jar
       

    Actual result:

       HTTP Response code: 200
       {"success":true,"result":{"success":true,"username":"unit_tests@aptana.com","email":"unit_tests@aptana.com","guid":"61643c9465ea8d339a3f9d6c01278f7f","eula":"1.1","org_id":14301,"connect.sid":"s:U6lircyhdyW50aiXNJHbUiko.rosaL8MzQ19G8p7mQN+x7bSmTy0eVhZzOZ72KBvXLsI","clusterType":"enterprise","apiServer":"api.appcelerator.net","concerto":"https://appctest-2.appcelerator.com/concerto","touchtest":"http://appctest-2.appcelerator.com/concerto/touchtest","acsBaseUrl":"https://api.cloud.appcelerator.com","acsAuthBaseUrl":"https://secure-identity.cloud.appcelerator.com","acsAppEndpoint":"https://api.cloud.appcelerator.com/v1/apps/create.json?ct=enterprise","acsLoginEndpoint":"https://api.cloud.appcelerator.com/v1/admins/studio_login.json?ct=enterprise","nodeACSEndpoint":"http://admin.cloudapp-enterprise.appcelerator.com"}}
       

JSON Source