From the blog

OAuth2.0 With The Rest Client Components For C++ Builder

Authentication becomes a critical part of any business, that too developing applications using the OAuth2.0 protocol is still challenging to some C++Builder developers using Restful APIs as most modern IoT applications mandates. Don’t worry, this post will simplify your challenge and understand better. Assume an end-user(Resource Owner) has an account in google(Resource Server) and has resources like contacts. The same user wants to sign up in Facebook (Third-Party App), as a user, he needs to reuse users credentials of google in Facebook and avoid fresh signup(filling all the personal details in Facebook and creating login credentials orto access some of the protected resources from google e.g) use contacts from google to invite friends that need to be used on Facebook. This is achieved by traditional Client Server authentication. But this approach has drawbacks as mentioned below. End user credentials is used by 3rd party app. 3rd party app store credentials for later use. Resource servers must provide password authentication. End users cannot revoke access to individual 3rd party app as credential are universal, can only block access by changing password. Compromise of 3rd party app exposes end user password. OAuth2.0 addresses these issues by introducing an authorization layer and separating the role of the client from that of the resource owner. Instead of using the resource owner’s credentials to access protected resources, the client obtains an access token — a string denoting a specific scope, lifetime, and other access attributes. Access tokens are issued to third-party clients by an authorization server with the approval of the resource owner. The client uses the access token to access the protected resources hosted by the resource server. For above scenario, an end-user (resource owner) can grant facebook (client- webapp, browser, desktop app) access to his protected contacts stored at a google contacts (resource server), without sharing his username and password with the facebook client to invite friends. Instead, he authenticates directly with a server trusted by the contact service(authorization server), which issues the contacts service delegation-specific credentials (access token). End user data is exposed over a Restful API. All transaction is over HTTP/HTTPS. REST – Representational state transfer web services are known as Restful APIs is an architecture style not a protocol. It exposes end user data (XML or typically JSON) by creating URI and transfer over a HTTP protocol. For RestDemo Sample click here. OAuth2.0 Work Flow. Authorization Grant Types: It can be Authorization code, Implicit, Resource owner credentials, Client Credentials. OAuth2.0 and the Internet Of Things: IoT Gadgets and Devices vast of amount of data which can be Applied with analytics which can creates revenue stream. Many IoT Vendors expose end user data over Restful services. Be aware of Vendor Restful API restrictions such as Rate limiting, time and changes in vendor API may result in feature breaking in your client Application. To avoid such limitations you can check Embercadero’s Enterprise Mobility Services Middleware. Okay, this would have helped in understanding the concepts about OAuth2.0 and IoT Use cases. To check the demonstration in action checkout this below one.

Read More

30+ Delphi Units For The Next Level DevOps

GpDelphiUnits is a collection of Delphi units by Primož Gabrijelčič. These Delphi Units might help you to do some work quickly and efficiently. This is an open-source project and you can check out the full source code on over GitHub. What you can get from these units? Here are some of the available units with aims: DSiWin32 Collection of Win32/Win64 wrappers and helper functions. GpCommandLineParser Attribute-based command line parser. GpForm A simple form with some enhancements. GpHttp Asynchronous HTTP GET/POST with ICS and OmniThreadLibrary. GpHugeF Interface to 64-bit file functions with some added functionality. GpLists Various TList descendants, TList-compatible, and TList-similar classes. GpLockFreeQueue The sample implementation of a dynamically allocated, O(1) enqueue and dequeue, threadsafe, micro locking queue. GpManagedClass Smarter base class. Handles error codes, has a precondition and postcondition checker. GpStructuredStorage Structured storage (compound file; file system inside a file) implementation. GpStuff Various stuff with no other place to go. GpSync Enhanced synchronization primitives. GpSysHook The main unit for the GpSysHookDLL. Implements system-wide keyboard, mouse, shell, and CBT hooks. Supports multiple listeners, Delphi Units, automatic unhooking on process detach, and only installs the hooks that are needed. Supports notification listeners and filter listeners (should be used with care because SendMessage used for filtering can effectively block the whole system if the listener is not processing messages). Each listener can only listen to one hook because the hook code is sent as a message ID. All internal IDs are generated from the module name so you only have to rename the DLL to make it peacefully coexist with another GpSysHookDLL DLL. GpTextFile Interface to 8/16-bit text files and streams. Uses the GpHugeF unit for file access. GpTextStream Stream wrapper class that automatically converts another stream (containing text data) into a Unicode stream. The underlying stream can contain 8-bit text (in any codepage) or 16-bit text (in 16-bit or UTF8 encoding). GpTimezone Time zone conversion. GpVCL VCL helper library. GpVersion Version info accessors and modifiers, version storage, and formatting. SafeMem GetMem/FreeMem wrapper that checks for block overruns. SpinLock A scalable atomic lock Head over and check out the full project source code and documentation here!

