i4connected Knowledgebase 5.6

Setting up the Web App portal

Abstract

Check out this article in order to build your i4connected Web App portal in order to store and manipulate data that will be used by you and your team.

The i4connected Web App portal is the interactive program built with web technologies (HTML, CSS, JS) storing and manipulating data which you and your team will be using to perform tasks over the internet.

In order to set it up, please follow the below described steps:

  1. Open the i4connected app folder and identify the Index.html file. Open the file using an editor tool and configure it as follows:

    1. Set the window.remoteUrl;

      Tip

      The window.remoteUrl needs to end in the "/" character.

      For example: http://192.168.0.xxx/i4/

    2. Set the script src for /signalr/hubs to the HTTP address of the API site.

  2. Next, open the Internet Information Services (IIS) application and expand the Connections tree structure in order to reach the Application Pools node.

  3. Right click on the node and select the Add Application Pool option.

    Add_App_Pool.jpg
  4. In the Add Application Pool dialog fill in the following settings:

    Add_Application_pool.jpg
    1. Name - name of the new i4connected Application Pool, dedicated for the i4connected Web Server.

    2. .NET CLR version - select .NET CLR Version v4.0.30319.

    3. Managed pipeline mode - select the Integrated option.

    4. Click the OK button to save the new Application Pool.

  5. In case the SQL Server will be accessed on a different Server, the Identity setting should be changed to point to a User which has access to the Analysis Services of the SQL Server. In our case it’s the previously mentioned “ServiceUser” Account. To proceed with this change, please follow these steps:

    Identity.jpg
    1. Select the new Application Pool in the list view via click-right. Select the Advanced Settings option.

    2. In the Advanced Settings dialog set the respective user under the Identity setting.

  6. Also in the Internet Information Services application select the Sites node via click-right. Select the Add Website option.

  7. In the Add Website dialog fill in the following settings:

    1. Site name - the name of the new Site.

    2. Application Pool - click the Select button and add the Application Pool you created at step 4.

    3. Physical path - use the Browse For Folder selector to apply the i4connected WEB folder (which is most commonly copied to wwwroot).

The i4connected API
Abstract

Check out this article and learn how to set up your i4connected API by going through the tutorials we have carefully prepared for you.

Setting up Internet Information Services
Abstract

Check out this article and learn how to deploy the i4connected portal on your working machine, by mapping the portal folder to IIS.

The first step when installing the i4connected application API consists in mapping the portal folder to IIS and converted to the application, through a custom application pool, by following the below described steps:

  1. Save the contents of the portal folder in the desired place on the hard drive. It is advisable not to use a very long folder path for storing the portal's files.

  2. Open the Internet Information Services (IIS) Manager and expand the Connections tree structure in order to reach the Application Pools node.

  3. Right click on the node and select the Add Application Pool option.

    Add_App_Pool.jpg
  4. In the Add Application Pool dialog fill in the following settings:

    Create_App_pool.jpg
    1. Name - name of the new i4connected Application Pool. For the current tutorial we will use the "DWH API" name.

    2. .NET CLR version - select No Managed Code option.

    3. Managed pipeline mode - select the Integrated option.

  5. Click the OK button to save the new Application Pool.

  6. Select the new Application Pool in the list view via right click. Select the Advanced Settings option.

  7. In the Advanced Settings dialog set the Load User Profile option to TRUE.

    Load_User_Profile.jpg

    Tip

    If you access the SQL Server on a different Server, then you need to set the Identity to a User which has access to the Analysis Services of the SQL Server. In our case it’s the previously mentioned" ServiceUser” account.

  8. Next, select the i4connected Website and select the Add Application option.

    Add_Application.jpg
  9. In the Add Application dialog configure the new application as follows:

    i4connected_application.jpg
    1. Alias - the alias of the IIS application (for example: "i4").

    2. Application pool - click the Select button and add the Application Pool you created at step 4.

    3. Physical path - use the Browse For Folder selector to apply the i4connected API folder.

    4. Next, click the OK button to save your changes.

After processing the above changes at level of the Internet Information Services (IIS) application, we need to edit the Web.config file from the portal's folder in order to communicate with the Analysis Services and the SQL Database, as follows:

  1. Open the i4connected API folder and identify the WEBfactory.DWH.Web.Core.exe.config file and edit the connection strings.

  2. Next, open the App.config file and edit the correct connection strings for SSAS and SQL.

  3. Open the appsettings.json file and set the "Authority" to the URL of the API site, using the same protocol (http or https).

    Tip

    The API Site URL should not end with the "/" character.

    For example: http://192.168.0.xxx/i4

  4. When installing an i4connected 5.5.20 version, you can set an optional property named "IssuerUri" in the appsettings.json file. The issuer name should be set to the one appearing in the discovery document and the issued JWT tokens.

    Tip

    Organising this step could be useful if a Server is behind a Proxy.

  5. Further on, if a proxy is needed to reach the internet you can add the following into the WEBfactory.DWH.Web.Core.exe.configfile directly in front of the <runtime> definitions:

       <system.net>
            <defaultProxy
    enabled="true">
            <proxy
    bypassonlocal="true"
                proxyaddress="http://ip_oder_name:Port/" />
            </defaultProxy>       
        </system.net>
    
  6. In order to get a working swagger documentation, it is necessary to edit the redirect URL of the API in the database, as follows:

    1. Open the Database in the SSMS and go to the table ClientRedirectUris.

    2. Open the table in edit mode and change the row with the ClientId 3 to use the ip/name of the API.

      Tip

      For example: http://192.168.0.xxx/i4/docs/oauth2-redirect.html

