SlideShare a Scribd company logo
1 of 44
Download to read offline
@DanielDeogun @DanielSawano#DevoxxPL
Platinum Sponsor:
Creating Secure Software
Benefits from Cloud Thinking
Daniel Deogun & Daniel Sawano
@DanielDeogun @DanielSawano#DevoxxPL
Daniel Deogun Daniel Sawano
@DanielDeogun @DanielSawano#DevoxxPL
Security benefits from cloud thinking?
@DanielDeogun @DanielSawano#DevoxxPL
Cloud concepts
• Codebase

One codebase tracked in revision control, many deploys
• Dependencies

Explicitly declare and isolate dependencies
• Config

Store configuration in the environment
• Backing services

Treat backing services as attached resources
• Build, release, run

Strictly separate build and run stages
• Processes

Execute the app as one or more stateless processes
• Port binding

Export services via port binding
• Concurrency

Scale out via the process model
• Disposability

Maximize robustness with fast startup and graceful shutdown
• Dev/prod parity

Keep development, staging, and production as similar as possible
• Logs

Treat logs as event streams
• Admin processes

Run admin/management tasks as one-off processes
Twelve-factor app
https://12factor.net
A cloud-native application is an application that has been
designed and implemented to run on a Platform-as-a-Service
installation and to embrace horizontal elastic scaling.
Cloud-native
Kevin Hoffman, Beyond the Twelve-Factor App
@DanielDeogun @DanielSawano#DevoxxPL
What we’ll cover today
• Configuration
• Separate processes
• Logging
• The three R’s of enterprise security
@DanielDeogun @DanielSawano#DevoxxPL
Configuration
“Store configuration in the environment”
@DanielDeogun @DanielSawano#DevoxxPL
Configuration
public class ServiceConfiguration {
private static final int PORT_NUMBER = 1023;
private static final Duration CONNECTION_TIMEOUT = ofSeconds(5);
// ...
}
Configuration in code
@DanielDeogun @DanielSawano#DevoxxPL
Configuration
public class ServiceConfiguration {
private static final int PORT_NUMBER = 1023;
private static final Duration CONNECTION_TIMEOUT = ofSeconds(5);
private static final String USERNAME = “client-app”;
private static final String PASSWORD = "yC6@SX5O";
// ...
}
Configuration in code
@DanielDeogun @DanielSawano#DevoxxPL
Configuration
Configuration in code — challenges
• Anyone with access to the code can read the secrets
• No audit trail
@DanielDeogun @DanielSawano#DevoxxPL
Configuration
environments:
dev:
service:
port: 2864
connection-timeout: 5000
username: dev-client-app
password: spring2019
prod:
service:
port: 1023
connection-timeout: 1000
username: client-app
password: yC6@SX5O
Configuration in

resource files
@DanielDeogun @DanielSawano#DevoxxPL
Configuration
Configuration in resource files — challenges
• Anyone with access to the conf can read the secrets
• No, or very limited, audit trail
• Encrypting values creates new problems
@DanielDeogun @DanielSawano#DevoxxPL
Configuration
environment
port=1023
username=client-app
password=yC6@SX5O
Application
injected by
platform
Configuration in

the environment
@DanielDeogun @DanielSawano#DevoxxPL
Configuration
Configuration in the environment - solved security challenges
• Audit trail

Responsibility put on the platform. Some aspects can be solved with IAM.
• Sharing secrets

Minimized. Only managed by platform admins.
• Encryption

