SlideShare une entreprise Scribd logo
1  sur  14
Télécharger pour lire hors ligne
Advanced use of SVN
  in the life-cycle of web oriented projects



Emiliano `AlberT` Gabrielli
 emiliano.gabrielli@deArchitettura.com
CIO & CTO @
Intro::why another SVN-related talk
• underline, one time again, the necessity of adopting versioning
  tools in every project
• discuss some undervalued security-related points:
   ∘ ACL granularity
   ∘ roles separation in the development team
   ∘ security in the data storage
   ∘ avoiding osmotic migration of configuration vulnerabilities from the
     devel/test environment into production
• point out how to use SVN with an enterprise oriented mind
   ∘ avoid OSS forking
   ∘ increase SW lifetime and maintainability
   ∘ automate daily quality related tasks




                             Emiliano Gabrielli,                            2
Everybody needs a RCS
A Revision Control System makes the life easier in a number of
situations:
• aims to standardize the work-flow of the developing team
• makes junior coders less fearful
• automates production of the project history documentation
• gives the team a powerful weapon against disasters
• aims to automate deploying, making releases, application
  versioning, etc
• makes it possible to have per-customer customized versions of
  the same project, without the headache of syncing updates,
  security patches and bug fix
• permits the inclusion of 3rd party OSS, without the needing of
  forking it
• makes our new features to OSS simply available for submission to
  the community

                           Emiliano Gabrielli,                       3
This presentation is on SVN
Using SVN is a drug. Once you know it you can't do anything
without it

 $ mkdir IPC_09
 $ cd IPC_09
 $ svnadmin create SVN_REPO
 $ mkdir presentation_init
 $ cp ../PHPCon09_SVN_advanced.odp presentation_init
 $ svn import ./presentation_init/ 
                   file:///home/albert/Desktop/IPC_09/SVN_REPO
 $ svn co file:///~/Desktop/IPC_09/SVN_REPO presentation
 $ rm -rf presentation_init



                              Emiliano Gabrielli,                4
SVN::ACL granularity
Using SVN in combination with apache mod_dav_svn and
mod_authz_svn makes it possible to have a fine-grain control on
the access of every single member of the development team to the
code repository

• don't give direct access (ssh, file-system, etc) to the repository
• implement apache-svn repository access
• configure users (username/password pairs)
• define groups of users based on their role
• deny access to every user/group on every repository
• grant a WL based access to each repository




                            Emiliano Gabrielli,                        5
SVN::role separation - mod_authz_svn syntax

[groups]
<group_name> = <user>[,<user>...]
...

[<repo_name>:<path in repository>]
@<group> = [rw|r]
<user>    = [rw|r]
*         = [rw|r]


* → Everyone
r → GET, PROPFIND, REPORT, OPTIONS
w → MKCOL, DELETE, PUT, PROPATCH, CHECKOUT, MERGE, MKACTIVITY

svn copy and svn move require at least w on destination


                          Emiliano Gabrielli,                   6
SVN::role separation - users, groups, repos and paths

• 2 types of rights
• 3 levels of access granting:
   ∘ Users and groups
   ∘ Repository
   ∘ Path in repository
• We can define non-system users in a htpasswd-like way:
   ∘ htdigest [-c] passwordfile realm username
   ∘ -c   flag creates a new file
• We can grant different access to different repositories
• For fine grain per directory r/w control we need mod_authz_svn




                              Emiliano Gabrielli,                  7
SVN::security in the data storage
By defining roles and ACL we can reach a good isolation of
security sensitive data in the repository tree:
• DB users/pwds
• Application level credentials (backend)
• Company accounts (SMS-GW uses/pwd)
• Credentials on the production server !

Creating a production branch we can easily achieve all the aboves
by the matter of a simple svn merge:
• Deny access to /branches/prod to everybody
• Grant rw permission to the production server webmaster
• Create /branches/prod as a copy of /trunk asap
• Granted people has to modify credentials only once!



                           Emiliano Gabrielli,                      8
SVN::avoiding configuration vulnerabilities dev-to-prod migration