Installing the API Printing service
Abstract

Check out this tutorial in order to learn how to set up the printing service for your i4connected database and how to install the Chromium software.

The i4connected Printing service is based on the Chromium software so it is recommended to install it on the machine where it is accessible to the ASP.NET Core application. Please follow up the below described steps in order that you set up you Printing service:

  1. Download Chromium software from here and install it on the machine where the i4connected installation is available.

    Note

    For the present tutorial we are using the 706915 Chromium version and we downloaded the chrome-win.zip archive.

  2. Next, open Microsoft SQL Server manager Studio and connect to the database server. Open the Settings table by means of right-click and Edit Top 200 Rows.

    Settings_table.jpg
  3. Identify the feature.printing .executablePath setting.

    Table.jpg
  4. Make sure that the value of the is the feature.printing .executablePath setting is the absolute path to the chrome.exe .

    Tip

    The print sub-directory needs to be in the api directory.

    For example: C:/Program Files (x86)/Chromium/Application/chrome.exe

  5. In order to check your settings, open the i4connected application and try to print the contents of a panel, using the designated function.

    Print.jpg
  6. The PDF document will be downloaded directly in the browser.

    PDF_doc.jpg
Setting up External providers
Abstract

Check out this article and learn how to enable multiple external providers such as Facebook, Twitter, Google, Microsoft and Custom OpenID Connect.

The i4connected application gives users the freedom to chose which Identity Provider they use to sign into the portal. Before moving on with this guide, let's clarify what is an Identity Provider?

An Identity provider is a service that creates and maintains identity information in order to provide authentication services to the i4connected application. This function can significantly reduce sign-in and registration friction, which allows the users to easily access the application without needing to create new passwords or remember usernames.

The i4connected application allows the user to add social authentication connections (using the Facebook and Twitter providers) as well as built in-house connections (using the Custom OpenID Connect protocol).

Basically, the user can sign in the i4connected applications using their credentials from the following supported external providers:

  • Facebook

  • Twitter

  • Google

  • Microsoft

  • Custom OpenID Connect

In order to configure an external provider, please follow the below described steps:

  1. Open a File Explorer window and locate the appsettings.json file under the i4connected_app api folder.

    appsettings.jpg
  2. Open the appsettings.json file using an editor tool.

  3. Under the Authentication line the supported external providers are listed.

  4. Replace the null value with the requested information and save the appsettings.json file changes.

    Authentication_providers.jpg

Tip

Please also check our tutorial describing the steps needed to enable Login via an External Provider.

Here are the settings required to enable the i4connected external providers:

Table 1. Facebook provider

Property

Description

AppId

The unique identification number of your Facebook application account.

AppSecret

The secret key of your Facebook application account.



Table 2. Twitter provider

Property

Description

ConsumerKey

The unique identification key of you Twitter application account.

ConsumerSecret

The secret key of your Twitter application account.



Table 3. Google provider

Property

Description

ClientId

The unique number used to identify your Google account.

ClientSecret

The secret key of your Google account.



Table 4. Microsoft provider

Property

Description

ApplicationId

The unique identification number of your Microsoft application.

Password

The Client secret (application password) consisting of a secret string that the application uses to prove its identity when requesting a token.



Table 5. Custom OpenID Connect provider

Property

Description

ClientId

The unique number of the client for which all tokens must be issued.

ClientSecret

The secret key of the client.

Authority

The URL used to identify the client.

Name

The name of the client that will be displayed in the application.

ResponseType

The type of response can be:

  • code - The requester would like an Authorization Code to be returned to them.

  • token - The requester would like an Access Token to be returned to them.

  • id_token - The requester would like an ID Token to be returned to them.

  • none - The requester does not want any of the above to be returned to them. The “none” response type is a special case in that it can not be combined with any of the others.

    The other three can be combined in any way, hence requesting all of the details for the combination that was specified. For example:

    • code token - The requester would like both an Authorization Code and an Access Token to be returned to them.

    • code id_token - The requester would like both an Authorization Code and an ID Token to be returned to them.

    • id_token token - The requester would like both an ID Token and an Access Token to be returned to them.

    • code id_token token - The requester would like an Authorization Code, an ID Token and an Access Token to be returned to them.