Not completely solved. Can be solved with ephemeral secrets.
@DanielDeogun @DanielSawano#DevoxxPL
What we’ll cover today
✓ Configuration
• Separate processes
• Logging
• The three R’s of enterprise security
@DanielDeogun @DanielSawano#DevoxxPL
Separate processes
Run apps as separate stateless processes
@DanielDeogun @DanielSawano#DevoxxPL
Separate processes
• Run the app as multiple stateless processes
• Separate the deployment and running of the application
• Only communicate via backing services
@DanielDeogun @DanielSawano#DevoxxPL
Separate processes
Run the app as multiple stateless processes
• Security benefit: increased availability and integrity
@DanielDeogun @DanielSawano#DevoxxPL
CIA
• Confidentiality — data must only be disclosed to authorized users
• Integrity — data modification is only allowed in an authorized manner
• Availability — data must be available when needed
@DanielDeogun @DanielSawano#DevoxxPL
Separate processes
Run the app as multiple stateless processes
• Security benefit: increased availability and integrity
@DanielDeogun @DanielSawano#DevoxxPL
Separate processes
Separate the deployment and running of the application
• Security benefit: principle of least privilege
@DanielDeogun @DanielSawano#DevoxxPL
Separate processes
Only communicate via backing services
• Security benefit: improves availability and integrity by allowing
apps to be stateless
@DanielDeogun @DanielSawano#DevoxxPL
What we’ll cover today
✓ Configuration
✓ Separate processes
• Logging
• The three R’s of enterprise security
@DanielDeogun @DanielSawano#DevoxxPL
Logging
Use logging as a service
@DanielDeogun @DanielSawano#DevoxxPL
Logging
Logging to disk - challenges
• Confidentiality
• May contain sensitive information
• Hard to control access
• Hard to get a good audit trail
• Hard prevent illegal access
@DanielDeogun @DanielSawano#DevoxxPL
Logging
Logging to disk - challenges
• Integrity
• Maintaining integrity often overlooked
• Write access to log files usually not restricted or audited
@DanielDeogun @DanielSawano#DevoxxPL
Logging
Logging to disk - challenges
• Availability
• Log files are lost when servers are replaced
• Disk space runs out
@DanielDeogun @DanielSawano#DevoxxPL
Logging
Logging as a service
Application
Log service
@DanielDeogun @DanielSawano#DevoxxPL
Logging
Logging as a service - solved security challenges
• Confidentiality

Easy to restrict access and prevent illegal access.

Audit trail.
• Integrity

Mutating operations not exposed/implemented.

Can even digitally sign log events
• Availability

Log storage is handled explicitly so no log files can go missing

Storage is a primary concern so no accidental shortage of disk space.
@DanielDeogun @DanielSawano#DevoxxPL
What we’ll cover today
✓ Configuration
✓ Separate processes
✓ Logging
• The three R’s of enterprise security
@DanielDeogun @DanielSawano#DevoxxPL
The three R’s
The three R’s of enterprise security
Justin Smith, 2016
@DanielDeogun @DanielSawano#DevoxxPL
The three R’s
The three R’s of enterprise security
• Rotate

Rotate secrets every few minutes or hours
• Repave

Repave servers and applications every few hours
• Repair

Repair vulnerable software a few hours after patch is available
@DanielDeogun @DanielSawano#DevoxxPL
The three R’s
Increase change to reduce risk
@DanielDeogun @DanielSawano#DevoxxPL
The three R’s
Rotate secrets every few minutes or hours
environment
password=yC6@SX5O
certificate=xyz
Applicationephemeral secrets
injected by platform
@DanielDeogun @DanielSawano#DevoxxPL
The three R’s
Rotate secrets every few minutes or hours
password=yC6@SX5O
Application
password?
Secret
Service
@DanielDeogun @DanielSawano#DevoxxPL
The three R’s
• Passwords
• Certificates
• Access tokens
• …
Rotate secrets every few minutes or hours
@DanielDeogun @DanielSawano#DevoxxPL
The three R’s
Repave servers and applications every few hours
• Recreate servers and apps from a know good state
• Use rolling deployments to eliminate downtime
• Burn old instances to the ground
• If running containers, consider also repaving the host
@DanielDeogun @DanielSawano#DevoxxPL
The three R’s
• Applies to both operating systems and applications
• No incremental updates, repave instead
Repair vulnerable software a few hours after patch is available
@DanielDeogun @DanielSawano#DevoxxPL
The three R’s
Repair vulnerable software a few hours after patch is available
Patch
available
New known