Creating a production branch we also grant against the evil of
routine-bounded tasks typical od development environment:

• devel/test passwords are typically weak and .. shared
• It is possible to automate a forced check on commit time, to
  search for evil well known code
• A conscientious use of markers like “FIXME” may be a best
  practice
• Maybe useful in devel to intentionally have (and commit) some
  kind of tricky code, helper scripts, debugging and so on
• The aboves do not have to be in production !




                           Emiliano Gabrielli,                      9
SVN::aim to be “enterprise”

By the effort of developing one time forever some helper script it
is possible to dramatically simplify and automate the life-cycle of
a project, as the life of the project manager and the team

• SVN helps to avoid errors in the development work-flow
• Who helps us to avoid errors in the SVN management ?
• Branching and merging can be error prone
• Tagging has to be a coherent process through the entire
• Import a vendor drop has to be safe and simple
• New people in the team have to be easily integrated and skilled
• New developers have to be productive not creating disasters




                            Emiliano Gabrielli,                       10
SVN::aim to be “enterprise” (2)
  • avoid OSS forking:
     ∘ Branching and using the vendor drop import concept we can easily
       modify OSS to our needs, without having to fork the vendor
     ∘ svn_load_dirs.pl is a script available on svn web site that helps in
       the vendor drop import task
     ∘ Merging the vendor in our trunk we can get the new and maintain
       our customizations ... for free !
  • increase SW lifetime and maintainability:
     ∘ Forking makes impossible to re-sync with OSS updates
     ∘ One day our fork will be much less smart than its OSS counterpart
     ∘ That day we will have to make a choice: redo the job or freeze our
       features forever
  • Using a few helper scripts we can automate daily tasks:
     ∘ assure tags naming and comments are coherent
     ∘ Deploy its a matter of execute an interactive script
     ∘ Everything is proposed/defaulted and previewed
                             Emiliano Gabrielli,                              11
deprj-tools::a set of script that makes the difference
  • We have developed a set of well tested, solid and simply to use
    script that automates and makes interactive every step in the
    project life-cycle:
     ∘ deprj-svn_vendor_load.sh: a wrapper over svn_load_dirs.pl, but
       it knows our repository structure and automates importing and
       merging
     ∘ deprj-svn_prj_tag.sh: assure the current copy is a trunk
       checkout, tells the name of the last tag made, give the opportunity
       to list tags suggest 1_0_0 as default if no previous tag is present
     ∘ deprj-svn_prod_sync.sh: makes production branch if it does not
       exists, makes the merge from the trunk at the revision of the last
       tag, marks the current sync revision, gives the comment for
       commit
     ∘ deprj-common.sh: functions and variables sourced by every other
       script. This makes the code KISS and DRY




                             Emiliano Gabrielli,                            12
Questions ?




Emiliano `AlberT` Gabrielli
 emiliano.gabrielli@deArchitettura.com
CIO & CTO @
Advanced use of SVN
  in the life-cycle of web oriented projects



Emiliano `AlberT` Gabrielli
 emiliano.gabrielli@deArchitettura.com
CIO & CTO @

Contenu connexe

Tendances

Ci jenkins maven svn
Ci jenkins maven svnCi jenkins maven svn
Ci jenkins maven svnAnkur Goyal
 
Continuous Delivery Using Jenkins
Continuous Delivery Using JenkinsContinuous Delivery Using Jenkins
Continuous Delivery Using JenkinsCliffano Subagio
 
Docker and Selenoid - Make Autotests Great Again
Docker and Selenoid - Make Autotests Great Again Docker and Selenoid - Make Autotests Great Again
Docker and Selenoid - Make Autotests Great Again COMAQA.BY
 
CI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
CI/CD with Jenkins and Docker - DevOps Meetup Day ThailandCI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
CI/CD with Jenkins and Docker - DevOps Meetup Day ThailandTroublemaker Khunpech
 
Continuous delivery with Jenkins Enterprise and Deployit
Continuous delivery with Jenkins Enterprise and DeployitContinuous delivery with Jenkins Enterprise and Deployit
Continuous delivery with Jenkins Enterprise and DeployitXebiaLabs
 
