Posts

How to run a Pega V8.x case using Alexa?

Image
Before we work on creating a Pega case to run it from Alexa developer console, first we need to understand Alexa working environment. Alexa is Amazon's cloud-based voice service. Alexa Skills are programs that can be activated online and extend the range the Alexa Language Service’s functions with certain abilities. Technically, an Alexa skill consists of a user interface (the “front end”) and the program logic (the back end). The program logic in the back end runs either on your own server or on the basis of AWS Lambda, a data processing service provided by Amazon. Main points to remember while working with Alexa env: Log in to  https://developer.amazon.com/ en-US/ alexa . If you don’t have an Amazon Developer account yet, create a free one. Click on “ Alexa  Skills Kit”(ASK) in the drop-down menu under “Products” and then on “Register Now” to open the  Alexa  Developer console. The  Alexa  Developer Console is currently available in English, Japanese...

My version of JWT and the generation of JWT using Pega Infinity V8.4.2

Image
JWT stands for JSON Web Token. JSON Web Token (JWT) is an open standard (RFC 7519) that defines a compact and self-contained way for securely transmitting information between parties as a JSON object.  This information can be verified and trusted because it is digitally signed. The client will need to authenticate with the server using the credentials only once.   JWT is a means of representing claims to be transferred between two parties. The claims in a JWT are encoded as a JSON object that is digitally signed using JSON Web Signature (JWS) and/or encrypted using JSON Web Encryption (JWE).JWTs are a good way of securely transmitting information between parties because they can be signed, which means you can be sure that the senders are who they say they are. Additionally, the structure of a JWT allows you to verify that the content hasn't been tampered with.  For all future requests the client can authenticate itself to the server using this JSON Web Token(JWT) and so d...

LDAP (OpenLDAP) integration setup in Pega V821 Personal Edition

Image
LDAP is the Lightweight Directory Access Protocol . Basically, it's a protocol used to access data from a database (or other source) and it's mostly suited for large numbers of queries and minimal updates (the sort of thing you would use for login information for example). LDAP doesn't itself provide a database, just a means to query data in the database. There are different ways to implement LDAP:   1) Active Dir (MS Dir service for Windows) 2) Apache Dir Server 3) Redhat Dir Server 4) Oracle Intent Dir 5) IBM Tivoli Dir Server 6) OpenLDAP server - focusing on this option in this post Data in LDAP is organized hierarchically, starting at a root and branching down into individual entries. Entries at the top level of the hierarchy represent larger organizations, and under the larger organizations are entries for smaller organizations. At the bottom of the hierarchy are entries for individual people or resources. Each entry is uniquely identified by a distinguished name (dn)....

Pega SSO using OpenID connect authentication service

Image
We can create a new OpenID Connect authentication service in Pega using google as the OpenID Identity provider and how we can log in Pega using the google credentials.Pega supports OpenID authentication service in versions 7.4 & above. Sequence of steps in this implementation: 1) User tries to login into a Pega application using Google login credentials 2) Pega application sends an auth request to Google(OpenID Identity Provider) 3) A Google login screen appears and allows the user to enter id/pwd to pass the credentials to Identity Provider 4) Google generates an auth code and sends it back to Pega app 5) After receiving the auth code, Pega requests for an access token and receives it from the Identity Provider 6) After getting the token, Pega sends a request and retrieves the user info necessary for authentication To work on the above steps, we need to login into google's developer portal: https://console.developers.google.com/project?pli=1 and  1) Create a new project:PegaPr...

Is it possible to enable SSL on localhost running on Tomcat?

Image
 The answer is YES.  Enabling of SSL on PegaV82 running on Tomcat and is possible with the help of infrastructure work. To do this simple exercise, here are the simple steps to follow. 1) First, we need to create a keystore.jks file and here is the java command to run the keystore.exe tool from our java path.  2) Second, copy this jks file in our /tomcat/config path and update the <Connector> configuration from server.xml file present in the same path: /tomcat/config.  3) Finally, reboot the tomcat server after making the xml file changes and we can try with  https://localhost:8443/prweb/ PRServlet   to launch Pega and login with our id/pwd References:  1) google.com 2) community.pega.com 3) Pega developer help

Can we call a JavaScript function from Pega activity/DataTransform?

Image
The answer is YES but there is no OOTB feature provided by Pega to fulfil this. There mught be various options to achieve this functionality but I am exlaining here to crack it by using java code written in a simple Pega function. This Pega function would act like a wrapper to cover the java logic and can be called in not only just activity/DT call but wherever we have a possibility. Java has a package called "javax.script.*" where we have all the invocation methods to run the JS code. This code is tested in Pega V7.x and V8.x but I am not 100% sure about prior versions of Pega. The idea behind this tiny exercise is like we call a js file (SampleJS.js) from the server path (eg:/tomcat/lib)and execute the JS function within the server to get the o/p value from the function logic.  Here are the simple steps to be followed in implementing this work.   1) Create a Pega function(eg:RunJSFunction) having a parameter of js file location (/tomcat/lib/misc/SampleJS.js)  2) Call th...

AWS S3 integration from Pega V8

Image
Brief idea on AWS S3: Amazon S3 or Amazon Simple Storage Service is a service offered by Amazon Web Services (AWS) that provides object storage through a web service interface.Amazon S3 uses the same scalable storage infrastructure that Amazon.com uses to run its global e-commerce network.Amazon S3 can be employed to store any type of object which allows for uses like storage for Internet applications, backup and recovery, disaster recovery, data archives, data lakes for analytics, and hybrid cloud storage. The basic storage units of Amazon S3 are objects which are organized into buckets. Each object is identified by a unique, user-assigned key.Buckets can be managed using either the console provided by Amazon S3, programmatically using the AWS SDK, or with the Amazon S3 REST application programming interface (API). Objects can be managed using the AWS SDK or with the Amazon S3 REST API.Amazon S3 provides an API for developers.The AWS console provides tools for managing and uploadi...