{"id":86074,"date":"2019-01-14T07:00:30","date_gmt":"2019-01-14T05:00:30","guid":{"rendered":"https:\/\/www.javacodegeeks.com\/?p=86074"},"modified":"2019-01-11T11:50:24","modified_gmt":"2019-01-11T09:50:24","slug":"grails-spring-security","status":"publish","type":"post","link":"https:\/\/www.javacodegeeks.com\/2019\/01\/grails-spring-security.html","title":{"rendered":"Grails with Spring Security"},"content":{"rendered":"<h2>1. Overview of Spring Security Integration with Grails<\/h2>\n<p>Spring Security touts a number of authentication, authorization, instance-based, and various other features that make it so attractive to secure applications with.<\/p>\n<p>With this in mind, due to Grails use of Spring\u2019s <a href=\"https:\/\/en.wikipedia.org\/wiki\/Inversion_of_control\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"With this in mind, due to Grails use of Spring's Inversion of Control Framework and MVC setup,\u00a0 (opens in a new tab)\">Inversion of Control <\/a>Framework and MVC setup, developers sought to use Spring Security to secure Grails.<\/p>\n<p>This has resulted in two notable plugins: <a href=\"http:\/\/plugins.grails.org\/plugin\/grails\/spring-security-core\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"This has resulted in two notable plugins: Spring Security Core Plugin and\u00a0Spring Security ACL Plugin. (opens in a new tab)\">Spring Security Core Plugin <\/a>and\u00a0<a href=\"https:\/\/grails-plugins.github.io\/grails-spring-security-acl\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"This has resulted in two notable plugins: Spring Security Core Plugin and\u00a0Spring Security ACL Plugin. (opens in a new tab)\">Spring Security ACL Plugin<\/a>.<\/p>\n<p>We will be reviewing the capabilities of these Spring Security plugins and making comparisons to using Spring Security for a plain old Spring application.<\/p>\n<h2>2. Spring Security Core Plugin<\/h2>\n<p>This plugin provides practical defaults with many configuration options for customization.<\/p>\n<h3>2.1 Domain Classes<\/h3>\n<p>The Spring Security Core Plugin uses the default Grails domain classes. In order to use the standard lookup for the plugin, we need at a minimum a\u00a0<em>Person<\/em> and\u00a0<em>Authority<\/em> domain class.<\/p>\n<p>If we want to store URL &lt;==&gt; Role mappings in the database (which is one of several approaches for defining the mappings), we need a <em>Requestmap<\/em> domain class. If we use the recommended approach for mapping the many-to-many relationship between\u00a0<em>Person<\/em> and Authority, we also need a domain class to map the join table.<\/p>\n<p>To use the user\/group lookup, we\u2019ll also need a <em>Group\u00a0<\/em>domain class. If we are using the recommended approach for mapping many-to-many relationship between <em>Person<\/em> and\u00a0<em>Group<\/em> and between\u00a0<em>Group<\/em> and <em>Authority<\/em> we\u2019ll need a domain class for each to map the join tables. We can still additionally use\u00a0<em>Requestmap<\/em> with this approach.<\/p>\n<p>We can use the <a href=\"https:\/\/grails-plugins.github.io\/grails-spring-security-core\/3.2.x\/index.html#s2-quickstart\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"We can use the s2-quickstart to generate domain classes. The syntax is quite easy: (opens in a new tab)\">s2-quickstart<\/a> to generate domain classes. The syntax is quite easy:<\/p>\n<pre class=\"brush:bash\">grails s2-quickstart DOMAIN_CLASS_PACKAGE USER_CLASS_NAME ROLE_CLASS_NAME [REQUESTMAP_CLASS_NAME] [--groupClassName=GROUP_CLASS_NAME]<\/pre>\n<p>An example with\u00a0<em>Person<\/em>, <em>Authority<\/em>, and <em>Requestmap<\/em>:<\/p>\n<pre class=\"brush:bash\">grails s2-quickstart com.ourapp Person Authority Requestmap<\/pre>\n<h3>2.2 Configuring Request Mappings for Securing URLs<\/h3>\n<p>We can choose among the following approaches to configure request mappings for securing URLs:<div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<ul>\n<li>The <i>@Secured<\/i>\u00a0annotation. This is considered the <a href=\"https:\/\/grails-plugins.github.io\/grails-spring-security-core\/3.2.x\/index.html#securedAnnotations\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"The @Secured\u00a0annotation. This is considered the default approach.\u2028A  Map in\u00a0application.groovy. This called a\u00a0Static Map\u2028Requestmap\u00a0domain class instances stored in the database  (opens in a new tab)\">default approach.<\/a><\/li>\n<li>A Map in\u00a0<i>application.groovy<\/i>. This called a\u00a0<a href=\"https:\/\/grails-plugins.github.io\/grails-spring-security-core\/3.2.x\/index.html#configGroovyMap\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"The @Secured\u00a0annotation. This is considered the default approach.\u2028A  Map in\u00a0application.groovy. This called a\u00a0Static Map\u2028Requestmap\u00a0domain class instances stored in the database  (opens in a new tab)\">Static Map<\/a><\/li>\n<li><i>Requestmap<\/i>\u00a0<a href=\"https:\/\/grails-plugins.github.io\/grails-spring-security-core\/3.2.x\/index.html#requestmapInstances\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"The @Secured\u00a0annotation. This is considered the default approach.\u2028A  Map in\u00a0application.groovy. This called a\u00a0Static Map\u2028Requestmap\u00a0domain class instances stored in the database  (opens in a new tab)\">domain class instances stored in the database <\/a><\/li>\n<\/ul>\n<p>We can only use one method at a time.<\/p>\n<p>For example, here is use of the\u00a0<code>@Secured<\/code> annotation with Spring Expression Language (SpEL):<\/p>\n<pre class=\"brush:java\">class SecureController {\n\n   @Secured(\"hasRole('ROLE_USER')\")\n   def someRandomAction() {\n      ...\n   }<\/pre>\n<h3>2.3 Various Other Features<\/h3>\n<p>Some various features of the Spring Security Core Plugin include:<\/p>\n<ul>\n<li>Helper classes for dealing with lower levels of Spring Security, such as a<em> SecurityTagLib <\/em>that provides GSP tags to support conditional display based on whether the user is authenticated, and\/or has the required role to perform a particular action.<\/li>\n<li>Events \u2013 including event notifications, event listeners, and callback closures.<\/li>\n<li>Filters, including the ability\u00a0 to define which filters are applied to different URL patterns.<\/li>\n<\/ul>\n<h2>3. Spring Security ACL Plugin<\/h2>\n<p>The Spring Security ACL Plugin adds Domain Object Security support to a Grails application that uses the aforementioned Spring Security Core Plugin. So, we need to have that other plugin already in our\u00a0<em>build.gradle<\/em>.<\/p>\n<p>What does it mean to add Domain Object Security support?\u00a0The Spring Security Core plugin and other extension plugins support restricting access to URLs via rules that include checking a user\u2019s authentication status, roles, etc. and the ACL plugin extends this by adding support for restricting access to individual domain class instances.<\/p>\n<h3>3.1 Method Security<\/h3>\n<p>The four annotations typically available in Spring Security are available for use with Spring Expression Language (SpEL) expressions to perform <a href=\"https:\/\/www.javacodegeeks.com\/2019\/01\/expression-based-access-control.html\">Expression-Based Access Control<\/a>:<\/p>\n<ul>\n<li><em>@PreAuthorize<\/em><\/li>\n<li><em>@PreFilter<\/em><\/li>\n<li><em>@PostAuthorize<\/em><\/li>\n<li><em>@PostFilter<\/em><\/li>\n<\/ul>\n<p>The above annotations are all documented in the\u00a0<a href=\"https:\/\/docs.spring.io\/spring-security\/site\/docs\/5.2.0.BUILD-SNAPSHOT\/reference\/htmlsingle\/#method-security-expressions\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"The above annotations are all considered Method Security Expressions in the Spring Security documentation.\u00a0 (opens in a new tab)\">Method Security Expressions<\/a>\u00a0portion of the Spring Security documentation.<\/p>\n<p>The ability to use method security is a very significant difference between the Spring Security ACL Plugin and the Spring Security Core Plugin. If we are to implement fine-grained access control, the Spring Security ACL Plugin is a must have for this reason.<\/p>\n<p>Thankfully, besides the syntax differences between Groovy and Java, the code really looks the same:<\/p>\n<pre class=\"brush:java\">@PreAuthorize(\"hasRole('ROLE_USER')\")\n   @PostFilter(\"hasPermission(filterObject, read) or \" +\n               \"hasPermission(filterObject, admin)\")\n   List getAllDocs(params = [:]) {\n      Report.list(params)\n   }<\/pre>\n<h3>3.2 Domain Classes<\/h3>\n<p>Like the Spring Security Core Plugin, the Spring Security ACL Plugin uses domain classes for appropriate structuring.<\/p>\n<p>The domain classes, in this case, are used to manage database state. To be compatible with the typically JDBC-based Spring Security code, domain classes are created to generate the table and column names.<\/p>\n<p>The classes in this plugin associated with persistence use these classes. However, they can be overridden by running the\u00a0<a href=\"https:\/\/grails-plugins.github.io\/grails-spring-security-acl\/latest\/index.html#s2-create-acl-domains\">s2-create-acl-domains<\/a>\u00a0script:<\/p>\n<pre class=\"brush:bash\">grails s2-create-acl-domains<\/pre>\n<p>So, the script will generate the same domain classes in our application\u2019s\u00a0<code>grails-app\/domain<\/code> folder to allow some customization.<\/p>\n<h3>3.3 Various Other Features<\/h3>\n<p>Some various features of the Spring Security ACL Plugin include:<\/p>\n<ul>\n<li>Run-As-Authentication Replacement:\u00a0this is a temporary authentication switch that only lasts for one method invocation.<\/li>\n<li>Custom permissions: There are 5 permissions available from the <em>BasePermission<\/em> class:\u00a0<code>READ<\/code>,\u00a0<code>WRITE<\/code>,\u00a0<code>CREATE<\/code>,\u00a0<code>DELETE<\/code>, and\u00a0<code>ADMINISTRATION<\/code>. You can add your own permissions, if you need.<\/li>\n<li>Tag library (taglib) for permit and deny.<\/li>\n<\/ul>\n<h2>4. Conclusion<\/h2>\n<p>The Spring Security Core Plugin offers a number of very useful features for securing Grails with Spring Security, but in order to implement more sophisticated, fine-grained authorization it is necessary to use the Spring Security ACL Plugin in conjunction.<\/p>\n<p>Recommended reading: <a href=\"https:\/\/www.javacodegeeks.com\/2018\/07\/authorizing-resources-created.html\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"Recommended reading: Authorizing Resources Based On Who Created Them (Spring Security) (opens in a new tab)\">Authorizing Resources Based On Who Created Them (Spring Security)<\/a> and my posts about the<a href=\"https:\/\/www.javacodegeeks.com\/2018\/01\/converting-html-richtextstring-apache-poi.html\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"Recommended reading: Authorizing Resources Based On Who Created Them (Spring Security) and my posts about the Spring Framework for general Spring knowledge. (opens in a new tab)\"> Spring Framework<\/a> for general Spring knowledge.<\/p>\n<div class=\"attribution\">\n<table>\n<tbody>\n<tr>\n<td>Published on Java Code Geeks with permission by Michael Good, partner at our <a href=\"\/\/www.javacodegeeks.com\/join-us\/jcg\/\" target=\"_blank\" rel=\"noopener\">JCG program<\/a>. See the original article here: <a href=\"http:\/\/michaelcgood.com\/grails-spring-security\/\" target=\"_blank\" rel=\"noopener\">Grails with Spring Security<\/a><\/p>\n<p>Opinions expressed by Java Code Geeks contributors are their own.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>1. Overview of Spring Security Integration with Grails Spring Security touts a number of authentication, authorization, instance-based, and various other features that make it so attractive to secure applications with. With this in mind, due to Grails use of Spring\u2019s Inversion of Control Framework and MVC setup, developers sought to use Spring Security to secure &hellip;<\/p>\n","protected":false},"author":5558,"featured_media":130,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[192,125],"class_list":["post-86074","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-enterprise-java","tag-grails","tag-spring-security"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Grails with Spring Security - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"Interested to learn about Spring Security? Check our article reviewing the capabilities of these Spring Security plugins and compare them for an application\" \/>\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.javacodegeeks.com\/2019\/01\/grails-spring-security.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Grails with Spring Security - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"Interested to learn about Spring Security? Check our article reviewing the capabilities of these Spring Security plugins and compare them for an application\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.javacodegeeks.com\/2019\/01\/grails-spring-security.html\" \/>\n<meta property=\"og:site_name\" content=\"Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2019-01-14T05:00:30+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/grails-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=\"Michael Good\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Michael Good\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2019\\\/01\\\/grails-spring-security.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2019\\\/01\\\/grails-spring-security.html\"},\"author\":{\"name\":\"Michael Good\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/d13cc729556b91450ae21878a82139ed\"},\"headline\":\"Grails with Spring Security\",\"datePublished\":\"2019-01-14T05:00:30+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2019\\\/01\\\/grails-spring-security.html\"},\"wordCount\":866,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2019\\\/01\\\/grails-spring-security.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/grails-logo.jpg\",\"keywords\":[\"Grails\",\"Spring Security\"],\"articleSection\":[\"Enterprise Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2019\\\/01\\\/grails-spring-security.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2019\\\/01\\\/grails-spring-security.html\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2019\\\/01\\\/grails-spring-security.html\",\"name\":\"Grails with Spring Security - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2019\\\/01\\\/grails-spring-security.html#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2019\\\/01\\\/grails-spring-security.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/grails-logo.jpg\",\"datePublished\":\"2019-01-14T05:00:30+00:00\",\"description\":\"Interested to learn about Spring Security? Check our article reviewing the capabilities of these Spring Security plugins and compare them for an application\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2019\\\/01\\\/grails-spring-security.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2019\\\/01\\\/grails-spring-security.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2019\\\/01\\\/grails-spring-security.html#primaryimage\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/grails-logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/grails-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2019\\\/01\\\/grails-spring-security.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Enterprise Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\\\/enterprise-java\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Grails with Spring Security\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Developers Resource Center\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.javacodegeeks.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/javacodegeeks\",\"https:\\\/\\\/x.com\\\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/d13cc729556b91450ae21878a82139ed\",\"name\":\"Michael Good\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/dc6ef7dbff80afe08a3cdc3b0677aaa26021085e041ce1873dc2141bc581b623?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/dc6ef7dbff80afe08a3cdc3b0677aaa26021085e041ce1873dc2141bc581b623?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/dc6ef7dbff80afe08a3cdc3b0677aaa26021085e041ce1873dc2141bc581b623?s=96&d=mm&r=g\",\"caption\":\"Michael Good\"},\"description\":\"Michael is a software engineer located in the Washington DC area that is interested in Java, cyber security, and open source technologies. Follow his personal blog to read more from Michael.\",\"sameAs\":[\"http:\\\/\\\/www.michaelcgood.com\"],\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/author\\\/michael-good\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Grails with Spring Security - Java Code Geeks","description":"Interested to learn about Spring Security? Check our article reviewing the capabilities of these Spring Security plugins and compare them for an application","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.javacodegeeks.com\/2019\/01\/grails-spring-security.html","og_locale":"en_US","og_type":"article","og_title":"Grails with Spring Security - Java Code Geeks","og_description":"Interested to learn about Spring Security? Check our article reviewing the capabilities of these Spring Security plugins and compare them for an application","og_url":"https:\/\/www.javacodegeeks.com\/2019\/01\/grails-spring-security.html","og_site_name":"Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2019-01-14T05:00:30+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/grails-logo.jpg","type":"image\/jpeg"}],"author":"Michael Good","twitter_card":"summary_large_image","twitter_creator":"@javacodegeeks","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Michael Good","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.javacodegeeks.com\/2019\/01\/grails-spring-security.html#article","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/2019\/01\/grails-spring-security.html"},"author":{"name":"Michael Good","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/d13cc729556b91450ae21878a82139ed"},"headline":"Grails with Spring Security","datePublished":"2019-01-14T05:00:30+00:00","mainEntityOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2019\/01\/grails-spring-security.html"},"wordCount":866,"commentCount":0,"publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2019\/01\/grails-spring-security.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/grails-logo.jpg","keywords":["Grails","Spring Security"],"articleSection":["Enterprise Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.javacodegeeks.com\/2019\/01\/grails-spring-security.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.javacodegeeks.com\/2019\/01\/grails-spring-security.html","url":"https:\/\/www.javacodegeeks.com\/2019\/01\/grails-spring-security.html","name":"Grails with Spring Security - Java Code Geeks","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2019\/01\/grails-spring-security.html#primaryimage"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2019\/01\/grails-spring-security.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/grails-logo.jpg","datePublished":"2019-01-14T05:00:30+00:00","description":"Interested to learn about Spring Security? Check our article reviewing the capabilities of these Spring Security plugins and compare them for an application","breadcrumb":{"@id":"https:\/\/www.javacodegeeks.com\/2019\/01\/grails-spring-security.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.javacodegeeks.com\/2019\/01\/grails-spring-security.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/2019\/01\/grails-spring-security.html#primaryimage","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/grails-logo.jpg","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/grails-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.javacodegeeks.com\/2019\/01\/grails-spring-security.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Java","item":"https:\/\/www.javacodegeeks.com\/category\/java"},{"@type":"ListItem","position":3,"name":"Enterprise Java","item":"https:\/\/www.javacodegeeks.com\/category\/java\/enterprise-java"},{"@type":"ListItem","position":4,"name":"Grails with Spring Security"}]},{"@type":"WebSite","@id":"https:\/\/www.javacodegeeks.com\/#website","url":"https:\/\/www.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Developers Resource Center","publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/d13cc729556b91450ae21878a82139ed","name":"Michael Good","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/dc6ef7dbff80afe08a3cdc3b0677aaa26021085e041ce1873dc2141bc581b623?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/dc6ef7dbff80afe08a3cdc3b0677aaa26021085e041ce1873dc2141bc581b623?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/dc6ef7dbff80afe08a3cdc3b0677aaa26021085e041ce1873dc2141bc581b623?s=96&d=mm&r=g","caption":"Michael Good"},"description":"Michael is a software engineer located in the Washington DC area that is interested in Java, cyber security, and open source technologies. Follow his personal blog to read more from Michael.","sameAs":["http:\/\/www.michaelcgood.com"],"url":"https:\/\/www.javacodegeeks.com\/author\/michael-good"}]}},"_links":{"self":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/86074","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/users\/5558"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=86074"}],"version-history":[{"count":0,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/86074\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media\/130"}],"wp:attachment":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=86074"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=86074"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=86074"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}