{"id":616,"date":"2011-10-19T14:56:00","date_gmt":"2011-10-19T14:56:00","guid":{"rendered":"http:\/\/www.javacodegeeks.com\/2012\/10\/apache-shiro-application-security-made-easy.html"},"modified":"2012-10-21T20:26:36","modified_gmt":"2012-10-21T20:26:36","slug":"apache-shiro-application-security-made","status":"publish","type":"post","link":"https:\/\/www.javacodegeeks.com\/2011\/10\/apache-shiro-application-security-made.html","title":{"rendered":"Apache Shiro : Application Security Made Easy"},"content":{"rendered":"<div dir=\"ltr\" style=\"text-align: left\">Considering that JAVA is over 10+ years old, the number of choices for application developers that need to build authentication and authorization into their applications is shockingly low.<\/p>\n<p>In JAVA &amp; J2EE, the JAAS specification was an attempt to address security. While JAAS works for authentication, the authorization part is just too cumbersome to use. The EJB and Servlet specifications offer coarse grained authorization at a method and resource level. But these are too coarse to be of any use in real world applications. For Spring users, Spring Security is an alternative. But it is a little complicated to use, especially the authorization model. A majority of applications end up building their home grown solutions for authentication and authorization.<\/p>\n<p><a href=\"http:\/\/shiro.apache.org\/\">Apache Shiro<\/a> is a open source JAVA security framework that addresses this problem. It is an elegant framework that lets you add authentication, authorization and session management to your application with ease.<\/p>\n<h3> The highlights of Shiro are: <\/h3>\n<p>It is a pure java framework. It works with all kinds of JAVA applications: J2SE, J2EE, Web, standalone or distributed.<\/p>\n<p>It can integrate easily with various repositories that may host user and permissions metadata such as RDBMs, LDAPs.<\/p>\n<p>It has a simple and intuitive permissions model that can apply to wide variety of problem domains. It is a model that lets you focus on your problem domain without getting you bogged down in the framework.<\/p>\n<p>It has built in support for session management.<\/p>\n<p>It has built in support for caching metadata.<\/p>\n<p>It integrates very easily with Spring. Same applies to any J2EE application server.<\/p>\n<p>Most importantly, it is very easy to use. Most of the time, all you will need to do to integrate Shiro, will be to implement a REALM that ties Shiro to your User and Permissions metadata.<\/p>\n<h3> Shiro Concepts<\/h3>\n<p>The SecurityManager encapsulates the security configuration of an application that uses Shiro.<\/p>\n<p>Subject is the runtimes view of a user that is using the system. When the subject is created, it is not authenticated. For authentication, the login method must be called, passing in the proper credentials. <\/p>\n<p>Session represents the session associated with an authenticated Subject. The session has a session id. Applications can store arbitrary data in the session. The session is valid until the user logs out or the session times out.<\/p>\n<p>A permission represents what actions a subject may perform on a resource in the application. Out of the box Shiro supports permissions represented by colon separated tokens. Each token has some logical meaning. For example, my application may define a permission as ResourceType:actions:ResourceInstance. More concretely File:read:contacts.doc represents a permission to read a file contacts.doc. The permission must be associated with a user, to grant that permission to the user.<div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<p>A Role is a collection of permissions that might represent ability to perform some organizational function. Roles make the association between users and permissions more manageable.<\/p>\n<p>A Realm abstracts your user, permission and role metadata for Shiro. You make this data available to Shiro by implementing a realm and plugging it into Shiro. Typical realms use either a relational database or LDAP to store user data.<\/p>\n<h3> Tutorial<\/h3>\n<p>Let us build a simple java application that does some authentication and authorization. For this tutorial you will need:<\/p>\n<ol style=\"text-align: left\">\n<li><a href=\"http:\/\/shiro.apache.org\/index.html\">Apache Shiro<\/a><\/li>\n<li>A java development environment. I use Eclipse. But you can use other IDEs or command line tools as well.<\/li>\n<li>You may download the source code for this example at <a href=\"https:\/\/sites.google.com\/site\/khangaonkar\/home\/shirosamples\">simpleshiro.zip<\/a><\/li>\n<\/ol>\n<h4> Step 1: Create a Shiro.ini configuration file<\/h4>\n<p>We will use the default file base realm that comes with Shiro. This reads the user\/permission metadata from the shiro.ini file. In a subsequent tutorial, I will show how to build a realm that gets data from a relational database.<\/p>\n<p>In the Ini file, let us define some users and associate some roles to them.<\/p>\n<pre class=\"brush:bash\"># Simple shiro.ini file\r\n[users]\r\n# user admin with password 123456 and role Administrator\r\nadmin = 123456, Administrator\r\n# user mike with password abcdef and role Reader\r\nmike = abcdef, Reader\r\n# user joe with password !23abC2 and role Writer\r\njoe = !23abC2, Writer\r\n# -----------------------------------------------------------------------------\r\n# Roles with assigned permissions\r\n[roles]\r\n# A permission is modeled as Resourcetype:actions:resourceinstances\r\n# Administrator has permission to do all actions on all resources\r\nAdministrator = *:*:*\r\n# Reader has permission to read all files\r\nReader = File:read:*\r\n# Writer role has permission to read and write all files\r\nWriter = File:read,write:*\r\n<\/pre>\n<p>In the above shiro.ini we have defined 3 users and 3 roles. The permission is modeled<br \/>\nas colon separated tokens. Each token can have multiple comma separated parts. Each domain and part grants permission to some application specific domain.<\/p>\n<h4> Step 2: BootStrap shiro into you application<\/h4>\n<pre class=\"brush:java\">Factory factory = new IniSecurityManagerFactory(\"classpath:shiro.ini\");\r\nSecurityManager securityManager = factory.getInstance();\r\nSecurityUtils.setSecurityManager(securityManager);\r\n<\/pre>\n<p>IniSecurityManagerFactory loads the configuration from shiro.ini and creates a singleton SecurityManager for the application. For simplicity, Our shiro.ini goes with the default SecurityManager configuration which uses a Text based realm and gets user,permission,role metadata from the shiro.ini file. <\/p>\n<h4> Step 3: Login<\/h4>\n<pre class=\"brush:java\">Subject usr = SecurityUtils.getSubject();\r\nUsernamePasswordToken token = new UsernamePasswordToken(\"mike\", \"abcdef\");\r\ntry {\r\n    usr.login(token);\r\n} \r\ncatch (AuthenticationException ae) {\r\n    log.error(ae.toString()) ;\r\n    return ;\r\n}\r\nlog.info(\"User [\" + usr.getPrincipal() + \"] logged in successfully.\");\r\n<\/pre>\n<p>SecurityUtils is a factory class for getting an existing subject or creating a new one. Credentials are passed in using an AuthenticationToken. In this case, we want to pass in a username and password and hence use the UsernamePasswordToken. Then we call the login method on the Subject passing in the authentication token.<\/p>\n<h4> Step 4: Check if the user has permission<\/h4>\n<pre class=\"brush:java\">if (usr.isPermitted(\"File:write:xyz.doc\")) {\r\n    log.info(usr.getPrincipal() + \" has permission to write xyz.doc \");\r\n} else {\r\n    log.info(usr.getPrincipal() + \" does not have permission to write xyz.doc \");\r\n}\r\nif (usr.isPermitted(\"File:read:xyz.doc\")) {\r\n    log.info(usr.getPrincipal() + \" has permission to read xyz.doc \");\r\n} else {\r\n    log.info(usr.getPrincipal() + \" does not have permission to read xyz.doc \");\r\n}\r\n<\/pre>\n<p>Subject has a isPermitted method that takes a permission string as parameter and returns true\/false. <\/p>\n<h4> Step 5: Logout<\/h4>\n<pre class=\"brush:java\">usr.logout();\r\n<\/pre>\n<p>The logout method logs the user out.<br \/>\nTo get familiar with Shiro, try changing the UsernamePasswordToken and login as a different user. Check some other permissions. Modify the Shiro.ini file to create new users and roles with different permissions. Run the program a few times with different metadata and different input.<\/p>\n<p>In a production environment, you will not want users and roles in an ini file. You want them in a secure repository like a relational database or LDAP. In the next part, I will show you how to build a Shiro Realm that can use user,role, permission metadata from a relational database.<\/p>\n<p><strong><i>Reference: <\/i><\/strong><a href=\"http:\/\/khangaonkar.blogspot.com\/2011\/10\/apache-shiro-application-security-made.html\">Apache Shiro : Application Security Made Easy<\/a> by our <a href=\"http:\/\/www.javacodegeeks.com\/p\/jcg.html\">JCG partner<\/a> Manoj at the&nbsp;<a href=\"http:\/\/khangaonkar.blogspot.com\/\">The Khangaonkar Report<\/a>&nbsp;blog<\/p>\n<p><strong>Related Articles:<\/strong><\/p>\n<ul style=\"text-align: left\">\n<li><a href=\"http:\/\/www.javacodegeeks.com\/2011\/10\/services-practices-tools-that-should_18.html\">Services, practices &amp; tools that should exist in any software development house, part 2<\/a><\/li>\n<li> <a href=\"http:\/\/www.javacodegeeks.com\/2010\/12\/securing-gwt-apps-with-spring-security.html\">Securing GWT apps with Spring Security<\/a><\/li>\n<li><a href=\"http:\/\/www.javacodegeeks.com\/2011\/09\/configuration-management-in-java-ee.html\">Configuration Management in Java EE<\/a><\/li>\n<li><a href=\"http:\/\/www.javacodegeeks.com\/2011\/07\/top-25-most-dangerous-software-errors.html\">Top 25 Most Dangerous Software Errors &#8211; 2011<\/a><\/li>\n<li><a href=\"http:\/\/www.javacodegeeks.com\/2011\/10\/spring-mvc-interceptors-example.html\">Spring MVC Interceptors Example<\/a><\/li>\n<li><a href=\"http:\/\/www.javacodegeeks.com\/2011\/09\/google-clientlogin-utility-in-java.html\">Google ClientLogin Utility in Java<\/a><\/li>\n<\/ul>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Considering that JAVA is over 10+ years old, the number of choices for application developers that need to build authentication and authorization into their applications is shockingly low. In JAVA &amp; J2EE, the JAAS specification was an attempt to address security. While JAAS works for authentication, the authorization part is just too cumbersome to use. &hellip;<\/p>\n","protected":false},"author":305,"featured_media":79,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[295,296,297],"class_list":["post-616","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-enterprise-java","tag-apache-shiro","tag-jaas","tag-security"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Apache Shiro : Application Security Made Easy - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"Considering that JAVA is over 10+ years old, the number of choices for application developers that need to build authentication and authorization into\" \/>\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\/2011\/10\/apache-shiro-application-security-made.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Apache Shiro : Application Security Made Easy - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"Considering that JAVA is over 10+ years old, the number of choices for application developers that need to build authentication and authorization into\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.javacodegeeks.com\/2011\/10\/apache-shiro-application-security-made.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=\"2011-10-19T14:56:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2012-10-21T20:26:36+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/apache-shiro-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=\"Manoj Khangaonkar\" \/>\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=\"Manoj Khangaonkar\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2011\\\/10\\\/apache-shiro-application-security-made.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2011\\\/10\\\/apache-shiro-application-security-made.html\"},\"author\":{\"name\":\"Manoj Khangaonkar\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/1b867f5998ce2a4a4c514239c96637fd\"},\"headline\":\"Apache Shiro : Application Security Made Easy\",\"datePublished\":\"2011-10-19T14:56:00+00:00\",\"dateModified\":\"2012-10-21T20:26:36+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2011\\\/10\\\/apache-shiro-application-security-made.html\"},\"wordCount\":978,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2011\\\/10\\\/apache-shiro-application-security-made.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/apache-shiro-logo.jpg\",\"keywords\":[\"Apache Shiro\",\"JAAS\",\"Security\"],\"articleSection\":[\"Enterprise Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2011\\\/10\\\/apache-shiro-application-security-made.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2011\\\/10\\\/apache-shiro-application-security-made.html\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2011\\\/10\\\/apache-shiro-application-security-made.html\",\"name\":\"Apache Shiro : Application Security Made Easy - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2011\\\/10\\\/apache-shiro-application-security-made.html#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2011\\\/10\\\/apache-shiro-application-security-made.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/apache-shiro-logo.jpg\",\"datePublished\":\"2011-10-19T14:56:00+00:00\",\"dateModified\":\"2012-10-21T20:26:36+00:00\",\"description\":\"Considering that JAVA is over 10+ years old, the number of choices for application developers that need to build authentication and authorization into\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2011\\\/10\\\/apache-shiro-application-security-made.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2011\\\/10\\\/apache-shiro-application-security-made.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2011\\\/10\\\/apache-shiro-application-security-made.html#primaryimage\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/apache-shiro-logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/apache-shiro-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2011\\\/10\\\/apache-shiro-application-security-made.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\":\"Apache Shiro : Application Security Made Easy\"}]},{\"@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\\\/1b867f5998ce2a4a4c514239c96637fd\",\"name\":\"Manoj Khangaonkar\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/56f9c038909f5c71f8a524fc672805e758a44d1fdb2ef98e7eed9c806a468f24?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/56f9c038909f5c71f8a524fc672805e758a44d1fdb2ef98e7eed9c806a468f24?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/56f9c038909f5c71f8a524fc672805e758a44d1fdb2ef98e7eed9c806a468f24?s=96&d=mm&r=g\",\"caption\":\"Manoj Khangaonkar\"},\"sameAs\":[\"http:\\\/\\\/khangaonkar.blogspot.com\\\/\"],\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/author\\\/Manoj-Khangaonkar\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Apache Shiro : Application Security Made Easy - Java Code Geeks","description":"Considering that JAVA is over 10+ years old, the number of choices for application developers that need to build authentication and authorization into","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\/2011\/10\/apache-shiro-application-security-made.html","og_locale":"en_US","og_type":"article","og_title":"Apache Shiro : Application Security Made Easy - Java Code Geeks","og_description":"Considering that JAVA is over 10+ years old, the number of choices for application developers that need to build authentication and authorization into","og_url":"https:\/\/www.javacodegeeks.com\/2011\/10\/apache-shiro-application-security-made.html","og_site_name":"Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2011-10-19T14:56:00+00:00","article_modified_time":"2012-10-21T20:26:36+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/apache-shiro-logo.jpg","type":"image\/jpeg"}],"author":"Manoj Khangaonkar","twitter_card":"summary_large_image","twitter_creator":"@javacodegeeks","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Manoj Khangaonkar","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.javacodegeeks.com\/2011\/10\/apache-shiro-application-security-made.html#article","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/2011\/10\/apache-shiro-application-security-made.html"},"author":{"name":"Manoj Khangaonkar","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/1b867f5998ce2a4a4c514239c96637fd"},"headline":"Apache Shiro : Application Security Made Easy","datePublished":"2011-10-19T14:56:00+00:00","dateModified":"2012-10-21T20:26:36+00:00","mainEntityOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2011\/10\/apache-shiro-application-security-made.html"},"wordCount":978,"commentCount":2,"publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2011\/10\/apache-shiro-application-security-made.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/apache-shiro-logo.jpg","keywords":["Apache Shiro","JAAS","Security"],"articleSection":["Enterprise Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.javacodegeeks.com\/2011\/10\/apache-shiro-application-security-made.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.javacodegeeks.com\/2011\/10\/apache-shiro-application-security-made.html","url":"https:\/\/www.javacodegeeks.com\/2011\/10\/apache-shiro-application-security-made.html","name":"Apache Shiro : Application Security Made Easy - Java Code Geeks","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2011\/10\/apache-shiro-application-security-made.html#primaryimage"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2011\/10\/apache-shiro-application-security-made.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/apache-shiro-logo.jpg","datePublished":"2011-10-19T14:56:00+00:00","dateModified":"2012-10-21T20:26:36+00:00","description":"Considering that JAVA is over 10+ years old, the number of choices for application developers that need to build authentication and authorization into","breadcrumb":{"@id":"https:\/\/www.javacodegeeks.com\/2011\/10\/apache-shiro-application-security-made.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.javacodegeeks.com\/2011\/10\/apache-shiro-application-security-made.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/2011\/10\/apache-shiro-application-security-made.html#primaryimage","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/apache-shiro-logo.jpg","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/apache-shiro-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.javacodegeeks.com\/2011\/10\/apache-shiro-application-security-made.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":"Apache Shiro : Application Security Made Easy"}]},{"@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\/1b867f5998ce2a4a4c514239c96637fd","name":"Manoj Khangaonkar","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/56f9c038909f5c71f8a524fc672805e758a44d1fdb2ef98e7eed9c806a468f24?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/56f9c038909f5c71f8a524fc672805e758a44d1fdb2ef98e7eed9c806a468f24?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/56f9c038909f5c71f8a524fc672805e758a44d1fdb2ef98e7eed9c806a468f24?s=96&d=mm&r=g","caption":"Manoj Khangaonkar"},"sameAs":["http:\/\/khangaonkar.blogspot.com\/"],"url":"https:\/\/www.javacodegeeks.com\/author\/Manoj-Khangaonkar"}]}},"_links":{"self":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/616","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\/305"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=616"}],"version-history":[{"count":0,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/616\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media\/79"}],"wp:attachment":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=616"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=616"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=616"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}