Read More

Create a Web Application Security Blueprint

The best way to make web applications secure is to include security at every step along the development process, from requirements analysis, to design, to implementation and testing, and into maintenance and update phases. To that end, it’s wise to consider a kind of “Web Application Security Blueprint” as part and parcel of how you work through the application lifecycle. Here’s a checklist of items to consider and best practices to follow when putting such a blueprint together. Put the security focus on the web application with Web Application Security Blueprint First and foremost, this means scanning for and eliminating vulnerabilities before applications get released. Kiuwan’s code scanning tools and technologies can not only provide guidance and remediation for the code you build in house, but also assess risks and vulnerabilities in the open source frameworks and code libraries you reference in that code. Second, a constant focus on Web Application Security Blueprint means that security concerns play a role in establishing application architecture and design, and security reviews should be included as part of the feedback process in moving those choices and lifecycle steps forward. The same concerns apply when choosing open source or third-party components, libraries and frameworks. (Here again, Kiuwan can help provide insight on such things.) Third, it’s vital to choose development tools that include (or can incorporate) security scans as part of the process of managing builds, versions and releases. Kiuwan offers plug-ins for the following IDEs: Eclipse (Analyzer and Viewer) RAD (Rational Application Developer for WebSphere Software) IBM Rational Developer for i systems (and more) Microsoft Visual Studio (Viewer) JetBrains (Viewer) IntelliJ IDEA, PhpStorm, PyCharm (and more) Microsoft VS Code (Viewer) Use the right security tools Development managers and software architects would do well to consult security experts as well as developers in assembling an application security (AppSec) toolkit. This toolkit should include all the software and analysis tools required to identify and then address or remediate risks, threats and vulnerabilities. This is where Kiuwan’s code security tools really shine, including Code Security (SAST), Insights (SCA for assessing and managing open source risk) and Code Analysis (QA for code analysis, including IDE plug-ins). Assemble people with the proper skills and resources Developers need information and training about how best to consider and incorporate security concerns as a key ingredient throughout the entire development and operations lifecycles. To that end, Kiuwan offers a broad collection of on-demand webinars to help establish and elevate developers’ security consciousness and to foster a deeper understanding and more effective use of Kiuwan’s tools and technologies. Topics include tutorials on working with specific tools (code scanning, plug-in integration, working with open source components, and more), as well as training on continuous delivery (a stance often termed DevSecOps or even SecDevOps), managing security challenges on distributed teams, effective strategies for working on remote QA teams, and more. Kiuwan won’t leave you to figure out its tools and technologies on your own; you’ll find plenty of help, guidance, and examples. Pivot DevSecOps into the cloud Companies need to understand what kinds of security risks cloud providers pose (and most accept), as well as what kinds of security controls they use and offer to their customers to manage security in the cloud. When migrating applications from on-premises resources (compute, storage and networking) into the cloud (ditto), companies must develop a detailed plan to incorporate […]

Read More

Corona distance-tracking solution with Cisco Meraki and PRTG

