Replacing the UGC Moderation Web service Web application with a standalone UGC Moderation Service microservice
This is the recommended way to upgrade the UGC Moderation Service.
Procedure
- From the WEB-INF/classes/ subdirectory of your Java/JSP Web application, copy all files to a backup location.
- On the SDL Web installation media, access Content Delivery\roles\ugc\service-moderation\.
- Copy the standalone\ folder in this location, including its files and subfolders, to a location of your choice, and rename it to moderationservice.
- Only if you modified your logback.xml file, merge the contents of your backed-up logback.xml file with the file by the same name in the config\ subfolder of the moderationservice\ folder.
- Restore your remaining backed-up configuration files to the config\ folder
- In the configuration location, open the following files for editing:
- cd_webservice_conf.xml
- cd_storage_conf.xml
- cd_ambient_conf.xml
- From cd_webservice_conf.xml, copy the section called
<OData>, with all of its contents, to your clipboard. - In cd_storage_conf.xml, place your cursor before the
<License>section and paste the copied code. - Save and close cd_storage_conf.xml.
- From cd_webservice_conf.xml, copy the sections called
<AuthenticationServer>and<Accounts>, with all of their contents, to your clipboard. - In cd_ambient_conf.xml, place your cursor inside the
<Security>section, before the<Rules>subsection or, if there is no<Rules>subsection, just before the closing tag</Security>, and then paste the copied code. - If you use OAuth authentication, add an
OAuthEnabledattribute to theSecurityelement and set it totrue. - If you use OAuth authentication, add the following subelement inside the
Securityelement:<RequestValidator>com.sdl.web.oauth.validator.OAuth2RequestValidator</RequestValidator> - If you use OAuth authentication, cut the
<SharedSecret>element out of yourSecuritysection and paste it inside the<AuthenticationServer>section you just pasted from cd_webservice_conf.xml, replacing any<SharedSecret>element that is already there. - Add the following
Claimelements to your<GloballyAcceptedClaims>section:<Claim Uri="taf:tracking:id"/> <Claim Uri="taf:claim:contentdelivery:webservice:user"/> <Claim Uri="taf:claim:contentdelivery:webservice:post:allowed"/> - Remove all
Pathelements inside the<ExcludedPaths>section, and add the followingPathelement:<Path>/token.svc</Path> - In your
Cartridgeelement for the UGC Cartridge, add a new attribute calledCategoryand set it tosystem, so that the element looks like this:<Cartridge Category="system" File="ugc_ambient_cartridge_conf.xml" /> - Inside the
<Cookies>section, add the following subelement:<Cookie Type="ADF" Name="TAFContext" /> - Save and close cd_ambient_conf.xml.
- Close cd_webservice_conf.xml. You can now delete this file.
- Proceed to install UGC Moderation Service as a standalone microservice.
- Installing the UGC Moderation service as a microservice
Run the appropriate microservice installation PowerShell or Unix script to install and run the standalone microservice.