Unable to create an Oauth client using a local account
Hi,
I'm trying to create a servlet to create an Oauth client using a local account. This servlet works in one scenario and doesnt work in another scenario, I want to know what im missing.
Scenario 1 (Which works):
For this scenario, lets say I used local account - oauthserviceuser1
Step1: Manual Creation: When I login to aem using a local account and go to /libs/granite/oauth/content/clients.html, and click on the create button, I am able to create an Oauth client and able to download the private key for that Oauth client. This creates a node under /home/users/oauth for the new oauth client created and also generates a store.p12 file.
Step 2: Call the Servlet to create another Oauth Client: The servlet I created, which calls the following endpoints is Successful. This also creates a node under /home/users/oauth for the new Oauth client created and also generates a store.p12 file.
1. GET - http://localhost:4505/libs/granite/oauth/content/newclient.html - this generates the client id, client secret, clientIdHmac
2. POST - http://localhost:4505/home/users/a/a-dwp3ZMviewbq5WiNrW/oauth/ - this uses the previously generated client id, client secret, clientIdHmac to create an Oauth client. (Here the /a/a-dwp3ZMviewbq5WiNrW is the local account user that I want to use to create Oauth client).
Scenario 2 (which doesn't work):
For this scenario, let's say I used local account - oauthserviceuser2.
(Note that in this scenario, I'm not doing a manual creation of Oauth client prior to calling my servlet)
Step 1: Calling the servlet to create Oauth client: The servlet I created, which calls the following endpoints is successful. But it doesn't create a node in /home/users/oauth and also doesn't generate a store.p12 file.
I want to understand what permissions are being added in scenario 1, step 1, which further enables the servlet calls to be successful. Looks like this is an ACL issue, but not able to figure out the exact permissions required. Any help would be appreciated.
Thanks for patiently reading till the end.