Friday, May 13, 2022

Script to start/stop java service


#!/bin/bash

JAVA_HOME=/opt/jdk-17
BASEDIR=/opt/myjava-server
PID="$BASEDIR"/myjava-server.pid
LOG="$BASEDIR"/logs/myjava-server.log
REPO="$BASEDIR"/lib
JARPATH="$REPO"/myajava-server.jar
MAINCLASS=com.test.java.MyJavaServer
RUNCMD="$JAVACMD $JAVA_OPTS --add-opens java.base/java.lang=ALL-UNNAMED -classpath $JARPATH $MAINCLASS $@"


# If a specific java binary isn't specified search for the standard 'java' binary
if [ -z "$JAVACMD" ] ; then
  if [ -n "$JAVA_HOME"  ] ; then
    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
      # IBM's JDK on AIX uses strange locations for the executables
      JAVACMD="$JAVA_HOME/jre/sh/java"
    else
      JAVACMD="$JAVA_HOME/bin/java"
    fi
  else
    JAVACMD=`which java`
  fi
fi

if [ ! -x "$JAVACMD" ] ; then
  echo "Error: JAVA_HOME is not defined correctly." 1>&2
  echo "  We cannot execute $JAVACMD" 1>&2
  exit 1
fi



case "$1" in
start)
   exec $RUNCMD > "$LOG" 2>&1 &
   echo $!>"$PID"
   ;;
stop)
   kill `cat "$PID"`
   rm "$PID"
   ;;
restart)
   $0 stop
   $0 start
   ;;
status)
   if [ -e "$PID" ]; then
      echo server is running, pid=`cat "$PID"`
   else
      echo server is NOT running
      exit 1
   fi
   ;;
*)
   echo "Usage: $0 {start|stop|status|restart}"
esac

exit 0

Thursday, October 21, 2021

Sample pgsql function and its usage

--First, run this ode, it will create a function
create function update_user_groups(userId int)
returns void
language plpgsql
as
$$
DECLARE
 i  INTEGER := (select max(sort_order) from user_groups where user_id=userId);
begin
for r in 1000006..1000026 loop
i = i+1;
insert into user_groups values(userId, r, i) ON CONFLICT DO NOTHING;
end loop;
end;
$$;
--If everything ok, this will create a function in your functions list


--Then call the function u created giving arguments (ex userId in this case)
select update_user_groups(103);

Wednesday, October 06, 2021

Create User Script

USERNAME=$1
sudo adduser $USERNAME  --disabled-password  --gecos ""
cd /home/$USERNAME
sudo mkdir .ssh
sudo touch .ssh/authorized_keys
sudo chmod 600 .ssh/authorized_keys
sudo ssh-keygen -b 2048 -t rsa -f /home/$USERNAME/$USERNAME -q -N ""
sudo cp /home/$USERNAME/$USERNAME.pub  /home/$USERNAME/.ssh/authorized_keys
sudo chown  $USERNAME:$USERNAME  /home/$USERNAME/.ssh/
sudo chown  $USERNAME:$USERNAME  /home/$USERNAME/.ssh/authorized_keys
sudo usermod -aG sudo $USERNAME
sudo passwd $USERNAME

# to scp the private key, lets have it copied here
sudo cp /home/$USERNAME/$USERNAME  /home/ubuntu/
cd /home/ubuntu/
sudo chown ubuntu:ubuntu $USERNAME

Tuesday, April 03, 2018

URL redirect with haproxy


I have following requests
GET/POST http://10.0.0.1:8081/foo/abc/pqr
GET/POST http://10.0.0.1:8081/bar/xyz/tuv

Depending on /foo or /bar i need to send them to different  backends let say fooServer and barServeras follows


GET/POST http://10.0.0.1:8080/abc/pqr
GET/POST http://10.0.0.1:8585/xyz/tuv


Solution
Use haproxy or nginx to ulr redirect, I have tried nginx and this time i want to try haproxy therefore this post is based on haproxy

Install haproxy (on Mac), Configure and Run

1. install brew 
     see https://brew.sh/