Do you remember the summer of 2019, when we danced together at music festivals, populated beaches and went to the supermarket without being counted at the entrance? And all of this without a face mask? In 2020, many things have changed. Suddenly there is this fear of the virus, you pick up the word “Corona” in just about every conversation and much of the former easygoingness is suddenly gone. Companies are also thinking about what their everyday work life could look like in the future. The most important recommendation in office corridors at the moment is: Keep your distance! However, it is not always easy to assess this correctly. A team of the well-known IT company Bechtle GmbH in the Hannover office had the idea to find a solution for this within the framework of a virtual hackathon, which I will now introduce to you in more detail. The concept The objective of the idea was to create an analysis that would give the people in a room quick, easy and highly accurate information about whether the distances are appropriate. However, accuracy, complexity and speed are not easy to calculate here, which is why the result was not intended to be 100% accurate, but rather a flexible form of feedback that can be achieved without too much effort. Use of Meraki zones to determine distances Meraki cameras can determine the number of people in a camera image, and the image can also be divided into different, freely configurable zones. The idea is to set up the zones so that they correspond to the allowed distance. As soon as a zone is occupied by more than one person, this means that the distance is less than the required range. The information about the zones can be determined at Meraki via API or via MQTT stream. No upload of images to a cloud is necessary since the image evaluations are performed directly on the camera and only the purely numerical values are then transferred to the zones. Data analysis with PRTG Network Monitor To evaluate and display the mentioned numerical values, another tool is necessary. This is where PRTG Network Monitor comes into play. Using the REST Custom sensor, PRTG accesses the Meraki API and reads the necessary values. The first step is to display the people in each zone individually. Next, the Sensor Factory sensor in PRTG calculates the data and visualizes the results with a traffic light dashboard. This makes it visible at a glance if there are too many people in a zone and if the necessary distances are no longer given. That was only the beginning The proof of concept I just described was only the first step. Useful extensions are, for example, WiFi-capable lamps or traffic lights that directly signal that distances in a room can no longer be maintained by flashing a red light. Data transmission can also be optimized in the next step. Instead of the previous API-based solution, data transmission using the MQTT protocol is planned.

Read More

Powerful Human Interface Devices Library For C++ Builder

Communicating with Human Interface Devices such as Alphanumeric display, Bar Code Reader, Sensors, Volume control on Speakers/Headsets becomes a primary use case for real-world, Cross-platform applications. Do you spend more time in building libraries to communicate with Human Interface Devices for your Delphi/C++ FireMonkey applications? WINSOFT Provides a powerful library to get the job done. It uses the standard Windows HID API. Features: Able to notify on Human Interface Devices arrival and removal. Can retrieve all the HID devices information available in the System. Flexible to getting/set Feature Report for the HID devices. Works with Windows 32/64-bit applications. Versions Supported: /C++ Builder XE2 – C++ Builder 10.4.1 Sydney Platforms: Windows, OS X, Android, and iOS; Steps to Download and use the Native HID Library: Download Native HID for FireMonkey and Unzip the file. Nahttps://winsoft.sk/nathid.htmvigate to the Library folder for different Versions. e.g) Delphi104-Win32. Read the Readme.txt file to know about features and copyright information. Create a Windows VCL Application and use FHid.pas in the uses section. Include the Library folder into Project->Options->Delphi Compiler->Search Path. Compile and check for using the library. NativeHID Download and Use for FireMonkey demo:https://www.youtube.com/embed/qx5A1zm9WkM?feature=oembed Key HID concepts:Report -Reports are the actual data that is exchanged between a device and a software client.  Input Report – Data sent from the Human Interface Devices to the application, typically when the state of a control changes. Output Report – Data sent from the application to the HID device, for example to the LEDs on a keyboard. Feature Report -Data that can be manually read and/or written, and are typically related to configuration information. Report Descriptor – The Report Descriptor describes the format and meaning of the data that the device supports.UsageTables – Contain a list with descriptions of Usages, which describe the intended meaning and use of a particular item described in the Report Descriptor. For example, a Usage is defined for the left button of a mouse.  USB-IF WorkGroup Publishes the Usage Tables. See USB-IF HID Specifications. Learn how to build FireMonkey applications using Native HID library

Read More

Sencha Ext JS 7.3 GA Release is here!