good state
Repave
@DanielDeogun @DanielSawano#DevoxxPL
The three R’s
• Applies to both operating systems and your own applications
• No incremental updates, repave instead
• CI/CD enables you to repair your own applications
• Don’t forget 3rd party dependencies
Repair vulnerable software a few hours after patch is available
@DanielDeogun @DanielSawano#DevoxxPL
The three R’s
Ever-changing software is the nemesis
of persistent threats
@DanielDeogun @DanielSawano#DevoxxPL
Summary
✓ Configuration
✓ Separate processes
✓ Logging
✓ The three R’s of enterprise security
@DanielDeogun @DanielSawano#DevoxxPL
bit.ly/secure-by-design
Manning Publication
40% discount
ctwdevoxxpl18
@DanielDeogun @DanielSawano#DevoxxPL
Q&A
[2]
40% discount
ctwdevoxxpl18
bit.ly/secure-by-design
@DanielDeogun @DanielSawano#DevoxxPL
Thanks!

More Related Content

More from Daniel Sawano

Devoxx, MA, 2015, Failing Continuous Delivery
Devoxx, MA, 2015, Failing Continuous DeliveryDevoxx, MA, 2015, Failing Continuous Delivery
Devoxx, MA, 2015, Failing Continuous DeliveryDaniel Sawano
 
Failing Continuous Delivery, Agile Prague 2015
Failing Continuous Delivery, Agile Prague 2015Failing Continuous Delivery, Agile Prague 2015
Failing Continuous Delivery, Agile Prague 2015Daniel Sawano
 
Failing Continuous Delivery, Devoxx Poland, 2015
Failing Continuous Delivery, Devoxx Poland, 2015Failing Continuous Delivery, Devoxx Poland, 2015
Failing Continuous Delivery, Devoxx Poland, 2015Daniel Sawano
 
Things Every Professional Programmer Should Know
Things Every Professional Programmer Should KnowThings Every Professional Programmer Should Know
Things Every Professional Programmer Should KnowDaniel Sawano
 
Failing Continuous Delivery, JDays, 2015
Failing Continuous Delivery, JDays, 2015Failing Continuous Delivery, JDays, 2015
Failing Continuous Delivery, JDays, 2015Daniel Sawano
 
Reactive Programming With Akka - Lessons Learned
Reactive Programming With Akka - Lessons LearnedReactive Programming With Akka - Lessons Learned
Reactive Programming With Akka - Lessons LearnedDaniel Sawano
 

More from Daniel Sawano (7)

Devoxx, MA, 2015, Failing Continuous Delivery
Devoxx, MA, 2015, Failing Continuous DeliveryDevoxx, MA, 2015, Failing Continuous Delivery
Devoxx, MA, 2015, Failing Continuous Delivery
 
Failing Continuous Delivery, Agile Prague 2015
Failing Continuous Delivery, Agile Prague 2015Failing Continuous Delivery, Agile Prague 2015
Failing Continuous Delivery, Agile Prague 2015
 
Failing Continuous Delivery, Devoxx Poland, 2015
Failing Continuous Delivery, Devoxx Poland, 2015Failing Continuous Delivery, Devoxx Poland, 2015
Failing Continuous Delivery, Devoxx Poland, 2015
 
Things Every Professional Programmer Should Know
Things Every Professional Programmer Should KnowThings Every Professional Programmer Should Know
Things Every Professional Programmer Should Know
 
Failing Continuous Delivery, JDays, 2015
Failing Continuous Delivery, JDays, 2015Failing Continuous Delivery, JDays, 2015
Failing Continuous Delivery, JDays, 2015
 
Akka Made Our Day
Akka Made Our DayAkka Made Our Day
Akka Made Our Day
 
Reactive Programming With Akka - Lessons Learned
Reactive Programming With Akka - Lessons LearnedReactive Programming With Akka - Lessons Learned
Reactive Programming With Akka - Lessons Learned
 