Dev ops tools and was liberty profile
Dev ops tools and was liberty profileDev ops tools and was liberty profile
Dev ops tools and was liberty profilesflynn073
 
Build automation best practices
Build automation best practicesBuild automation best practices
Build automation best practicesCode Mastery
 
Securing jenkins
Securing jenkinsSecuring jenkins
Securing jenkinsCloudBees
 
CI/CD Pipeline as a Code using Jenkins 2
CI/CD Pipeline as a Code using Jenkins 2CI/CD Pipeline as a Code using Jenkins 2
CI/CD Pipeline as a Code using Jenkins 2Mayank Patel
 
Jenkins introduction
Jenkins introductionJenkins introduction
Jenkins introductionGourav Varma
 
Presentation 1 open source tools in continuous integration environment v1.0
Presentation 1   open source tools in continuous integration environment v1.0Presentation 1   open source tools in continuous integration environment v1.0
Presentation 1 open source tools in continuous integration environment v1.0Jasmine Conseil
 
CI and CD with Jenkins
CI and CD with JenkinsCI and CD with Jenkins
CI and CD with JenkinsMartin Málek
 
Continuous Integration (Jenkins/Hudson)
Continuous Integration (Jenkins/Hudson)Continuous Integration (Jenkins/Hudson)
Continuous Integration (Jenkins/Hudson)Dennys Hsieh
 
Jenkins + Docker = Continuous Improvement
Jenkins + Docker = Continuous ImprovementJenkins + Docker = Continuous Improvement
Jenkins + Docker = Continuous ImprovementUdaypal Aarkoti
 
10 Reasons to Use an IDE for OpenVMS Development
10 Reasons to Use an IDE for OpenVMS Development10 Reasons to Use an IDE for OpenVMS Development
10 Reasons to Use an IDE for OpenVMS Developmentecubemarketing
 

Tendances (20)

Jenkins
JenkinsJenkins
Jenkins
 
Ci jenkins maven svn
Ci jenkins maven svnCi jenkins maven svn
Ci jenkins maven svn
 
Build Time Hacking
Build Time HackingBuild Time Hacking
Build Time Hacking
 
Continuous Delivery Using Jenkins
Continuous Delivery Using JenkinsContinuous Delivery Using Jenkins
Continuous Delivery Using Jenkins
 
Docker and Selenoid - Make Autotests Great Again
Docker and Selenoid - Make Autotests Great Again Docker and Selenoid - Make Autotests Great Again
Docker and Selenoid - Make Autotests Great Again
 
Jenkins-CI
Jenkins-CIJenkins-CI
Jenkins-CI
 
CI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
CI/CD with Jenkins and Docker - DevOps Meetup Day ThailandCI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
CI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
 
Continuous delivery with Jenkins Enterprise and Deployit
Continuous delivery with Jenkins Enterprise and DeployitContinuous delivery with Jenkins Enterprise and Deployit
Continuous delivery with Jenkins Enterprise and Deployit
 
Dev ops tools and was liberty profile
Dev ops tools and was liberty profileDev ops tools and was liberty profile
Dev ops tools and was liberty profile
 
Build automation best practices
Build automation best practicesBuild automation best practices
Build automation best practices
 
Securing jenkins
Securing jenkinsSecuring jenkins
Securing jenkins
 
CI/CD Pipeline as a Code using Jenkins 2
CI/CD Pipeline as a Code using Jenkins 2CI/CD Pipeline as a Code using Jenkins 2
CI/CD Pipeline as a Code using Jenkins 2
 
K8s Cluster Build
K8s Cluster BuildK8s Cluster Build
K8s Cluster Build
 
MohitBilakhia
MohitBilakhiaMohitBilakhia
MohitBilakhia
 
Jenkins introduction
Jenkins introductionJenkins introduction
Jenkins introduction
 
Presentation 1 open source tools in continuous integration environment v1.0
Presentation 1   open source tools in continuous integration environment v1.0Presentation 1   open source tools in continuous integration environment v1.0
Presentation 1 open source tools in continuous integration environment v1.0
 
