SlideShare a Scribd company logo
1 of 33
Download to read offline
Security Practices in
OpenShift
as experienced @ Amadeus
Nenad Bogojević
Amadeus S.A.S.
Diogenes Rettori
Red Hat
2017
©AmadeusITGroupanditsaffiliatesandsubsidiaries
_Provides IT services for travel
industry
_Operates e-commerce web sites,
payment processing, b2b services in
travel
_Using OpenShift 3 since 2 years
• In own datacenters, in public clouds
2
©AmadeusITGroupanditsaffiliatesandsubsidiaries
Amadeus
In one slide
_Protecting assets
• computing capacity, data
_Personal information
• General Data Protection Regulation
(GDPR)
_e-Commerce & payment processing
• PCI/DSS
3
©AmadeusITGroupanditsaffiliatesandsubsidiaries
Why security
And not the one like in picture
_OpenShift & Containers
• Lot of things are changing
• Old rules may not be applicable
• Risks are still out there
4
©AmadeusITGroupanditsaffiliatesandsubsidiaries
How?
To be better than the one like in picture
_OpenShift & Containers
• Lot of things are changing
• Old rules may not be applicable
• Risks are still out there
EVERYONE ON BOARD
5
©AmadeusITGroupanditsaffiliatesandsubsidiaries
How?
To be better than the one like in picture
Infrastructure
©AmadeusITGroupanditsaffiliatesandsubsidiaries
7
©AmadeusITGroupanditsaffiliatesandsubsidiaries
OpenShift Architecture
In one slide
Use OpenStack on our hardware
Or public cloud providers
8
©AmadeusITGroupanditsaffiliatesandsubsidiaries
Preparing infrastructure
And security
_Pre-constructed VM images
• mirrored repositories & registries
• scanned using OpenSCAP
_Network design
• Where are DMZ and layered
protection?
• OpenStack – security groups
_Access control (bastion server)
_Upgrade policy
• Rebuild vs rolling
• Bi-weekly/monthly
9
©AmadeusITGroupanditsaffiliatesandsubsidiaries
OpenShift Security Architecture
Different kind of network zones
Users
DevOps
Developers
App Nodes
Infra Nodes
Bastion
Repository
CI/CD
SSH
Masters
HTTPS
Repository
pull
SDN
@
OpenShift
©AmadeusITGroupanditsaffiliatesandsubsidiaries
11
©AmadeusITGroupanditsaffiliatesandsubsidiaries
Let’s login!
12
©AmadeusITGroupanditsaffiliatesandsubsidiaries
Let’s login!
oc login -u system:admin
13
©AmadeusITGroupanditsaffiliatesandsubsidiaries
Let’s login!
14
©AmadeusITGroupanditsaffiliatesandsubsidiaries
OpenShift Security Introduction
_Way of managing & distributing sensitive information
• keys, certificates, passwords, usernames
_Separate sensitive information management from application pods
• Secured delivery to nodes (TLS)
• Only present in memory on openshift nodes
• Centralized management
• Easy access from application
• Environment variables
• Volumes
15
©AmadeusITGroupanditsaffiliatesandsubsidiaries
OpenShift Secrets
Decoupling sensitive information from applications
16
©AmadeusITGroupanditsaffiliatesandsubsidiaries
Using Secrets
Security as code
apiVersion: v1
kind: Pod
metadata:
name: use-secret-pod
spec:
containers:
- name: secret-test-container
image: myapp
env:
- name: SECRET_USERNAME
valueFrom:
secretKeyRef:
name: top-secret
key: username
restartPolicy: Always
apiVersion: v1
kind: Secret
metadata:
name: top-secret
data:
username: bmVuYWQ=
password: aWtuZXd5b3V3b3VsZHRyeXRoaXM=
Masters
_Stored in (almost) clear
• in etcd on masters
• on tmp storage on nodes
• accessible through API
_How about vaults?
17
©AmadeusITGroupanditsaffiliatesandsubsidiaries
OpenShift Secrets – „Less Great Things“
Handbrake for certification
_You already have big issue if someone compromised your infrastructure
_Encrypt disks
_Store in vault, with decryption service
• Side-car or init containers
• Security as a service
_Compensating controls
18
©AmadeusITGroupanditsaffiliatesandsubsidiaries
Some solutions
It’s not show-stopper
_OpenShift provides log of activities that have affected system by individual
users, administrators, or other components of the system.
_Activate on master /etc/origin/master/master-config.yaml
19
©AmadeusITGroupanditsaffiliatesandsubsidiaries
OpenShift Audit Log
auditConfig:
enabled: true
AUDIT: id="5c3b8227-4af9-4322-8a71-542231c3887b" ip="127.0.0.1"
method="GET" user="nenad" as="<self>" namespace="someproject"
uri="/api/v1/namespaces/someproject/secrets"
AUDIT: id="5c3b8227-4af9-4322-8a71-542231c3887b" response="401"
20
©AmadeusITGroupanditsaffiliatesandsubsidiaries
auditd introduction
audit.log
rsyslog
Alerting system
auditd rules
-a always,exit -S <syscall>
-w <filename>
_OpenShift master - know if someone plays with etcd
21
©AmadeusITGroupanditsaffiliatesandsubsidiaries
auditd rules for masters
Monitoring etcd
-a always,exit -F arch=b64 -S creat -S open -S openat
-S open_by_handle_at -S truncate -S ftruncate
–F dir=/var/lib/etcd
-k openshift_etcd
_Secrets mounted as tmpfs inside /var/lib/opesnift.
_When new secret is mounted add it to auditd rules
• When new secret is unmounted remove it to from auditd rules
_All monitorable secrets must have certain string in name
• (e.g. secret~example)
_If you open or close secrets often, it may generate a lot of messages
22
©AmadeusITGroupanditsaffiliatesandsubsidiaries
..and on nodes
Monitoring secret
findmnt --list --noheadings --types tmpfs --poll --output ACTION,TARGET |
grep secret~example |
awk ‘$1 == “mount” { print $2 }‘ |
xargs -L 1 -i auditctl --a always,exit -F arch=b64 -S creat -S open -S openat
-S open_by_handle_at -S truncate -S ftruncate -F dir={} -k openshift_secret
findmnt --list --noheadings --types tmpfs --poll --output ACTION,TARGET |
grep secret~example |
awk ‘$1 == “unmount” { print $2 }‘ |
xargs -L 1 -i auditctl --d always,exit -F arch=64 -S creat -S open -S openat
-S open_by_handle_at -S truncate -S ftruncate -F dir={} -k openshift_secret
23
©AmadeusITGroupanditsaffiliatesandsubsidiaries
More use of auditd
With the help of openscap
_Secure communication inside or outside your cluster
_Service annotated with
service.alpha.openshift.io/serving-cert-secret-
name=name
_Certificate automatically generated and provided as
a secret to pod
_Clients can rely on automatically mounted CA
/var/run/secrets/kubernetes.io/serviceaccount/
service-ca.crt
24
©AmadeusITGroupanditsaffiliatesandsubsidiaries
Service Signing Certificate
clientpod
mongodb.myproject.svc
©AmadeusITGroupanditsaffiliatesandsubsidiaries
Containers
• We want to empower developer
• Let’s be agile!
• Run as root
• Privileged containers – hostpath
• port < 1000
• Running old containers
• FROM httpd:2.4.12
• There’s this cool blackhat/jboss
container on docker hub, let’s pull it
26
©AmadeusITGroupanditsaffiliatesandsubsidiaries
Containers & Developers
• We want to empower developer
• Let’s be agile!
• Run as root
• Privileged containers – hostpath
• port < 1000
• Running old containers
• FROM httpd:2.4.12
• There’s this cool blackhat/jboss
container on docker hub, let’s pull it
27
©AmadeusITGroupanditsaffiliatesandsubsidiaries
Containers & Developers
When will
they learn!
_Support arbitrary user ids
• Use root group
chown -R someuser:root /app && chmod –R g+rwX /app
_Your application needs to listen on port 80?
• Can’t you change it?
_Use SCC (Security Context Constraint)
• privileged containers, host paths, user id,
FS Groups, selinux, capabilities
_seccomp if you want to restrict even more
28
©AmadeusITGroupanditsaffiliatesandsubsidiaries
Root Access
Not allowed
apiVersion: v1
kind: Service
metadata:
name: httpd
spec:
ports:
- port: 80
targetPort: 10080
protocol: TCP
_All images come from internal registry
_Using RHEL as base images
• RedHat repository mirrored into internal
_Other images must be built internally from source code
_No automatic access to docker hub from build machines
_Production access it’s own repository with only validated
images
29
©AmadeusITGroupanditsaffiliatesandsubsidiaries
Image control
Secured source
access.redhat.com/containers
_Can we run security scan on image before it runs?
• image-inspector
• oscap-docker
_Run OpenSCAP on a docker image and serve
result
docker run -ti --rm --privileged -p 8080:8080
-v /var/run/docker.sock:/var/run/docker.sock
openshift/image-inspector --image=some-application:20
--path=/tmp/image-content --serve 0.0.0.0:8080 --scan-
type=openscap
_Used during build process
30
©AmadeusITGroupanditsaffiliatesandsubsidiaries
Old images and security vulnerabilities
image-inspector
_Platform can be secured from container vulnerabilities
• containers do bring risk, but it can be managed
_Platform will not solve application vulnerabilities
• but it can help
• true multitenancy is complex
_Start with the principle of least access
• grant new capabilities to applications only when needed
31
©AmadeusITGroupanditsaffiliatesandsubsidiaries
Guiding thoughts
Encryption of Secrets!
Network policies – internal and egress
Generic/pluggable image-inspector?
More fine-grained RBAC.
32
©AmadeusITGroupanditsaffiliatesandsubsidiaries
What we miss
This might be roadmap
Thank you!
©AmadeusITGroupanditsaffiliatesandsubsidiaries
You can follow us on:
AmadeusITgroup
amadeus.com
amadeus.com/blog

