SlideShare a Scribd company logo
1 of 31
Download to read offline
Can you keep a secret?
Moisieienko Valerii
XP Days 2017
Who Is This Guy?
• Senior Application Engineer @ Oracle UGBU
• 8+ years in commercial software development
• Oracle Certified Professional
• MapR Certified HBase Developer
• Masters Degree in Information Security
Notification
This presentation is based on my personal experience
and does not represent official position of Oracle
company.
Everybody Has A Secret
• Database credentials
• Third-party API keys
• License keys
• Sensitive environment variables
And How Do We Usually
Keep Them ?
database:

connections:

default:

url: jdbc:mysql://my.db.server:3306/example_service

user: service_user

password: superStrongPassword
apiToken: 8d07b5e9-fbb2-4499-a3c4-053190a78827
Private Code Repository
Authentification
But No Authorisation
The Task
• Reliable secret storage
• Data encryption support
• Flexible user authentication backend
• Authorization
• Convenient interaction for humans and applications
Possible Solutions
• HSMs
• Amazon KMS
• Keywhiz
• Conjur
• HashiCorp Vault
HashiCorp Vault
• Secure Secret Storage
• Data Encryption
• Access Control
• Pluggable Auth & Storage Backends
• Vault Client & HTTP API
Getting Started
• Vault Server
• Secrets
• Policies
• Authentification
• Tokens
Vault Server
vault server -dev
vault server -config=
server_config.hcl
export VAULT_ADDR=
'http://127.0.0.1:8200'
storage "mysql" {
username = "vault"
password = "iamvault"
database = "vault"
}
listener "tcp" {
address = "127.0.0.1:8200"
tls_disable = 1
}
Secrets
vault write secret/v1/my/secrets <key1>=<value1>
<key2>=<value2> <key3>=<value3>
vault read secret/v1/my/secrets
vault delete secret/v1/my/secrets
vault path-help secret/
Policies
vault policy-write
myfirstpolicy policy.hcl
path "secret/*" {
capabilities = ["create"]
}
path "secret/read/only" {
capabilities = ["read"]
}
path "auth/token/lookup-
self" {
capabilities = ["read"]
}
Tokens
vault token-create -policy=
<policy_name>
vault auth <token>
vault token-revoke
<token>
token
d5da8c66-1b37-6916-85cc-319
2a135f9a1
token_accessor
ae97c557-e416-8d98-
b815-7394b0d7bcbb
token_duration 768h0m0s
token_renewable true
token_policies [default
myfirstpolicy]
Authentification
vault auth-enable github
vault write auth/github/config organization=<github_org>
vault write auth/github/map/teams/default value=default
vault auth -method=github token=<github_token>
vault auth-disable github
Vault Integration
• Define secrets
• Create application role
• Create policies
• Provide policy mapping
• Place secrets to Vault
• Adjust application
• Summon
Application Role
vault write auth/token/roles/role.service.example-service
allowed_policies="policy.service.example-service"
Polices
• Admin policy
• Application policy
Admin Policy
example-service-admin.hcl
# Admins can read/write secrets for their service

path "secret/service/example_service/v1/*" {

capabilities = ["create", "read", "update", "delete",
"list"]

}



# Admins can provision tokens for their service

path "auth/token/create/role.service.example-service" {

capabilities = ["create", "update"]

}
Application Policy
example-service.hcl
path "secret/service/example_service/v1/*" {

capabilities = ["read", "list"]

}
Writing Policies
vault policy-write policy.service.example-service.admin
example-service-admin.hcl
vault policy-write policy.service.example-service
example-service.hcl
# Specific to particular auth backend
vault write auth/github/map/teams/default
value=policy.service.example-service.admin
Secrets Go To Vault
vault write secret/service/example_service/v1/
db_properties jdbc.url=<jdbc_url>
jdbc.username=<username> jdbc.password=<password>
Application Adjustment
Application adjustment
secrets file
DB_URL: !var secret/service/example_service/v1/
db_properties:jdbc.url
DB_USERNAME: !var secret/service/example_service/v1/
db_properties:jdbc.username
DB_PASSWORD: !var secret/service/example_service/v1/
db_properties:jdbc.password
Application adjustment
properties file
database:

jdbcUrl: ENV[DB_URL]

user: ENV[DB_USERNAME]

password: ENV[DB_PASSWORD]
Application adjustment
Environment Variable Lookup
private static final Pattern SECRETS_PATTERN = 

Pattern.compile("ENV[(.*)]");



public String resolvePropertyValue(String value) {

Matcher matcher = SECRETS_PATTERN.matcher(value);

if (matcher.find()) {

return System.getenv(matcher.group(1));

}

else {

return value;

}

}
Summon
• Install
brew tap conjurinc/tools
brew install summon
• Vault Provider
mv summon-vault /usr/local/lib/summon/
chmod 755 /usr/local/lib/summon/summon-vault
• Check
VAULT_TOKEN=<TOKEN> summon --provider summon-vault -f
secrets.yml ruby -e 'puts ENV["DB_URL"]'
Integration Demo
Pros And Cons
+ Easy setup
+ Master key sharing
+ Pluggable storage and auth backends
+ Straight forward policy control
+ Provides client and HTTP API
- Application integration
- Token renewal mechanism
Thank you!
You are welcome to write me at
valeramoiseenko@gmail.com
GitHub
https://github.com/moisieienko-valerii/vault-dropwizard

More Related Content

What's hot

Identity Security - Azure Active Directory
Identity Security - Azure Active DirectoryIdentity Security - Azure Active Directory
Identity Security - Azure Active DirectoryEng Teong Cheah
 
Zero Credential Development with Managed Identities
Zero Credential Development with Managed IdentitiesZero Credential Development with Managed Identities
Zero Credential Development with Managed IdentitiesJoonas Westlin
 
Mobile Authentication for iOS Applications - Stormpath 101
Mobile Authentication for iOS Applications - Stormpath 101Mobile Authentication for iOS Applications - Stormpath 101
Mobile Authentication for iOS Applications - Stormpath 101Stormpath
 
Building a document e-signing workflow with Azure Durable Functions
Building a document e-signing workflow with Azure Durable FunctionsBuilding a document e-signing workflow with Azure Durable Functions
Building a document e-signing workflow with Azure Durable FunctionsJoonas Westlin
 
How to Use Stormpath in angular js
How to Use Stormpath in angular jsHow to Use Stormpath in angular js
How to Use Stormpath in angular jsStormpath
 
O365Con18 - Red Team vs Blue Team - Sasha Kranjac & Mustafa Toroman
O365Con18 - Red Team vs Blue Team - Sasha Kranjac & Mustafa ToromanO365Con18 - Red Team vs Blue Team - Sasha Kranjac & Mustafa Toroman
O365Con18 - Red Team vs Blue Team - Sasha Kranjac & Mustafa ToromanNCCOMMS
 
O365Con18 - Azure Active Directory - Sasha Kranjac & Mustafa Toroman
O365Con18 - Azure Active Directory - Sasha Kranjac & Mustafa ToromanO365Con18 - Azure Active Directory - Sasha Kranjac & Mustafa Toroman
O365Con18 - Azure Active Directory - Sasha Kranjac & Mustafa ToromanNCCOMMS
 
Building a Node.js API backend with LoopBack in 5 Minutes
Building a Node.js API backend with LoopBack in 5 MinutesBuilding a Node.js API backend with LoopBack in 5 Minutes
Building a Node.js API backend with LoopBack in 5 MinutesRaymond Feng
 
Zero Credential Development with Managed Identities for Azure resources
Zero Credential Development with Managed Identities for Azure resourcesZero Credential Development with Managed Identities for Azure resources
Zero Credential Development with Managed Identities for Azure resourcesJoonas Westlin
 
Using an in-house WordPress framework
Using an  in-house WordPress frameworkUsing an  in-house WordPress framework
Using an in-house WordPress frameworkpeterwilsoncc
 