CI and CD with Jenkins
CI and CD with JenkinsCI and CD with Jenkins
CI and CD with Jenkins
 
Continuous Integration (Jenkins/Hudson)
Continuous Integration (Jenkins/Hudson)Continuous Integration (Jenkins/Hudson)
Continuous Integration (Jenkins/Hudson)
 
Jenkins + Docker = Continuous Improvement
Jenkins + Docker = Continuous ImprovementJenkins + Docker = Continuous Improvement
Jenkins + Docker = Continuous Improvement
 
10 Reasons to Use an IDE for OpenVMS Development
10 Reasons to Use an IDE for OpenVMS Development10 Reasons to Use an IDE for OpenVMS Development
10 Reasons to Use an IDE for OpenVMS Development
 

En vedette

Subversion client
Subversion clientSubversion client
Subversion clientrchakra
 
高级英语全国2008年10月高等教育自学考试
高级英语全国2008年10月高等教育自学考试高级英语全国2008年10月高等教育自学考试
高级英语全国2008年10月高等教育自学考试guest2bb065
 
Intervalo técnico Git/SVN
Intervalo técnico Git/SVNIntervalo técnico Git/SVN
Intervalo técnico Git/SVNLuciano Lima
 
Silverlight Developer Introduction
Silverlight   Developer IntroductionSilverlight   Developer Introduction
Silverlight Developer IntroductionTomy Ismail
 
Subversion workshop
Subversion workshopSubversion workshop
Subversion workshopTrafeX
 
Introduction to Subversion
Introduction to SubversionIntroduction to Subversion
Introduction to SubversionAtul Jha
 
02.28.13 WANDisco SVN Training: Getting Info Out of SVN
02.28.13 WANDisco SVN Training: Getting Info Out of SVN02.28.13 WANDisco SVN Training: Getting Info Out of SVN
02.28.13 WANDisco SVN Training: Getting Info Out of SVNWANdisco Plc
 
Extending VuGen 11.5 with custom add-ins
Extending VuGen 11.5 with custom add-insExtending VuGen 11.5 with custom add-ins
Extending VuGen 11.5 with custom add-insstuartmoncrieff
 
Version Control With Subversion
Version Control With SubversionVersion Control With Subversion
Version Control With SubversionSamnang Chhun
 
SVN Best Practices
SVN Best PracticesSVN Best Practices
SVN Best Practicesabackstrom
 
02.19.13 WANDisco SVN Training: Branching Options for Development
02.19.13 WANDisco SVN Training: Branching Options for Development02.19.13 WANDisco SVN Training: Branching Options for Development
02.19.13 WANDisco SVN Training: Branching Options for DevelopmentWANdisco Plc
 
Subversion Overview
Subversion OverviewSubversion Overview
Subversion Overviewpolarion
 
datastage training | datastage online training | datastage training videos | ...
datastage training | datastage online training | datastage training videos | ...datastage training | datastage online training | datastage training videos | ...
datastage training | datastage online training | datastage training videos | ...Nancy Thomas
 

En vedette (20)

Subversion client
Subversion clientSubversion client
Subversion client
 
Subversion
SubversionSubversion
Subversion
 
高级英语全国2008年10月高等教育自学考试
高级英语全国2008年10月高等教育自学考试高级英语全国2008年10月高等教育自学考试
高级英语全国2008年10月高等教育自学考试
 
Intervalo técnico Git/SVN
Intervalo técnico Git/SVNIntervalo técnico Git/SVN
Intervalo técnico Git/SVN
 
Scala: Linguagem Promissora e Funcional
Scala: Linguagem Promissora e FuncionalScala: Linguagem Promissora e Funcional
Scala: Linguagem Promissora e Funcional
 
Silverlight Developer Introduction
Silverlight   Developer IntroductionSilverlight   Developer Introduction
Silverlight Developer Introduction
 
Tortoise svn 1.8.1-en
Tortoise svn 1.8.1-enTortoise svn 1.8.1-en
Tortoise svn 1.8.1-en
 