The Sencha team is excited to announce the latest release of Sencha Ext JS 7.3! Although the pandemic has disrupted the entire world’s ‘normal’ workflow, the Sencha team held strong and has been working relentlessly toward getting this quarterly release in the hands of our community.  This release mainly focuses on feature quality improvements, performance and usability enhancements in both the modern and classic toolkit. We’ve added many API examples and some ready-to-use templates for quick reuse. Through each release, we are committed to continually listening to your feedback as we improve the product experience, and strengthen the quality and functionality of the product.  Read on to learn what’s new in Sencha Ext JS 7.3. Highlights of Sencha Ext JS 7.3 Several improvements to the Data Grid, Fields, Charts and Buttons widgets. Enhancements to Ext JS Grid scrolling experience. Many quality improvements addressing customer reported tickets. Check out the release notes for full details.  New Kitchen Sink examples and directly usable ready-to-go templates for both toolkits Over 30+ new fiddle examples in Ext JS API Docs  Upgraded Froala WYSIWYG Editor to latest version 3.2.1 Ext JS Kitchen Sink Examples  New ready-to-go ‘Login Form’ templates. We’ve created some handy examples that can easily be directly copy-pasted into your application. Learn how to: Create a responsive login form Create a template to reset user password Create a responsive create account template Login Screen Example Create Account Example Easily navigable and ‘searchable’ component examples for the Modern toolkit. Quickly search for examples via the ‘Menu search’ option. View corresponding code and directly implement it into your application. (The tree view navigation exists in the Kitchen sink classic toolkit—we’ve expanded it for the modern toolkit) New API Component Examples  We’ve added over 30+ Data Grid API component examples and fiddle links so you can directly copy-paste the code into your application.  Check out Ext.grid API examples in the API docs for Classic and Modern Toolkit. New examples have been added for Columns (check, drag, tree, date, text, boolean), Plugins (row operations, clipboard, summary, drag-drop), Filters, Selection (rows, cells, header) and many more. Here are a few fiddle snippets: Here are our top 5 “don’t miss out” examples for modern and classic toolkits— Modern Toolkit Classic Toolkit Ext.grid.rowedit.Plugin Ext.grid.plugin.CellEditing.html Ext.grid.selection.Columns.html Ext.grid.column.Boolean.html Ext.grid.selection.Replicator.html Ext.grid.plugin.Clipboard.html Ext.grid.plugin.Clipboard.html Ext.grid.plugin.RowWidget.html Ext.grid.filters.Plugin.html Ext.grid.plugin.DragDrop.html What’s Next?  The engineering team is pacing well on regular quarterly releases and we are committed to delivering new features, quality, performance and usability enhancements and improvements all along. The work on Ext JS 7.4 is in full swing! We expect version 7.4 to be packed with many new features and enhancements especially around the data grid. Our goal is to provide you with continual support through quality and performance enhancements. If you have any feedback or questions, drop us a note here or get in touch.   Try Sencha Ext JS 7.3 We invite you to try out Ext JS 7.3 today! The 30-day free trial is available via public npm or through an easy zip download.  Get started today and build your first app in 3 easy steps.  Download Ext JS 7.3 30-day free trial Read the Getting Started Guides Check out the new and updated Resource Center

Read More

C++ Builder Multi-Device application with Platform APIs