Instant Security & Scalable User Management with Spring Boot
Instant Security & Scalable User Management with Spring BootInstant Security & Scalable User Management with Spring Boot
Instant Security & Scalable User Management with Spring BootStormpath
 
Elastic & Azure & Episever, Case Evira
Elastic & Azure & Episever, Case EviraElastic & Azure & Episever, Case Evira
Elastic & Azure & Episever, Case EviraMikko Huilaja
 
SEC303 Top 10 AWS Identity and Access Management Best Practices - AWS re:Inve...
SEC303 Top 10 AWS Identity and Access Management Best Practices - AWS re:Inve...SEC303 Top 10 AWS Identity and Access Management Best Practices - AWS re:Inve...
SEC303 Top 10 AWS Identity and Access Management Best Practices - AWS re:Inve...Amazon Web Services
 
Making Sense of API Access Control
Making Sense of API Access ControlMaking Sense of API Access Control
Making Sense of API Access ControlCA API Management
 
Episerver and search engines
Episerver and search enginesEpiserver and search engines
Episerver and search enginesMikko Huilaja
 
Working with LoopBack Models
Working with LoopBack ModelsWorking with LoopBack Models
Working with LoopBack ModelsRaymond Feng
 
Scout xss csrf_security_presentation_chicago
Scout xss csrf_security_presentation_chicagoScout xss csrf_security_presentation_chicago
Scout xss csrf_security_presentation_chicagoknaddison
 
JWTs in Java for CSRF and Microservices
JWTs in Java for CSRF and MicroservicesJWTs in Java for CSRF and Microservices
JWTs in Java for CSRF and MicroservicesStormpath
 
Rev Your Engines - SharePoint Performance Enhancements
Rev Your Engines - SharePoint Performance EnhancementsRev Your Engines - SharePoint Performance Enhancements
Rev Your Engines - SharePoint Performance EnhancementsEric Shupps
 
Ako prepojiť aplikáciu s Elasticsearch
Ako prepojiť aplikáciu s ElasticsearchAko prepojiť aplikáciu s Elasticsearch
Ako prepojiť aplikáciu s Elasticsearchbart-sk
 

What's hot (20)

Identity Security - Azure Active Directory
Identity Security - Azure Active DirectoryIdentity Security - Azure Active Directory
Identity Security - Azure Active Directory
 
Zero Credential Development with Managed Identities
Zero Credential Development with Managed IdentitiesZero Credential Development with Managed Identities
Zero Credential Development with Managed Identities
 
Mobile Authentication for iOS Applications - Stormpath 101
Mobile Authentication for iOS Applications - Stormpath 101Mobile Authentication for iOS Applications - Stormpath 101
Mobile Authentication for iOS Applications - Stormpath 101
 
Building a document e-signing workflow with Azure Durable Functions
Building a document e-signing workflow with Azure Durable FunctionsBuilding a document e-signing workflow with Azure Durable Functions
Building a document e-signing workflow with Azure Durable Functions
 
How to Use Stormpath in angular js
How to Use Stormpath in angular jsHow to Use Stormpath in angular js
How to Use Stormpath in angular js
 
O365Con18 - Red Team vs Blue Team - Sasha Kranjac & Mustafa Toroman
O365Con18 - Red Team vs Blue Team - Sasha Kranjac & Mustafa ToromanO365Con18 - Red Team vs Blue Team - Sasha Kranjac & Mustafa Toroman
O365Con18 - Red Team vs Blue Team - Sasha Kranjac & Mustafa Toroman
 
O365Con18 - Azure Active Directory - Sasha Kranjac & Mustafa Toroman
O365Con18 - Azure Active Directory - Sasha Kranjac & Mustafa ToromanO365Con18 - Azure Active Directory - Sasha Kranjac & Mustafa Toroman
O365Con18 - Azure Active Directory - Sasha Kranjac & Mustafa Toroman
 
Building a Node.js API backend with LoopBack in 5 Minutes
Building a Node.js API backend with LoopBack in 5 MinutesBuilding a Node.js API backend with LoopBack in 5 Minutes
Building a Node.js API backend with LoopBack in 5 Minutes
 