2. brew install haproxy
3. Configure haproxy.cfg 
     vim /usr/local/etc/haproxy.cfg
4. Start haproxy
     To have launchd start haproxy now and restart at login:
        brew services start haproxy
     Or, if you don't want/need a background service you can just run:
        haproxy -f /usr/local/etc/haproxy.cfg


Note that I want to replace the /foo and /bar parts from the original url
Thanks to the solution at https://github.com/rancher/rancher/issues/1701#issuecomment-275112038
it was not that hard

Here is the haproxy.cfg file


global
        maxconn 72000
        daemon

defaults
        mode    http
        timeout connect 4000ms
        timeout client 60000ms
        timeout server 30000ms

listen stats
    bind 10.0.0.1:9090
    mode http
    stats enable
    stats hide-version
    stats realm Haproxy\ Statistics
    stats uri /
    stats auth admin:admin

frontend my_frontend
    bind 10.0.0.1:8081
    acl is_foo path_beg /foo
    use_backend foo_be if is_foo
    acl is_bar path_beg /bar
    use_backend bar_be if is_bar

backend foo_be
    balance roundrobin
    cookie SERVERID insert
    option httpclose
    option forwardfor
    reqrep ^([^\ :]*)\ /foo/(.*)     \1\ /\2
    server fooServer 10.0.0.1:8080  cookie fooServer

backend bar_be
    balance roundrobin
    cookie SERVERID insert
    option httpclose
    option forwardfor
    reqrep ^([^\ :]*)\ /bar/(.*)     \1\ /\2
    server barServer 10.0.0.1:8585  cookie barServer


Note that i wanted to disable the http check, therefore that config is not added

Thursday, January 26, 2017

WSO2 ESB - How to assign endpoints at build time

In WSO2 ESB endpoint values can be represented as resource variables(place holders). Endpoint values can then be assigned at build time. You need to use maven-replacer-plugin to achieve this.
1. Using ESB Tooling, create an ESB Config project and create a proxy service within the project. Define your endpoint address as a variable using  a syntax similar to follows

   
       
           
               
                   
2. Add the maven-replacer-plugin configuration to in the pom.xml file of the ESB project.

   com.google.code.maven-replacer-plugin
   replacer
   1.5.3
   
       
           package
           
               replace
           
       
   
   
       
           ${basedir}/target/**/*.xml
       
       
           
               @HelloWorldEp
               ${helloWorld.ep}
           
       
   

3. Create a CApp containing the ESB Config project you created above.
4. Build the ESB Config project first, using the following command
         mvn clean install -DhelloWorld.ep="http://localhost:9773/services/HelloService/"
5. And then  build the CApp project. Check the proxy service created in the target directory of the CApp project. You will see the variable @HelloWorldEp is replaced by the URL value provided at the time of building.  





   
       
           
               
NOTE
Alternatively you can use the Maven Multi Module(MMM) project to make this process more simpler (which is also the best practice[1] when developing WSO2 projects). We can use MMM as the parent project for ESB and CApp projects. For this, first create a MMM project, then create ESB project and CApp project as child modules of MMM project (following step 1,2 and 3). Then Build the Maven Multi Module project using the same command as in step 4. This reduces the build of each modules, as MMM does that for you. Sample project for this implementation can be found at my Github esb-samples Repo https://github.com/susinda/esb-samples/tree/master/assign-endpoints-at-buildtime/

[1] - http://wso2.com/library/articles/2015/10/article-wso2-developer-studio-development-and-deployment-best-practices/

Monday, August 22, 2016

My first exercise with Backbone.js

Files below itself says what it does, Hope it's not that difficult  :)
Also read following for more information 
https://addyosmani.com/backbone-fundamentals/#what-is-backbone.js
http://www.tutorialspoint.com/backbonejs/backbonejs_environment_setup.htm

Wednesday, August 10, 2016

Install Postgres on Ubuntu

1. Install

sudo apt-get update
sudo apt-get install postgresql postgresql-contrib

2 Start the postgres

