Set up access to Application API (IIS)
After you have created API endpoints, you can access data in Intrexx externally, via a smartphone app, for example.
Authorization is required to access the Intrexx Application API. This will only be done against Intrexx. It is not possible to use the Windows authentication integrated in the IIS is for authorization in the Intrexx Application API.
The following is a description of how to proceed if you are using IIS with built-in Windows authentication.
Baseline scenario
This description is relevant for you under the following conditions:
-
You are running Intrexx under Windows.
-
You are using IIS (Internet Information Service) as the front-end web server.
-
You are using the Windows authentication built into IIS.
-
You are using the Intrexx Application API.
(Compare also the sections Intrexx architecture and Windows - Configure IIS (Internet Information Services)))
Authentication to the Intrexx Application API
Authentication to the Intrexx Application API is not possible via the Windows authentication integrated in the IIS. Instead, you must set up anonymous access for the Intrexx Application API in the IIS. In this case, the authentication only takes place against Intrexx. This is possible either via the API key (Authentication via API keys) or via the API login (Authentication via API login endpoint and cookies (without API key))).
Key steps
-
Create directories in the portal directory
-
Define settings for authentication in IIS
-
The file belonging to the portal web.config customize
-
The file associated with Windows applicationHost.config customize
-
Delete the previously created directories in the portal directory
Set up anonymous access in IIS
Step-by-step guide
To set up anonymous access to the Intrexx Application API in IIS, proceed as follows:
-
Start the windows explorer.
-
Create the directory "api" in the portal directory under "external > htmlroot" and create the directory "app" in the api directory.
The directory structure should look like this:
<intrexx-installation-directory>\org\<portal directory>\external\htmlroot\api\app
-
Start IIS.
-
Highlight the "api" directory .
-
Double-click on "Authentication" .
You will reach "Authentication".
-
For "Anonymous Authentication", set the status to "Enabled".
-
Set all other authentication entries to "Disabled".
-
Proceed in the same way as the "app" directory.
-
Go back to the window explorer.
-
Change to the directory<intrexx-installation-directory>\org\<portal directory>\external\htmlroot.
web.config
-
Open the "web.config" file.
-
Add the following code before the closing tag </configuration> into the file:
<location path="api"> <!-- relative to where the web.config file is located --> <system.web> <authorization> <allow users="*" /> </authorization> </system.web> <system.webServer> <security> <authentication> <windowsAuthentication enabled="false" /> <anonymousAuthentication enabled="true" /> </authentication> </security> </system.webServer> </location>
-
Then save the file.
-
Change to the directory %WinDir%\System32\Inetsrv\Config.
ApplicationHost.config
-
Open the ApplicationHost.config file.
-
Set the following properties of the <sectionGroup name="security"> or <sectionGroup name="authentication"> from "Deny" to "Allow":
<section name="access" overrideModeDefault="Allow" /> <section name="anonymousAuthentication" overrideModeDefault="Allow" /> <section name="windowsAuthentication" overrideModeDefault="Allow" />
-
Then save the file.
-
Restart IIS.
-
Delete the "api" and "app" directories previously created in the portal directory at "external > htmlroot".
More information