Zero Credential Development with Managed Identities for Azure resources
Zero Credential Development with Managed Identities for Azure resourcesZero Credential Development with Managed Identities for Azure resources
Zero Credential Development with Managed Identities for Azure resources
 
Using an in-house WordPress framework
Using an  in-house WordPress frameworkUsing an  in-house WordPress framework
Using an in-house WordPress framework
 
Instant Security & Scalable User Management with Spring Boot
Instant Security & Scalable User Management with Spring BootInstant Security & Scalable User Management with Spring Boot
Instant Security & Scalable User Management with Spring Boot
 
Elastic & Azure & Episever, Case Evira
Elastic & Azure & Episever, Case EviraElastic & Azure & Episever, Case Evira
Elastic & Azure & Episever, Case Evira
 
SEC303 Top 10 AWS Identity and Access Management Best Practices - AWS re:Inve...
SEC303 Top 10 AWS Identity and Access Management Best Practices - AWS re:Inve...SEC303 Top 10 AWS Identity and Access Management Best Practices - AWS re:Inve...
SEC303 Top 10 AWS Identity and Access Management Best Practices - AWS re:Inve...
 
Making Sense of API Access Control
Making Sense of API Access ControlMaking Sense of API Access Control
Making Sense of API Access Control
 
Episerver and search engines
Episerver and search enginesEpiserver and search engines
Episerver and search engines
 
Working with LoopBack Models
Working with LoopBack ModelsWorking with LoopBack Models
Working with LoopBack Models
 
Scout xss csrf_security_presentation_chicago
Scout xss csrf_security_presentation_chicagoScout xss csrf_security_presentation_chicago
Scout xss csrf_security_presentation_chicago
 
JWTs in Java for CSRF and Microservices
JWTs in Java for CSRF and MicroservicesJWTs in Java for CSRF and Microservices
JWTs in Java for CSRF and Microservices
 
Rev Your Engines - SharePoint Performance Enhancements
Rev Your Engines - SharePoint Performance EnhancementsRev Your Engines - SharePoint Performance Enhancements
Rev Your Engines - SharePoint Performance Enhancements
 
Ako prepojiť aplikáciu s Elasticsearch
Ako prepojiť aplikáciu s ElasticsearchAko prepojiť aplikáciu s Elasticsearch
Ako prepojiť aplikáciu s Elasticsearch
 

Similar to Can you keep a secret? (XP Days 2017)

Bsidesnova- Pentesting Methodology - Making bits less complicated
Bsidesnova- Pentesting Methodology - Making bits less complicatedBsidesnova- Pentesting Methodology - Making bits less complicated
Bsidesnova- Pentesting Methodology - Making bits less complicatedOctavio Paguaga
 
What is tackled in the Java EE Security API (Java EE 8)
What is tackled in the Java EE Security API (Java EE 8)What is tackled in the Java EE Security API (Java EE 8)
What is tackled in the Java EE Security API (Java EE 8)Rudy De Busscher
 
Java EE Security API - JSR375: Getting Started
Java EE Security API - JSR375: Getting Started Java EE Security API - JSR375: Getting Started
Java EE Security API - JSR375: Getting Started Rudy De Busscher
 
Securing Microservices using Play and Akka HTTP
Securing Microservices using Play and Akka HTTPSecuring Microservices using Play and Akka HTTP
Securing Microservices using Play and Akka HTTPRafal Gancarz
 
JavaOne 2014 - Supporting Multi-tenancy Applications with Java EE
JavaOne 2014 - Supporting Multi-tenancy Applications with Java EEJavaOne 2014 - Supporting Multi-tenancy Applications with Java EE
JavaOne 2014 - Supporting Multi-tenancy Applications with Java EERodrigo Cândido da Silva
 
First Look at Azure Logic Apps (BAUG)
First Look at Azure Logic Apps (BAUG)First Look at Azure Logic Apps (BAUG)
First Look at Azure Logic Apps (BAUG)Daniel Toomey
 