sudo /etc/init.d/postgresql start
If does not start correctly try the solution at  this link
https://www.digitalocean.com/community/questions/language-problem-on-ubuntu-14-04

3. Login as postgres user
sudo -i -u postgres
This postgres is the default user that postgres adds to linux sytem when it is installing

4. Create a postgres role
createuser --interactive
This is an interactive mode to create a the postgres role/user, It will ask you two questions: the name of the role and whether it should be a superuser. Lets answer "dbuser1" and "y" for the two questions

5. Create a database
Here we have to create the database with the same name we have given for role (in above step 3.)
createdb dbuser1

6. Create a system user with the same name
Logout from postgres user
exit
Then create a user
sudo adduser dbuser1
This is reuired becase the way that Postgres is set up by default (authenticating roles that are requested by matching system accounts) also comes with the assumption that a matching database will exist for the role to connect to.

7. You may sometimes need to add the new user for the sudoer list 
sudo usermod -a -G sudo dbuser1

8. Now login as the newly created user (here we have linux username, postgres role name and db all having same name)
sudo su - dbuser

9. Give psql command, this will take you to the psql command line interface
psql

10. Give \conninfo command to check the connection information

Play arround
\list or \l: list all databases
\dt: list all tables in the current database
To switch databases:
\connect database_name
Create a db from a dbscript
\i path\of the\dbsrcipt.sql
Check the tables (show tables)
\dt


Allow remote connections
psql -U postgres -h 192.168.102.1
psql: could not connect to server: Connection refused
        Is the server running on host "192.168.102.1" and accepting
        TCP/IP connections on port 5432?

To enable other computers to connect to your PostgreSQL server, edit the file /etc/postgresql/9.1/main/postgresql.conf
Locate the line #listen_addresses = 'localhost' and change it to:
listen_addresses = '*'


To allow the access to database, Edit the file /etc/postgresql/9.1/main/pg_hba.conf to use MD5 authentication with the postgres user:
# TYPE  DATABASE        USER            ADDRESS                 METHOD
host    all             all             192.168.0.0/24          md5


Above config says it allows access from all databases for all users whome are connecting from 192.168.0.0/24. And the authentication method is encrypted password 


sudo /etc/init.d/postgresql start

Monday, August 01, 2016

There is no rocket science in Puppet :)


 My 1st puppet module to download Java


class wso2base::download_java {
  $oracle_repo = 'http://download.oracle.com/otn-pub/java/jdk/7u75-b13/'
  $oracle_header = '"Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie"'
  $java_package = 'jdk-7u75-linux-x64.tar.gz'
  $java_dir     = '/opt/java/'

  file { '/opt/java/': ensure => directory, recurse => true }

  exec {
    "${name}_download_java":
      path    => ["/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"],
      cwd     => "/opt/java/",
      unless  => "test -f ${java_dir}${java_package}",
      command => "wget --no-cookies --no-check-certificate --header ${oracle_header} ${oracle_repo}/${java_package}";

    "${name}_extract_java":
      path    => ["/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"],
      cwd     => "/opt/java/",
      command => "tar xvfz ${java_package}",
      require => Exec["${name}_download_java"];

  }

}

Tuesday, July 12, 2016

LoadBalancing 'WSO2 API Manger Store' with Nginx

Hi All

In this post i'll share the LB configs which worked for me on LB'ing  two WSO2-API Manager Store nodes. In-case if anyone needs :)

In LB'ing I had 3 main tasks in mind
1. Forward 443 traffic to 9443
This is needed as I want the users to easily access the store without port  number in the address, eg https://apistore.wso2.test.com/store
2. Redirect the /carbon (management console) traffic to /store
As this is the store (portal) part of the API-Manager we donot want to expose the /carbon (management console) to outside, further we will redirect ant traffic comes to /carbon to /store
3. Redirect http traffic to https
This is to avoid http access, but at the same time redirect http aces request to https

For above tasks, I have used two files, one is for tasks 1. and 2. and other is for the task 3. I think these is nothing much to explain here, just notice the listen, location and rewrite keywords, which does the job.