Recently uploaded

CompTIA Security+ (Study Notes) for cs.pdf
CompTIA Security+ (Study Notes) for cs.pdfCompTIA Security+ (Study Notes) for cs.pdf
CompTIA Security+ (Study Notes) for cs.pdfFurqanuddin10
 
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...rajkumar669520
 
Microsoft 365 Copilot; An AI tool changing the world of work _PDF.pdf
Microsoft 365 Copilot; An AI tool changing the world of work _PDF.pdfMicrosoft 365 Copilot; An AI tool changing the world of work _PDF.pdf
Microsoft 365 Copilot; An AI tool changing the world of work _PDF.pdfQ-Advise
 
Secure Software Ecosystem Teqnation 2024
Secure Software Ecosystem Teqnation 2024Secure Software Ecosystem Teqnation 2024
Secure Software Ecosystem Teqnation 2024Soroosh Khodami
 
What need to be mastered as AI-Powered Java Developers
What need to be mastered as AI-Powered Java DevelopersWhat need to be mastered as AI-Powered Java Developers
What need to be mastered as AI-Powered Java DevelopersEmilyJiang23
 
Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)
Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)
Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)Gáspár Nagy
 
How to pick right visual testing tool.pdf
How to pick right visual testing tool.pdfHow to pick right visual testing tool.pdf
How to pick right visual testing tool.pdfTestgrid.io
 