Building APIs in an easy way using API Platform
Building APIs in an easy way using API PlatformBuilding APIs in an easy way using API Platform
Building APIs in an easy way using API PlatformAntonio Peric-Mazar
 
Enterprise-class security with PostgreSQL - 1
Enterprise-class security with PostgreSQL - 1Enterprise-class security with PostgreSQL - 1
Enterprise-class security with PostgreSQL - 1Ashnikbiz
 
Azure Low Lands 2019 - Building secure cloud applications with Azure Key Vault
Azure Low Lands 2019 - Building secure cloud applications with Azure Key VaultAzure Low Lands 2019 - Building secure cloud applications with Azure Key Vault
Azure Low Lands 2019 - Building secure cloud applications with Azure Key VaultTom Kerkhove
 
HashiConf Digital 2020: HashiCorp Vault configuration as code via HashiCorp T...
HashiConf Digital 2020: HashiCorp Vault configuration as code via HashiCorp T...HashiConf Digital 2020: HashiCorp Vault configuration as code via HashiCorp T...
HashiConf Digital 2020: HashiCorp Vault configuration as code via HashiCorp T...Andrey Devyatkin
 
Iac :: Lessons Learned from Dev to Ops
Iac :: Lessons Learned from Dev to OpsIac :: Lessons Learned from Dev to Ops
Iac :: Lessons Learned from Dev to OpsEmma Button
 
So I DevSecOpsed Office 365
So I DevSecOpsed Office 365So I DevSecOpsed Office 365
So I DevSecOpsed Office 365Alex Mags
 
Protecting Your Data with Encryption on AWS
Protecting Your Data with Encryption on AWSProtecting Your Data with Encryption on AWS
Protecting Your Data with Encryption on AWSAmazon Web Services
 
Externalizing Authorization in Micro Services world
Externalizing Authorization in Micro Services worldExternalizing Authorization in Micro Services world
Externalizing Authorization in Micro Services worldSitaraman Lakshminarayanan
 
Microsoft 365 De Security pdf
Microsoft 365 De Security pdfMicrosoft 365 De Security pdf
Microsoft 365 De Security pdfMarkus Moeller
 
Preparing for Data Residency and Custom Domains
Preparing for Data Residency and Custom DomainsPreparing for Data Residency and Custom Domains
Preparing for Data Residency and Custom DomainsAtlassian
 
HashiCorp Vault configuration as code via HashiCorp Terraform- stories from t...
HashiCorp Vault configuration as code via HashiCorp Terraform- stories from t...HashiCorp Vault configuration as code via HashiCorp Terraform- stories from t...
HashiCorp Vault configuration as code via HashiCorp Terraform- stories from t...Andrey Devyatkin
 

Similar to Can you keep a secret? (XP Days 2017) (20)

Bsidesnova- Pentesting Methodology - Making bits less complicated
Bsidesnova- Pentesting Methodology - Making bits less complicatedBsidesnova- Pentesting Methodology - Making bits less complicated
Bsidesnova- Pentesting Methodology - Making bits less complicated
 
What is tackled in the Java EE Security API (Java EE 8)
What is tackled in the Java EE Security API (Java EE 8)What is tackled in the Java EE Security API (Java EE 8)
What is tackled in the Java EE Security API (Java EE 8)
 
Java EE Security API - JSR375: Getting Started
Java EE Security API - JSR375: Getting Started Java EE Security API - JSR375: Getting Started
Java EE Security API - JSR375: Getting Started
 
Securing Microservices using Play and Akka HTTP
Securing Microservices using Play and Akka HTTPSecuring Microservices using Play and Akka HTTP
Securing Microservices using Play and Akka HTTP
 
21 05-2018
21 05-201821 05-2018
21 05-2018
 
JavaOne 2014 - Supporting Multi-tenancy Applications with Java EE
JavaOne 2014 - Supporting Multi-tenancy Applications with Java EEJavaOne 2014 - Supporting Multi-tenancy Applications with Java EE
JavaOne 2014 - Supporting Multi-tenancy Applications with Java EE
 
