Skip to main content

Posts

How to install Oracle Virtualbox in Ubuntu?

Introduction VirtualBox is a powerful free tool offered by Oracle for running an operating system on your computer virtually. In this tutorial lets learn how to install VirtualBox on Ubuntu. Installation 1. Open a terminal or press Ctrl + Alt +T 2. Enter the following command to all the packages or dependencies.      sudo apt-get update ( make sure to give the root password) 3. Run the following command to download and install Virtualbox     sudo apt-get install vrtualbox virtualbox-ext-pack That's all! VirtualBox has been successfully installed on your Ubuntu machine, and you can start using it.

How to install draw.io Desktop Application on Kali Linux?

draw.io is an online diagramming open source web application which can be used as flowchart maker, network diagram software, ER diagram tool, UML diagramand more. It can be freely accessible website of draw.io or official Docker image or Desktop version for macOS, Linux & Windows. This guide includes detailed instructions about Desktop version installation on Kali Linux. Download the .deb build for draw.io sudo apt update sudo apt -y install wget curl curl -s https://api.github.com/repos/jgraph/drawio-desktop/releases/latest | grep browser_download_url | grep '\.deb' | cut -d '"' -f 4 | wget -i - Install with dpkg command sudo apt -f install ./drawio-amd64-*.de When application is installed, launch the application with following command. drawio Now application is ready to use. Click on " Create New Diagram"  to create new project or click on " Open Existing Diagram " to edit. ...

What is Honeypot?

A  honeypot is a security mechanism that creates a virtual trap to lure attackers. Simply we can say that this is a  decoy box residing inside your network demilitarized zone  (DMZ), set up by a security professional to trap or aid in locating hackers, or to draw them  away from the real target system. Since this a  decoy system , a malicious attacker might try to attack; software on  the system can log information about the attacker such as the IP address. This information  can be used to try to locate the attacker either during or after the attack. Honeypots vary based on design and deployment models, but they are all decoys intended to look like legitimate, vulnerable systems to attract cyber criminals. Type of Honeypot Production Honeypot : Used by companies and corporations for the purpose of researching the motives hackers as well ass diverting and mitigating the risk of attacks on the overall network. Research Honeypot : Used by nonprofit organi...

How to retrieve Attributes (fields) in Active Directory using jaggery?

We can get user attributes in Active Directory using jaggery and need to follow the steps which were provided in the previous blog . <% var carbon = require('carbon'); var tenantId = -1234; var url = 'https://localhost:9443/admin/services/'; var server = new carbon.server.Server(url); var userManager = new carbon.user.UserManager(server, tenantId); var result = userManager.getClaims("WSO2USERSTORE/testuser", "default"); for(i =0; i<result.length; i++){ print(result[i].getClaimUri() + " ==> " +result[i].getValue()); print('<br>'); } %> Here, getClaims(username String, profile String) method is used to get all claim values of the user in the profile and it returns a JSON object with all claims that user has and their values.

How to list all users belongs to particular user store using jaggery?

We can list all users belongs to particular user store using jaggery. To achieve this, create a directory(ListUser) inside "<BPS>/repository/deployment/server/jaggeryapps" and then create a jaggery file(listUser.jag) inside a newly created folder. In this example, I used WSO2 BPS to test this sample. Add the following content into listUser.jag file. <% var carbon = require('carbon'); var tenantId = -1234; var url = 'https://<HOSTNAME>:9443/admin/services/'; var server = new carbon.server.Server(url); var userManager = new carbon.user.UserManager(server, tenantId); print(userManager.getUserListOfRole("ROLE")); %> Here, you need to change the "HOSTNAME" and "ROLE" according to your config. Please find the sample listUser.jag blow, where my "HOSTNAME" is localhost and user "ROLE" is WSO2USERSTORE/clerk. <% var carbon = require('carbon'); var tenantId = -1234; var url = 'http...

RESTful API for WSO2 API Manager

