{"id":75662,"date":"2018-04-06T07:00:00","date_gmt":"2018-04-06T04:00:00","guid":{"rendered":"https:\/\/www.javacodegeeks.com\/?p=75662"},"modified":"2018-04-05T11:44:38","modified_gmt":"2018-04-05T08:44:38","slug":"java-ee-8-security-api-overview","status":"publish","type":"post","link":"https:\/\/www.javacodegeeks.com\/2018\/04\/java-ee-8-security-api-overview.html","title":{"rendered":"Java EE 8 Security API: Overview"},"content":{"rendered":"<h2>The New Security API<\/h2>\n<p>Probably, the single most significant new feature added to Java EE 8 is the new security API.<\/p>\n<p>The primary motivations for this new API were to\u00a0simplify, standardize and modernize the way security concerns are handled across containers and implementations. And they have done a great job.<\/p>\n<ul>\n<li>The configuration\u00a0of web authentication has been modernized thanks to <strong>three new annotations<\/strong> that make <em><strong>web.xml<\/strong><\/em> file declaration redundant.<\/li>\n<li>The new<b>\u00a0Security Context\u00a0<\/b>API standardizes the way the servlet and EJB container perform authentication and<\/li>\n<li>The new <b>Identity S<\/b><strong>tore<\/strong> abstraction to simplifies the use of identity stores.<\/li>\n<\/ul>\n<p>For now, let\u2019s look at the first of these new features.<\/p>\n<p><a href=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2018\/04\/Java-EE-8-The-New-Security-API-Overview-Series.png\"><img decoding=\"async\" class=\"size-full wp-image-75682 aligncenter\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2018\/04\/Java-EE-8-The-New-Security-API-Overview-Series.png\" alt=\"\" width=\"620\" height=\"264\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2018\/04\/Java-EE-8-The-New-Security-API-Overview-Series.png 620w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2018\/04\/Java-EE-8-The-New-Security-API-Overview-Series-300x128.png 300w\" sizes=\"(max-width: 620px) 100vw, 620px\" \/><\/a><\/p>\n<h3>Annotation-Driven Authentication Mechanism<\/h3>\n<p>This feature is all about configuring web security. Which traditional required XML declaration in the <em><strong>web.xml<\/strong><\/em> file.<\/p>\n<p>This is no longer\u00a0necessary, thanks to the\u00a0<strong><em>HttpAuthenticationMechanism\u00a0<\/em><\/strong>interface which represents an HTTP authentication and comes with three built-in CDI-enabled implementations each representing one of the three ways web security can be configured.<\/p>\n<p>They are trigger with the use of one of these annotations.<\/p>\n<pre class=\"brush:java\">@BasicAuthenticationMechanismDefinition\r\n@FormAuthenticationMechanismDefinition\r\n@CustomFormAuthenticationMechanismDefinition<\/pre>\n<p>They replicate the functionality of the classic HTTP basic authentication, form and custom form based authentication already available in the servlet container.<\/p>\n<p>For example,\u00a0to enable Basic authentication all that is necessary is to add the\u00a0<em><strong>BasicAuthenticationMechanismDefinition\u00a0<\/strong><\/em>annotation to your servlet and that\u2019s it.<\/p>\n<pre class=\"brush:java\">@BasicAuthenticationMechanismDefinition(realmName=\"${'user-realm'}\")\r\n@WebServlet(\"\/user\")\r\n@DeclareRoles({ \"admin\", \"user\", \"demo\" })\r\n@ServletSecurity(@HttpConstraint(rolesAllowed = \"user\"))\r\npublic class UserServlet extends HttpServlet { \u2026 }<\/pre>\n<p>You can now throw away your XML configurations and use one of these new annotations to drive web security.<\/p>\n<p>The next great feature of the security API is the Identity store abstraction.<\/p>\n<h3>Identity Store Abstraction<\/h3>\n<p>An identity store is a database that stores user identification data such as user name, group membership, and information used to verify credentials.<div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<p>The new Java EE Security API provides an identity store abstraction called <strong><em>IdentityStore<\/em><\/strong> which is used to interact with identity stores in order to authenticate users and retrieve group memberships and is akin to the <em><strong>JAAS LoginModule<\/strong><\/em> interface.<\/p>\n<p>It is intended that <strong><em>IdentityStore<\/em> <\/strong>is used by <strong><em>HttpAuthenticationMechanism<\/em> <\/strong>implementations, although that isn\u2019t a requirement. The <strong><em>IdentityStore<\/em> <\/strong>can stand separate and be used by any other authentication mechanism the application developer wishes.<\/p>\n<p>Nevertheless, the use of <strong><em>IdentityStore<\/em> <\/strong>and <strong><em>HttpAuthenticationMechanism<\/em> <\/strong>together enables an application to control the identity stores it uses for authentication in a portable and standard way and is the recommended way for most use case scenarios.<\/p>\n<p>Now, you are enabled to implement your own identity store by implementing the <strong><em>IdentityStore<\/em> <\/strong>interface or you can use one of the built-in<strong> <em>IdentityStore<\/em><\/strong> implementations for LDAP and relational databases. They are initialized by passing configuration details to the appropriate annotation <em><strong>@LdapIdentityStoreDefinition<\/strong><\/em> or <em><strong>@DataBaseIdentityStoreDefinition<\/strong><\/em>.<\/p>\n<p>Let\u2019s have a look a the use of a built-in identity store.<\/p>\n<p>The simplest identity store is the database store. It is configured via the\u00a0<em><strong>@DataBaseIdentityStoreDefinition <\/strong><\/em>annotation as shown below.<\/p>\n<pre class=\"brush:java\">@DatabaseIdentityStoreDefinition(\r\n\u00a0 dataSourceLookup = \"${'java:global\/permissions_db'}\",\r\n\u00a0 callerQuery = \"#{'select password from caller where name = ?'}\",\r\n\u00a0 groupsQuery = \r\n     \"select group_name from caller_groups where caller_name = ?\",\r\n\u00a0 hashAlgorithm = PasswordHash.class,\r\n\u00a0 priority = 10\r\n)\r\n@ApplicationScoped\r\n@Named\r\npublic class ApplicationConfig { ... }<\/pre>\n<p>The configuration options are fairly self-explanatory and should be familiar to you if you have configured a database definition.<\/p>\n<p>However, note the priority set to 10, this is used in case multiple identity stores are found by the runtime and determines the iteration order relative to other stores. Lower numbers have higher priority.<\/p>\n<p>Now let\u2019s take a look that the final new feature of the security API.<\/p>\n<h3>The Security Context<\/h3>\n<p>The goal of the security context is to provide consistent access to security context across the servlet and EJB containers.<\/p>\n<p>Currently, these containers implement security context objects inconsistently. For example, the servlet container provides an <strong><em>HttpServletRequest<\/em> <\/strong>instance on which the <em><strong>getUserPrincipal()<\/strong><\/em> method is called to obtain the user <strong><em>Principal<\/em><\/strong><em>,<\/em> and the EJB container provides the differently named <strong><em>EJBContext<\/em><\/strong> instance, on which the same named method is called. And likewise, to test if the user belongs to a certain role the method <em><strong>isUserRole() <\/strong><\/em>is called on the <strong><em>HttpServletRequest<\/em> <\/strong>instance and the <em><strong>isCallerInRole() <\/strong><\/em>is called on the <strong><em>EJBContext<\/em> <\/strong>instance.<\/p>\n<p>The <strong><em>SecurityContext<\/em> <\/strong>provides consistency across the Servlet and EJB container for obtaining this kind of information. It has five methods and none of which have default implementations.<\/p>\n<p><em><b>Principal getCallerPrincipal();\u00a0<\/b><\/em>Returns the platform-specific principal representing the name of the current authenticated user or null if the current caller is not authenticated.<\/p>\n<p><em><b>&lt;T extends Principal&gt; Set&lt;T&gt; getPrincipalsByType(Class&lt;T&gt; pType);\u00a0<\/b><\/em>Returns all <strong><em>Principal<\/em>s<\/strong> of the given type from the authenticated caller\u2019s <strong><em>Subject<\/em><\/strong><em>,<\/em> otherwise, an empty <strong><em>Set<\/em> <\/strong>is returned if neither the <strong><em>pType<\/em><\/strong> type is found or the current user is not authenticated.<\/p>\n<p><em><b>boolean isCallerInRole(String role);\u00a0<\/b><\/em>Determines whether or not the caller is included in the specified role otherwise it returns false if the user is not authorized.<\/p>\n<p><em><b>boolean hasAccessToWebResource(String resource, String\u2026 methods);\u00a0<\/b><\/em>Determines whether or not the caller has access to the given web resource via the methods provided.<\/p>\n<p><em><b>AuthenticationStatus authenticate(HttpServletRequest req, HttpServletResponse res, AuthenticationParameters param);\u00a0<\/b><\/em>Informs the container that it should start or continue an HTTP based authentication conversation with the caller. This method only works in the servlet container because of its dependence on the <strong><em>HttpServletRequest<\/em> <\/strong>and <strong><em>HttpServletResponse<\/em> <\/strong>instances.<\/p>\n<p>The security context is a CDI bean and therefore injectable into any class in the servlet and EJB container.<\/p>\n<pre class=\"brush:java\">@Inject\r\nprivate SecurityContext securityContext;<\/pre>\n<p>With the <strong><em>SecurityContext<\/em> <\/strong>instance in hand, you can call any of the methods to get access to context-aware security information.<\/p>\n<pre class=\"brush:java\">boolean hasAccess = securityContext  \r\n    .hasAccessToWebResource(\"\/secretServlet\", \"GET\");<\/pre>\n<p>Now that wraps up this overview of the security API, there is plenty more to know about the Security API.<\/p>\n<div class=\"attribution\">\n<table>\n<tbody>\n<tr>\n<td>Published on Java Code Geeks with permission by Alex Theedom, 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=\"https:\/\/readlearncode.com\/java-ee\/java-ee-8-security-api-overview\/\" target=\"_blank\" rel=\"noopener\">Java EE 8 Security API: Overview<\/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>The New Security API Probably, the single most significant new feature added to Java EE 8 is the new security API. The primary motivations for this new API were to\u00a0simplify, standardize and modernize the way security concerns are handled across containers and implementations. And they have done a great job. The configuration\u00a0of web authentication has &hellip;<\/p>\n","protected":false},"author":500,"featured_media":112,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[297],"class_list":["post-75662","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-enterprise-java","tag-security"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Java EE 8 Security API: Overview - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"The New Security API Probably, the single most significant new feature added to Java EE 8 is the new security API. The primary motivations for this new\" \/>\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\/2018\/04\/java-ee-8-security-api-overview.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Java EE 8 Security API: Overview - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"The New Security API Probably, the single most significant new feature added to Java EE 8 is the new security API. The primary motivations for this new\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.javacodegeeks.com\/2018\/04\/java-ee-8-security-api-overview.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:author\" content=\"http:\/\/www.facebook.com\/alex.theedom.j2ee\" \/>\n<meta property=\"article:published_time\" content=\"2018-04-06T04:00:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-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=\"Alex Theedom\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@alextheedom\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Alex Theedom\" \/>\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\\\/2018\\\/04\\\/java-ee-8-security-api-overview.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/04\\\/java-ee-8-security-api-overview.html\"},\"author\":{\"name\":\"Alex Theedom\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/39c928afe0429ad2d2742a8b79ec8bce\"},\"headline\":\"Java EE 8 Security API: Overview\",\"datePublished\":\"2018-04-06T04:00:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/04\\\/java-ee-8-security-api-overview.html\"},\"wordCount\":918,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/04\\\/java-ee-8-security-api-overview.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/enterprise-java-logo.jpg\",\"keywords\":[\"Security\"],\"articleSection\":[\"Enterprise Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/04\\\/java-ee-8-security-api-overview.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/04\\\/java-ee-8-security-api-overview.html\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/04\\\/java-ee-8-security-api-overview.html\",\"name\":\"Java EE 8 Security API: Overview - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/04\\\/java-ee-8-security-api-overview.html#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/04\\\/java-ee-8-security-api-overview.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/enterprise-java-logo.jpg\",\"datePublished\":\"2018-04-06T04:00:00+00:00\",\"description\":\"The New Security API Probably, the single most significant new feature added to Java EE 8 is the new security API. The primary motivations for this new\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/04\\\/java-ee-8-security-api-overview.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/04\\\/java-ee-8-security-api-overview.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/04\\\/java-ee-8-security-api-overview.html#primaryimage\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/enterprise-java-logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/enterprise-java-logo.jpg\",\"width\":150,\"height\":150,\"caption\":\"java-interview-questions-answers\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/04\\\/java-ee-8-security-api-overview.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\":\"Java EE 8 Security API: Overview\"}]},{\"@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\\\/39c928afe0429ad2d2742a8b79ec8bce\",\"name\":\"Alex Theedom\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/6d875f8b02b9be72e4dcae0e790c2edc5416eac63cad6e1474d370f884605062?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/6d875f8b02b9be72e4dcae0e790c2edc5416eac63cad6e1474d370f884605062?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/6d875f8b02b9be72e4dcae0e790c2edc5416eac63cad6e1474d370f884605062?s=96&d=mm&r=g\",\"caption\":\"Alex Theedom\"},\"description\":\"Alex Theedom is a Senior Java Developer and has recently played a pivotal role in the architectural design and development of a microservice based, custom built lottery and instant win game platform. Alex has experience of Java web application development in a diverse range of fields including finance, e-learning, lottery and software development. He is the co-author of Professional Java EE Design Patterns and many articles.\",\"sameAs\":[\"https:\\\/\\\/readlearncode.com\\\/\",\"http:\\\/\\\/www.facebook.com\\\/alex.theedom.j2ee\",\"http:\\\/\\\/www.linkedin.com\\\/pub\\\/alex-theedom\\\/42\\\/90b\\\/910\",\"https:\\\/\\\/x.com\\\/alextheedom\"],\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/author\\\/alex-theedom\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Java EE 8 Security API: Overview - Java Code Geeks","description":"The New Security API Probably, the single most significant new feature added to Java EE 8 is the new security API. The primary motivations for this new","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\/2018\/04\/java-ee-8-security-api-overview.html","og_locale":"en_US","og_type":"article","og_title":"Java EE 8 Security API: Overview - Java Code Geeks","og_description":"The New Security API Probably, the single most significant new feature added to Java EE 8 is the new security API. The primary motivations for this new","og_url":"https:\/\/www.javacodegeeks.com\/2018\/04\/java-ee-8-security-api-overview.html","og_site_name":"Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_author":"http:\/\/www.facebook.com\/alex.theedom.j2ee","article_published_time":"2018-04-06T04:00:00+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","type":"image\/jpeg"}],"author":"Alex Theedom","twitter_card":"summary_large_image","twitter_creator":"@alextheedom","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Alex Theedom","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.javacodegeeks.com\/2018\/04\/java-ee-8-security-api-overview.html#article","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/2018\/04\/java-ee-8-security-api-overview.html"},"author":{"name":"Alex Theedom","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/39c928afe0429ad2d2742a8b79ec8bce"},"headline":"Java EE 8 Security API: Overview","datePublished":"2018-04-06T04:00:00+00:00","mainEntityOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2018\/04\/java-ee-8-security-api-overview.html"},"wordCount":918,"commentCount":0,"publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2018\/04\/java-ee-8-security-api-overview.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","keywords":["Security"],"articleSection":["Enterprise Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.javacodegeeks.com\/2018\/04\/java-ee-8-security-api-overview.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.javacodegeeks.com\/2018\/04\/java-ee-8-security-api-overview.html","url":"https:\/\/www.javacodegeeks.com\/2018\/04\/java-ee-8-security-api-overview.html","name":"Java EE 8 Security API: Overview - Java Code Geeks","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2018\/04\/java-ee-8-security-api-overview.html#primaryimage"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2018\/04\/java-ee-8-security-api-overview.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","datePublished":"2018-04-06T04:00:00+00:00","description":"The New Security API Probably, the single most significant new feature added to Java EE 8 is the new security API. The primary motivations for this new","breadcrumb":{"@id":"https:\/\/www.javacodegeeks.com\/2018\/04\/java-ee-8-security-api-overview.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.javacodegeeks.com\/2018\/04\/java-ee-8-security-api-overview.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/2018\/04\/java-ee-8-security-api-overview.html#primaryimage","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","width":150,"height":150,"caption":"java-interview-questions-answers"},{"@type":"BreadcrumbList","@id":"https:\/\/www.javacodegeeks.com\/2018\/04\/java-ee-8-security-api-overview.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":"Java EE 8 Security API: Overview"}]},{"@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\/39c928afe0429ad2d2742a8b79ec8bce","name":"Alex Theedom","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/6d875f8b02b9be72e4dcae0e790c2edc5416eac63cad6e1474d370f884605062?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/6d875f8b02b9be72e4dcae0e790c2edc5416eac63cad6e1474d370f884605062?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/6d875f8b02b9be72e4dcae0e790c2edc5416eac63cad6e1474d370f884605062?s=96&d=mm&r=g","caption":"Alex Theedom"},"description":"Alex Theedom is a Senior Java Developer and has recently played a pivotal role in the architectural design and development of a microservice based, custom built lottery and instant win game platform. Alex has experience of Java web application development in a diverse range of fields including finance, e-learning, lottery and software development. He is the co-author of Professional Java EE Design Patterns and many articles.","sameAs":["https:\/\/readlearncode.com\/","http:\/\/www.facebook.com\/alex.theedom.j2ee","http:\/\/www.linkedin.com\/pub\/alex-theedom\/42\/90b\/910","https:\/\/x.com\/alextheedom"],"url":"https:\/\/www.javacodegeeks.com\/author\/alex-theedom"}]}},"_links":{"self":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/75662","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\/500"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=75662"}],"version-history":[{"count":0,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/75662\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media\/112"}],"wp:attachment":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=75662"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=75662"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=75662"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}