First Look at Azure Logic Apps (BAUG)
First Look at Azure Logic Apps (BAUG)First Look at Azure Logic Apps (BAUG)
First Look at Azure Logic Apps (BAUG)
 
Building APIs in an easy way using API Platform
Building APIs in an easy way using API PlatformBuilding APIs in an easy way using API Platform
Building APIs in an easy way using API Platform
 
Rails Security
Rails SecurityRails Security
Rails Security
 
Enterprise-class security with PostgreSQL - 1
Enterprise-class security with PostgreSQL - 1Enterprise-class security with PostgreSQL - 1
Enterprise-class security with PostgreSQL - 1
 
Azure Low Lands 2019 - Building secure cloud applications with Azure Key Vault
Azure Low Lands 2019 - Building secure cloud applications with Azure Key VaultAzure Low Lands 2019 - Building secure cloud applications with Azure Key Vault
Azure Low Lands 2019 - Building secure cloud applications with Azure Key Vault
 
HashiConf Digital 2020: HashiCorp Vault configuration as code via HashiCorp T...
HashiConf Digital 2020: HashiCorp Vault configuration as code via HashiCorp T...HashiConf Digital 2020: HashiCorp Vault configuration as code via HashiCorp T...
HashiConf Digital 2020: HashiCorp Vault configuration as code via HashiCorp T...
 
Iac :: Lessons Learned from Dev to Ops
Iac :: Lessons Learned from Dev to OpsIac :: Lessons Learned from Dev to Ops
Iac :: Lessons Learned from Dev to Ops
 
So I DevSecOpsed Office 365
So I DevSecOpsed Office 365So I DevSecOpsed Office 365
So I DevSecOpsed Office 365
 
Protecting Your Data with Encryption on AWS
Protecting Your Data with Encryption on AWSProtecting Your Data with Encryption on AWS
Protecting Your Data with Encryption on AWS
 
Understanding AWS Security
Understanding AWS SecurityUnderstanding AWS Security
Understanding AWS Security
 
Externalizing Authorization in Micro Services world
Externalizing Authorization in Micro Services worldExternalizing Authorization in Micro Services world
Externalizing Authorization in Micro Services world
 
Microsoft 365 De Security pdf
Microsoft 365 De Security pdfMicrosoft 365 De Security pdf
Microsoft 365 De Security pdf
 
Preparing for Data Residency and Custom Domains
Preparing for Data Residency and Custom DomainsPreparing for Data Residency and Custom Domains
Preparing for Data Residency and Custom Domains
 
HashiCorp Vault configuration as code via HashiCorp Terraform- stories from t...
HashiCorp Vault configuration as code via HashiCorp Terraform- stories from t...HashiCorp Vault configuration as code via HashiCorp Terraform- stories from t...
HashiCorp Vault configuration as code via HashiCorp Terraform- stories from t...
 

Recently uploaded

Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfCionsystems
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 

Recently uploaded (20)

Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdf
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 