More Related Content

What's hot

Red Hat Openshift Fundamentals.pptx
Red Hat Openshift Fundamentals.pptxRed Hat Openshift Fundamentals.pptx
Red Hat Openshift Fundamentals.pptxssuser18b1c6
 
Red Hat OpenShift Container Platform Overview
Red Hat OpenShift Container Platform OverviewRed Hat OpenShift Container Platform Overview
Red Hat OpenShift Container Platform OverviewJames Falkner
 
Kubernetes 101 - an Introduction to Containers, Kubernetes, and OpenShift
Kubernetes 101 - an Introduction to Containers, Kubernetes, and OpenShiftKubernetes 101 - an Introduction to Containers, Kubernetes, and OpenShift
Kubernetes 101 - an Introduction to Containers, Kubernetes, and OpenShiftDevOps.com
 
OpenShift-Technical-Overview.pdf
OpenShift-Technical-Overview.pdfOpenShift-Technical-Overview.pdf
OpenShift-Technical-Overview.pdfJuanSalinas593459
 
OpenShift Virtualization - VM and OS Image Lifecycle
OpenShift Virtualization - VM and OS Image LifecycleOpenShift Virtualization - VM and OS Image Lifecycle
OpenShift Virtualization - VM and OS Image LifecycleMihai Criveti
 
