2024 Jul 11 8:02 AM - edited 2024 Jul 11 8:04 AM
SAP Commerce Cloud version: 2205
In a SAP Infrastructure Assessment for our SAP Commerce Cloud system, SAP recommended for us to delete expired OAuthRefreshTokens using an OOTB cleanOAuthRefreshTokenCronJob. SAP says it can be found in the oauth2 extension. But, I can't find this in SAP Commerce Cloud 2205 code. I can't also find it in SAP Help nor in SAP for Me (KBA).
It is supposed to look something like this:
INSERT_UPDATE CronJob;
code[unique=true];job(code);singleExecutable;sessionLanguage(isocode)
;cleanOAuthRefreshTokenCronJob;cleanupOAuthRefreshTokenPerformable;false;de
INSERT_UPDATE Trigger;cronjob(code)[unique=true];cronExpression
; cleanOAuthRefreshTokenCronJob; 0 0/5 * ? * * *
Has cleanOAuthRefreshTokenCronJob been deprecated or removed?
Request clarification before answering.
Hi @geffchang
It's in the latest Commerce Cloud 2211 version.
You can find the Impex scripts at hybris/bin/platform/ext/oauth2/resources/impex/essentialdata-cleanup-oauthrefreshtoken.impex, and the Job implementation at hybris/bin/platform/ext/oauth2/resources/oauth2-spring.xml.
Here are the screenshot taken from my Commerce Cloud 2211 instance.
CronJob item
Job item
Hope it helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
NO. It is not Deprecated.
https://help.sap.com/doc/789b8a6e1434444da824c2493c6faaa0/2211.4/en-US/de/hybris/platform/oauth2/job...
You can find the respective strategy (de.hybris.platform.oauth2.jobs.maintenance.impl.CleanUpOAuthRefreshTokenStrategy) here oauth2-spring.xml.
The below impex should enable the job.
{code}
INSERT_UPDATE MaintenanceCleanupJob;code[unique=true];springId[unique=true];active[default=true]
;cleanupOAuthRefreshTokenPerformable;cleanupOAuthRefreshTokenPerformable;false
INSERT_UPDATE CronJob;code[unique=true];job(code);sessionLanguage(isoCode)[default=en]
;CleanUpAccessTokenJob;cleanupOAuthRefreshTokenPerformable
INSERT_UPDATE Trigger; cronJob(code)[unique = true]; second; minute; hour; day; month; year ; relative; active; maxAcceptableDelay
; CleanUpAccessTokenJob ; 0 ;1 ; -1 ; -1 ; -1 ; -1 ; false ; true ; -1
{code}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
22 | |
15 | |
4 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.