Entropy, Software Quality, and Innovation (presented at Princeton Plasma Phys...
Entropy, Software Quality, and Innovation (presented at Princeton Plasma Phys...Entropy, Software Quality, and Innovation (presented at Princeton Plasma Phys...
Entropy, Software Quality, and Innovation (presented at Princeton Plasma Phys...Andrea Goulet
 
INGKA DIGITAL: Linked Metadata by Design
INGKA DIGITAL: Linked Metadata by DesignINGKA DIGITAL: Linked Metadata by Design
INGKA DIGITAL: Linked Metadata by DesignNeo4j
 
IT Software Development Resume, Vaibhav jha 2024
IT Software Development Resume, Vaibhav jha 2024IT Software Development Resume, Vaibhav jha 2024
IT Software Development Resume, Vaibhav jha 2024vaibhav130304
 
how-to-download-files-safely-from-the-internet.pdf
how-to-download-files-safely-from-the-internet.pdfhow-to-download-files-safely-from-the-internet.pdf
how-to-download-files-safely-from-the-internet.pdfMehmet Akar
 
10 Essential Software Testing Tools You Need to Know About.pdf
10 Essential Software Testing Tools You Need to Know About.pdf10 Essential Software Testing Tools You Need to Know About.pdf
10 Essential Software Testing Tools You Need to Know About.pdfkalichargn70th171
 
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...Alluxio, Inc.
 
StrimziCon 2024 - Transition to Apache Kafka on Kubernetes with Strimzi.pdf
StrimziCon 2024 - Transition to Apache Kafka on Kubernetes with Strimzi.pdfStrimziCon 2024 - Transition to Apache Kafka on Kubernetes with Strimzi.pdf
StrimziCon 2024 - Transition to Apache Kafka on Kubernetes with Strimzi.pdfsteffenkarlsson2
 
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1KnowledgeSeed
 
Workforce Efficiency with Employee Time Tracking Software.pdf
Workforce Efficiency with Employee Time Tracking Software.pdfWorkforce Efficiency with Employee Time Tracking Software.pdf
Workforce Efficiency with Employee Time Tracking Software.pdfDeskTrack
 
How to install and activate eGrabber JobGrabber
How to install and activate eGrabber JobGrabberHow to install and activate eGrabber JobGrabber
How to install and activate eGrabber JobGrabbereGrabber
 
SQL Injection Introduction and Prevention
SQL Injection Introduction and PreventionSQL Injection Introduction and Prevention
SQL Injection Introduction and PreventionMohammed Fazuluddin
 

Recently uploaded (20)

CompTIA Security+ (Study Notes) for cs.pdf
CompTIA Security+ (Study Notes) for cs.pdfCompTIA Security+ (Study Notes) for cs.pdf
CompTIA Security+ (Study Notes) for cs.pdf
 
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...
 
Top Mobile App Development Companies 2024
Top Mobile App Development Companies 2024Top Mobile App Development Companies 2024
Top Mobile App Development Companies 2024
 
Microsoft 365 Copilot; An AI tool changing the world of work _PDF.pdf
Microsoft 365 Copilot; An AI tool changing the world of work _PDF.pdfMicrosoft 365 Copilot; An AI tool changing the world of work _PDF.pdf
Microsoft 365 Copilot; An AI tool changing the world of work _PDF.pdf
 
Secure Software Ecosystem Teqnation 2024
Secure Software Ecosystem Teqnation 2024Secure Software Ecosystem Teqnation 2024
Secure Software Ecosystem Teqnation 2024
 
What need to be mastered as AI-Powered Java Developers
What need to be mastered as AI-Powered Java DevelopersWhat need to be mastered as AI-Powered Java Developers
What need to be mastered as AI-Powered Java Developers
 
Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)
Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)
Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)
 
How to pick right visual testing tool.pdf
How to pick right visual testing tool.pdfHow to pick right visual testing tool.pdf
How to pick right visual testing tool.pdf
 
Entropy, Software Quality, and Innovation (presented at Princeton Plasma Phys...
Entropy, Software Quality, and Innovation (presented at Princeton Plasma Phys...Entropy, Software Quality, and Innovation (presented at Princeton Plasma Phys...
Entropy, Software Quality, and Innovation (presented at Princeton Plasma Phys...
 
5 Reasons Driving Warehouse Management Systems Demand
5 Reasons Driving Warehouse Management Systems Demand5 Reasons Driving Warehouse Management Systems Demand
5 Reasons Driving Warehouse Management Systems Demand
 
INGKA DIGITAL: Linked Metadata by Design
INGKA DIGITAL: Linked Metadata by DesignINGKA DIGITAL: Linked Metadata by Design
INGKA DIGITAL: Linked Metadata by Design
 
IT Software Development Resume, Vaibhav jha 2024
IT Software Development Resume, Vaibhav jha 2024IT Software Development Resume, Vaibhav jha 2024
IT Software Development Resume, Vaibhav jha 2024
 
how-to-download-files-safely-from-the-internet.pdf
how-to-download-files-safely-from-the-internet.pdfhow-to-download-files-safely-from-the-internet.pdf
how-to-download-files-safely-from-the-internet.pdf
 
10 Essential Software Testing Tools You Need to Know About.pdf
10 Essential Software Testing Tools You Need to Know About.pdf10 Essential Software Testing Tools You Need to Know About.pdf
10 Essential Software Testing Tools You Need to Know About.pdf
 
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
 
StrimziCon 2024 - Transition to Apache Kafka on Kubernetes with Strimzi.pdf
StrimziCon 2024 - Transition to Apache Kafka on Kubernetes with Strimzi.pdfStrimziCon 2024 - Transition to Apache Kafka on Kubernetes with Strimzi.pdf
StrimziCon 2024 - Transition to Apache Kafka on Kubernetes with Strimzi.pdf
 
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
 
Workforce Efficiency with Employee Time Tracking Software.pdf
Workforce Efficiency with Employee Time Tracking Software.pdfWorkforce Efficiency with Employee Time Tracking Software.pdf
Workforce Efficiency with Employee Time Tracking Software.pdf
 
How to install and activate eGrabber JobGrabber
How to install and activate eGrabber JobGrabberHow to install and activate eGrabber JobGrabber
How to install and activate eGrabber JobGrabber
 
SQL Injection Introduction and Prevention
SQL Injection Introduction and PreventionSQL Injection Introduction and Prevention
SQL Injection Introduction and Prevention
 

Devoxx PL 2018 - Creating secure software - Benefits from cloud thinking