Room 1 - 4 - Phạm Tường Chiến & Trần Văn Thắng - Deliver managed Kubernetes C...
Room 1 - 4 - Phạm Tường Chiến & Trần Văn Thắng - Deliver managed Kubernetes C...Room 1 - 4 - Phạm Tường Chiến & Trần Văn Thắng - Deliver managed Kubernetes C...
Room 1 - 4 - Phạm Tường Chiến & Trần Văn Thắng - Deliver managed Kubernetes C...Vietnam Open Infrastructure User Group
 
GitOps with ArgoCD
GitOps with ArgoCDGitOps with ArgoCD
GitOps with ArgoCDCloudOps2005
 
Introduction to Helm
Introduction to HelmIntroduction to Helm
Introduction to HelmHarshal Shah
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes IntroductionPeng Xiao
 
Cloud Native Engineering with SRE and GitOps
Cloud Native Engineering with SRE and GitOpsCloud Native Engineering with SRE and GitOps
Cloud Native Engineering with SRE and GitOpsWeaveworks
 
Room 3 - 7 - Nguyễn Như Phúc Huy - Vitastor: a fast and simple Ceph-like bloc...
Room 3 - 7 - Nguyễn Như Phúc Huy - Vitastor: a fast and simple Ceph-like bloc...Room 3 - 7 - Nguyễn Như Phúc Huy - Vitastor: a fast and simple Ceph-like bloc...
Room 3 - 7 - Nguyễn Như Phúc Huy - Vitastor: a fast and simple Ceph-like bloc...Vietnam Open Infrastructure User Group
 
Red Hat OpenShift on Bare Metal and Containerized Storage
Red Hat OpenShift on Bare Metal and Containerized StorageRed Hat OpenShift on Bare Metal and Containerized Storage
Red Hat OpenShift on Bare Metal and Containerized StorageGreg Hoelzer
 
Kubernetes internals (Kubernetes 해부하기)
Kubernetes internals (Kubernetes 해부하기)Kubernetes internals (Kubernetes 해부하기)
Kubernetes internals (Kubernetes 해부하기)DongHyeon Kim
 
Using GitHub Actions to Deploy your Workloads to Azure
Using GitHub Actions to Deploy your Workloads to AzureUsing GitHub Actions to Deploy your Workloads to Azure
Using GitHub Actions to Deploy your Workloads to AzureKasun Kodagoda
 
Adopting OpenTelemetry
Adopting OpenTelemetryAdopting OpenTelemetry
Adopting OpenTelemetryVincent Behar
 
VMware Tanzu Kubernetes Connect
VMware Tanzu Kubernetes ConnectVMware Tanzu Kubernetes Connect
VMware Tanzu Kubernetes ConnectVMware Tanzu
 
