How to set up and configure Gradial with Adobe Experience Manager (AEM) 6.5
Create an OAuth Client
<AEM-HOST>/libs/granite/oauth/content/clients.html
, click Createhttps://www.gradial.com/api/v1/auth/aem65/oauth2/callback
Define Custom OAuth Scopes
ExampleScope.java - Complete Implementation
/content/dam
/
for component/template definitions, dynamic media publishing, etc./content/launches
/content/cq:tags
/content/dam
/content/sitea
but not /content/siteb
SiteAAuthorScope
, SiteBExperienceFragmentScope
)RESOURCE_URI
and privilege combinations/content/sitea
but the authenticating user lacks permissions to that path, OAuth authorization will fail..config
filesConfigure User Permissions
/apps
- Application configurations and components/bin
- Binary servlets and utilities/conf
- Configuration settings/content
- All content areas/libs
- System libraries/content/launches
- For launch-based workflows (default)/content/<your-website-path>
- Direct content modification (if not using launches)/content/dam
- Digital Asset Management operations/content/cq:tags
- Tag managementjcr:versionManagement
on /content/launches
- Required for version control operations on launchesjcr:lockManagement
on relevant paths - Required for content locking during edits/content/mysite
, ensure the user has author permissions for that path<AEM-HOST>:<PORT>/security/permissions.html
Configure oauthservice System User Permissions
oauthservice
is a built-in system user that AEM creates to handle OAuth token operations. This user must have enhanced permissions beyond regular users to manage access control for OAuth scopes./apps
, /bin
, /conf
, /content
, /etc
, /home
, /libs
, /var
/content/launches
, /content/dam
, /content/cq:tags
, or your specific site pathsjcr:versionManagement
, jcr:lockManagement
jcr:readAccessControl
- Read permission metadata and access control listsjcr:modifyAccessControl
- Modify access control for OAuth scope validation<AEM-HOST>:<PORT>/security/permissions.html/principal/oauthservice?filter=user
jcr:readAccessControl
and jcr:modifyAccessControl
are presentConfigure OAuth Server Authentication Handler
<AEM-HOST>:<PORT>/system/console/configMgr
Property | Value | Purpose |
---|---|---|
jaas.ranking | 1100 | Sets priority over other auth handlers |
jaas.controlFlag | sufficient | Allows OAuth to satisfy auth requirements |
oauth.offline.validation | true | Enables token validation without callbacks |
jaas.realmName | jackrabbit.oak | Specifies the security realm |
path | / | Applies OAuth to all paths |
jaas.ranking
field1100
(or higher if you have custom auth handlers with high rankings)jaas.controlFlag
to sufficient
oauth.offline.validation
to true
jaas.realmName
: Use jackrabbit.oak
(AEM’s default security realm)path
: Set to /
to apply OAuth authentication to all AEM paths.config
file format:jaas.ranking
values may cause OAuth authentication to be bypassed. Ensure the ranking is higher than other authentication handlers.Configure Service-to-Service (2-Legged)
Testing