apistore_443_to_9443.conf file

upstream apistore9443 {
  ip_hash;
  server 10.0.0.11:9443;
  server 10.0.0.12:9443;
}

server {
  listen   443;
  server_name apistore.wso2.test.com;

location / {
    proxy_set_header X-Forwarded-Host $host;
    proxy_set_header X-Forwarded-Server $host;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Host $http_host;
    proxy_read_timeout 5m;
    proxy_send_timeout 5m;
    proxy_pass https://apistore9443;
}

location /carbon {
     rewrite ^/carbon(.*) https://apistore.wso2.test.com/store permanent;
}

  ssl on;

  ##SSL cert location
  ssl_certificate /etc/nginx/certs/apistore.crt;
  ssl_certificate_key  /etc/nginx/certs/apistore.pem;

  ssl_session_timeout 5m;
  client_max_body_size 100m;

  #Removed SSLv3 as a fix for the POODLE
  ssl_protocols TLSv1 TLSv1.1 TLSv1.2;

  ssl_ciphers ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS;
  ssl_prefer_server_ciphers on;

  access_log /var/log/nginx/access.log;
  error_log /var/log/nginx/error.log;
}


apistore_80_to_443.conf file
server {
  listen 80;
  server_name apistore.wso2.test.com;
  rewrite ^/(.*) https://apistore.wso2.test.com/$1 permanent;

  access_log /var/log/nginx/access.log;
  error_log /var/log/nginx/error.log;
}


Thank should go to Manula(at wso2) for helping me.

Monday, June 06, 2016

Script to backup wso2-server directory to an external server

Note : Make sure you have only the wso2-server in the backupDir.
Please pay attention to the bold parts of the script below

Fill-out the backupUser, backupServer and backupDest varibles for the remote backup server.

Improvements
1. You can omit the password promting for scp by configuring keys between your server and remote server. refer[1]
2. You can use incron job[1] to automate backing up on daily (timely) basis.
http://susinda.blogspot.com/2016/05/wso2-depsync-with-rsync-and-incron.html


backupDir=/apps/wso2
backupUser=backupRoot
backupServer=backupVM
backupDest=/apps/backups
cd $backupDir
rm *.zip

a=$(hostname)
b=`date +%Y-%m-%d`
c='.zip'
zipName=$b-$a$c
pack=$(ls)
echo zipping $pack to $zipName
zip -r $zipName $pack
echo scp..ing $zipName to $backupUser@$backupServer:$backupDest
scp $zipName $backupUser@$backupServer:$backupDest
echo Backup completed ..!

Tuesday, May 31, 2016

WSO2 Depsync with rsync and incron

Setup password less authentication for ubuntu
1. create a private/pub key in master server (use empty passprase)
ssh-keygen

2. Copy the new key to your worker server:
ssh-copy-id worker_username@worker_host

Setup rsync and incron
1. install rsync
sudo apt-get install rsync

2. install incron
sudo apt-get install incron

3. Allow incron
vim /etc/incron.allow
add rootuser username in this file, save and close

4. Create a push_artifacts.sh file with following content in  APIM-HOME directory

#!/bin/bash
# push_artifacts.sh - Push artifact changes to the worker nodes.
master_artifact_path=/apps/wso2/wso2am-1.10.0/repository/deployment/server
worker_artifact_path=/apps/wso2/wso2am-1.10.0/repository/deployment/
worker_nodes=(worker1 worker2 worker3)
while [ -f /tmp/.rsync.lock ]
do
  echo -e ";[WARNING] Another rsync is in progress, waiting...";
  sleep 2
done
mkdir /tmp/.rsync.lock
if [ $? = "1" ]; then
echo ";[ERROR] : can not create rsync lock";
exit 1
else
echo ";INFO : created rsync lock";
fi
for i in ${worker_nodes[@]}; do
echo ";===== Beginning artifact sync for $i =====";
rsync -avzx --delete -e ssh $master_artifact_path rootuser@$i:$worker_artifact_path
if [ $? = "1" ]; then
echo ";[ERROR] : rsync failed for $i";
exit 1
fi
echo ";===== Completed rsync for $i =====";
done
rm -rf /tmp/.rsync.lock
echo ";[SUCCESS] : Artifact synchronization completed successfully";