svn
svnsvn
svn
 
Subversion workshop
Subversion workshopSubversion workshop
Subversion workshop
 
Introduction to Subversion
Introduction to SubversionIntroduction to Subversion
Introduction to Subversion
 
Git para quem vem do SVN
Git para quem vem do SVNGit para quem vem do SVN
Git para quem vem do SVN
 
02.28.13 WANDisco SVN Training: Getting Info Out of SVN
02.28.13 WANDisco SVN Training: Getting Info Out of SVN02.28.13 WANDisco SVN Training: Getting Info Out of SVN
02.28.13 WANDisco SVN Training: Getting Info Out of SVN
 
Extending VuGen 11.5 with custom add-ins
Extending VuGen 11.5 with custom add-insExtending VuGen 11.5 with custom add-ins
Extending VuGen 11.5 with custom add-ins
 
Introduce to SVN
Introduce to SVNIntroduce to SVN
Introduce to SVN
 
Version Control With Subversion
Version Control With SubversionVersion Control With Subversion
Version Control With Subversion
 
SVN Best Practices
SVN Best PracticesSVN Best Practices
SVN Best Practices
 
02.19.13 WANDisco SVN Training: Branching Options for Development
02.19.13 WANDisco SVN Training: Branching Options for Development02.19.13 WANDisco SVN Training: Branching Options for Development
02.19.13 WANDisco SVN Training: Branching Options for Development
 
Git vs. SVN
Git vs. SVNGit vs. SVN
Git vs. SVN
 
Subversion Overview
Subversion OverviewSubversion Overview
Subversion Overview
 
datastage training | datastage online training | datastage training videos | ...
datastage training | datastage online training | datastage training videos | ...datastage training | datastage online training | datastage training videos | ...
datastage training | datastage online training | datastage training videos | ...
 

Similaire à PHP Con09: SVN Advanced

Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a...
Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a...Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a...
Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a...Lean IT Consulting
 
Jbossworld Presentation
Jbossworld PresentationJbossworld Presentation
Jbossworld PresentationDan Hinojosa
 
The DevOps paradigm - the evolution of IT professionals and opensource toolkit
The DevOps paradigm - the evolution of IT professionals and opensource toolkitThe DevOps paradigm - the evolution of IT professionals and opensource toolkit
The DevOps paradigm - the evolution of IT professionals and opensource toolkitMarco Ferrigno
 
The DevOps Paradigm
The DevOps ParadigmThe DevOps Paradigm
The DevOps ParadigmNaLUG
 
Using Chef InSpec for Infrastructure Security
Using Chef InSpec for Infrastructure SecurityUsing Chef InSpec for Infrastructure Security
Using Chef InSpec for Infrastructure SecurityMandi Walls
 
DevOps Tooling - Pop-up Loft TLV 2017
DevOps Tooling - Pop-up Loft TLV 2017DevOps Tooling - Pop-up Loft TLV 2017
DevOps Tooling - Pop-up Loft TLV 2017Amazon Web Services
 
AWS re:Invent 2016: DevOps on AWS: Accelerating Software Delivery with the AW...
AWS re:Invent 2016: DevOps on AWS: Accelerating Software Delivery with the AW...AWS re:Invent 2016: DevOps on AWS: Accelerating Software Delivery with the AW...
AWS re:Invent 2016: DevOps on AWS: Accelerating Software Delivery with the AW...Amazon Web Services
 
Continuous Delivery, Continuous Integration
Continuous Delivery, Continuous Integration Continuous Delivery, Continuous Integration
Continuous Delivery, Continuous Integration Amazon Web Services
 
InSpec at DevOps ATL Meetup January 22, 2020
InSpec at DevOps ATL Meetup January 22, 2020InSpec at DevOps ATL Meetup January 22, 2020
InSpec at DevOps ATL Meetup January 22, 2020Mandi Walls
 