C++ Builder Multi-Device application provides three levels of development: ⦁ Components (VCL and FMX)⦁ Common Libraries (RTL).⦁ Platform APIs (iOS, Android, Mac OS) In this post we will discuss and show how to use the Platform APIs (iOS, Android, Mac OS). Specifically, we’ll look at how to use the iOS APIs to obtain Apple iOS device information for the Operating System (OS) version, the OS name and the iOS device type. Some refer to this as being able to ‘Touch the Metal’ of the device, meaning having access to the low level APIs of the device. The C++ Builder Run Time Library (RTL) includes a number of header files that provide C++ interfaces to the iOS frameworks written in Objective-C. And C++ Builder has the same for Android for the Java Libraries for Android, to allow you to access the APIs of the Android Java libraries from your native C++ code. For Apple IOS, using C++ Builder, these units are scoped with iOSapi and are installed by default in your installation folder \include\ios\rtl.  For Example: The complete list of these units are listed on this C++ Builder DocWiki page iOS Objective-C Frameworks (iOSapi) The C++ Builder FireMonkey framework relies on some of these units. For help on these iOS APIs, you can see the Apple documentation at iOS Developer Library To get to the iOS device information we need, we will need to use the iOS Objective-C Framework for:  iOSapi.UIKit.hpp Note:  The iOSapi.UIKit.hpp also includes the iOSapi.Foundation.hpp and the Macapi.Helpers (Macapi.ObjectiveC.hpp): 123 #define Iosapi_UikitHPP#include <iOSapi.Foundation.hpp>#include <Macapi.ObjectiveC.hpp> Here are steps to create a C++ Builder Multi-Device application to display Apple iOS device information for the Operating System (OS) version, the OS name and the iOS device type: Create a new C++ Builder Multi-Device application, BLANK. Target Platform = iOS 64-bit. Save Project in a new Folder, such as /Projects/CppiOSDeviceInfo Use Project | Options | Deployment | Provisioning, to select your Apple Provisioning Profile and your Developer Certificate: 4. Use Project | Options | Application | Version Info | to enter your unique Application Identifier for the CFBundleIdentifier: Q4X27M46Z4.$(ModuleName) 5. In our C++ Builder Multi-Device iOS application, we will include this one header file:  #include <iOSapi.UIKit.hpp> 1234 #include <fmx.h>#include <iOSapi.UIkit.hpp>  // iOS Device information#pragma hdrstop#include “uMain.h” 6. For the User Interface (UI), create a UI that look like this: 7. To create this UI, follow these steps: On your Blank form in your new C++ Builder Multi-Device application: a. Add a Toolbar, property Align = Top. b. On the Toolbar, add a Button, Align = Right. Button Name = btnGetDeviceInfo. StyleLookup = refreshtoolbuttonbordered. c. On the Toolbar, add a Label, Align = Contents. Label->Text = Device Information d. To display the iOS Device information we will use a ListBox. Add ListBox to the form. Align = Top. e. To the ListBox, add three (3) ListBoxItems, to display the OS version, the OS name and the iOS device type.  To do this, in the Structure Pane, Right-click on ListBox1, Items Editor, Select ListBoxItem from the dropdown, Click Add item button 3 times. Rename ListBoxItem’s TEXT values as OS Name:, Device Type:, and OS Version, and ListBoxItem.Name = lbOSName , lbDeviceType, and lbOSVersion , respectively. 8. You can now double-click on the button for GetDeviceInfo and for it’s OnClick Event Handler, and you can use the functions and methods in the iOSapi UIKit header file to get OS information from our iOS device. 9. First, in your C++ Builder IDE, lets look at the iOSapi.UIKit.hpp header file.  In the IDE Editor, select the iOSapi.UIKit.hpp | Right-Click | Open File At Cursor.  This should open the iOSapi.UIKit.hpp header file in the Editor. 10. Looking at the “Methods Insite” dropdown, […]

Read More

Understanding the DevOps Approach to Code Security

DevOps generally means integrating software development (dev) and information technology operations (ops) to speed the lifecycle, deliver better features, updates and fixes, and more. What’s sometimes missing from this perspective? Code Security. Here’s a description of how to bring security fully into this picture, and integrate it all the way from design, through development and test, and into production. DevOps is a set of software development practices that combines software development (Dev) and information technology operations (Ops) to shorten the systems development life cycle while delivering features, fixes, and updates frequently in close alignment with business objectives. Most experts agree that DevOps actually combines three key ingredients: People, meaning developers and their hangers-on (testing, QA, and so forth), IT professionals, and other “interested parties” – usually stakeholders in what’s being developed and maintained. Process, meaning a deliberate and calculated focus on the software development lifecycle as a formal process, that uses methods like Scrum to codify and stimulate team communications among all the people involved (not just developers, but everybody) with CI/CD (Continuous Integration and Continuous Deployment) to continuously integrate code changes and deploy applications to production as needed, scheduled, or available. Tools, meaning software tools used to help the people fully implement the process. Tools to enable IT automation are essential to making DevOps work properly According to The DevOps Handbook, the real essence of DevOps depends on “applying the most trusted principles from the domain of physical manufacturing and leadership to the IT value stream.” It goes on to mention a slew of bodies of knowledge that include Lean, Theory of Constraints, resilience engineering, learning organizations (continuous learning and continuous improvement)Kiu, safety culture, human factors, and more. On the leadership side, it cites to high-trust management cultures, servant leadership, and organizational change management. DevOps isn’t just a combination of Dev and Ops, it’s actually an entire frame of reference for doing development and IT correctly, responsibly, and repeatedly. Where Does Code Security Come Into DevOps? The short, flippant answer to this question is correct, but overly brief – namely “Everywhere.” That is, security has to be part of the process used for DevOps, it has to be built into the tools used to do DevOps (or make it happen), and, above all, it needs to be high up in the minds of the people involved in DevOps. Kiuwan offers a way to bring security in throughout the entire DevOps lifecycle. It offers the ability to scan code for vulnerabilities and even to automate relevant remediation (where available). But because the Kiuwan tools integrate with various well-known development environments, this makes scanning code for security vulnerabilities, adoption of security coding standards, and automatic error prevent part and parcel of the development, test, and update/maintenance processes across the entire lifecycle. Kiuwan’s IDE integrations encompass the following families and items: Eclipse-based IDEs: Luna, RAD, IBM Rational Developer) Microsoft Visual Studio and Visual Studio Code JetBrains-based IDEs: Intellij IDEA, PhpStorm, PyCharm, Android Studio, and CLion Thus, organizations gain lots of traction to build security (and code scanning) into all phases of their development, maintenance, and deployment efforts. This is why some refer to the most productive mindset in this arena not simply as DevOps but rather as DevSecOps to put security on par with the equally important frameworks that help to formalize and […]

