{"id":24783,"date":"2019-09-05T12:15:22","date_gmt":"2019-09-05T09:15:22","guid":{"rendered":"https:\/\/www.webcodegeeks.com\/?p=24783"},"modified":"2019-09-05T10:14:00","modified_gmt":"2019-09-05T07:14:00","slug":"ensuring-security-covered-application","status":"publish","type":"post","link":"https:\/\/www.webcodegeeks.com\/ruby\/ensuring-security-covered-application\/","title":{"rendered":"Ruby on Rails Developer Series: Ensuring Security is Covered in Your Application"},"content":{"rendered":"\n<p>Welcome to the last and fourth blog post in my Ruby on Rails Developer Series. In this part, our goal is to go over some major security themes to ensure best practices. We will piggyback from the project you have been building in the other parts and use project-specific scenarios that will help secure the application. The series theme is to make you feel confident as an engineer in building a structured project with Ruby on Rails.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">1. Authentication<\/h2>\n\n\n\n<p>Having authentication set up helps verify that the user is sanctioned to have access. Say you wanted to access a specific item in our Todo list <code>todos\/{:todo_id}\/item\/{:item_id}<\/code>, however, if we don\u2019t validate, the user has access to view records. They can easily change the numbers of the <code>todo_id<\/code> and <code>item_id<\/code> and view those.<\/p>\n\n\n\n<p>I recommended you use an existing gem-like <a href=\"https:\/\/github.com\/plataformatec\/devise\">devise<\/a> for authentication. Devise uses Bcrypt which makes it extremely difficult to for hackers to compute a password as it\u2019s computationally expensive with time. Devise has modules to also help with recovering passwords, registering, tracking user sign-ins, locking records, etc.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">2. Strong Parameters<\/h2>\n\n\n\n<p>Having strong parameters is when you securely permit the data being sent to you from a request. Let us say we created a form that creates a Todo record: If we followed this common pattern <code>Todo.create(params[:todo]<\/code>. And say the form was altered with fields that don\u2019t exist in the model then rails will raise an exception. The same scenario works for updating values in a form if there is something we didn\u2019t want to be updated.<\/p>\n\n\n\n<p><strong>What do I do?<\/strong><\/p>\n\n\n\n<p>By using strong parameters, you whitelist the values that can be used.<\/p>\n\n\n\n<p><code>params.require(:todo).permit(:name, :priority)<\/code><\/p>\n\n\n\n<p>Now if the user submits the form with incorrect data to the parameterized fields the form will throw an error.<\/p>\n\n\n\n<p><strong>How do I use it?<\/strong><\/p>\n\n\n\n<div>\n<div id=\"highlighter_555388\" class=\"syntaxhighlighter  php\">\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td class=\"gutter\">\n<div class=\"line number1 index0 alt2\">1<\/div>\n<div class=\"line number2 index1 alt1\">2<\/div>\n<div class=\"line number3 index2 alt2\">3<\/div>\n<div class=\"line number4 index3 alt1\">4<\/div>\n<div class=\"line number5 index4 alt2\">5<\/div>\n<div class=\"line number6 index5 alt1\">6<\/div>\n<div class=\"line number7 index6 alt2\">7<\/div>\n<\/td>\n<td class=\"code\">\n<div class=\"container\">\n<div class=\"line number1 index0 alt2\"><code class=\"php plain\">def create<\/code><\/div>\n<div class=\"line number2 index1 alt1\"><code class=\"php spaces\">&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code class=\"php plain\">Todo.create(todo_params)<\/code><\/div>\n<div class=\"line number3 index2 alt2\"><code class=\"php functions\">end<\/code><\/div>\n<div class=\"line number4 index3 alt1\">&nbsp;<\/div>\n<div class=\"line number5 index4 alt2\"><code class=\"php plain\">def todo_params<\/code><\/div>\n<div class=\"line number6 index5 alt1\"><code class=\"php spaces\">&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code class=\"php plain\">params.<\/code><code class=\"php keyword\">require<\/code><code class=\"php plain\">(:todo).permit(:name, :priority)<\/code><\/div>\n<div class=\"line number7 index6 alt2\"><code class=\"php functions\">end<\/code><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\">3. Slug it!<\/h2>\n\n\n\n<p>A slug is part of a URL that identifies a particular record in an easy-to-read form. Slugs are good because we don\u2019t have to reveal the <code>id<\/code> of the record.<\/p>\n\n\n\n<p>I recommend using <a href=\"https:\/\/github.com\/norman\/friendly_id\">FriendlyId<\/a> as it\u2019s the \u201cSwiss Army bulldozer\u201d of slugging and permalink plugins for ActiveRecord.<\/p>\n\n\n\n<p>After implementing, we can change our <code>show<\/code> methods to look like this:<\/p>\n\n\n\n<p><code>Todo.friendly.find(params[:id])<\/code><\/p>\n\n\n\n<p><code>params[:id]<\/code> \u2013 will contain the slug as we now use it as the id of the record.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">4. Use HTTPS<\/h2>\n\n\n\n<p>Protect sensitive data, especially logins or payment pages. These are easily sniffed when traffic is unencrypted since cookies are easily obtainable through cross-site scripting (XSS).<\/p>\n\n\n\n<p>In the application config file you will need to specify <code>config.force_ssl = true<\/code>.<\/p>\n\n\n\n<p>Learn how to <a href=\"https:\/\/letsencrypt.org\/docs\/\">create an SSL certificate here<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">5. Cross-Site Request Forgery (CSRF)<\/h2>\n\n\n\n<p><strong>What is this?<\/strong><\/p>\n\n\n\n<p>The attack method of cross-site request forgery is the idea that someone can insert malicious code into the application and trick the server to think the user is authenticated. This could allow the attacker to execute unauthorized commands.<\/p>\n\n\n\n<p><strong>How do I enable this?<\/strong><\/p>\n\n\n\n<p>Add <code>protect_from_forgery with: :exception<\/code> in the application controller.<\/p>\n\n\n\n<p>You can rescue forgery if the request is invalid as follows:<\/p>\n\n\n\n<div>\n<div id=\"highlighter_139927\" class=\"syntaxhighlighter  php\">\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td class=\"gutter\">\n<div class=\"line number1 index0 alt2\">1<\/div>\n<div class=\"line number2 index1 alt1\">2<\/div>\n<div class=\"line number3 index2 alt2\">3<\/div>\n<\/td>\n<td class=\"code\">\n<div class=\"container\">\n<div class=\"line number1 index0 alt2\"><code class=\"php plain\">rescue_from ActionController::InvalidAuthenticityToken <\/code><code class=\"php keyword\">do<\/code> <code class=\"php plain\">|exception|<\/code><\/div>\n<div class=\"line number2 index1 alt1\"><code class=\"php spaces\">&nbsp;&nbsp;<\/code><code class=\"php plain\">sign_out_user # Example method that will destroy the user cookies<\/code><\/div>\n<div class=\"line number3 index2 alt2\"><code class=\"php functions\">end<\/code><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\">6. Check for Active Record Exceptions<\/h2>\n\n\n\n<p>One good thing we did in the <a href=\"https:\/\/www.webcodegeeks.com\/ruby\/power-strong-apis-json-postgres-database\/\">previous part<\/a> of the series was create an Exception Concern that sat on the top layer of the Application Controller to guard for specific application Active Record exceptions.<\/p>\n\n\n\n<p>The module below rescues these specific Active Record Exceptions:<\/p>\n\n\n\n<div>\n<div id=\"highlighter_954120\" class=\"syntaxhighlighter  php\">\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td class=\"gutter\">\n<div class=\"line number1 index0 alt2\">01<\/div>\n<div class=\"line number2 index1 alt1\">02<\/div>\n<div class=\"line number3 index2 alt2\">03<\/div>\n<div class=\"line number4 index3 alt1\">04<\/div>\n<div class=\"line number5 index4 alt2\">05<\/div>\n<div class=\"line number6 index5 alt1\">06<\/div>\n<div class=\"line number7 index6 alt2\">07<\/div>\n<div class=\"line number8 index7 alt1\">08<\/div>\n<div class=\"line number9 index8 alt2\">09<\/div>\n<div class=\"line number10 index9 alt1\">10<\/div>\n<div class=\"line number11 index10 alt2\">11<\/div>\n<div class=\"line number12 index11 alt1\">12<\/div>\n<div class=\"line number13 index12 alt2\">13<\/div>\n<\/td>\n<td class=\"code\">\n<div class=\"container\">\n<div class=\"line number1 index0 alt2\"><code class=\"php plain\">module ExceptionHandler<\/code><\/div>\n<div class=\"line number2 index1 alt1\"><code class=\"php spaces\">&nbsp;&nbsp;<\/code><code class=\"php plain\">extend ActiveSupport::Concern<\/code><\/div>\n<div class=\"line number3 index2 alt2\">&nbsp;<\/div>\n<div class=\"line number4 index3 alt1\"><code class=\"php spaces\">&nbsp;&nbsp;<\/code><code class=\"php plain\">included <\/code><code class=\"php keyword\">do<\/code><\/div>\n<div class=\"line number5 index4 alt2\"><code class=\"php spaces\">&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code class=\"php plain\">rescue_from ActiveRecord::RecordNotFound <\/code><code class=\"php keyword\">do<\/code> <code class=\"php plain\">|e|<\/code><\/div>\n<div class=\"line number6 index5 alt1\"><code class=\"php spaces\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code class=\"php plain\">render json: { message: e.message }, status: 404<\/code><\/div>\n<div class=\"line number7 index6 alt2\"><code class=\"php spaces\">&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code class=\"php functions\">end<\/code><\/div>\n<div class=\"line number8 index7 alt1\">&nbsp;<\/div>\n<div class=\"line number9 index8 alt2\"><code class=\"php spaces\">&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code class=\"php plain\">rescue_from ActiveRecord::RecordInvalid <\/code><code class=\"php keyword\">do<\/code> <code class=\"php plain\">|e|<\/code><\/div>\n<div class=\"line number10 index9 alt1\"><code class=\"php spaces\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code class=\"php plain\">render json: { message: e.message }, status: 422<\/code><\/div>\n<div class=\"line number11 index10 alt2\"><code class=\"php spaces\">&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code class=\"php functions\">end<\/code><\/div>\n<div class=\"line number12 index11 alt1\"><code class=\"php spaces\">&nbsp;&nbsp;<\/code><code class=\"php functions\">end<\/code><\/div>\n<div class=\"line number13 index12 alt2\"><code class=\"php functions\">end<\/code><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n\n\n\n<p>You can find more exceptions to guard for <a href=\"https:\/\/apidock.com\/rails\/ActiveRecord\/RecordInvalid\">here<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Wrapping up the series<\/h2>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" width=\"480\" height=\"281\" src=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2019\/09\/giphy.gif\" alt=\"\" class=\"wp-image-24788\"\/><\/figure><\/div>\n\n\n\n<p>You have done it! Time to pat yourself on the back as we have planned to build our application and have built a structured project using Ruby on Rails.<\/p>\n\n\n\n<p>In this series, the goal was to outline how to bolster your API with strong top layers of infrastructure and Postgres, dockerize your project and add security layers to mitigate attacks to your application.<\/p>\n\n\n\n<p>I wanted to thank everyone for reading this series and I hope you feel more confident as an engineer building a rails application!<\/p>\n\n\n\n<p>I hope outlined the other parts for you to (re)visit.<\/p>\n\n\n\n<p><a href=\"https:\/\/www.webcodegeeks.com\/ruby\/developer-series-spinning-json-api\/\">Part One<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/www.webcodegeeks.com\/ruby\/power-strong-apis-json-postgres-database\/\">Part Two<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/www.webcodegeeks.com\/ruby\/ruby-on-rails-developer-series-creating-a-docker-container-around-your-application\/\">Part Three<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Additional resources<\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>Read more about <a href=\"https:\/\/blog.codeship.com\/continuous-integration-continuous-delivery-continuous-security\/\">continuous security<\/a><\/li><li>Try CloudBees CodeShip for <a href=\"https:\/\/app.codeship.com\/registrations\/new?utm_source=MainHP?utm_referrer=https:\/\/codeship.com\/\">free<\/a><\/li><li>Download the whitepaper about <a href=\"https:\/\/www.cloudbees.com\/resource\/whitepaper\/devsecops-speed-and-security-together-last\">DevSecOps<\/a><\/li><\/ul>\n\n\n\n<div class=\"attribution\">\n<table>\n<tbody>\n<tr>\n<td>\n<p>Published on Web Code Geeks with permission by Evan Glazer, partner at our <a href=\"\/\/www.webcodegeeks.com\/join-us\/wcg\/\" target=\"_blank\" rel=\"noopener noreferrer\">WCG program<\/a>. See the original article here: <a href=\"https:\/\/blog.codeship.com\/ruby-on-rails-developer-series-ensuring-security-is-covered-in-your-application\/\" target=\"_blank\" rel=\"noopener noreferrer\">Ruby on Rails Developer Series: Ensuring Security is Covered in Your Application<\/a><\/p>\n<p>Opinions expressed by Web Code Geeks contributors are their own.<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Welcome to the last and fourth blog post in my Ruby on Rails Developer Series. In this part, our goal is to go over some major security themes to ensure best practices. We will piggyback from the project you have been building in the other parts and use project-specific scenarios that will help secure the &hellip;<\/p>\n","protected":false},"author":10271,"featured_media":4127,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21],"tags":[95],"class_list":["post-24783","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ruby","tag-rails"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Ruby on Rails Developer Series: Ensuring Security is Covered in Your Application - Web Code Geeks - 2026<\/title>\n<meta name=\"description\" content=\"Interested to learn about Ensuring Security? Check our article going over some major security themes to ensure best practices\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.webcodegeeks.com\/ruby\/ensuring-security-covered-application\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Ruby on Rails Developer Series: Ensuring Security is Covered in Your Application - Web Code Geeks - 2026\" \/>\n<meta property=\"og:description\" content=\"Interested to learn about Ensuring Security? Check our article going over some major security themes to ensure best practices\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.webcodegeeks.com\/ruby\/ensuring-security-covered-application\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webcodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2019-09-05T09:15:22+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/04\/rubyonrails-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Evan Glazer\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@evan_glazer\" \/>\n<meta name=\"twitter:site\" content=\"@webcodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Evan Glazer\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.webcodegeeks.com\/ruby\/ensuring-security-covered-application\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/ruby\/ensuring-security-covered-application\/\"},\"author\":{\"name\":\"Evan Glazer\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/99389fa5af3bc43e693c41e0d63e8329\"},\"headline\":\"Ruby on Rails Developer Series: Ensuring Security is Covered in Your Application\",\"datePublished\":\"2019-09-05T09:15:22+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/ruby\/ensuring-security-covered-application\/\"},\"wordCount\":723,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/ruby\/ensuring-security-covered-application\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/04\/rubyonrails-logo.jpg\",\"keywords\":[\"Rails\"],\"articleSection\":[\"Ruby\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.webcodegeeks.com\/ruby\/ensuring-security-covered-application\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.webcodegeeks.com\/ruby\/ensuring-security-covered-application\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/ruby\/ensuring-security-covered-application\/\",\"name\":\"Ruby on Rails Developer Series: Ensuring Security is Covered in Your Application - Web Code Geeks - 2026\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/ruby\/ensuring-security-covered-application\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/ruby\/ensuring-security-covered-application\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/04\/rubyonrails-logo.jpg\",\"datePublished\":\"2019-09-05T09:15:22+00:00\",\"description\":\"Interested to learn about Ensuring Security? Check our article going over some major security themes to ensure best practices\",\"breadcrumb\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/ruby\/ensuring-security-covered-application\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.webcodegeeks.com\/ruby\/ensuring-security-covered-application\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/ruby\/ensuring-security-covered-application\/#primaryimage\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/04\/rubyonrails-logo.jpg\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/04\/rubyonrails-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.webcodegeeks.com\/ruby\/ensuring-security-covered-application\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.webcodegeeks.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Ruby\",\"item\":\"https:\/\/www.webcodegeeks.com\/category\/ruby\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Ruby on Rails Developer Series: Ensuring Security is Covered in Your Application\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\",\"url\":\"https:\/\/www.webcodegeeks.com\/\",\"name\":\"Web Code Geeks\",\"description\":\"Web Developers Resource Center\",\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.webcodegeeks.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\/\/www.webcodegeeks.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webcodegeeks\",\"https:\/\/x.com\/webcodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/99389fa5af3bc43e693c41e0d63e8329\",\"name\":\"Evan Glazer\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/d682081fa7ff1813f66b9c2d06e8476ca6f3b6956f15f8e38d6fcc6b89292fcd?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/d682081fa7ff1813f66b9c2d06e8476ca6f3b6956f15f8e38d6fcc6b89292fcd?s=96&d=mm&r=g\",\"caption\":\"Evan Glazer\"},\"description\":\"Evan Glazer is a software engineer and self-starter at Edukate, where he uses Ember and Ruby on Rails and works with natural language processing and machine learning.\",\"sameAs\":[\"https:\/\/blog.codeship.com\",\"https:\/\/x.com\/evan_glazer\"],\"url\":\"https:\/\/www.webcodegeeks.com\/author\/evan-glazer\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Ruby on Rails Developer Series: Ensuring Security is Covered in Your Application - Web Code Geeks - 2026","description":"Interested to learn about Ensuring Security? Check our article going over some major security themes to ensure best practices","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.webcodegeeks.com\/ruby\/ensuring-security-covered-application\/","og_locale":"en_US","og_type":"article","og_title":"Ruby on Rails Developer Series: Ensuring Security is Covered in Your Application - Web Code Geeks - 2026","og_description":"Interested to learn about Ensuring Security? Check our article going over some major security themes to ensure best practices","og_url":"https:\/\/www.webcodegeeks.com\/ruby\/ensuring-security-covered-application\/","og_site_name":"Web Code Geeks","article_publisher":"https:\/\/www.facebook.com\/webcodegeeks","article_published_time":"2019-09-05T09:15:22+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/04\/rubyonrails-logo.jpg","type":"image\/jpeg"}],"author":"Evan Glazer","twitter_card":"summary_large_image","twitter_creator":"@evan_glazer","twitter_site":"@webcodegeeks","twitter_misc":{"Written by":"Evan Glazer","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.webcodegeeks.com\/ruby\/ensuring-security-covered-application\/#article","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/ruby\/ensuring-security-covered-application\/"},"author":{"name":"Evan Glazer","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/99389fa5af3bc43e693c41e0d63e8329"},"headline":"Ruby on Rails Developer Series: Ensuring Security is Covered in Your Application","datePublished":"2019-09-05T09:15:22+00:00","mainEntityOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/ruby\/ensuring-security-covered-application\/"},"wordCount":723,"commentCount":0,"publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/ruby\/ensuring-security-covered-application\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/04\/rubyonrails-logo.jpg","keywords":["Rails"],"articleSection":["Ruby"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.webcodegeeks.com\/ruby\/ensuring-security-covered-application\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.webcodegeeks.com\/ruby\/ensuring-security-covered-application\/","url":"https:\/\/www.webcodegeeks.com\/ruby\/ensuring-security-covered-application\/","name":"Ruby on Rails Developer Series: Ensuring Security is Covered in Your Application - Web Code Geeks - 2026","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/ruby\/ensuring-security-covered-application\/#primaryimage"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/ruby\/ensuring-security-covered-application\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/04\/rubyonrails-logo.jpg","datePublished":"2019-09-05T09:15:22+00:00","description":"Interested to learn about Ensuring Security? Check our article going over some major security themes to ensure best practices","breadcrumb":{"@id":"https:\/\/www.webcodegeeks.com\/ruby\/ensuring-security-covered-application\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.webcodegeeks.com\/ruby\/ensuring-security-covered-application\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/ruby\/ensuring-security-covered-application\/#primaryimage","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/04\/rubyonrails-logo.jpg","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/04\/rubyonrails-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.webcodegeeks.com\/ruby\/ensuring-security-covered-application\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.webcodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Ruby","item":"https:\/\/www.webcodegeeks.com\/category\/ruby\/"},{"@type":"ListItem","position":3,"name":"Ruby on Rails Developer Series: Ensuring Security is Covered in Your Application"}]},{"@type":"WebSite","@id":"https:\/\/www.webcodegeeks.com\/#website","url":"https:\/\/www.webcodegeeks.com\/","name":"Web Code Geeks","description":"Web Developers Resource Center","publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.webcodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.webcodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.webcodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webcodegeeks","https:\/\/x.com\/webcodegeeks"]},{"@type":"Person","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/99389fa5af3bc43e693c41e0d63e8329","name":"Evan Glazer","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/d682081fa7ff1813f66b9c2d06e8476ca6f3b6956f15f8e38d6fcc6b89292fcd?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d682081fa7ff1813f66b9c2d06e8476ca6f3b6956f15f8e38d6fcc6b89292fcd?s=96&d=mm&r=g","caption":"Evan Glazer"},"description":"Evan Glazer is a software engineer and self-starter at Edukate, where he uses Ember and Ruby on Rails and works with natural language processing and machine learning.","sameAs":["https:\/\/blog.codeship.com","https:\/\/x.com\/evan_glazer"],"url":"https:\/\/www.webcodegeeks.com\/author\/evan-glazer\/"}]}},"_links":{"self":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/24783","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/users\/10271"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/comments?post=24783"}],"version-history":[{"count":0,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/24783\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media\/4127"}],"wp:attachment":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media?parent=24783"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/categories?post=24783"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/tags?post=24783"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}