Symptom
After upgrading to the SAP Commerce Cloud JDK21 version, the deprecated Spring Security OAuth library has been replaced by Spring Security, resulting in breaking changes to authentication in the SmartEdit web application. This article mainly introduces how to implement SmartEdit on the new version and prevent unwanted behaviors such as the following ones:
- FIRST SCENARIO
- After entering the credentials to login to SmartEdit, the page shows "Authorization not granted—Invalid request" as below:
- Checking in OpenSearch, can find the error message like below:
-
org.springframework.web.client.HttpClientErrorException$Unauthorized: 401 on GET request for "https://127.0.0.1:8088/smarteditwebservices/v1/configurations": "{<EOL> "errors" : [ {<EOL> "message" : "The application has encountered an error",<EOL> "type" : "InsufficientAuthenticationError"<EOL> } ]<EOL>}"
-
- After entering the credentials to login to SmartEdit, the page shows "Authorization not granted—Invalid request" as below:
- SECOND SCENARIO
- After the upgrade and trying to log in to SmartEdit, the page shows "HTTP Status 404 - Not Found":
- Checking in the Network tab of the developer tools of the browser, one can find the request and response similar to below:
GET https://backoffice.*****-*****-**-public.model-t.cc.commerce.ondemand.com/authorizationserver/oauth/authorize?client_id=smartedit&response_type=code&code_challenge=DGRslEYVrWdho-2FLP2qJaCP_9cnsNMtR4mrcOu90Q4&code_challenge_method=S256&scope=basic%20permissionswebservices
GETclient_id: smartedit
response_type: code
code_challenge: DGRslEYVrWdho-2FLP2qJaCP_9cnsNMtR4mrcOu90Q4
code_challenge_method: S256
scope: basic permissionswebservices
- After the upgrade and trying to log in to SmartEdit, the page shows "HTTP Status 404 - Not Found":
"Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental."
Read more...
Environment
SAP Commerce Cloud 2211 for JDK21
Product
Keywords
Smartedit, flow, JDK21, deploy, upgrade, build, OAuth, authorizationserver, resourceserver , KBA , CEC-SCC-COM-SEDIT , SmartEdit , How To
About this page
This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP for Me (Login required).Search for additional results
Visit SAP Support Portal's SAP Notes and KBA Search.
SAP Knowledge Base Article - Preview