Here, I will explain, how to create an API through API Publisher .  This request is to obtain the consumer key/ secret key pair. curl -X POST -H "Authorization: Basic < BASE64 username:password >" -H "Content-Type: application/json" -d '{"callbackUrl": "www.google.lk","clientName": "rest_api_publisher","tokenScope": "Production","owner": " username ","grantType": "password refresh_token","saasApp": true}' https:// api.cloud.wso2.com /client-registration/v0.11/register Note: The <user name> should be email@organization_key. For example, if the e-mail is john@gmail.com, the <user name> should be  john@gmail.com@organization_key. You can find the organization_key on the Manage page of the cloud. Sample Request: curl -X POST -H "Authorization: Basic dml2ZWthbmFudGhhbxxxxxxxxxxxxxx= " -H "Content-Type: ...

How to add custom headers to published APIs in WSO2 API Cloud?

This blog guides you to add additional headers to published API in WSO2 API Cloud .  The API Cloud is based on WSO2 API Manager , WSO2's complete solution for designing and publishing APIs and managing a developer community. In order to add additional headers to the allowed headers, we have to configure CORS headers per API level . Once we configure, we can include additional headers in the API Console. In the example below, we will add a custom header called " setName " to an existing API and invoke it from the Developer Portal. Edit a published API and then click "Next: Implement >"          Select the Enable API based CORS Configuration check box to enable CORS for the API. Add the additional headers in "Access Control Allow Headers", then Enter and click Save. Now we have completed for configuring  CORS headers. Then we need to include additional headers in the API Console. Edit a published API again, then nav...

How to integrate WSO2 ESB SNMP Connector with Google Spreadsheet Connector?

In my previous blog, I describe how to work with SNMP Connector and now I am going to do a scenario by integrating the SNMP Connector with the Google Spreadsheet connector. This scenario explains that insert the data which is the response of the SNMPSet operation to the spreadsheet. Before start, the ESB, download snmp4j-2.5.5.jar and add it to the <ESB_HOME>/repository/components/lib directory. Environment Setup Download ESB 5.0.0 from  here . Upload the following connectors. (Refer this to  add and enable the connector ) snmp-connector-1.0.0 googlespreadsheet-connector-3.0.0 Follow the  instruction  to get the credential for the Google Spreadsheet Connector. Following is a sample proxy service that illustrates how to test the above scenario. <?xml version="1.0" encoding="UTF-8"?> <proxy xmlns="http://ws.apache.org/ns/synapse" name="SNMPSetScenario" startOnLoad="true" statistics=...

Working with WSO2 SNMP Connector

SNMP Connector allows you to monitor and configure the network components such as servers, routers, switches or printers through the WSO2 ESB. Simple Network Management Protocol (SNMP) is an Internet-standard protocol for managing devices on IP networks. It uses the snmp4j library which is an enterprise class free open source SNMP implementation for Java™ SE. Before start, the ESB, download snmp4j-2.5.5.jar and add it to the <ESB_HOME>/repository/components/lib directory. Environment Setup Download ESB 5.0.0 from  here . Deploy the SNMP Connector.(Refer this to  add and enable the connector ) Following is a sample proxy service that illustrates how to test the SNMPSet operation. <proxy xmlns="http://ws.apache.org/ns/synapse" name="SNMPSet" startOnLoad="true" statistics="disable" trace="disable" transports="https,http,local"> <target> <inSequence...

How to integrate WSO2 ESB File Connector with Gmail Connector?

In this section, I am going to describe  a connector scenario by integrating the File Connector with  the Gmail connector.  For an example, you can use  the File Connector to read a file content and send that content using Gmail Connector. Environment Setup Download ESB 5.0.0 from  here . Upload the following connectors. (Refer this to add and enable the connector ) fileconnector-connector-2.0.6 gmail-connector-3.0.4 Follow the instruction to get the credential for the Gmail connector. Following is a sample proxy service that illustrates how to test the above scenario. <?xml version="1.0" encoding="UTF-8"?> <proxy xmlns="http://ws.apache.org/ns/synapse" name="Read_AND_sendMail" transports="https,http" statistics="disable" trace="disable" startOnLoad="true"> <target> <inSequence> <property name="source" expression="json-eva...

What is Simple Network Management Protocol?

The SNMP(Simple Network Management Protocol)is a protocol that allows devices to expose useful information to other devices or applications. Using SNMP, the Network operators can be able to manage their network elements, identify the fault, and can configure the remote system. The SNMP Protocol is based on the communication between an Agent and a Manager. SNMP Manager: A manager or management system is a separate entity that is responsible for communicating with the SNMP agent implemented network devices. SNMP Manager’s key functions Queries agents.  Gets responses from agents Sets variables in agents.  Acknowledges asynchronous events from agents.  SNMP Agent: The agent is a program that is packaged within the network element. Enabling the agent allows it to collect the management information database from the device locally and makes it available to the SNMP manager when it is queried for. These agents could be standard (e.g. Net-SNMP) or specific to a...

