Skip to main content

Posts

Featured Post

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.
Recent posts

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...