Oauth client creation is failing | Community
Skip to main content
akhilraj
Level 5
December 22, 2022
Solved

Oauth client creation is failing

  • December 22, 2022
  • 1 reply
  • 1181 views

Hi,

 

We are using adobe 6.5.0 SP10 version in our servers and we are trying to configure Oauth authorization mechanism for third parties to consume our services/servlets and currently we have implemented SAML SSO authentication which is working fine for end users.

 

For third parties to consume our servlet we started configuring Oauth implementation as suggested by few documents.

https://medium.com/tech-learnings/how-to-manage-the-protected-aem-resources-through-oauth-2-0-851ce4c7a5ef

In local we are able to proceed, but in our servers, when we create oauth client we are getting below error.

 

the "oauth:clientIdHmac" value not saving while creating client as well as it is showing some error if we try to add manually as well.

Due to this, even the node under admin/oauth also not creating.

 

Any idea, what is the problem here?

 

 

 

Best answer by akhilraj

Issue is fixed by importing nodetype.cnd for oauth:client

1 reply

akhilraj
akhilrajAuthor
Level 5
December 29, 2022

Hi,

 

In our old 6.1 AEM instance Oauth client creation is working.

But we are currently using AEM 6.5 SP 10 on prem instance where the creation of Oauth client is failing.

Suspecting that something happened during upgrade but unable to figure out what is the problem.

Any help ?

 

28.12.2022 23:03:08.725 *ERROR* [10.213.102.122 [1672297388723] POST /home/users/a/admin/oauth/ HTTP/1.1] org.apache.sling.servlets.post.impl.operations.ModifyOperation Exception during response processing.
java.lang.IllegalArgumentException: Value for key oauth:clientIdHmac can't be put into node: uA0ISZ62lZuiQ7FZawp7OUMyUL4SLiQnm9A8q-BMeYc
at org.apache.sling.jcr.resource.internal.JcrModifiableValueMap.put(JcrModifiableValueMap.java:458) [org.apache.sling.jcr.resource:3.0.18]

 

Caused by: javax.jcr.nodetype.ConstraintViolationException: No matching property definition: oauth:clientIdHmac = uA0ISZ62lZuiQ7FZawp7OUMyUL4SLiQnm9A8q-BMeYc
at org.apache.jackrabbit.oak.jcr.delegate.NodeDelegate.setProperty(NodeDelegate.java:519) [org.apache.jackrabbit.oak-jcr:1.22.8]

akhilraj
akhilrajAuthor
Level 5
January 19, 2023

Any hint would be really helpful

akhilraj
akhilrajAuthorAccepted solution
Level 5
January 23, 2023

Issue is fixed by importing nodetype.cnd for oauth:client