Why we don’t use the Term DevOps: the Journey to a Product Mindset - DevOpsCo...
Why we don’t use the Term DevOps: the Journey to a Product Mindset - DevOpsCo...Why we don’t use the Term DevOps: the Journey to a Product Mindset - DevOpsCo...
Why we don’t use the Term DevOps: the Journey to a Product Mindset - DevOpsCo...Henning Jacobs
 
SVN Usage & Best Practices
SVN Usage & Best PracticesSVN Usage & Best Practices
SVN Usage & Best PracticesAshraf Fouad
 
Adding Security and Compliance to Your Workflow with InSpec
Adding Security and Compliance to Your Workflow with InSpecAdding Security and Compliance to Your Workflow with InSpec
Adding Security and Compliance to Your Workflow with InSpecMandi Walls
 
Microservices and containers for the unitiated
Microservices and containers for the unitiatedMicroservices and containers for the unitiated
Microservices and containers for the unitiatedKevin Lee
 
Achieving DevOps Success with Chef Automate
Achieving DevOps Success with Chef AutomateAchieving DevOps Success with Chef Automate
Achieving DevOps Success with Chef AutomateChef
 
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer ToolsDevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer ToolsAmazon Web Services
 
Pragmatic Pipeline Security
Pragmatic Pipeline SecurityPragmatic Pipeline Security
Pragmatic Pipeline SecurityJames Wickett
 
Eclipse Che - A Revolutionary IDE for Distributed & Mainframe Development
Eclipse Che - A Revolutionary IDE for Distributed & Mainframe DevelopmentEclipse Che - A Revolutionary IDE for Distributed & Mainframe Development
Eclipse Che - A Revolutionary IDE for Distributed & Mainframe DevelopmentDevOps.com
 

Similaire à PHP Con09: SVN Advanced (20)

Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a...
Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a...Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a...
Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a...
 
Jbossworld Presentation
Jbossworld PresentationJbossworld Presentation
Jbossworld Presentation
 
The DevOps paradigm - the evolution of IT professionals and opensource toolkit
The DevOps paradigm - the evolution of IT professionals and opensource toolkitThe DevOps paradigm - the evolution of IT professionals and opensource toolkit
The DevOps paradigm - the evolution of IT professionals and opensource toolkit
 
The DevOps Paradigm
The DevOps ParadigmThe DevOps Paradigm
The DevOps Paradigm
 
Using Chef InSpec for Infrastructure Security
Using Chef InSpec for Infrastructure SecurityUsing Chef InSpec for Infrastructure Security
Using Chef InSpec for Infrastructure Security
 
DevOps Tooling - Pop-up Loft TLV 2017
DevOps Tooling - Pop-up Loft TLV 2017DevOps Tooling - Pop-up Loft TLV 2017
DevOps Tooling - Pop-up Loft TLV 2017
 
Power of Azure Devops
Power of Azure DevopsPower of Azure Devops
Power of Azure Devops
 
Versioning for Developers
Versioning for DevelopersVersioning for Developers
Versioning for Developers
 
AWS re:Invent 2016: DevOps on AWS: Accelerating Software Delivery with the AW...
AWS re:Invent 2016: DevOps on AWS: Accelerating Software Delivery with the AW...AWS re:Invent 2016: DevOps on AWS: Accelerating Software Delivery with the AW...
AWS re:Invent 2016: DevOps on AWS: Accelerating Software Delivery with the AW...
 
Continuous Delivery, Continuous Integration
Continuous Delivery, Continuous Integration Continuous Delivery, Continuous Integration
Continuous Delivery, Continuous Integration
 
InSpec at DevOps ATL Meetup January 22, 2020
InSpec at DevOps ATL Meetup January 22, 2020InSpec at DevOps ATL Meetup January 22, 2020
InSpec at DevOps ATL Meetup January 22, 2020
 
Why we don’t use the Term DevOps: the Journey to a Product Mindset - DevOpsCo...
Why we don’t use the Term DevOps: the Journey to a Product Mindset - DevOpsCo...Why we don’t use the Term DevOps: the Journey to a Product Mindset - DevOpsCo...
Why we don’t use the Term DevOps: the Journey to a Product Mindset - DevOpsCo...
 