How to obtain Access Token for MailChimp REST API?

Register an Application  In the MailChimp account, navigate to the Account page. In the account drop-down menu, click Extras and choose API Keys Under the “Developing an App?” heading, click Register and Manage Your Apps Click Register an App In the fields provided, input your application’s information and click Create When creation is successful, you’ll see an Aplication created message appear, and more information at the end of your form, including the Client_ID and Client Secret Obtain the Access Token It begins the authorization process by redirecting the user to the authorize_uri. This is a GET request, and response_type=code, client_id, and the redirect_uri are included. https://login.mailchimp.com/oauth2/authorize?response_type=code&client_id=12345&redirect_uri=http://vsvives.blogspot.com/ The user is prompted to enter their username and password to approve the application then you will redirect back to your redirect_uri as a GET request with the code parameter. h...

How to get token for ActiveCollab V5?

Using the URL " https://www.activecollab.com/ " to create a "Free Trial" account for ActiveCollab version5.For that, you need to pass the "Your Name or Organization, Email and Password". Send a POST request to " https://my.activecollab.com/api/v1/external/login" with "email" and "password" as parameters. Sample request { "password":"xxxxxxxxxx", "email":"emailAddress" } Response { "is_ok":true, "accounts":[ { "url":"https://app.activecollab.com/134362", "name":"134362", "display_name":"vivek (ID: 134362)", "class":"FeatherApplicationInstance" } ], "user":{ "first_name":"vive", "last_name":"siva", "intent":"O7NB7V96R0M48-xxxxxxxxxxxxxx...

How to register a new application in the Azure classic portal?

Sign in to the  Azure Management Portal  using your Office 365 Developer Site credentials. Click  Active Directory  on the left menu, then click on the  Directory  for your Office 365 developer site.       On the top menu, click  Applications. Click  Add  from the bottom menu. Click Add an application my organization is developing. Specify  the application name and select  WEB APPLICATION AND/OR WEB API   for  Type . Click the arrow icon on the bottom-right corner of the page. Specify a Sign-on URL and APP ID URI (E.g https://localhost:9443/commonauth) .  The App ID URI is a unique identifier for Azure AD to identify your app. It must be a unique value in your organization’s Azure AD . (For example, if your organization’s Mail ID is like " testUser@viveXYZ.onmicrosoft.com ", then App ID URI be like  https://viveXYZ.onmicrosoft.com/myNewApp ). Click the  checkbox  in th...

How to associate an Azure subscription with Office 365 account (Azure AD)?

  1.  Log on to the  Microsoft Azure Management portal  with your existing Azure credentials. 2. Select the  Active Directory  node, then select the  Directory  tab and, at the bottom of the screen, select  New.             3. On the  New  menu, select  Active Directory  >  Directory  >  Custom Create .              4. In  Add directory , in the  Directory  drop-down box, select  Use existing directory .       Check  I am ready to be signed out , and then select the check mark in the lower-right corner.                    This brings you back to the Azure Management Portal.  5. Log in with your Office 365 account information.       You will be prompted whether to use your directory with  Azure. Important ...

How to generate AccessToken and AccessTokenSecret using OAuth (v1.0a) protocol?

In this post, I am going to briefly explain how to generate the access token and secret using   OAuth (v1.0a) protocol, here I am using  Xero payroll API  Request URLs for generating tokens. " https://www.hurl.it/ " is used to generate the above token. Steps: 1) Before start, we need to create a Xero account (https://www.xero.com/signup/) and valid application (https://api.xero.com/Application/). Once you create app, you can get the "Consumer Key" and "Consumer Secret". 2) The next step is to obtain an Unauthorized Request Token Go to the "https://www.hurl.it/" then select " Add Authentication " and click on " OAuth 1.0a". In the " Destination", choose GET HTTP method and add the " https://api.xero.com/oauth/RequestToken " in the place, then add the " Consumer Key" and " Consumer Secret" which is obtained from APP, after adding click the "Launch Request" to get  ...