User Guide: AMF Security version 2.6.0 for VST-VRT

# Customizing site content for Redirect-URL Action

Site Content for Redirect-URL Action
HTML file content
Dictionary file for multilingual support
Site customization example

You can customize the in-site text and logo for Redirect-URL Action of AMF Application Proxy.
To customize, create content for any site and upload it to AMF Security.
The content of the created site is not included in the AMF Security system settings backup file, so manage and save it separately.
Site content can be uploaded and downloaded on the AMF > Redirect-URL Settings page. In addition, the content is prepared even in the initial state and can be downloaded. By editing the content in the initial state, you can customize it more easily than creating a new one.
Site content must:

- Save the character encoding as "UTF-8 without BOM". If you save with other character encoding, the site may not be displayed properly.
- Use only alphanumeric characters, hyphens, and underscores in file names.
- Arrange the content of the site to be uploaded according to the file structure described later and compress it in ZIP format.
- Use only alphanumeric characters, hyphens, and underscores in the filename of the ZIP file.

### Site Content for Redirect-URL Action

The contents of the site content for Redirect-URL Action in the initial state are as follows.

- index.html (site HTML file) [required]
- i18n.json (dictionary file for multilingual support)
- index.css
- img (folder containing image files)
  - at-logo.svg
  - favicon.png

> Note

> > When the "Enable Web site for quarantined device." check box on the AMF > Redirect-URL Settings page is checked, the default site content for Redirect-URL Action can be obtained from the "Download" button in "Customize Site Content".

Web accesses from terminals to which Redirect-URL Action is applied are forwarded to AMF Security from the product that supports Redirect-URL Action. At that time, the contents of the index.html file are displayed in the terminal's web browser. So make sure to include the index.html file in your site content. Also, the dictionary file i18n.json is required for multilingual site content.

### HTML file content

HTML files such as index.html are written in the HTML language just like a general website, but the following special keywords are provided to display device information.

Table 1: Keywords
Keyword | Display content
--- | ---
{{mac}} | Device MAC Address
{{status}} | Terminal state
{{reason}} | Device quarantine reason
{{i18n['<keyword>']}} | Dictionary entries for multilingual support

By writing the above keywords anywhere in the HTML file, when AMF Security receives access from a terminal to which Redirect-URL Action is applied, the keyword is replaced with the corresponding terminal information and displayed.

### Dictionary file for multilingual support

In order to make the site compatible with multiple languages, describe the dictionary data in the following format in i18n.json.
Below are examples of descriptions in English and Japanese.

    {
      "en": {
        "mac": "MAC Address",
        "reason": "Reason for quarantine"
        },
      "ja": {
        "mac": "MAC Address",
        "reason": "reason for quarantine"
      },
    }

As shown above, this description is divided into blocks for each language ("en" and "ja"), and each block contains dictionary items.
Also, by describing the i18n keyword anywhere in index.html, AMF Security embeds and displays the dictionary item corresponding to the keyword.
◼ Examples

      <div>
        <p>{{i18n['reason']}}: {{i18n['msgAuthFailed']}}</p>
      </div>

### Site customization example

This is the procedure for editing the initial site content and changing the message and logo.

> Note

> > Save the files (i18n.json and index.html) to be edited in the following procedure with "UTF-8 without BOM" character encoding.

1. Go to the AMF > Redirect-URL Settings page.
2. Check the "Enable Web site for quarantined device" checkbox and click the "Submit" button.

   > Note

   > > Once the site is activated, the item "Customize Site Content" becomes operable.

3. Click the "Download" button in "Customize Site Content" to download the initial site content.
4. Unzip the downloaded site content to any folder.
5. Change the message on your site.
   Open i18n.json, rewrite the "message" item in the "ja" block and "en" block to any text, and save.
6. Next, change the logo within the site.
   Save the image file under the img folder. Use only alphanumeric characters, hyphens, and underscores in file names.
7. Open index.html, change the following to the name of the saved image file, and save it.

         <div class="title">
           <img class="logo" src="/img/<logo_file_name>"><span class="product">AMF Security</span>
         </div>

8. Upload customized site content.
   Make sure index.html is included in your customized site content.
   Compress it in ZIP format so that the hierarchy of the site content is the same as the structure described in "Site content for Redirect-URL Action".
   Use only alphanumeric characters, hyphens, and underscores in file names.
9. Click the Upload button on the AMF > Redirect-URL Settings page to display the "Upload the customized Web page" dialog.
   Click the "Choose File" button to select the site content file and click the "Submit" button.
10. Click "Sample page of Web Site" at the bottom of the page to make sure your customized site content is displayed correctly.

Site customization is complete.

02 Aug 2024 15:10