SVN Usage & Best Practices
SVN Usage & Best PracticesSVN Usage & Best Practices
SVN Usage & Best Practices
 
Adding Security and Compliance to Your Workflow with InSpec
Adding Security and Compliance to Your Workflow with InSpecAdding Security and Compliance to Your Workflow with InSpec
Adding Security and Compliance to Your Workflow with InSpec
 
Jenkins pipeline as code
Jenkins pipeline as codeJenkins pipeline as code
Jenkins pipeline as code
 
Microservices and containers for the unitiated
Microservices and containers for the unitiatedMicroservices and containers for the unitiated
Microservices and containers for the unitiated
 
Achieving DevOps Success with Chef Automate
Achieving DevOps Success with Chef AutomateAchieving DevOps Success with Chef Automate
Achieving DevOps Success with Chef Automate
 
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer ToolsDevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
 
Pragmatic Pipeline Security
Pragmatic Pipeline SecurityPragmatic Pipeline Security
Pragmatic Pipeline Security
 
Eclipse Che - A Revolutionary IDE for Distributed & Mainframe Development
Eclipse Che - A Revolutionary IDE for Distributed & Mainframe DevelopmentEclipse Che - A Revolutionary IDE for Distributed & Mainframe Development
Eclipse Che - A Revolutionary IDE for Distributed & Mainframe Development
 

Dernier

Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
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
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
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
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
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
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
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
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
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
 

Dernier (20)

Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
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
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
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, ...
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
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
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
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
 