Can you keep a secret? (XP Days 2017)

  • 1. Can you keep a secret? Moisieienko Valerii XP Days 2017
  • 2. Who Is This Guy? • Senior Application Engineer @ Oracle UGBU • 8+ years in commercial software development • Oracle Certified Professional • MapR Certified HBase Developer • Masters Degree in Information Security
  • 3. Notification This presentation is based on my personal experience and does not represent official position of Oracle company.
  • 4. Everybody Has A Secret • Database credentials • Third-party API keys • License keys • Sensitive environment variables
  • 5. And How Do We Usually Keep Them ? database:
 connections:
 default:
 url: jdbc:mysql://my.db.server:3306/example_service
 user: service_user
 password: superStrongPassword apiToken: 8d07b5e9-fbb2-4499-a3c4-053190a78827
  • 8. The Task • Reliable secret storage • Data encryption support • Flexible user authentication backend • Authorization • Convenient interaction for humans and applications
  • 9. Possible Solutions • HSMs • Amazon KMS • Keywhiz • Conjur • HashiCorp Vault
  • 10. HashiCorp Vault • Secure Secret Storage • Data Encryption • Access Control • Pluggable Auth & Storage Backends • Vault Client & HTTP API
  • 11. Getting Started • Vault Server • Secrets • Policies • Authentification • Tokens
  • 12. Vault Server vault server -dev vault server -config= server_config.hcl export VAULT_ADDR= 'http://127.0.0.1:8200' storage "mysql" { username = "vault" password = "iamvault" database = "vault" } listener "tcp" { address = "127.0.0.1:8200" tls_disable = 1 }
  • 13. Secrets vault write secret/v1/my/secrets <key1>=<value1> <key2>=<value2> <key3>=<value3> vault read secret/v1/my/secrets vault delete secret/v1/my/secrets vault path-help secret/
  • 14. Policies vault policy-write myfirstpolicy policy.hcl path "secret/*" { capabilities = ["create"] } path "secret/read/only" { capabilities = ["read"] } path "auth/token/lookup- self" { capabilities = ["read"] }
  • 15. Tokens vault token-create -policy= <policy_name> vault auth <token> vault token-revoke <token> token d5da8c66-1b37-6916-85cc-319 2a135f9a1 token_accessor ae97c557-e416-8d98- b815-7394b0d7bcbb token_duration 768h0m0s token_renewable true token_policies [default myfirstpolicy]
  • 16. Authentification vault auth-enable github vault write auth/github/config organization=<github_org> vault write auth/github/map/teams/default value=default vault auth -method=github token=<github_token> vault auth-disable github
  • 17. Vault Integration • Define secrets • Create application role • Create policies • Provide policy mapping • Place secrets to Vault • Adjust application • Summon
  • 18. Application Role vault write auth/token/roles/role.service.example-service allowed_policies="policy.service.example-service"
  • 19. Polices • Admin policy • Application policy
  • 20. Admin Policy example-service-admin.hcl # Admins can read/write secrets for their service
 path "secret/service/example_service/v1/*" {
 capabilities = ["create", "read", "update", "delete", "list"]
 }
 
 # Admins can provision tokens for their service
 path "auth/token/create/role.service.example-service" {
 capabilities = ["create", "update"]
 }
  • 22. Writing Policies vault policy-write policy.service.example-service.admin example-service-admin.hcl vault policy-write policy.service.example-service example-service.hcl # Specific to particular auth backend vault write auth/github/map/teams/default value=policy.service.example-service.admin
  • 23. Secrets Go To Vault vault write secret/service/example_service/v1/ db_properties jdbc.url=<jdbc_url> jdbc.username=<username> jdbc.password=<password>
  • 25. Application adjustment secrets file DB_URL: !var secret/service/example_service/v1/ db_properties:jdbc.url DB_USERNAME: !var secret/service/example_service/v1/ db_properties:jdbc.username DB_PASSWORD: !var secret/service/example_service/v1/ db_properties:jdbc.password
  • 26. Application adjustment properties file database:
 jdbcUrl: ENV[DB_URL]
 user: ENV[DB_USERNAME]
 password: ENV[DB_PASSWORD]
  • 27. Application adjustment Environment Variable Lookup private static final Pattern SECRETS_PATTERN = 
 Pattern.compile("ENV[(.*)]");
 
 public String resolvePropertyValue(String value) {
 Matcher matcher = SECRETS_PATTERN.matcher(value);
 if (matcher.find()) {
 return System.getenv(matcher.group(1));
 }
 else {
 return value;
 }
 }
  • 28. Summon • Install brew tap conjurinc/tools brew install summon • Vault Provider mv summon-vault /usr/local/lib/summon/ chmod 755 /usr/local/lib/summon/summon-vault • Check VAULT_TOKEN=<TOKEN> summon --provider summon-vault -f secrets.yml ruby -e 'puts ENV["DB_URL"]'
  • 30. Pros And Cons + Easy setup + Master key sharing + Pluggable storage and auth backends + Straight forward policy control + Provides client and HTTP API - Application integration - Token renewal mechanism
  • 31. Thank you! You are welcome to write me at valeramoiseenko@gmail.com GitHub https://github.com/moisieienko-valerii/vault-dropwizard