Rancher 2.0 Technical Deep Dive
Rancher 2.0 Technical Deep DiveRancher 2.0 Technical Deep Dive
Rancher 2.0 Technical Deep DiveLINE Corporation
 

What's hot (20)

Red Hat Openshift Fundamentals.pptx
Red Hat Openshift Fundamentals.pptxRed Hat Openshift Fundamentals.pptx
Red Hat Openshift Fundamentals.pptx
 
Gitops Hands On
Gitops Hands OnGitops Hands On
Gitops Hands On
 
Red Hat OpenShift Container Platform Overview
Red Hat OpenShift Container Platform OverviewRed Hat OpenShift Container Platform Overview
Red Hat OpenShift Container Platform Overview
 
Kubernetes 101 - an Introduction to Containers, Kubernetes, and OpenShift
Kubernetes 101 - an Introduction to Containers, Kubernetes, and OpenShiftKubernetes 101 - an Introduction to Containers, Kubernetes, and OpenShift
Kubernetes 101 - an Introduction to Containers, Kubernetes, and OpenShift
 
Monitoring With Prometheus
Monitoring With PrometheusMonitoring With Prometheus
Monitoring With Prometheus
 
OpenShift-Technical-Overview.pdf
OpenShift-Technical-Overview.pdfOpenShift-Technical-Overview.pdf
OpenShift-Technical-Overview.pdf
 
OpenShift Virtualization - VM and OS Image Lifecycle
OpenShift Virtualization - VM and OS Image LifecycleOpenShift Virtualization - VM and OS Image Lifecycle
OpenShift Virtualization - VM and OS Image Lifecycle
 
Room 1 - 4 - Phạm Tường Chiến & Trần Văn Thắng - Deliver managed Kubernetes C...
Room 1 - 4 - Phạm Tường Chiến & Trần Văn Thắng - Deliver managed Kubernetes C...Room 1 - 4 - Phạm Tường Chiến & Trần Văn Thắng - Deliver managed Kubernetes C...
Room 1 - 4 - Phạm Tường Chiến & Trần Văn Thắng - Deliver managed Kubernetes C...
 
GitOps with ArgoCD
GitOps with ArgoCDGitOps with ArgoCD
GitOps with ArgoCD
 
Introduction to Helm
Introduction to HelmIntroduction to Helm
Introduction to Helm
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes Introduction
 
Cloud Native Engineering with SRE and GitOps
Cloud Native Engineering with SRE and GitOpsCloud Native Engineering with SRE and GitOps
Cloud Native Engineering with SRE and GitOps
 
Room 3 - 7 - Nguyễn Như Phúc Huy - Vitastor: a fast and simple Ceph-like bloc...
Room 3 - 7 - Nguyễn Như Phúc Huy - Vitastor: a fast and simple Ceph-like bloc...Room 3 - 7 - Nguyễn Như Phúc Huy - Vitastor: a fast and simple Ceph-like bloc...
Room 3 - 7 - Nguyễn Như Phúc Huy - Vitastor: a fast and simple Ceph-like bloc...
 
Room 2 - 1 - Phạm Quang Minh - A real DevOps culture in practice
Room 2 - 1 - Phạm Quang Minh - A real DevOps culture in practiceRoom 2 - 1 - Phạm Quang Minh - A real DevOps culture in practice
Room 2 - 1 - Phạm Quang Minh - A real DevOps culture in practice
 
Red Hat OpenShift on Bare Metal and Containerized Storage
Red Hat OpenShift on Bare Metal and Containerized StorageRed Hat OpenShift on Bare Metal and Containerized Storage
Red Hat OpenShift on Bare Metal and Containerized Storage
 
Kubernetes internals (Kubernetes 해부하기)
Kubernetes internals (Kubernetes 해부하기)Kubernetes internals (Kubernetes 해부하기)
Kubernetes internals (Kubernetes 해부하기)
 
Using GitHub Actions to Deploy your Workloads to Azure
Using GitHub Actions to Deploy your Workloads to AzureUsing GitHub Actions to Deploy your Workloads to Azure
Using GitHub Actions to Deploy your Workloads to Azure
 
Adopting OpenTelemetry
Adopting OpenTelemetryAdopting OpenTelemetry
Adopting OpenTelemetry
 
VMware Tanzu Kubernetes Connect
VMware Tanzu Kubernetes ConnectVMware Tanzu Kubernetes Connect
VMware Tanzu Kubernetes Connect
 
Rancher 2.0 Technical Deep Dive
Rancher 2.0 Technical Deep DiveRancher 2.0 Technical Deep Dive
Rancher 2.0 Technical Deep Dive
 

Similar to Security practices in OpenShift

Simplifying Multi-User SOLIDWORKS Implementations
Simplifying Multi-User SOLIDWORKS ImplementationsSimplifying Multi-User SOLIDWORKS Implementations
Simplifying Multi-User SOLIDWORKS ImplementationsHawk Ridge Systems
 