PHP Con09: SVN Advanced

  • 1. Advanced use of SVN in the life-cycle of web oriented projects Emiliano `AlberT` Gabrielli emiliano.gabrielli@deArchitettura.com CIO & CTO @
  • 2. Intro::why another SVN-related talk • underline, one time again, the necessity of adopting versioning tools in every project • discuss some undervalued security-related points: ∘ ACL granularity ∘ roles separation in the development team ∘ security in the data storage ∘ avoiding osmotic migration of configuration vulnerabilities from the devel/test environment into production • point out how to use SVN with an enterprise oriented mind ∘ avoid OSS forking ∘ increase SW lifetime and maintainability ∘ automate daily quality related tasks Emiliano Gabrielli, 2
  • 3. Everybody needs a RCS A Revision Control System makes the life easier in a number of situations: • aims to standardize the work-flow of the developing team • makes junior coders less fearful • automates production of the project history documentation • gives the team a powerful weapon against disasters • aims to automate deploying, making releases, application versioning, etc • makes it possible to have per-customer customized versions of the same project, without the headache of syncing updates, security patches and bug fix • permits the inclusion of 3rd party OSS, without the needing of forking it • makes our new features to OSS simply available for submission to the community Emiliano Gabrielli, 3
  • 4. This presentation is on SVN Using SVN is a drug. Once you know it you can't do anything without it $ mkdir IPC_09 $ cd IPC_09 $ svnadmin create SVN_REPO $ mkdir presentation_init $ cp ../PHPCon09_SVN_advanced.odp presentation_init $ svn import ./presentation_init/ file:///home/albert/Desktop/IPC_09/SVN_REPO $ svn co file:///~/Desktop/IPC_09/SVN_REPO presentation $ rm -rf presentation_init Emiliano Gabrielli, 4
  • 5. SVN::ACL granularity Using SVN in combination with apache mod_dav_svn and mod_authz_svn makes it possible to have a fine-grain control on the access of every single member of the development team to the code repository • don't give direct access (ssh, file-system, etc) to the repository • implement apache-svn repository access • configure users (username/password pairs) • define groups of users based on their role • deny access to every user/group on every repository • grant a WL based access to each repository Emiliano Gabrielli, 5
  • 6. SVN::role separation - mod_authz_svn syntax [groups] <group_name> = <user>[,<user>...] ... [<repo_name>:<path in repository>] @<group> = [rw|r] <user> = [rw|r] * = [rw|r] * → Everyone r → GET, PROPFIND, REPORT, OPTIONS w → MKCOL, DELETE, PUT, PROPATCH, CHECKOUT, MERGE, MKACTIVITY svn copy and svn move require at least w on destination Emiliano Gabrielli, 6
  • 7. SVN::role separation - users, groups, repos and paths • 2 types of rights • 3 levels of access granting: ∘ Users and groups ∘ Repository ∘ Path in repository • We can define non-system users in a htpasswd-like way: ∘ htdigest [-c] passwordfile realm username ∘ -c flag creates a new file • We can grant different access to different repositories • For fine grain per directory r/w control we need mod_authz_svn Emiliano Gabrielli, 7
  • 8. SVN::security in the data storage By defining roles and ACL we can reach a good isolation of security sensitive data in the repository tree: • DB users/pwds • Application level credentials (backend) • Company accounts (SMS-GW uses/pwd) • Credentials on the production server ! Creating a production branch we can easily achieve all the aboves by the matter of a simple svn merge: • Deny access to /branches/prod to everybody • Grant rw permission to the production server webmaster • Create /branches/prod as a copy of /trunk asap • Granted people has to modify credentials only once! Emiliano Gabrielli, 8
  • 9. SVN::avoiding configuration vulnerabilities dev-to-prod migration Creating a production branch we also grant against the evil of routine-bounded tasks typical od development environment: • devel/test passwords are typically weak and .. shared • It is possible to automate a forced check on commit time, to search for evil well known code • A conscientious use of markers like “FIXME” may be a best practice • Maybe useful in devel to intentionally have (and commit) some kind of tricky code, helper scripts, debugging and so on • The aboves do not have to be in production ! Emiliano Gabrielli, 9
  • 10. SVN::aim to be “enterprise” By the effort of developing one time forever some helper script it is possible to dramatically simplify and automate the life-cycle of a project, as the life of the project manager and the team • SVN helps to avoid errors in the development work-flow • Who helps us to avoid errors in the SVN management ? • Branching and merging can be error prone • Tagging has to be a coherent process through the entire • Import a vendor drop has to be safe and simple • New people in the team have to be easily integrated and skilled • New developers have to be productive not creating disasters Emiliano Gabrielli, 10
  • 11. SVN::aim to be “enterprise” (2) • avoid OSS forking: ∘ Branching and using the vendor drop import concept we can easily modify OSS to our needs, without having to fork the vendor ∘ svn_load_dirs.pl is a script available on svn web site that helps in the vendor drop import task ∘ Merging the vendor in our trunk we can get the new and maintain our customizations ... for free ! • increase SW lifetime and maintainability: ∘ Forking makes impossible to re-sync with OSS updates ∘ One day our fork will be much less smart than its OSS counterpart ∘ That day we will have to make a choice: redo the job or freeze our features forever • Using a few helper scripts we can automate daily tasks: ∘ assure tags naming and comments are coherent ∘ Deploy its a matter of execute an interactive script ∘ Everything is proposed/defaulted and previewed Emiliano Gabrielli, 11
  • 12. deprj-tools::a set of script that makes the difference • We have developed a set of well tested, solid and simply to use script that automates and makes interactive every step in the project life-cycle: ∘ deprj-svn_vendor_load.sh: a wrapper over svn_load_dirs.pl, but it knows our repository structure and automates importing and merging ∘ deprj-svn_prj_tag.sh: assure the current copy is a trunk checkout, tells the name of the last tag made, give the opportunity to list tags suggest 1_0_0 as default if no previous tag is present ∘ deprj-svn_prod_sync.sh: makes production branch if it does not exists, makes the merge from the trunk at the revision of the last tag, marks the current sync revision, gives the comment for commit ∘ deprj-common.sh: functions and variables sourced by every other script. This makes the code KISS and DRY Emiliano Gabrielli, 12
  • 13. Questions ? Emiliano `AlberT` Gabrielli emiliano.gabrielli@deArchitettura.com CIO & CTO @
  • 14. Advanced use of SVN in the life-cycle of web oriented projects Emiliano `AlberT` Gabrielli emiliano.gabrielli@deArchitettura.com CIO & CTO @