ResponseMode

The mode of the response can be:

  • query - The Authorization Response parameters are encoded in the query string added to the redirect_uri when redirecting back to the client.

  • fragment - The Authorization Response parameters are encoded in the fragment and added to the redirect_uri when redirecting back to the client.

  • form_post - The Authorization Response parameters are encoded as HTML form values that are auto-submitted in the User-agent, and thus are transmitted via the HTTP POST method to the client, with the result parameters being encoded in the body using the application/x-www-form-urlencoded format.

MetadataAddress

Optionally, allows the user to set a discovery endpoint address for obtaining metadata.

Scopes

Optionally, allows the user to list additional permissions which the i4connected system requests from the external identity provider. For instance, the configured identity provider user email address. The Scopes array should be added between square brackets and each scope should be added between double quotes.



Setting up RabbitMQ for Effective permissions
Abstract

In order that the i4connected effective permissions to be applied to your i4connected portal please follow the RabbitMQ installation and configuration guidelines.

Important

The Effective permissions feature is only available for i4connected 5.6 version. If your application version is lower, these steps are not needed.

The new i4connected security model enforces a new set of permissions, also known as Effective Permissions. The API settings for them, are stored under the appsettings.json file and can be customised by the user, as follows:

  1. Open the i4connected API folder and identify the appsettings.json file.

  2. Open the appsettings.json file with an editor tool and proceed with the following settings, under the Effective Permissions section:

    Note

    In case no custom changes are needed, RabbitMQ Server will take the default values for Effective Permissions, which are:

    Effective_permissions_API.jpg
    • RabbitMqUri - amqp://localhost

    • RabbitMqExchange - effective.permissions

    • RabbitMqQueueName - effectivePermissions

    • ConfirmPublishTimeout - 30sec

    However, in case the RabbitMQ Server will be used for more than one i4connected installation, these settings need to be customised for each i4connected setup.

    1. RabbitMQUri - the Url pointing towards the RabbitMQ Server.

      Tip

      The Url will be formatted as follows: amqp://user:password@host:port/vh.

    2. RabbitMQEXchange - name of the RabbitMQ Exchange.

      Important

      In case you are using your own RabbitMQ server, please provide WEBfactory team with the name of your RabbitMQ Exchange.

      Please also make sure that yourRabbitMQ Exchange meets the following requirements:

      • Exchange Type - Direct

      • Exchange Durability - Durable

      • Exchange Auto delete - No

    3. RabbitMqQueueName - the name of the Queue configured in the RabbitMQ Server application.

    4. ConfirmPublishTimeout - the custom timeout value for confirming the data publishing.

  3. Make sure that the respective lines are enabled (uncommented).

Installing the i4messenger MobileApp
Abstract

Check out these article and learn how to install the i4messenger MobileApp by setting up and deploying the application portal.

As the i4messenger MobileApp is an add-on to the i4connected platform, it will be delivered as a separate file of the installation pack (i4messenger_web.zip).

Important

After processing the steps described below, please proceed to the i4messenger MobileApp dedicated article.

Prerequisites

In order for the i4messenger MobileApp to properly communicate with the i4connected portal, the following prerequisites must be met:

  • i4connected 5.5 or higher

Setting up Internet Information Services
  1. Save the contents of the i4messenger_web folder in the desired place on the hard drive. It is advisable not to use a very long folder path for storing the files.

  2. Open the Internet Information Services (IIS) Manager and expand the Connections tree structure in order to reach the Application Pools node.

  3. Right click on the node and select the Add Application Pool option.

    2.jpg
  4. In the Add Application Pool dialog fill in the following settings:

    Add_app_pool.jpg
    1. Name – name of the i4messenger Application Pool.

    2. .NET CLR version – select No Managed Code option

    3. Managed pipeline mode – select the Integrated option

  5. Click the OK button to save the new Application Pool.

  6. Next, select the i4connected Website and select the Add Application option.

    Add_application_IIS.jpg
  7. In the Add Application dialog fill in the followings:

    Add_website.jpg
    1. Alias – the alias of the IIS application (for example: „i4messenger_app“

    2. Application pool: click the Select button and apply the i4messenger Application Pool created at step 4.

    3. Psychical path – use the Browse For Folder selector to apply the i4mesenger_web folder.

    4. Next, click OK button to save your changes.

Setting up the i4connected transmission settings

In order to set up the i4connected transmission settings, please proceed as follows:

  1. Log into the i4connected portal.

    Important

    The user should have the Manage messenger permission enabled.

  2. Open the Notification Profile List panel and click on the Transmission settings toolbar button.

    Notif_profile_list_panel.jpg
  3. In the Transmission settings panel, make sure that the Server Root URL points towards the current i4connected server.

  4. Click the bottom Save button in order to preserve your changes and you are good to go!