6. Give it executable rights
chmod +x push_artifacts.sh

7. Execute below command to configure icron.
incrontab -e

8. Add the below text in the prompt opened by above step.
/apps/wso2/wso2am-1.10.0/repository/deployment/server IN_MODIFY,IN_CREATE,IN_DELETE /apps/wso2/wso2am-1.10.0/push_artifacts.sh

9. Test
Add a file in master node /apps/wso2/wso2am-1.10.0/repository/deployment/server  and check in worker node, that same file has been copied there

10. Further you can check the log to see the incron logs 
tail /var/log/syslog

Monday, August 03, 2015

Updating wso2 APIManager APIs with Publisher APIs

Here i'll show how to add and update apis to wso2 api manager using publisher-apis(1)


1. Login and get cookie
curl -X POST -c cookies http://localhost:9763/publisher/site/blocks/user/login/ajax/login.jag -d 'action=login&username=admin&password=admin'


2. Add API
curl -X POST -b cookies http://localhost:9763/publisher/site/blocks/item-add/ajax/add.jag -d "action=addAPI&name=YoutubeFeeds&visibility=public&version=1.0.0&description=Youtube Live Feeds&endpointType=nonsecured&http_checked=http&https_checked=https&&wsdl=&tags=youtube,gdata,multimedia&tier=Silver&thumbUrl=http://www.10bigideas.com.au/www/573/files/pf-thumbnail-youtube_logo.jpg&context=/youtube&tiersCollection=Gold&resourceCount=0&resourceMethod-0=GET&resourceMethodAuthType-0=Application&resourceMethodThrottlingTier-0=Unlimited&uriTemplate-0=/*" -d'endpoint_config={"production_endpoints":
{"url":"http://gdata.youtube.com/feeds/api/standardfeeds","config":null}
,"endpoint_type":"http"}';


3. Update API with a new resource(POST) called "/postTest"
curl -X POST -b cookies http://localhost:9763/publisher/site/blocks/item-add/ajax/add.jag -d "action=updateAPI&name=YoutubeFeeds&visibility=public&version=1.0.0&description=Youtube Live Feeds&endpointType=nonsecured&http_checked=http&https_checked=https&&wsdl=&tags=youtube,gdata,multimedia&tier=Silver&thumbUrl=http://www.10bigideas.com.au/www/573/files/pf-thumbnail-youtube_logo.jpg&context=/youtube&tiersCollection=Gold&resourceCount=2&resourceMethod-0=GET&resourceMethodAuthType-0=Application&resourceMethodThrottlingTier-0=Unlimited&uriTemplate-0=/*&resourceMethod-1=POST&resourceMethodAuthType-1=Application&resourceMethodThrottlingTier-1=Unlimited&uriTemplate-1=/postTest" -d'endpoint_config={"production_endpoints":
{"url":"http://gdata.youtube.com/feeds/api/standardfeeds","config":null}
,"endpoint_type":"http"}';


4. Add two more methods PUT and GET for the same "/postTest" resource
curl -X POST -b cookies http://localhost:9763/publisher/site/blocks/item-add/ajax/add.jag -d "action=updateAPI&name=YoutubeFeeds&visibility=public&version=1.0.0&description=Youtube Live Feeds&endpointType=nonsecured&http_checked=http&https_checked=https&&wsdl=&tags=youtube,gdata,multimedia&tier=Silver&thumbUrl=http://www.10bigideas.com.au/www/573/files/pf-thumbnail-youtube_logo.jpg&context=/youtube&tiersCollection=Gold&resourceCount=4&resourceMethod-0=GET&resourceMethodAuthType-0=Application&resourceMethodThrottlingTier-0=Unlimited&uriTemplate-0=/*&resourceMethod-1=POST&resourceMethodAuthType-1=Application&resourceMethodThrottlingTier-1=Unlimited&uriTemplate-1=/postTest&resourceMethod-2=PUT&resourceMethodAuthType-2=Application&resourceMethodThrottlingTier-2=Unlimited&uriTemplate-2=/postTest&resourceMethod-3=GET&resourceMethodAuthType-3=Application&resourceMethodThrottlingTier-3=Unlimited&uriTemplate-3=/postTest" -d'endpoint_config={"production_endpoints":
{"url":"http://gdata.youtube.com/feeds/api/standardfeeds","config":null}
,"endpoint_type":"http"}';


