On Premise : Unable to access API
Issue | Unable to access API On Premise |
Nature | Bug |
Component impacted | API, Eridanis |
Version impacted | 2.7.0 |
Solution offered | IIS rewrite rule |
Ressources | Script |
Issue description:
Known Issue 2.7.0 only on premise
Following your update to version 2.7.0, you notice that your API access using "platform.url.com/API" is unreachable
- interface path: n / A
- Actual Behavior: On premise API access is unreachable
To restore access to the API, you must write an IIS rule using the script that we provide you:
By executing this script on the Security Engine Node machine, you will be able to rewrite IIS rule and restore API access:
Function Set-UrlRewriteRule {
[CmdletBinding()]
param (
[Parameter(Mandatory = $false)]
$iisSite = "iis:\sites\Default Web Site",
[Parameter(Mandatory = $false)]
$servicePort,
[Parameter(Mandatory = $true)]
$rewriteRuleName,
[Parameter(Mandatory = $false)]
$rewriteRuleRoot = "system.webServer/rewrite/rules/rule[@name='$rewriteRuleName']",
[Parameter(Mandatory = $true)]
$rewriteRulePattern,
[Parameter(Mandatory = $true)]
$rewriteRuleAction
)
Add-WebConfigurationProperty -pspath $iisSite -filter "system.webServer/rewrite/rules" -name "." -value @{name = $rewriteRuleName + $_ ; patternSyntax = 'Regular Expressions'; stopProcessing = 'False' }
Set-WebConfigurationProperty -pspath $iisSite -filter "$rewriteRuleRoot/match" -name "url" -value $rewriteRulePattern
Set-WebConfigurationProperty -pspath $iisSite -filter "$rewriteRuleRoot/conditions" -name "logicalGrouping" -value "MatchAny"
Set-WebConfigurationProperty -pspath $iisSite -filter "$rewriteRuleRoot/action" -name "type" -value "Rewrite"
Set-WebConfigurationProperty -pspath $iisSite -filter "$rewriteRuleRoot/action" -name "url" -value $rewriteRuleAction
}
## Api Assert Rule
Set-UrlRewriteRule -rewriteRuleName "Api" `
-rewriteRulePattern "/api/?(.*)" `
-rewriteRuleAction "http://127.0.0.1:3000/{R:1}"
Resolution criterias :
Your API access is reachable.
<Next Step > A fix will be made on the next minor version
Add New Comment