Overview
Authentication Methods
AEM 6.5 supports two primary authentication methods for external integrations:OAuth 2.0 (Preferred)
Recommended approach offering fine-grained access control through custom OAuth scopes. Provides better security, audit trails, and permission management.
Basic Authentication
Secondary option using username/password credentials. Simpler to implement but less secure and granular than OAuth.
Integration Steps
1
Configure Adobe Granite OAuth Server Authentication Handler
What this step does: Configures AEM to prioritize OAuth authentication over other authentication methods.
Determine the OAuth Module Ranking
- Navigate to
<AEM-HOST>:<PORT>/system/console/jaas - You will see a list of registered LoginModules
- Note the highest ranking number in the list - you’ll need to set the OAuth ranking higher than this value
Configure the OAuth Handler
- Navigate to
<AEM-HOST>:<PORT>/system/console/configMgr - Find “Adobe Granite OAuth Server Authentication Handler” in the list and click to edit
- Ensure the values are as follows:
- Path:
/ - jaas.controlFlag:
sufficient - jaas.realmName:
jackrabbit.oak - jaas.ranking: Set this to a value higher than the largest number in the LoginModules list (e.g., if the highest is 2001, use 2002 or higher)
- Offline Validation:
checked
- Path:
2
Configure oauthservice User Account
What this step does: Configures the system user that AEM uses to manage OAuth token operations and scope validation.About the oauthservice UserThe
oauthservice is a built-in system user provided by Adobe that AEM creates to handle OAuth token operations. This user requires elevated permissions to create and apply permissions for scoped requests.Access the Permissions Console
Navigate to<AEM-HOST>:<PORT>/security/permissions.html/principal/oauthservice?filter=userAdd Required ACEs (Access Control Entries)
Configure the following permissions for the oauthservice user:Path:/- Privileges:
jcr:versionManagement,jcr:modifyAccessControl,jcr:lockManagement,jcr:readAccessControl,jcr:read
/content- Privileges:
rep:write
The oauthservice user must have elevated permissions above the authenticated OAuth token user, as it is responsible for creating and applying permissions for scoped requests.
3
Configure OAuth Client
What this step does: Creates the OAuth client configuration that Gradial will use to authenticate with AEM.
Create the OAuth Client
- Navigate to
<AEM-HOST>:<PORT>/libs/granite/oauth/content/clients.html - Click “Create” in the top right corner
- Enter the following values:
- Name:
Gradial - Redirect URI:
https://www.gradial.com/api/v1/auth/aem65/oauth2/callback
- Name:
- Click “Save”
Retrieve OAuth Credentials
- Click into the newly created OAuth Client
- Note the following values (you’ll need to provide these to Gradial):
- Client ID
- Client Secret
- Click “Download Private Key” and securely save the file
You will need to provide the Client ID, Client Secret, and Private Key to your Gradial representative during the integration setup process.
4
Configure OAuth Scopes
What this step does: Deploys the OAuth scopes that define what permissions Gradial can request from AEM.You can deploy custom scopes by following the structure of the existing scope OSGI configuration files.
Gradial OAuth Scopes Package
Gradial provides an easy, effective method for deploying and updating OAuth scopes without custom Java development.Installation Options:- GitHub Repository: https://github.com/gradial/gradial-65-oauth
- Release Package: Download Release Installation
If you prefer not to use Gradial’s package, you can deploy your own custom OAuth scopes as part of your AEM package install. See the GitHub repository for examples of OSGI configuration files.
Scope Configuration
Each OAuth scope is defined by an OSGI configuration file stored in:Default Scopes
By default, Gradial installs aread_all scope that provides read access to all system paths required for operation:/apps- Component and application definitions/libs- System libraries/etc- Legacy configurations/conf- Context-aware configurations/var- Variable content (optional, required when workflow execution is needed)
We highly recommend keeping the
read_all scope in place. You can further limit the paths Gradial can access during the onboarding process.Gradial OAuth Scope Definitions
The following table defines the standard OAuth scopes provided by Gradial:| Scope Name | Resource Path | Privileges |
|---|---|---|
launch_author | /content/launches | jcr:read, rep:write, jcr:lockManagement, jcr:versionManagement |
publish_assets | /content/dam | jcr:read, jcr:addChildNodes, crx:replicate |
read_all | / | jcr:read |
site_author | /content | jcr:read, rep:write, jcr:lockManagement, jcr:versionManagement |
site_xf_author | /content/experience-fragments | jcr:read, rep:write, jcr:lockManagement, jcr:versionManagement |
tags_author | /content/cq:tags | jcr:read, rep:write, crx:replicate, jcr:versionManagement |
upload_assets | /content/dam | jcr:read, rep:write, jcr:lockManagement, jcr:versionManagement |
Custom Scopes for Multi-Site Environments
If you need custom scopes for specific sites or permission boundaries, you can create additional scope configurations. For example:- Site-specific author scopes:
/content/sitea,/content/siteb - Experience Fragment scopes:
/content/experience-fragments/sitea - Custom content paths:
/content/dam/myproject
5
Testing
What this step does: Validates that your OAuth configuration is working correctly by testing scope authorization.Replace the placeholders:
Test OAuth Scopes
To test your OAuth configuration and scopes, open the OAuth consent URL in a browser:<AEM-HOST>:<PORT>- Your AEM author instance URLCLIENT_ID- The Client ID from Step 3SCOPE1 SCOPE2- Space-separated list of scopes to test (e.g.,read_all site_author upload_assets)REDIRECT_URI- The redirect URI configured in Step 3
Expected Behavior
- You should see a consent dialog displaying each requested scope
- After authorizing, the browser should redirect to the redirect URI with an authorization code in the URL
- If the authenticating user lacks permissions for the requested scopes, no authorization code will be returned
Need Help?
Contact your Gradial representative for additional support with your AEM 6.5 integration.