Note that here we use the zero based indexes. Also note that resourceMethod can take any one of the following values: GET, POST, DELETE, PUT, OPTIONS - (1)

(1) - https://docs.wso2.com/display/AM180/Publisher+APIs

Tuesday, July 14, 2015

Automating JAX-WS Client Generation

This post describes a solution to automate the development of proxy service clients. This needs a Maven Multi Module project as the parent project, ESB project and a Registry project. Additionally we need a simple maven project to generate the client sources. So the project structure would looks like follows.
MavenParentProject
├── ESBconfigProject
├── RegistryProject
├── proxy-service-clients
Here ESBconfigProject contains the proxy services and RegistryProject contains the wsdls referred by ESB project. The proxy-service-clients project is a simple maven project, which is used to generate the client source.
In MavenParentProject's pom file define the modules in following order

    RegistryProject
    ESBconfigProject
    proxy-service-clients

ESBconfigProject proxy-service-clients
In proxy-service-clients project's pom file define the jaxws-maven-plugin[1] as follows
 
  org.codehaus.mojo
  jaxws-maven-plugin
  1.12
   
    
    package
      
      wsimport 
     
     
   
    
    com.sample.stub 
    ../RegistryProject
    src/main/java 
    
  
Then do a maven build ('mvn clean install') on parent project and it will generate the source for clients in proxy-service-clients/src/main/java directory and compiled jar will be generated at proxy-service-clients's target directory.

WSO2 ESB - Connecting APIs with Call Mediator


In this post i'm going to discuss an API interconnecting scenario with aid of an simple use case. Here the use case is as follows. We have two apis 1. Which gives the city name when longitude, latitude coordinates are given. 2. An API which gives temperature of a city (when city name is given). Here my objective is to combine (chain) both apis and get the temperature when lon-lat is given.

First we will create the mock APIs for  Map API and Weather API. To create APIs I used WSO2 Developer Studio [1]. Using DevStudio I created a JAX-RS project and deploy it on WSO2 AS[2]
Source code for Map service and Weather service is as follows.


You can download the war file from here. Once deployed the war file on WSO2 AS, you would be able to access the API's as follows. Note that i have set portOffset of WSO2 AS as 2 since i run both servers in same machine.

http://localhost:9765/SimpleMap_1.0.0/services/weather/gettemperature?city=Kandy

First one will give {"city":"kandy"} as the output and second will give the 24.5 as the temperature output.

Now it is the time to play with WSO2 ESB to chain the above two apis. Please have a look at ESB config below, As code says what it does i'm not going to explain in detail. Figure below show the DevStudio view of the API.



Now you can call the ESB api directly to get the temperate when the coordinates of the location is given.
http://localhost:8280/MapService/gettemperature?x=7&y=80

References
[1] - http://wso2.com/products/developer-studio/
[2] - http://wso2.com/products/application-server/
[3] - http://wso2.com/products/enterprise-service-bus/

Monday, April 27, 2015

WSO2IS-5.0.0 Admin Services

1. Navigate to IS_HOME/repository/conf" directory and open the carbon.xml file, then change the value of the "HideAdminServiceWSDLs" to false;

2. Stop the server with if already started.

3. Start with following command
           sh wso2server.sh -DosgiConsole

4. In the osgi console type listAdminServices

