{"id":6327,"date":"2019-04-18T13:21:19","date_gmt":"2019-04-18T07:51:19","guid":{"rendered":"\/?p=6327"},"modified":"2021-06-15T12:14:29","modified_gmt":"2021-06-15T06:44:29","slug":"ensure-service-user-an-acs-aem-commons-utility","status":"publish","type":"post","link":"https:\/\/www.argildx.us\/technology\/ensure-service-user-an-acs-aem-commons-utility\/","title":{"rendered":"Ensure Service User \u2013 An ACS AEM Commons Utility"},"content":{"rendered":"\n

Prior to AEM 6.2, developers used administrative resource resolver to access JCR programmatically.<\/span><\/span> Now, Ensure Service User in AEM will make the process less error prone and easier to manage.<\/span><\/p>\n

Problem <\/span><\/b>S<\/span><\/b>tatement:<\/span><\/b> <\/span><\/h5>\n

Let us assume that a developer needs to access the resource from content path programmatically. Before AEM 6.2, administrative resource resolver was one of the ways to achieve the same. <\/span>In<\/span> <\/span>addition to<\/span> providing access to the content path(s)<\/span>,<\/span> administrative resource resolver provides access to the complete repository <\/span>thereby<\/span> <\/span>mak<\/span><\/i>ing<\/span><\/i> the application prone to making undesired changes<\/span><\/i> (e.g. nodes under \/libs, \/apps etc.).<\/span> <\/span><\/p>\n

Since AEM 6.2, administrative resource resolver <\/span>has<\/span> <\/span>been <\/span>deprecated by Adobe and to address the above <\/span>issue <\/span>Adobe introduced \u201cService User\u201d. <\/span> <\/span><\/p>\n

Service User:<\/span><\/b> <\/span><\/h5>\n

A service user is a JCR user with no <\/span>set <\/span>password and <\/span>limited<\/span> privileges necessary to perform a specific task. <\/span>N<\/span>o password <\/span>requirement <\/span>means that it will not be possible to login with a service user.<\/span> <\/span><\/p>\n

JCR<\/span> is a<\/span>ccess<\/span>ed<\/span> <\/span>us<\/span>i<\/span>ng s<\/span>ervice users<\/span> i<\/span>nstead of the administrative resource resolver.<\/span> <\/span><\/p>\n

Below are <\/span>two<\/span> plu<\/span>s<\/span> points about Service User.<\/span> <\/span><\/p>\n