Read More

What DevSecOps Teams Can Learn from COVID-19

Over the last few months, the whole world has fundamentally changed due to the emergence of a novel coronavirus, COVID-19. The highly infectious nature of the virus, its devastating impact on vulnerable individuals who catch it, and the lack of a vaccine have allowed COVID-19 to become a global pandemic. Institutions of all types have been closed and life as we know it has been fundamentally changed. Officials argue about the “right” way to emerge from this self-imposed shutdown, but all agree that our world is different now. DevSecOps is one tiny part of the global economy, but it can benefit from the lessons this crisis can teach us. At its core, a DevSecOps philosophy exists to prevent a major disruption like COVID-19 from threatening an organization’s survival. That is not to say the DevSecOps could prevent a real-world virus, but how we approach an emergency should shape the way our DevSecOps teams approach their charters. We can all learn a great deal by looking at the COVID-19 crisis and examining how we can do things better next time.  The element of surprise Don’t underestimate the humanness of any team. Group dynamics affect every team’s performance and its ability to function effectively, and DevSecOps is no different. In fact, the degree to which a DevSecOps team adds value to its organization depends on its ability to function productively. Contentious competition rarely results in positive team outcomes. The fact is that we — as a community, a nation, and a global population — were not ready for COVID-19. There were a few qualified individuals who warned of such a pandemic for many years, but their warnings didn’t gain much traction. Traditional risk management had placed a pandemic like COVID-19 too low on the priority list to warrant a sufficient preparation budget. We flat out missed it. Hindsight is 20/20, and it is so easy to criticize others in retrospect. That isn’t the purpose here, and analysis for criticism is not very productive. Critical analysis, on the other hand, can be very productive. Those are very different approaches. Critical analysis of how we prepared for and managed the COVID-19 pandemic can provide DevSecOps teams with valuable insight into how to handle crises.  This novel virus took everyone by surprise. We had not properly recognized the threat, we had not invested in preparing for such a threat to be realized, and we failed to understand the gravity of the problem in its early stages. Analysts depended on limited and incomplete data to fuel models that were speculative and dynamic. Traditional data and models built for other similar outbreaks weren’t able to provide the granular results necessary to take decisive action. Authorities at all levels took good-faith action based on their interpretation of the latest models, but interpretations differed, and the resulting actions weren’t coordinated in many cases.  The DevSecOps takeaway is that our teams exist primarily to avoid competing for jurisdictional mandates. Cohesiveness is more than a happy feeling; it provides the ability to react uniformly to a crisis. The focus of an effective DevSecOps team should be to invest extensively in risk assessment, including exhaustive threat modeling, to understand its organization’s attack surface. Preparation is expensive, but being surprised costs a lot more.  Unplanned change isn’t easy The Project Management Institute’s (PMI) […]

Read More