Setup for Totalview Authentication¶
To enable Totalview Authentication for Totalview Time you need to have a valid installation of Totalview Suite 2021 or newer running with Totalview Authentication.
Setup Server¶
Find Totalview Time server folder and open the config file called “TimeServer.exe.config” and set these fields.
Finally restart the server.
Example of the .config file:
<configuration>
...
<appSettings>
...
<!-- OAuth -->
<add key="OAuthEnabled" value="true"/>
<add key="Authority" value="https://formula.totalview.cloud/TotalviewAuthentication"/>
<add key="ApiSecret" value="secret"/>
</appSettings>
</configuration>
Setup Client¶
Find Totalview Time client folder and open the config file called “TotalviewTimeClient.exe.config” and set these fields.
Finally increment the tv_version in the .config file at line 2. If this doesn’t exist then add it like this
<?xml version="1.0" encoding="utf-8"?>
<!-- tv_version=1.0.0.0 -->
<configuration>
...
<appSettings>
...
<!-- OAuth -->
<add key="OAuthEnabled" value="true"/>
<add key="Authority" value="https://formula.totalview.cloud/TotalviewAuthentication"/>
<add key="ClientSecret" value="secret"/>
</appSettings>
</configuration>
Setup Time Admin¶
Find Totalview Time Admin folder and open the config file called “Web.config” and set these fields.
In the Web.config file Change the Authentication Mode to None
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<appSettings>
<add key="UseTotalviewAuthentication" value="true" />
<add key="Authority" value="https://formula.totalview.cloud/TotalviewAuthentication"/>
<add key="ClientSecret" value="secret"/>
<add key="RedirectUri" value="https://formula.totalview.cloud/Time/LoginResultCallback.aspx"/>
<add key="PostLogoutRedirectUri" value="https://formula.totalview.cloud/Time"/>
</appSettings>
...
</configuration>
Go to the Totalview Database and in the “ClientRedirectUris” and “ClientPostLogoutRedirectUris” tables update the registered urls for the Totalview Time Admin client. They should be the same as registered in the Web.Config
Setup Reports¶
Generate client secret¶
This will generate the value for a client secrete ‘secret’, and can be inserted into the ClientSecrets table.
DECLARE @HASHBYTES VARBINARY(128) = hashbytes('sha2_256', 'secret')
SELECT cast(N'' as xml).value('xs:base64Binary(sql:variable("@HASHBYTES"))', 'varchar(128)');