Posts

Showing posts from July, 2020

Protect Your REST APIs and PII with JWT

How it works Simple way to Protect your REST APIs and PII (Personally Identifiable Information) using JWT Tokens. How it works To protect your customer data (PII like card number) that is exchanged between two parties/channels JWT Token are helpful. HTTPS only provides network level security but data still visible to the uses who gains authorization to the system. plain-api.sh $/> curl https://yourdomain.com/customers [ { "id": 1, "name": "James", "social": "999-99-9999", "phonoe": "111-111-1111", } ] Mask Sensitive information of API response for data security. masking_senstive_info.sh $/> curl https://yourdomain.com/customers [ { "id": "Q-VQ7HafDZ8aD6J_UJD62G3iUMyZBSGguf3pSBnLCgQh7FhA==", "name": "James", "social": "####-##-9999", &quo

Custom Jenkins Docker Image

How to run Dockerfile to build customized Jenkins docker image with pre-installed theme and required plugins. Dockerfile from jenkins/jenkins:latest #FROM openjdk # skip Setup Wizard during first startup ENV JAVA_OPTS="-Djenkins.install.runSetupWizard=false" ENV JENKINS_USER=admin ENV JENKINS_PASS=password # COPY custom scripts into jenkin initialization directory COPY jenkins-security.groovy /usr/share/jenkins/ref/init.groovy.d/ # (1) COPY jenkins-theme.groovy /usr/share/jenkins/ref/init.groovy.d/ # (2) #Copy jenkins-material-theme.css into /var/jenkins_home/userContent directory COPY jenkins-material-theme.css /var/jenkins_home/userContent/ # (3) RUN /usr/local/bin/install-plugins.sh simple-theme-plugin # Distributed Builds plugins RUN /usr/local/bin/install-plugins.sh ssh-slaves # install Notifications and Publishing plugins RUN /usr/local/bin/install-plugins.sh email-ext RUN /usr/local/bin/install-plugins.sh mailer RUN /usr/local/bin

Spring boot and Thymeleaf Integration

What is Thymeleaf Integrating Spring Boot with Thymeleaf and Spring Security Taglibs What is Thymeleaf Thymeleaf is a modern server-side Java template engine for both web and standalone environments. It helps to develop simple web application with HTML pages by enriching dynamic attributes within it. HTML templates written in Thymeleaf still look and work like HTML. Steps To integrate Spring boot with Thymeleaf Add maven dependencies to your pom.xml pom.xml <dependency> <groupId>org.thymeleaf.extras</groupId> <artifactId>thymeleaf-extras-springsecurity5</artifactId> <version>3.0.4.RELEASE</version> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-cache</artifactId> </dependency> <dependency> &