INTEGRAL Web Server Configuration Keywords
Jump directly to:
WEBSRV_ENABLE_AUTHCODE_GET
WEBSRV_ENABLE_AUTHCODE_SET
These two keywords can be used to protect INTEGRAL Web Server's system commands from accidental unauthorized access. WEBSRV_ENABLE_AUTHCODE_GET protects any system commands that display the state of the web server while WEBSRV_ENABLE_AUTHCODE_SET protects any system commands that modify the state of the web server. In both cases, the value of the keyword is a private access token that must be included in the query string of the requested system command in order for that command to be executed. If an incorrect access token is specified in the query string, the command is not executed and instead the 401 UNAUTHORIZED error page is returned.
If the value of the WEBSRV_ENABLE_AUTHCODE_GET keyword is an empty string, access token verification is disabled for all system commands that display the state of INTEGRAL Web Server. Similarly, if the value of the WEBSRV_ENABLE_AUTHCODE_SET keyword is an empty string, access token verification is disabled for all system commands that modify the state of INTEGRAL Web Server.
Example 1
Let's assume you want to execute the server_info.sys command using the following URL:
http://localhost:9881/server_info.sys
This command shows web server information, so it can be protected from unauthorized access using the WEBSRV_ENABLE_AUTHCODE_GET keyword.
!WEBSRV_ENABLE_AUTHCODE_GET=MySecretCode123
With the WEBSRV_ENABLE_AUTHCODE_GET keyword set as above, this command can only be executed using the following URL:
http://localhost:9881/server_info.sys?MySecretCode123
If the query string is empty or has any other value, the 401 UNAUTHORIZED error page will be returned instead.
Example 2
Let's assume you want to execute the server_clear_cache.sys command using the following URL:
http://localhost:9881/server_clear_cache.sys
This command modifies the state of the web server (clears its cache), so it can be protected from unauthorized access using the WEBSRV_ENABLE_AUTHCODE_SET keyword.
!WEBSRV_ENABLE_AUTHCODE_SET=P32AQ2143E8PU3A
With the WEBSRV_ENABLE_AUTHCODE_SET keyword set as above, this command can only be executed using the following URL:
http://localhost:9881/server_clear_cache.sys?P32AQ2143E8PU3A
If the query string is empty or has any other value, the 401 UNAUTHORIZED error page will be returned instead.