MySQL At Mastercard - 2018 MySQL Days
MySQL At Mastercard - 2018 MySQL DaysMySQL At Mastercard - 2018 MySQL Days
MySQL At Mastercard - 2018 MySQL DaysMark Swarbrick
 
Microservices with Node.js and Apache Cassandra
Microservices with Node.js and Apache CassandraMicroservices with Node.js and Apache Cassandra
Microservices with Node.js and Apache CassandraJorge Bay Gondra
 
PGEncryption_Tutorial
PGEncryption_TutorialPGEncryption_Tutorial
PGEncryption_TutorialVibhor Kumar
 
ArchivePod a legacy data solution when migrating to the #CLOUD
ArchivePod a legacy data solution when migrating to the #CLOUDArchivePod a legacy data solution when migrating to the #CLOUD
ArchivePod a legacy data solution when migrating to the #CLOUDGaret Keller
 
Configs, Configs, Everywhere! (Actually, Let's Simplify All Those Configs)
Configs, Configs, Everywhere! (Actually, Let's Simplify All Those Configs)Configs, Configs, Everywhere! (Actually, Let's Simplify All Those Configs)
Configs, Configs, Everywhere! (Actually, Let's Simplify All Those Configs)Akamai Developers & Admins
 
How You Convince Your Manager To Adopt Scala.js in Production
How You Convince Your Manager To Adopt Scala.js in ProductionHow You Convince Your Manager To Adopt Scala.js in Production
How You Convince Your Manager To Adopt Scala.js in ProductionBoldRadius Solutions
 
DataStax | Best Practices for Securing DataStax Enterprise (Matt Kennedy) | C...
DataStax | Best Practices for Securing DataStax Enterprise (Matt Kennedy) | C...DataStax | Best Practices for Securing DataStax Enterprise (Matt Kennedy) | C...
DataStax | Best Practices for Securing DataStax Enterprise (Matt Kennedy) | C...DataStax
 
MongoDB World 2018: Supercharge Your MongoDB Deployment with Ops Manager Auto...
MongoDB World 2018: Supercharge Your MongoDB Deployment with Ops Manager Auto...MongoDB World 2018: Supercharge Your MongoDB Deployment with Ops Manager Auto...
MongoDB World 2018: Supercharge Your MongoDB Deployment with Ops Manager Auto...MongoDB
 
Using Vault to decouple MySQL Secrets
Using Vault to decouple MySQL SecretsUsing Vault to decouple MySQL Secrets
Using Vault to decouple MySQL SecretsDerek Downey
 
CIS14: SCIM: Why It’s More Important, and More Simple, Than You Think
CIS14: SCIM: Why It’s More Important, and More Simple, Than You ThinkCIS14: SCIM: Why It’s More Important, and More Simple, Than You Think
CIS14: SCIM: Why It’s More Important, and More Simple, Than You ThinkCloudIDSummit
 
Webinar: Cloud Data Masking - Tips to Test Software Securely
Webinar: Cloud Data Masking - Tips to Test Software Securely Webinar: Cloud Data Masking - Tips to Test Software Securely
Webinar: Cloud Data Masking - Tips to Test Software Securely Skytap Cloud
 
SCIM: Why It’s More Important, and More Simple, Than You Think - CIS 2014
SCIM: Why It’s More Important, and More Simple, Than You Think - CIS 2014SCIM: Why It’s More Important, and More Simple, Than You Think - CIS 2014
SCIM: Why It’s More Important, and More Simple, Than You Think - CIS 2014Kelly Grizzle
 
MySQL Day Paris 2018 - MySQL InnoDB Cluster; A complete High Availability sol...
MySQL Day Paris 2018 - MySQL InnoDB Cluster; A complete High Availability sol...MySQL Day Paris 2018 - MySQL InnoDB Cluster; A complete High Availability sol...
MySQL Day Paris 2018 - MySQL InnoDB Cluster; A complete High Availability sol...Olivier DASINI
 
Integrated, Automated Video Room Systems - Webex Devices - Cisco Live Orlando...
Integrated, Automated Video Room Systems - Webex Devices - Cisco Live Orlando...Integrated, Automated Video Room Systems - Webex Devices - Cisco Live Orlando...
Integrated, Automated Video Room Systems - Webex Devices - Cisco Live Orlando...Cisco DevNet
 
Containerized MySQL OpenWorld talk
Containerized MySQL OpenWorld talkContainerized MySQL OpenWorld talk
Containerized MySQL OpenWorld talkPatrick Galbraith
 
Systemd evolution revolution_regression
Systemd evolution revolution_regressionSystemd evolution revolution_regression
Systemd evolution revolution_regressionSusant Sahani
 
Q Con New York 2015 Presentation - Conjur
Q Con New York 2015 Presentation - ConjurQ Con New York 2015 Presentation - Conjur
Q Con New York 2015 Presentation - Conjurconjur_inc
 

Similar to Security practices in OpenShift (20)

Cncf microservices security
Cncf microservices securityCncf microservices security
Cncf microservices security
 
Simplifying Multi-User SOLIDWORKS Implementations
Simplifying Multi-User SOLIDWORKS ImplementationsSimplifying Multi-User SOLIDWORKS Implementations
Simplifying Multi-User SOLIDWORKS Implementations
 
MySQL At Mastercard - 2018 MySQL Days
MySQL At Mastercard - 2018 MySQL DaysMySQL At Mastercard - 2018 MySQL Days
MySQL At Mastercard - 2018 MySQL Days
 
Microservices with Node.js and Apache Cassandra
Microservices with Node.js and Apache CassandraMicroservices with Node.js and Apache Cassandra
Microservices with Node.js and Apache Cassandra
 
PGEncryption_Tutorial
PGEncryption_TutorialPGEncryption_Tutorial
PGEncryption_Tutorial
 
ArchivePod a legacy data solution when migrating to the #CLOUD
ArchivePod a legacy data solution when migrating to the #CLOUDArchivePod a legacy data solution when migrating to the #CLOUD
ArchivePod a legacy data solution when migrating to the #CLOUD
 
Configs, Configs, Everywhere! (Actually, Let's Simplify All Those Configs)
Configs, Configs, Everywhere! (Actually, Let's Simplify All Those Configs)Configs, Configs, Everywhere! (Actually, Let's Simplify All Those Configs)
Configs, Configs, Everywhere! (Actually, Let's Simplify All Those Configs)
 
How You Convince Your Manager To Adopt Scala.js in Production
How You Convince Your Manager To Adopt Scala.js in ProductionHow You Convince Your Manager To Adopt Scala.js in Production
How You Convince Your Manager To Adopt Scala.js in Production
 
MySQL NoSQL APIs
MySQL NoSQL APIsMySQL NoSQL APIs
MySQL NoSQL APIs
 
DataStax | Best Practices for Securing DataStax Enterprise (Matt Kennedy) | C...
DataStax | Best Practices for Securing DataStax Enterprise (Matt Kennedy) | C...DataStax | Best Practices for Securing DataStax Enterprise (Matt Kennedy) | C...
DataStax | Best Practices for Securing DataStax Enterprise (Matt Kennedy) | C...
 
MongoDB World 2018: Supercharge Your MongoDB Deployment with Ops Manager Auto...
MongoDB World 2018: Supercharge Your MongoDB Deployment with Ops Manager Auto...MongoDB World 2018: Supercharge Your MongoDB Deployment with Ops Manager Auto...
MongoDB World 2018: Supercharge Your MongoDB Deployment with Ops Manager Auto...
 
Using Vault to decouple MySQL Secrets
Using Vault to decouple MySQL SecretsUsing Vault to decouple MySQL Secrets
Using Vault to decouple MySQL Secrets
 
CIS14: SCIM: Why It’s More Important, and More Simple, Than You Think
CIS14: SCIM: Why It’s More Important, and More Simple, Than You ThinkCIS14: SCIM: Why It’s More Important, and More Simple, Than You Think
CIS14: SCIM: Why It’s More Important, and More Simple, Than You Think
 
Webinar: Cloud Data Masking - Tips to Test Software Securely
Webinar: Cloud Data Masking - Tips to Test Software Securely Webinar: Cloud Data Masking - Tips to Test Software Securely
Webinar: Cloud Data Masking - Tips to Test Software Securely
 
SCIM: Why It’s More Important, and More Simple, Than You Think - CIS 2014
SCIM: Why It’s More Important, and More Simple, Than You Think - CIS 2014SCIM: Why It’s More Important, and More Simple, Than You Think - CIS 2014
SCIM: Why It’s More Important, and More Simple, Than You Think - CIS 2014
 
MySQL Day Paris 2018 - MySQL InnoDB Cluster; A complete High Availability sol...
MySQL Day Paris 2018 - MySQL InnoDB Cluster; A complete High Availability sol...MySQL Day Paris 2018 - MySQL InnoDB Cluster; A complete High Availability sol...
MySQL Day Paris 2018 - MySQL InnoDB Cluster; A complete High Availability sol...
 
Integrated, Automated Video Room Systems - Webex Devices - Cisco Live Orlando...
Integrated, Automated Video Room Systems - Webex Devices - Cisco Live Orlando...Integrated, Automated Video Room Systems - Webex Devices - Cisco Live Orlando...
Integrated, Automated Video Room Systems - Webex Devices - Cisco Live Orlando...
 
Containerized MySQL OpenWorld talk
Containerized MySQL OpenWorld talkContainerized MySQL OpenWorld talk
Containerized MySQL OpenWorld talk
 
Systemd evolution revolution_regression
Systemd evolution revolution_regressionSystemd evolution revolution_regression
Systemd evolution revolution_regression
 
Q Con New York 2015 Presentation - Conjur
Q Con New York 2015 Presentation - ConjurQ Con New York 2015 Presentation - Conjur
Q Con New York 2015 Presentation - Conjur
 

Recently uploaded

GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...apidays
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 

Recently uploaded (20)

GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 

Security practices in OpenShift

  • 1. Security Practices in OpenShift as experienced @ Amadeus Nenad Bogojević Amadeus S.A.S. Diogenes Rettori Red Hat 2017 ©AmadeusITGroupanditsaffiliatesandsubsidiaries
  • 2. _Provides IT services for travel industry _Operates e-commerce web sites, payment processing, b2b services in travel _Using OpenShift 3 since 2 years • In own datacenters, in public clouds 2 ©AmadeusITGroupanditsaffiliatesandsubsidiaries Amadeus In one slide
  • 3. _Protecting assets • computing capacity, data _Personal information • General Data Protection Regulation (GDPR) _e-Commerce & payment processing • PCI/DSS 3 ©AmadeusITGroupanditsaffiliatesandsubsidiaries Why security And not the one like in picture
  • 4. _OpenShift & Containers • Lot of things are changing • Old rules may not be applicable • Risks are still out there 4 ©AmadeusITGroupanditsaffiliatesandsubsidiaries How? To be better than the one like in picture
  • 5. _OpenShift & Containers • Lot of things are changing • Old rules may not be applicable • Risks are still out there EVERYONE ON BOARD 5 ©AmadeusITGroupanditsaffiliatesandsubsidiaries How? To be better than the one like in picture
  • 8. Use OpenStack on our hardware Or public cloud providers 8 ©AmadeusITGroupanditsaffiliatesandsubsidiaries Preparing infrastructure And security _Pre-constructed VM images • mirrored repositories & registries • scanned using OpenSCAP _Network design • Where are DMZ and layered protection? • OpenStack – security groups _Access control (bastion server) _Upgrade policy • Rebuild vs rolling • Bi-weekly/monthly
  • 9. 9 ©AmadeusITGroupanditsaffiliatesandsubsidiaries OpenShift Security Architecture Different kind of network zones Users DevOps Developers App Nodes Infra Nodes Bastion Repository CI/CD SSH Masters HTTPS Repository pull SDN @
  • 15. _Way of managing & distributing sensitive information • keys, certificates, passwords, usernames _Separate sensitive information management from application pods • Secured delivery to nodes (TLS) • Only present in memory on openshift nodes • Centralized management • Easy access from application • Environment variables • Volumes 15 ©AmadeusITGroupanditsaffiliatesandsubsidiaries OpenShift Secrets Decoupling sensitive information from applications
  • 16. 16 ©AmadeusITGroupanditsaffiliatesandsubsidiaries Using Secrets Security as code apiVersion: v1 kind: Pod metadata: name: use-secret-pod spec: containers: - name: secret-test-container image: myapp env: - name: SECRET_USERNAME valueFrom: secretKeyRef: name: top-secret key: username restartPolicy: Always apiVersion: v1 kind: Secret metadata: name: top-secret data: username: bmVuYWQ= password: aWtuZXd5b3V3b3VsZHRyeXRoaXM= Masters
  • 17. _Stored in (almost) clear • in etcd on masters • on tmp storage on nodes • accessible through API _How about vaults? 17 ©AmadeusITGroupanditsaffiliatesandsubsidiaries OpenShift Secrets – „Less Great Things“ Handbrake for certification
  • 18. _You already have big issue if someone compromised your infrastructure _Encrypt disks _Store in vault, with decryption service • Side-car or init containers • Security as a service _Compensating controls 18 ©AmadeusITGroupanditsaffiliatesandsubsidiaries Some solutions It’s not show-stopper
  • 19. _OpenShift provides log of activities that have affected system by individual users, administrators, or other components of the system. _Activate on master /etc/origin/master/master-config.yaml 19 ©AmadeusITGroupanditsaffiliatesandsubsidiaries OpenShift Audit Log auditConfig: enabled: true AUDIT: id="5c3b8227-4af9-4322-8a71-542231c3887b" ip="127.0.0.1" method="GET" user="nenad" as="<self>" namespace="someproject" uri="/api/v1/namespaces/someproject/secrets" AUDIT: id="5c3b8227-4af9-4322-8a71-542231c3887b" response="401"
  • 21. _OpenShift master - know if someone plays with etcd 21 ©AmadeusITGroupanditsaffiliatesandsubsidiaries auditd rules for masters Monitoring etcd -a always,exit -F arch=b64 -S creat -S open -S openat -S open_by_handle_at -S truncate -S ftruncate –F dir=/var/lib/etcd -k openshift_etcd
  • 22. _Secrets mounted as tmpfs inside /var/lib/opesnift. _When new secret is mounted add it to auditd rules • When new secret is unmounted remove it to from auditd rules _All monitorable secrets must have certain string in name • (e.g. secret~example) _If you open or close secrets often, it may generate a lot of messages 22 ©AmadeusITGroupanditsaffiliatesandsubsidiaries ..and on nodes Monitoring secret findmnt --list --noheadings --types tmpfs --poll --output ACTION,TARGET | grep secret~example | awk ‘$1 == “mount” { print $2 }‘ | xargs -L 1 -i auditctl --a always,exit -F arch=b64 -S creat -S open -S openat -S open_by_handle_at -S truncate -S ftruncate -F dir={} -k openshift_secret findmnt --list --noheadings --types tmpfs --poll --output ACTION,TARGET | grep secret~example | awk ‘$1 == “unmount” { print $2 }‘ | xargs -L 1 -i auditctl --d always,exit -F arch=64 -S creat -S open -S openat -S open_by_handle_at -S truncate -S ftruncate -F dir={} -k openshift_secret
  • 24. _Secure communication inside or outside your cluster _Service annotated with service.alpha.openshift.io/serving-cert-secret- name=name _Certificate automatically generated and provided as a secret to pod _Clients can rely on automatically mounted CA /var/run/secrets/kubernetes.io/serviceaccount/ service-ca.crt 24 ©AmadeusITGroupanditsaffiliatesandsubsidiaries Service Signing Certificate clientpod mongodb.myproject.svc
  • 26. • We want to empower developer • Let’s be agile! • Run as root • Privileged containers – hostpath • port < 1000 • Running old containers • FROM httpd:2.4.12 • There’s this cool blackhat/jboss container on docker hub, let’s pull it 26 ©AmadeusITGroupanditsaffiliatesandsubsidiaries Containers & Developers
  • 27. • We want to empower developer • Let’s be agile! • Run as root • Privileged containers – hostpath • port < 1000 • Running old containers • FROM httpd:2.4.12 • There’s this cool blackhat/jboss container on docker hub, let’s pull it 27 ©AmadeusITGroupanditsaffiliatesandsubsidiaries Containers & Developers When will they learn!
  • 28. _Support arbitrary user ids • Use root group chown -R someuser:root /app && chmod –R g+rwX /app _Your application needs to listen on port 80? • Can’t you change it? _Use SCC (Security Context Constraint) • privileged containers, host paths, user id, FS Groups, selinux, capabilities _seccomp if you want to restrict even more 28 ©AmadeusITGroupanditsaffiliatesandsubsidiaries Root Access Not allowed apiVersion: v1 kind: Service metadata: name: httpd spec: ports: - port: 80 targetPort: 10080 protocol: TCP
  • 29. _All images come from internal registry _Using RHEL as base images • RedHat repository mirrored into internal _Other images must be built internally from source code _No automatic access to docker hub from build machines _Production access it’s own repository with only validated images 29 ©AmadeusITGroupanditsaffiliatesandsubsidiaries Image control Secured source access.redhat.com/containers
  • 30. _Can we run security scan on image before it runs? • image-inspector • oscap-docker _Run OpenSCAP on a docker image and serve result docker run -ti --rm --privileged -p 8080:8080 -v /var/run/docker.sock:/var/run/docker.sock openshift/image-inspector --image=some-application:20 --path=/tmp/image-content --serve 0.0.0.0:8080 --scan- type=openscap _Used during build process 30 ©AmadeusITGroupanditsaffiliatesandsubsidiaries Old images and security vulnerabilities image-inspector
  • 31. _Platform can be secured from container vulnerabilities • containers do bring risk, but it can be managed _Platform will not solve application vulnerabilities • but it can help • true multitenancy is complex _Start with the principle of least access • grant new capabilities to applications only when needed 31 ©AmadeusITGroupanditsaffiliatesandsubsidiaries Guiding thoughts
  • 32. Encryption of Secrets! Network policies – internal and egress Generic/pluggable image-inspector? More fine-grained RBAC. 32 ©AmadeusITGroupanditsaffiliatesandsubsidiaries What we miss This might be roadmap
  • 33. Thank you! ©AmadeusITGroupanditsaffiliatesandsubsidiaries You can follow us on: AmadeusITgroup amadeus.com amadeus.com/blog