osgi> listAdminServices
Admin services deployed on this server:
1. ProvisioningAdminService, ProvisioningAdminService, https://localhost:9443/services/ProvisioningAdminService/ 
2. IdentitySAMLSSOConfigService, IdentitySAMLSSOConfigService, https://localhost:9443/services/IdentitySAMLSSOConfigService/ 
3. CarbonAppUploader, CarbonAppUploader, https://localhost:9443/services/CarbonAppUploader/ 
4. JaggeryAppAdmin, JaggeryAppAdmin, https://localhost:9443/services/JaggeryAppAdmin/ 
5. JaxwsWebappAdmin, JaxwsWebappAdmin, https://localhost:9443/services/JaxwsWebappAdmin/ 
6. RemoteUserStoreManagerService, RemoteUserStoreManagerService, https://localhost:9443/services/RemoteUserStoreManagerService/ 
7. UserProfileMgtService, UserProfileMgtService, https://localhost:9443/services/UserProfileMgtService/ 
8. StatisticsAdmin, StatisticsAdmin, https://localhost:9443/services/StatisticsAdmin/ 
9. LoggedUserInfoAdmin, LoggedUserInfoAdmin, https://localhost:9443/services/LoggedUserInfoAdmin/ 
10. WebappAdmin, WebappAdmin, https://localhost:9443/services/WebappAdmin/ 
11. ws-xacml, ws-xacml, https://localhost:9443/services/ws-xacml/ 
12. RemoteUserRealmService, RemoteUserRealmService, https://localhost:9443/services/RemoteUserRealmService/ 
13. TopicManagerAdminService, TopicManagerAdminService, https://localhost:9443/services/TopicManagerAdminService/ 
14. ClaimManagementService, ClaimManagementService, https://localhost:9443/services/ClaimManagementService/ 
15. IdentitySTSAdminService, IdentitySTSAdminService, https://localhost:9443/services/IdentitySTSAdminService/ 
16. NDataSourceAdmin, NDataSourceAdmin, https://localhost:9443/services/NDataSourceAdmin/ 
17. ServiceGroupAdmin, ServiceGroupAdmin, https://localhost:9443/services/ServiceGroupAdmin/ 
18. IdentityApplicationManagementService, IdentityApplicationManagementService, https://localhost:9443/services/IdentityApplicationManagementService/ 
19. CustomMeteringService, CustomMeteringService, https://localhost:9443/services/CustomMeteringService/ 
20. STSAdminService, STSAdminService, https://localhost:9443/services/STSAdminService/ 
21. DirectoryServerManager, DirectoryServerManager, https://localhost:9443/services/DirectoryServerManager/ 
22. OAuthAdminService, OAuthAdminService, https://localhost:9443/services/OAuthAdminService/ 
23. RegistryAdminService, RegistryAdminService, https://localhost:9443/services/RegistryAdminService/ 
24. FileDownloadService, FileDownloadService, https://localhost:9443/services/FileDownloadService/ 
25. ContentSearchAdminService, ContentSearchAdminService, https://localhost:9443/services/ContentSearchAdminService/ 
26. LoginStatisticsAdmin, LoginStatisticsAdmin, https://localhost:9443/services/LoginStatisticsAdmin/ 
27. CustomUIAdminService, CustomUIAdminService, https://localhost:9443/services/CustomUIAdminService/ 
28. SearchAdminService, SearchAdminService, https://localhost:9443/services/SearchAdminService/ 
29. RemoteAuthorizationManagerService, RemoteAuthorizationManagerService, https://localhost:9443/services/RemoteAuthorizationManagerService/ 
30. RemoteProfileConfigurationManagerService, RemoteProfileConfigurationManagerService, https://localhost:9443/services/RemoteProfileConfigurationManagerService/ 
31. SCIMConfigAdminService, SCIMConfigAdminService, https://localhost:9443/services/SCIMConfigAdminService/ 
32. IdentityProviderAdminService, IdentityProviderAdminService, https://localhost:9443/services/IdentityProviderAdminService/ 
33. IWAAuthenticator, IWAAuthenticator, https://localhost:9443/services/IWAAuthenticator/ 
34. LoggingAdmin, LoggingAdmin, https://localhost:9443/services/LoggingAdmin/ 
35. SampleDeployer, SampleDeployer, https://localhost:9443/services/SampleDeployer/ 
36. XMPPConfigurationService, XMPPConfigurationService, https://localhost:9443/services/XMPPConfigurationService/ 
37. SecurityAdminService, SecurityAdminService, https://localhost:9443/services/SecurityAdminService/ 
38. KeyStoreAdminService, KeyStoreAdminService, https://localhost:9443/services/KeyStoreAdminService/ 
39. ServerRolesManager, ServerRolesManager, https://localhost:9443/services/ServerRolesManager/ 
40. IdentityProviderMgtService, IdentityProviderMgtService, https://localhost:9443/services/IdentityProviderMgtService/ 
41. ResourceAdminService, ResourceAdminService, https://localhost:9443/services/ResourceAdminService/ 
42. ThemeMgtService, ThemeMgtService, https://localhost:9443/services/ThemeMgtService/ 
43. FileUploadService, FileUploadService, https://localhost:9443/services/FileUploadService/ 
44. RemoteTenantManagerService, RemoteTenantManagerService, https://localhost:9443/services/RemoteTenantManagerService/ 
45. EventBrokerService, EventBrokerService, https://localhost:9443/services/EventBrokerService/ 
46. TracerAdmin, TracerAdmin, https://localhost:9443/services/TracerAdmin/ 
47. MultipleCredentialsUserAdmin, MultipleCredentialsUserAdmin, https://localhost:9443/services/MultipleCredentialsUserAdmin/ 
48. UserStoreConfigAdminService, UserStoreConfigAdminService, https://localhost:9443/services/UserStoreConfigAdminService/ 
49. RepositoryAdminService, RepositoryAdminService, https://localhost:9443/services/RepositoryAdminService/ 
50. TenantMgtAdminService, TenantMgtAdminService, https://localhost:9443/services/TenantMgtAdminService/ 
51. DeploymentSynchronizerAdmin, DeploymentSynchronizerAdmin, https://localhost:9443/services/DeploymentSynchronizerAdmin/ 
52. EntitlementPolicyAdminService, EntitlementPolicyAdminService, https://localhost:9443/services/EntitlementPolicyAdminService/ 
53. ServerAdmin, ServerAdmin, https://localhost:9443/services/ServerAdmin/ 
54. ServiceAdmin, ServiceAdmin, https://localhost:9443/services/ServiceAdmin/ 
55. UserIdentityManagementAdminService, UserIdentityManagementAdminService, https://localhost:9443/services/UserIdentityManagementAdminService/ 
56. EntitlementAdminService, EntitlementAdminService, https://localhost:9443/services/EntitlementAdminService/ 
57. UserAdmin, UserAdmin, https://localhost:9443/services/UserAdmin/ 
58. AccountCredentialMgtConfigService, AccountCredentialMgtConfigService, https://localhost:9443/services/AccountCredentialMgtConfigService/ 
59. UserInformationRecoveryService, UserInformationRecoveryService, https://localhost:9443/services/UserInformationRecoveryService/ 
60. PropertiesAdminService, PropertiesAdminService, https://localhost:9443/services/PropertiesAdminService/ 
61. LogViewer, LogViewer, https://localhost:9443/services/LogViewer/ 
62. RemoteClaimManagerService, RemoteClaimManagerService, https://localhost:9443/services/RemoteClaimManagerService/ 
63. EntitlementService, EntitlementService, https://localhost:9443/services/EntitlementService/ 
64. OAuth2TokenValidationService, OAuth2TokenValidationService, https://localhost:9443/services/OAuth2TokenValidationService/ 

65. ProfilesAdminService, ProfilesAdminService, https://localhost:9443/services/ProfilesAdminService/

Friday, April 03, 2015

Applying Security from wso2 DeveloperStudio

Please refer [1]  for the subject, Note that this is a workaround only, proper way is on its way ..)

[1] -https://docs.google.com/document/d/1MDGwH4hk2X2COGCF4aYp7gSqmqbDzITKrKnA44s5ep8/pub